/*
Theme Name: MOVISART Dashboard
Version: 12.0
*/

:root {
    --accent: #007aa3;
    --accent-deep: #005f7d;
    --accent-soft: #e6f4f8;
    --highlight: #ffcc00;
    --highlight-deep: #d6aa00;
    --sidebar-bg: #4d4d4d;
    --sidebar-bg-deep: #3f3f3f;
    --panel: transparent;
    --panel-strong: #ffffff;
    --panel-border: transparent;
    --text: #1f2a30;
    --text-soft: #69767d;
    --text-inverse: #f5f7f8;
    --success: #3bb273;
    --shadow-lg: 0 24px 60px rgba(53, 64, 70, 0.14);
    --shadow-md: 0 14px 35px rgba(53, 64, 70, 0.1);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --w-sidebar: 300px;
    --w-collapsed: 88px;
    --content-width: 1120px;
}

html {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background:
        radial-gradient(circle at top left, rgba(0, 122, 163, 0.12), transparent 28%),
        radial-gradient(circle at bottom right, rgba(255, 204, 0, 0.12), transparent 24%),
        linear-gradient(135deg, #f7f8f8 0%, #eef2f3 58%, #e4eaec 100%);
    color: var(--text);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Source Sans 3", sans-serif;
    color: var(--text);
    background: transparent;
}

.app-shell {
    min-height: 100vh;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

body.admin-bar {
    min-height: calc(100vh - 32px);
}

.app-container {
    position: relative;
    display: flex;
    min-height: 100vh;
    width: 100%;
    box-sizing: border-box;
}

.admin-bar .app-container {
    min-height: calc(100vh - 32px);
}

@media screen and (max-width: 782px) {
    .admin-bar .app-container {
        min-height: calc(100vh - 46px);
    }

    .admin-bar #movisart-sidebar {
        top: 46px;
        height: calc(100vh - 46px);
    }
}

#movisart-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    width: var(--w-sidebar);
    height: 100vh;
    color: var(--text-inverse);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 14%),
        linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-deep) 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 10px 0 40px rgba(11, 18, 32, 0.15);
    transition: width 0.28s ease, transform 0.28s ease;
    z-index: 20;
    flex-shrink: 0;
}

#movisart-sidebar.collapsed {
    width: var(--w-collapsed);
}

#movisart-sidebar.collapsed ~ .main-content {
    margin-left: var(--w-collapsed);
}

.admin-bar #movisart-sidebar {
    top: 32px;
    height: calc(100vh - 32px);
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 84px;
    padding: 0 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.logo-area,
.custom-logo-link {
    display: inline-flex !important;
    align-items: center !important;
    color: #fff;
    font-family: "Manrope", sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-decoration: none;
    text-transform: uppercase;
}

.custom-logo-link img,
.logo-full img {
    display: block;
    max-width: 150px;
    max-height: 42px;
    width: auto;
    object-fit: contain;
}

.logo-mini {
    display: none;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    padding: 0;
    color: inherit;
    border-radius: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.logo-mini img {
    max-width: 44px;
    max-height: 44px;
}

.logo-mini-fallback {
    font-family: "Manrope", sans-serif;
    font-weight: 800;
    color: #fff;
}

.collapse-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-left: auto;
    padding: 0;
    color: var(--highlight);
    background: transparent;
    border: 0;
    border-radius: 10px;
    box-shadow: none;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.collapse-btn:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

.collapse-btn svg {
    width: 22px;
    fill: currentColor;
    transition: transform 0.28s ease;
}

.sidebar-nav {
    flex: 1;
    padding: 18px 14px;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 8px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
}

.menu-list,
.menu-list ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.menu-list li + li {
    margin-top: 6px;
}

.menu-list a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    border-radius: 10px;
    color: rgba(245, 247, 248, 0.88);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.menu-list li {
    max-width: 100%;
}

.menu-list a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    transform: none;
}

