:root {
    --app-bg: #f4f6fb;
    --app-card: rgba(255, 255, 255, 0.88);
    --app-line: rgba(25, 35, 60, 0.09);
    --app-text: #172033;
    --app-muted: #697386;
    --app-primary: #3559e8;
    --app-primary-soft: rgba(53, 89, 232, 0.10);
    --app-shadow: 0 14px 40px rgba(30, 45, 80, 0.08);
}

.app-body {
    background:
        radial-gradient(circle at 10% 0%, rgba(107, 132, 255, 0.10), transparent 30%),
        radial-gradient(circle at 95% 20%, rgba(95, 190, 220, 0.08), transparent 28%),
        var(--app-bg);
    color: var(--app-text);
}

.app-body .sidebar {
    background: rgba(255, 255, 255, 0.82);
    border-right: 1px solid var(--app-line);
    box-shadow: 8px 0 35px rgba(35, 50, 90, 0.04);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
}

.app-body .sidebar-header {
    padding: 24px 22px 18px;
    border-bottom: 1px solid var(--app-line);
}

.app-body .sidebar-nav {
    padding: 14px 12px;
}

.app-body .nav-label {
    margin: 18px 10px 7px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #8b94a7;
}

.app-body .sidebar-nav a,
.app-body .sidebar-logout {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    min-height: 44px;
    padding: 9px 12px;
    border: 0;
    border-radius: 12px;
    color: #59657a;
    background: transparent;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.app-body .sidebar-nav a:hover,
.app-body .sidebar-logout:hover {
    color: var(--app-text);
    background: rgba(53, 89, 232, 0.06);
}

.app-body .sidebar-nav a.is-active {
    color: var(--app-primary);
    background: var(--app-primary-soft);
    font-weight: 750;
}

.nav-icon {
    width: 25px;
    text-align: center;
    font-size: 17px;
    line-height: 1;
    flex: 0 0 25px;
}

.app-body .sidebar-footer {
    padding: 14px 14px 18px;
    border-top: 1px solid var(--app-line);
}

.sidebar-tip {
    margin: 0 4px 12px;
    padding: 12px;
    border-radius: 13px;
    background: rgba(53, 89, 232, 0.055);
    color: #68748a;
    font-size: 11px;
    line-height: 1.45;
}

.sidebar-logout {
    justify-content: flex-start;
}

.app-body .main-shell {
    background: transparent;
}

.app-body .topbar {
    height: 72px;
    padding: 0 30px;
    border-bottom: 1px solid var(--app-line);
    background: rgba(255, 255, 255, 0.68);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    position: sticky;
    top: 0;
    z-index: 30;
}

.topbar-title {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.topbar-context {
    color: #8a94a7;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .10em;
    text-transform: uppercase;
}

.topbar-title strong {
    font-size: 15px;
    font-weight: 750;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-left: auto;
    color: #68748a;
    font-size: 13px;
    font-weight: 600;
}

.user-avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--app-primary-soft);
    color: var(--app-primary);
    font-weight: 800;
}

.app-body .page-content {
    max-width: 1380px;
    margin: 0 auto;
    padding: 30px;
}

.home-page {
    max-width: 1180px;
    margin: 0 auto;
}

.welcome-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.welcome-row h1 {
    margin: 5px 0 4px;
    font-size: clamp(30px, 4vw, 44px);
    letter-spacing: -0.035em;
    line-height: 1.05;
}

.welcome-row p {
    margin: 0;
    color: var(--app-muted);
}

.eyebrow {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .13em;
    color: #8a94a7;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.action-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-height: 108px;
    padding: 18px;
    border: 1px solid var(--app-line);
    border-radius: 20px;
    background: var(--app-card);
    box-shadow: var(--app-shadow);
    text-decoration: none;
    color: var(--app-text);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.action-card:hover {
    transform: translateY(-2px);
    color: var(--app-text);
    border-color: rgba(53, 89, 232, .18);
    box-shadow: 0 18px 45px rgba(30, 45, 80, .12);
}

.action-card-main {
    grid-column: span 2;
    min-height: 122px;
    background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(240,244,255,.94));
}

.action-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 15px;
    background: var(--app-primary-soft);
    color: var(--app-primary);
    font-size: 21px;
    font-weight: 800;
}

.action-copy {
    min-width: 0;
}

.action-copy strong,
.action-copy small {
    display: block;
}

.action-copy strong {
    font-size: 16px;
    margin-bottom: 4px;
}

.action-copy small {
    color: var(--app-muted);
    line-height: 1.45;
}

.action-arrow {
    color: #9aa3b3;
    font-size: 20px;
}

.home-section {
    margin-top: 34px;
}

.section-heading-row h2,
.home-panel h2,
.help-panel h2 {
    margin: 3px 0 4px;
    font-size: 20px;
    letter-spacing: -.02em;
}

.section-heading-row p,
.home-panel p,
.help-panel p {
    margin: 0;
    color: var(--app-muted);
}

.simple-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.simple-stat {
    padding: 17px;
    border: 1px solid var(--app-line);
    border-radius: 17px;
    background: rgba(255,255,255,.74);
    text-decoration: none;
    color: var(--app-text);
}

.simple-stat:hover {
    color: var(--app-primary);
    border-color: rgba(53,89,232,.18);
}

.stat-number,
.stat-label {
    display: block;
}

.stat-number {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.03em;
}

.stat-label {
    margin-top: 2px;
    color: var(--app-muted);
    font-size: 12px;
}