.menu-list .current-menu-item > a,
.menu-list .current_page_item > a,
.menu-list .current-menu-ancestor > a {
    color: #fff;
    margin-right: -14px;
    margin-left: -14px;
    padding-right: 30px;
    padding-left: 30px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(0, 122, 163, 0.34), rgba(0, 122, 163, 0.16));
    transform: none;
}

.sidebar-footer {
    position: relative;
    padding: 18px 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(10px);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.user-avatar img {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.user-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.u-login {
    color: var(--highlight);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.u-name {
    color: #fff;
    font-size: 0.96rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.u-email {
    color: rgba(239, 243, 248, 0.62);
    font-size: 0.82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-dropdown {
    position: absolute;
    right: 16px;
    bottom: calc(100% + 12px);
    left: 16px;
    display: none;
    overflow: hidden;
    background: #575757;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    box-shadow: var(--shadow-md);
    z-index: 50;
}

.user-dropdown.show {
    display: block;
}

.user-dropdown ul,
.user-dropdown li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.user-dropdown a {
    display: block;
    padding: 14px 16px;
    color: rgba(239, 243, 248, 0.92);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.user-dropdown a:hover {
    color: #fff;
    background: rgba(0, 122, 163, 0.22);
}

.logout-link {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffd966 !important;
}

.login-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.72rem 0.95rem;
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    background: rgba(0, 122, 163, 0.22);
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.login-link:hover {
    color: #ffffff;
    background: rgba(0, 122, 163, 0.34);
}

#movisart-sidebar.collapsed .logo-full,
#movisart-sidebar.collapsed .user-meta,
#movisart-sidebar.collapsed #user-menu-toggle,
#movisart-sidebar.collapsed .menu-list .movisart-menu-item__label,
#movisart-sidebar.collapsed .menu-list .movisart-menu-item__text {
    display: none !important;
}

#movisart-sidebar.collapsed .menu-list a {
    justify-content: center;
}

#movisart-sidebar.collapsed .menu-list .movisart-menu-item__icon {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

#movisart-sidebar.collapsed .logo-mini {
    display: inline-flex;
}

#movisart-sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding-right: 0;
    padding-left: 0;
}

#movisart-sidebar.collapsed .sidebar-nav {
    padding-right: 10px;
    padding-left: 10px;
}

#movisart-sidebar.collapsed .menu-list a {
    justify-content: center;
    padding-right: 12px;
    padding-left: 12px;
}

#movisart-sidebar.collapsed .menu-list a::before {
    margin-right: 0;
}

#movisart-sidebar.collapsed .user-card {
    justify-content: center;
}

#movisart-sidebar.collapsed #toggle-sidebar {
    display: none;
}

#movisart-sidebar.collapsed #toggle-sidebar svg {
    transform: rotate(180deg);
}

.main-content {
    flex: 1;
    min-width: 0;
    margin-left: var(--w-sidebar);
    padding: 42px;
    min-height: 100vh;
    overflow-y: auto;
    transition: margin-left 0.28s ease;
}

.content-panel {
    position: relative;
    max-width: var(--content-width);
    margin: 0 auto;
}

.content-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    padding: 0 0 22px;
    margin-bottom: 22px;
    color: var(--text);
    background: transparent;
    border-bottom: 1px solid rgba(77, 77, 77, 0.12);
}

.content-hero__copy {
    position: relative;
    z-index: 1;
    max-width: 760px;
}

.content-hero__eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    padding: 0;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
}

.content-hero__title {
    margin: 0;
    font-family: "Manrope", sans-serif;
    font-size: clamp(2rem, 3vw, 3.5rem);
    line-height: 1.04;
    letter-spacing: -0.04em;
    color: var(--accent);
}

.content-hero__description {
    max-width: 62ch;
    margin: 14px 0 0;
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--text-soft);
}

.content-hero__badge {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    border-radius: 26px;
    font-family: "Manrope", sans-serif;
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--accent);
    background: rgba(0, 122, 163, 0.06);
    border: 1px solid rgba(0, 122, 163, 0.12);
}

.content-stack {
    display: grid;
    gap: 22px;
}

.entry-card {
    padding: 18px 0 24px;
    background: var(--panel);
    border: 0;
    border-bottom: 1px solid rgba(77, 77, 77, 0.12);
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
}