.home-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr);
    gap: 16px;
    margin-top: 18px;
}

.app-body .panel {
    border: 1px solid var(--app-line);
    border-radius: 20px;
    background: var(--app-card);
    box-shadow: var(--app-shadow);
}

.home-panel {
    padding: 20px;
}

.panel-head {
    margin-bottom: 15px;
}

.panel-head h2 {
    margin-top: 4px;
}

.text-link {
    color: var(--app-primary);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.simple-list {
    display: grid;
    gap: 7px;
}

.list-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    padding: 12px 10px;
    border-radius: 13px;
    text-decoration: none;
    color: var(--app-text);
}

.list-row:hover {
    background: rgba(53, 89, 232, .05);
    color: var(--app-text);
}

.list-row strong,
.list-row small {
    display: block;
}

.list-row small {
    margin-top: 2px;
    color: var(--app-muted);
}

.friendly-empty {
    padding: 22px 8px 10px;
}

.friendly-empty > span {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 13px;
    border-radius: 15px;
    background: var(--app-primary-soft);
    color: var(--app-primary);
    font-weight: 800;
}

.friendly-empty strong,
.friendly-empty p {
    display: block;
}

.friendly-empty strong {
    margin-bottom: 5px;
}

.friendly-empty p {
    margin-bottom: 15px;
}

.help-panel {
    position: relative;
    overflow: hidden;
}

.help-orb {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: 20px;
    border-radius: 50%;
    background: rgba(53,89,232,.10);
    color: var(--app-primary);
    font-size: 21px;
    font-weight: 800;
}

.help-panel .btn {
    margin-top: 18px;
}

.mobile-appbar {
    display: none;
}

@media (max-width: 900px) {
    .home-columns {
        grid-template-columns: 1fr;
    }

    .simple-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .app-body {
        padding-bottom: 84px;
    }

    .app-body .sidebar {
        width: min(340px, 88vw);
        max-width: none;
        transform: translateX(-105%);
        transition: transform .24s ease;
        z-index: 100;
        box-shadow: 18px 0 50px rgba(20, 30, 60, .18);
    }

    .app-body .sidebar.is-open {
        transform: translateX(0);
    }

    .app-body .topbar {
        height: 64px;
        padding: 0 14px;
    }

    .topbar-user-name {
        display: none;
    }

    .app-body .page-content {
        padding: 20px 14px 18px;
    }

    .welcome-row {
        align-items: stretch;
        flex-direction: column;
        gap: 15px;
        margin-bottom: 18px;
    }

    .welcome-row h1 {
        font-size: 31px;
    }

    .home-primary-action {
        width: 100%;
        justify-content: center;
    }

    .action-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .action-card,
    .action-card-main {
        grid-column: auto;
        min-height: 92px;
        padding: 15px;
        border-radius: 17px;
    }

    .action-icon {
        width: 44px;
        height: 44px;
    }

    .action-copy strong {
        font-size: 15px;
    }

    .action-copy small {
        font-size: 12px;
    }

    .simple-stats {
        gap: 9px;
    }

    .simple-stat {
        padding: 14px;
        border-radius: 15px;
    }

    .stat-number {
        font-size: 24px;
    }

    .home-panel {
        padding: 16px;
        border-radius: 17px;
    }

    .list-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 7px;
    }

    .list-row > strong:last-child {
        grid-column: 1 / -1;
        color: #566276;
    }

    .mobile-appbar {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: max(10px, env(safe-area-inset-bottom));
        z-index: 90;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        align-items: center;
        min-height: 66px;
        padding: 6px;
        border: 1px solid rgba(255,255,255,.75);
        border-radius: 22px;
        background: rgba(255,255,255,.68);
        box-shadow: 0 16px 45px rgba(25, 35, 65, .18), inset 0 1px 0 rgba(255,255,255,.9);
        backdrop-filter: blur(26px) saturate(180%);
        -webkit-backdrop-filter: blur(26px) saturate(180%);
    }

    .mobile-appbar a,
    .mobile-appbar button {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 2px;
        min-width: 0;
        min-height: 54px;
        border: 0;
        border-radius: 16px;
        background: transparent;
        color: #778195;
        text-decoration: none;
        font: inherit;
    }

    .mobile-appbar a span,
    .mobile-appbar button span {
        font-size: 20px;
        line-height: 1.1;
        font-weight: 700;
    }

    .mobile-appbar small {
        font-size: 10px;
        font-weight: 700;
    }

    .mobile-appbar a.is-active,
    .mobile-appbar button:active {
        color: var(--app-primary);
        background: rgba(53,89,232,.10);
    }

    .mobile-menu-toggle {
        display: flex;
        flex: 0 0 38px;
        width: 38px;
        height: 38px;
        margin-right: 10px;
        border: 0;
        border-radius: 12px;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 4px;
        background: rgba(53,89,232,.08);
    }

    .mobile-menu-toggle span {
        display: block;
        width: 16px;
        height: 2px;
        border-radius: 2px;
        background: #4e5a70;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 95;
        background: rgba(20, 28, 48, .30);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
        backdrop-filter: blur(2px);
    }

    .sidebar-backdrop.is-visible {
        opacity: 1;
        pointer-events: auto;
    }
}

@media (min-width: 761px) {
    .mobile-menu-toggle {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .action-card,
    .app-body .sidebar,
    .sidebar-backdrop,
    .app-body .sidebar-nav a,
    .app-body .sidebar-logout {
        transition: none;
    }
}