.entry-card--empty {
    text-align: center;
    padding-top: 8px;
}

.entry-card--single {
    padding-top: 8px;
}

.entry-header {
    margin-bottom: 18px;
}

.entry-header--detail {
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(77, 77, 77, 0.08);
}

.entry-title {
    margin: 0;
    font-family: "Manrope", sans-serif;
    font-size: clamp(1.5rem, 2vw, 2rem);
    line-height: 1.12;
    letter-spacing: -0.03em;
    color: var(--accent);
}

.entry-title a {
    text-decoration: none;
}

.entry-title a:hover {
    color: var(--accent-deep);
}

.entry-summary,
.entry-meta {
    color: var(--text-soft);
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.92rem;
    font-weight: 600;
}

.entry-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    background: transparent;
    border-radius: 999px;
}

.entry-content {
    font-size: 1.03rem;
    line-height: 1.75;
    color: #334249;
}

.entry-content > :first-child {
    margin-top: 0;
}

.entry-content > :last-child {
    margin-bottom: 0;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin-top: 2.1em;
    margin-bottom: 0.65em;
    font-family: "Manrope", sans-serif;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--accent);
}

.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content blockquote {
    margin-bottom: 1.15em;
}

.entry-content ul,
.entry-content ol {
    padding-left: 1.4em;
}

.entry-content li + li {
    margin-top: 0.45em;
}

.entry-content blockquote {
    padding: 18px 22px;
    color: #3d4c53;
    background: rgba(255, 204, 0, 0.08);
    border-left: 4px solid var(--highlight);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.entry-content a {
    color: var(--accent-deep);
    font-weight: 700;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.2em;
}

.entry-actions {
    margin-top: 1.5rem;
    margin-bottom: 0;
}

.button-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0.9rem 1.2rem;
    color: #fff !important;
    font-weight: 700;
    text-decoration: none !important;
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    border-radius: 999px;
    box-shadow: 0 12px 24px rgba(0, 122, 163, 0.24);
}

.button-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(0, 122, 163, 0.3);
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 0;
}

.entry-content th,
.entry-content td {
    padding: 12px 14px;
    border: 1px solid rgba(16, 24, 38, 0.08);
    text-align: left;
}

.entry-content th {
    background: rgba(77, 77, 77, 0.04);
}

.entry-content code {
    padding: 0.2em 0.45em;
    font-size: 0.92em;
    background: rgba(0, 122, 163, 0.08);
    border-radius: 8px;
}

.entry-content pre {
    padding: 20px;
    color: #f7fafb;
    background: #4d4d4d;
    border-radius: 18px;
    overflow: auto;
}

.wp-block-image img,
.entry-content img {
    border-radius: 12px;
    box-shadow: none;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 1200px) {
    .main-content {
        padding: 28px;
    }

    .content-hero {
        padding-bottom: 20px;
    }
}

@media (max-width: 960px) {
    #movisart-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        transform: translateX(-100%);
        width: min(320px, calc(100vw - 28px));
        min-height: 100vh;
        height: 100vh;
    }

    #movisart-sidebar.is-open {
        transform: translateX(0);
    }

    #movisart-sidebar.is-mobile .logo-mini {
        display: none !important;
    }

    #movisart-sidebar.collapsed ~ .main-content {
        margin-left: 0;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    body.sidebar-open::before {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(11, 18, 32, 0.42);
        backdrop-filter: blur(2px);
        z-index: 10;
    }

    .main-content {
        margin-left: 0;
        padding: 22px;
    }

    .content-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .content-hero__badge {
        width: 72px;
        height: 72px;
    }
}

@media (max-width: 640px) {
    .main-content {
        padding: 16px;
    }

    .content-hero {
        padding-bottom: 18px;
        margin-bottom: 18px;
    }

    .entry-card {
        padding: 16px 0 20px;
    }

    .entry-meta {
        gap: 8px;
    }

    .entry-meta span {
        width: 100%;
        justify-content: flex-start;
    }
}