:root {
    --blue: #1f5fbf;
    --blue-dark: #173b73;
    --green: #1f9d63;
    --orange: #f59e0b;
    --red: #dc3545;
    --gray: #64748b;
    --bg: #f4f7fb;
    --ink: #152033;
}

body {
    font-family: "Roboto Slab", serif;
    font-size: 14px;
}

/* Connected app shell */
.app-shell {
    grid-template-columns: 235px 1fr;
    background: #f3f7fc;
}

.sidebar {
    background: #142943;
    border-right: 0;
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    color: #fff;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    margin-bottom: 34px;
    white-space: normal;
}

.brand:hover {
    color: #fff;
}

.brand-icon {
    color: #2f78ff;
    font-size: 1.95rem;
    line-height: 1;
}

.brand span:last-child {
    display: grid;
    line-height: 1.1;
}

.brand small {
    color: #93a8c3;
    font-size: .86rem;
    font-weight: 600;
    margin-top: 4px;
}

.app-nav {
    gap: 8px;
}

.sidebar .nav-link,
.settings-toggle {
    width: 100%;
    min-height: 52px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #d8e4f4;
    padding: 12px 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.settings-toggle {
    justify-content: space-between;
}

.settings-toggle span {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active,
.settings-toggle:hover {
    color: #2f83ff;
    background: rgba(47, 131, 255, .18);
}

.sidebar .nav-link i,
.settings-toggle i {
    font-size: 1.05rem;
}

.settings-submenu {
    display: none;
    margin: 6px 0 4px 36px;
    gap: 4px;
    flex-direction: column;
}

.nav-settings.open .settings-submenu {
    display: flex;
}

.settings-submenu a {
    color: #b8c7dc;
    border-radius: 6px;
    padding: 8px 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 9px;
}

.settings-submenu a:hover {
    color: #fff;
    background: rgba(255, 255, 255, .08);
}

.sidebar-logout {
    margin-top: auto;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    padding: 14px;
}

.sidebar-logout:hover {
    color: #8db7ff;
}

.topbar {
    height: 86px;
    padding: 0 22px;
    justify-content: flex-end;
    background: #fff;
}

.menu-button,
.top-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid #d7e0ed;
    border-radius: 8px;
    background: #fff;
    color: #536984;
}

.menu-button {
    margin-right: auto;
}

.top-search {
    width: min(360px, 38vw);
    height: 46px;
    background: #f1f5fb;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    color: #71829a;
}

.top-search input {
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    width: 100%;
}

.top-user {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 190px;
}

.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #bbd4ff, #1763e8);
    box-shadow: 0 10px 24px rgba(23, 99, 232, .22);
}

.top-user strong,
.top-user small {
    display: block;
}

.top-user small {
    color: #63728a;
    font-weight: 700;
}

.content {
    padding: 36px 22px;
}

.dashboard-home {
    max-width: 1160px;
}

.dashboard-heading h1 {
    color: #04132f;
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 4px;
}

.dashboard-heading p {
    color: #64748b;
    font-size: 1.05rem;
    margin-bottom: 26px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.dashboard-stat,
.dashboard-card {
    background: #fff;
    border: 1px solid #dfe7f2;
    border-radius: 8px;
    box-shadow: 0 14px 28px rgba(17, 33, 56, .05);
}

.dashboard-stat {
    min-height: 144px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 28px 22px;
}

.dashboard-stat span {
    display: block;
    color: #1d3150;
    font-size: 1.05rem;
    margin-bottom: 22px;
}

.dashboard-stat strong {
    color: #04132f;
    font-size: 2.15rem;
    line-height: 1;
}

.dashboard-stat i,
.activity-row > i {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.1rem;
}

.stat-blue {
    color: #1763ed;
    background: #dfeaff;
}

.stat-orange {
    color: #e97820;
    background: #ffe5d2;
}

.stat-green {
    color: #18a86b;
    background: #d5f6e9;
}

.stat-red {
    color: #e84d56;
    background: #ffe0e3;
}

.dashboard-panels {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: 18px;
}

.dashboard-card {
    padding: 24px;
    min-height: 336px;
}

.dashboard-card h2 {
    color: #04132f;
    font-size: 1.35rem;
    font-weight: 900;
    margin-bottom: 18px;
}

.activity-list {
    display: grid;
    gap: 14px;
}

.activity-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    color: #071630;
}

.activity-row strong,
.activity-row small {
    display: block;
}

.activity-row small,
.activity-row em {
    color: #6f7f99;
    font-size: .88rem;
    font-style: normal;
}

.dashboard-link {
    display: inline-block;
    color: #04132f;
    font-weight: 900;
    margin-top: 22px;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    gap: 18px;
}

@media (max-width: 992px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .top-search {
        width: 100%;
        max-width: 320px;
    }

    .dashboard-stats,
    .dashboard-panels,
    .settings-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .topbar {
        height: auto;
        flex-wrap: wrap;
        padding: 14px;
    }

    .top-user {
        min-width: 0;
    }

    .dashboard-stats,
    .dashboard-panels,
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

/* Rollback connected UI to stable classic dashboard */
.app-shell {
    display: grid;
    grid-template-columns: 270px 1fr;
    min-height: 100vh;
    background: var(--bg);
}

.sidebar {
    background: #fff;
    border-right: 1px solid #e5eaf2;
    padding: 24px 18px;
    position: sticky;
    top: 0;
    height: 100vh;
    display: block;
    color: var(--ink);
}

.brand {
    color: var(--blue-dark);
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 28px;
    display: block;
}

.sidebar .nav-link {
    color: #334155;
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: auto;
    font-weight: 500;
    background: transparent;
}

.sidebar .nav-link:hover {
    background: #eef5ff;
    color: var(--blue);
}

.topbar {
    height: 72px;
    background: #fff;
    border-bottom: 1px solid #e5eaf2;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 10;
    justify-content: flex-start;
}

.content {
    padding: 28px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.stats-grid.compact {
    grid-template-columns: repeat(4, minmax(140px, 1fr));
}

.stat-card {
    background: #fff;
    border-radius: 8px;
    border-top: 4px solid var(--gray);
    padding: 18px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
    display: block;
}

.stat-card span {
    display: block;
    color: #64748b;
    font-size: .88rem;
    margin-bottom: 8px;
}

.stat-card strong {
    font-size: 2rem;
    line-height: 1;
}

.stat-card.blue { border-color: var(--blue); }
.stat-card.gray { border-color: var(--gray); }
.stat-card.green { border-color: var(--green); }
.stat-card.orange { border-color: var(--orange); }
.stat-card.red { border-color: var(--red); }

.panel {
    background: #fff;
    border: 1px solid #e5eaf2;
    border-radius: 8px;
    padding: 22px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .05);
}

@media (max-width: 992px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
        position: fixed;
        z-index: 20;
        width: 270px;
        box-shadow: 20px 0 40px rgba(15, 23, 42, .18);
    }

    .sidebar.open {
        display: block;
    }

    .stats-grid,
    .stats-grid.compact {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }
}

@media (max-width: 576px) {
    .content {
        padding: 18px;
    }

    .topbar {
        padding: 0 16px;
    }

    .stats-grid,
    .stats-grid.compact {
        grid-template-columns: 1fr;
    }
}

body {
    background: var(--bg);
    color: var(--ink);
}

a {
    text-decoration: none;
}

.app-shell {
    display: grid;
    grid-template-columns: 270px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: #fff;
    border-right: 1px solid #e5eaf2;
    padding: 24px 18px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.brand {
    color: var(--blue-dark);
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 28px;
}

.sidebar .nav-link {
    color: #334155;
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar .nav-link:hover {
    background: #eef5ff;
    color: var(--blue);
}

.main {
    min-width: 0;
}

.topbar {
    height: 72px;
    background: #fff;
    border-bottom: 1px solid #e5eaf2;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.content {
    padding: 28px;
}

.page-title {
    color: #0f172a;
    font-size: 1.65rem;
    font-weight: 800;
    margin: 0 0 6px;
}

.panel {
    background: #fff;
    border: 1px solid #e5eaf2;
    border-radius: 8px;
    padding: 22px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .05);
}

.panel h2 {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.panel.narrow {
    max-width: 920px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.stats-grid.compact {
    grid-template-columns: repeat(4, minmax(140px, 1fr));
}

.stat-card {
    background: #fff;
    border-radius: 8px;
    border-top: 4px solid var(--gray);
    padding: 18px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}

.stat-card span {
    display: block;
    color: #64748b;
    font-size: .88rem;
    margin-bottom: 8px;
}

.stat-card strong {
    font-size: 2rem;
    line-height: 1;
}

.stat-card.blue { border-color: var(--blue); }
.stat-card.gray { border-color: var(--gray); }
.stat-card.green { border-color: var(--green); }
.stat-card.orange { border-color: var(--orange); }
.stat-card.red { border-color: var(--red); }

.filters {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 220px auto;
    gap: 10px;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(31, 95, 191, .92), rgba(23, 59, 115, .88)),
        url('https://images.unsplash.com/photo-1551434678-e076c223a692?auto=format&fit=crop&w=1400&q=80') center/cover;
}

.auth-card {
    width: min(440px, 100%);
    background: #fff;
    border-radius: 8px;
    padding: 28px;
    box-shadow: 0 22px 70px rgba(2, 8, 23, .28);
}

.auth-card h1 {
    font-size: 1.7rem;
    font-weight: 800;
    margin-bottom: 22px;
}

.role-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.dossier-page {
    --line: #d7dfeb;
    --soft: #f8fafc;
    --text-soft: #64748b;
}

.dossier-filters {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 220px;
    gap: 14px;
    margin-bottom: 18px;
}

.dossier-filters label {
    display: block;
    color: #60708a;
    font-size: .82rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.dossier-filters .form-control,
.dossier-filters .form-select {
    height: 52px;
    border-color: #cfd8e6;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
}

.dossier-board {
    background: #fff;
    border-left: 4px solid #ffa12f;
}

.dossier-block {
    border: 1px solid var(--line);
    border-left: 0;
    border-bottom: 0;
}

.dossier-block:last-child {
    border-bottom: 1px solid var(--line);
}

.dossier-row {
    display: grid;
    grid-template-columns: 52px minmax(170px, 1.15fr) 176px minmax(130px, .75fr) 150px 150px auto;
    gap: 12px;
    align-items: center;
    min-height: 82px;
    padding: 12px 14px 12px 18px;
    background: var(--soft);
}

.folder-toggle {
    width: 48px;
    height: 48px;
    border: 1px solid #eef2f7;
    border-radius: 6px;
    background: #f9fbfe;
    color: #1763ed;
    font-weight: 900;
}

.folder-toggle[aria-expanded="true"] i {
    transform: rotate(0deg);
}

.folder-toggle[aria-expanded="false"] i {
    transform: rotate(-90deg);
}

.folder-title {
    color: #061329;
    font-size: 1.08rem;
    font-weight: 900;
}

.folder-note {
    color: #64748b;
    font-weight: 800;
}

.folder-date {
    color: #061329;
    font-size: 1.02rem;
    white-space: nowrap;
}

.status-pill {
    display: inline-grid;
    place-items: center;
    min-width: 156px;
    height: 48px;
    border: 1px solid transparent;
    border-radius: 999px;
    color: #fff;
    font-weight: 900;
    text-align: center;
    box-shadow: 0 10px 22px rgba(15, 23, 42, .08);
    transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.status-pill.progress {
    background: #FFA12F;
    border-color: #f08f18;
    box-shadow: 0 12px 24px rgba(255, 161, 47, .24);
}

.status-pill.done {
    background: #18be76;
    border-color: #10a365;
    box-shadow: 0 12px 24px rgba(24, 190, 118, .2);
}

.status-pill.todo {
    background: #9da7b5;
    border-color: #8a95a4;
    box-shadow: 0 12px 24px rgba(100, 116, 139, .16);
}

.status-pill.blocked {
    background: #ef5350;
    border-color: #df3d3a;
    box-shadow: 0 12px 24px rgba(239, 83, 80, .22);
}

.folder-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.folder-actions form {
    margin: 0;
}

.icon-action {
    width: 40px;
    height: 40px;
    border: 1px solid #d6dfec;
    border-radius: 6px;
    background: #fff;
    color: #0e1b2f;
    display: inline-grid;
    place-items: center;
    box-shadow: 0 2px 5px rgba(15, 23, 42, .05);
}

.icon-action:hover {
    border-color: #1763ed;
    color: #1763ed;
}

.dossier-items {
    background: #fff;
    padding-left: 52px;
}

.dossier-items-head,
.dossier-item-row {
    display: grid;
    grid-template-columns: minmax(170px, 1.1fr) minmax(150px, .75fr) 176px 150px 150px auto;
    gap: 12px;
    align-items: center;
    padding: 0 14px 0 18px;
}

.dossier-items-head {
    min-height: 52px;
    color: #60708a;
    font-size: .88rem;
    font-weight: 900;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.dossier-item-row {
    min-height: 70px;
    border-bottom: 1px solid var(--line);
}

.item-field,
.item-date,
.add-item-inline input {
    min-width: 0;
    width: 100%;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: #061329;
    font-size: 1rem;
    padding: 9px 10px;
}

.item-field:focus,
.item-date:focus,
.add-item-inline input:focus {
    outline: 0;
    border-color: #c8d7ee;
    background: #f8fbff;
}

.item-status-select {
    appearance: none;
    cursor: pointer;
    padding: 0 18px;
    outline: 0;
    text-align: center;
    text-align-last: center;
    font-weight: 900;
}

.item-status-select:focus {
    box-shadow: 0 0 0 4px rgba(23, 99, 237, .12), 0 12px 24px rgba(15, 23, 42, .1);
}

.status-dropdown {
    width: 100%;
    min-width: 156px;
}

.status-button {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.status-button.dropdown-toggle::after {
    margin-left: 4px;
}

.status-menu {
    min-width: 190px;
    padding: 8px;
    border: 1px solid #d8e2ef;
    border-radius: 8px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .14);
}

.status-menu form {
    margin: 0;
}

.status-menu .dropdown-item {
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    padding: 10px 12px;
}

.status-menu .dropdown-item.active,
.status-menu .dropdown-item:active {
    background: #eef5ff;
    color: #061329;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.status-dot.todo { background: #9da7b5; }
.status-dot.progress { background: #FFA12F; }
.status-dot.done { background: #18be76; }
.status-dot.blocked { background: #ef5350; }

.add-item-inline {
    display: grid;
    grid-template-columns: minmax(170px, 1.1fr) minmax(150px, .75fr) 150px 150px auto;
    gap: 12px;
    align-items: center;
    padding: 12px 14px 0 18px;
}

.add-item-inline .btn {
    height: 56px;
    justify-self: start;
    border-radius: 6px;
    font-size: 1.02rem;
    font-weight: 900;
    color: #061329;
    border-color: #d4ddea;
}

.empty-dossiers {
    border: 1px solid var(--line);
    border-left: 0;
    padding: 42px;
    text-align: center;
    color: var(--text-soft);
    background: #fff;
}

.landing-page {
    min-height: 100vh;
    background: #fff;
    color: #101a33;
}

.landing-nav {
    height: 96px;
    display: grid;
    grid-template-columns: 260px 1fr auto;
    align-items: center;
    gap: 28px;
    padding: 0 clamp(22px, 4.6vw, 72px);
    border-bottom: 1px solid #eef2f8;
    background: rgba(255, 255, 255, .95);
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: blur(14px);
}

.landing-logo {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: #0b1630;
}

.landing-logo:hover {
    color: #0b1630;
}

.logo-mark {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #2f72ff, #174fd0);
    box-shadow: 0 14px 26px rgba(31, 95, 191, .26);
    font-size: 1.55rem;
}

.landing-logo strong,
.landing-logo small {
    display: block;
}

.landing-logo strong {
    font-size: 1.35rem;
    line-height: 1.05;
}

.landing-logo small {
    color: #68758d;
    font-size: 1rem;
    margin-top: 2px;
}

.landing-menu {
    display: flex;
    justify-content: center;
    gap: clamp(20px, 4vw, 58px);
}

.landing-menu a {
    color: #16213a;
    font-weight: 600;
}

.landing-menu a.active,
.landing-menu a:hover {
    color: #0d5be8;
}

.landing-actions {
    display: flex;
    gap: 16px;
}

.landing-actions .btn {
    min-width: 132px;
    border-radius: 6px;
    padding: 12px 22px;
    font-weight: 700;
}

.hero-section {
    display: grid;
    grid-template-columns: minmax(320px, .78fr) minmax(620px, 1.35fr);
    gap: clamp(34px, 5vw, 78px);
    align-items: center;
    padding: clamp(54px, 7vw, 86px) clamp(22px, 4.6vw, 72px) 48px;
    background: linear-gradient(105deg, #fff 0%, #f6faff 48%, #eef6ff 100%);
    overflow: hidden;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid #b9d1f8;
    border-radius: 999px;
    color: #0d2553;
    background: #eef6ff;
    font-weight: 600;
    padding: 6px 16px;
    margin-bottom: 28px;
}

.hero-copy h1 {
    font-size: clamp(3rem, 5.3vw, 5.15rem);
    line-height: 1.06;
    font-weight: 900;
    letter-spacing: 0;
    margin-bottom: 28px;
}

.hero-copy h1 span {
    color: #1c63e8;
}

.hero-copy p {
    color: #263754;
    font-size: 1.13rem;
    line-height: 1.75;
    max-width: 620px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 34px 0 24px;
}

.hero-buttons .btn {
    min-width: 220px;
    border-radius: 6px;
    font-weight: 800;
    padding: 16px 24px;
}

.trial-note {
    color: #73809a;
    display: flex;
    gap: 12px;
    align-items: center;
    font-weight: 500;
}

.trial-note i {
    color: #0d5be8;
}

.dashboard-preview {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 28px 80px rgba(28, 83, 143, .16);
    min-height: 584px;
    overflow: hidden;
    border: 1px solid #edf2f8;
}

.preview-topbar {
    height: 64px;
    display: grid;
    grid-template-columns: 220px 42px 1fr 32px 168px;
    gap: 14px;
    align-items: center;
    padding: 0 18px;
    border-bottom: 1px solid #e8edf5;
}

.mini-logo {
    display: flex;
    gap: 10px;
    align-items: center;
    color: #0b1630;
    font-weight: 800;
}

.mini-logo i {
    color: #1763ed;
    font-size: 1.5rem;
}

.mini-logo small,
.preview-user small {
    display: block;
    font-size: .68rem;
    color: #71809b;
    font-weight: 600;
}

.icon-button {
    width: 34px;
    height: 34px;
    border: 1px solid #dce5f2;
    border-radius: 8px;
    background: #fff;
    color: #4d5d76;
}

.preview-search {
    justify-self: end;
    width: 144px;
    border-radius: 999px;
    background: #f3f6fb;
    color: #8791a5;
    font-size: .75rem;
    padding: 9px 12px;
}

.preview-bell {
    color: #50627e;
    position: relative;
}

.preview-user {
    display: grid;
    grid-template-columns: 30px 1fr;
    column-gap: 10px;
    align-items: center;
    font-size: .8rem;
}

.preview-user span {
    grid-row: span 2;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #cfe0ff, #1d63df);
}

.preview-body {
    display: grid;
    grid-template-columns: 190px 1fr;
    min-height: 520px;
}

.preview-sidebar {
    background: linear-gradient(160deg, #0f213a, #172944);
    padding: 26px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.preview-sidebar a {
    color: #f8fbff;
    border-radius: 8px;
    padding: 11px 12px;
    font-size: .86rem;
    display: flex;
    gap: 10px;
    align-items: center;
}

.preview-sidebar a.active {
    color: #2b85ff;
    background: rgba(62, 126, 224, .16);
    font-weight: 800;
}

.preview-sidebar .logout {
    margin-top: auto;
}

.preview-content {
    background: #f6f9fd;
    padding: 28px 18px;
}

.preview-content h2 {
    font-size: 1.45rem;
    font-weight: 900;
    margin: 0;
}

.preview-content > p {
    color: #61708a;
    margin: 4px 0 20px;
    font-size: .88rem;
}

.preview-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.preview-stats div,
.activity-card,
.chart-card {
    background: #fff;
    border: 1px solid #e8edf5;
    border-radius: 8px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, .04);
}

.preview-stats div {
    position: relative;
    min-height: 116px;
    padding: 18px;
}

.preview-stats small {
    color: #364762;
    display: block;
}

.preview-stats strong {
    display: block;
    font-size: 1.7rem;
    margin-top: 12px;
}

.preview-stats i {
    position: absolute;
    right: 18px;
    top: 22px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
}

.blue { color: #1763ed; background: #dce9ff; }
.orange { color: #e97820; background: #ffe5d2; }
.green { color: #18a86b; background: #d5f6e9; }
.red { color: #e84d56; background: #ffe0e3; }

.preview-panels {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: 14px;
    margin-top: 16px;
}

.activity-card,
.chart-card {
    padding: 18px;
    min-height: 260px;
}

.activity-card h3,
.chart-card h3 {
    font-size: 1rem;
    font-weight: 900;
    margin-bottom: 16px;
}

.activity-card p {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
    font-size: .82rem;
}

.activity-card p i {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    display: grid;
    place-items: center;
}

.activity-card span small {
    display: block;
    color: #50617c;
}

.activity-card em {
    color: #8a97aa;
    font-size: .7rem;
    font-style: normal;
}

.activity-card a {
    color: #0d5be8;
    font-weight: 700;
    font-size: .82rem;
}

.mock-chart {
    height: 164px;
    border-left: 1px solid #dfe7f3;
    border-bottom: 1px solid #dfe7f3;
    background-image: linear-gradient(#edf2f8 1px, transparent 1px), linear-gradient(90deg, #edf2f8 1px, transparent 1px);
    background-size: 100% 40px, 46px 100%;
    display: flex;
    align-items: end;
    gap: 15px;
    padding: 0 18px;
}

.mock-chart span {
    flex: 1;
    border-radius: 999px 999px 0 0;
    background: linear-gradient(180deg, #1763ed, rgba(23, 99, 237, .18));
    min-width: 12px;
}

.chart-legend {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    color: #3a4a65;
    font-size: .72rem;
    margin-top: 16px;
}

.chart-legend b {
    width: 14px;
    height: 8px;
    border-radius: 999px;
    background: #1763ed;
}

.chart-legend .green-dot {
    background: #18a86b;
}

.feature-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 34px;
    padding: 28px clamp(22px, 4.6vw, 72px) 38px;
    background: #fff;
}

.feature-strip article {
    border: 1px solid #e2e9f3;
    border-radius: 8px;
    min-height: 114px;
    display: grid;
    grid-template-columns: 66px 1fr;
    gap: 16px;
    align-items: center;
    padding: 22px;
}

.feature-strip i {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #1763ed;
    background: #f0f6ff;
    font-size: 2rem;
}

.feature-strip h3 {
    font-size: 1rem;
    font-weight: 900;
}

.feature-strip p {
    color: #4d5d76;
    margin: 0;
}

.landing-section {
    text-align: center;
    padding: 72px 22px;
    background: #fff;
}

.landing-section.muted {
    background: #f6f9fd;
}

.landing-section h2 {
    font-weight: 900;
    margin-bottom: 12px;
}

.landing-section p {
    color: #53637d;
    max-width: 760px;
    margin: 0 auto;
    font-size: 1.05rem;
}

.contact-band {
    background: linear-gradient(135deg, #eef6ff, #fff);
}

.landing-footer {
    text-align: center;
    color: #71809b;
    padding: 26px;
    background: #fff;
}

@media (max-width: 992px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
        position: fixed;
        z-index: 20;
        width: 270px;
        box-shadow: 20px 0 40px rgba(15, 23, 42, .18);
    }

    .sidebar.open {
        display: block;
    }

    .stats-grid,
    .stats-grid.compact {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }

    .landing-nav {
        height: auto;
        grid-template-columns: 1fr;
        padding-top: 18px;
        padding-bottom: 18px;
    }

    .landing-menu {
        justify-content: flex-start;
        overflow-x: auto;
        gap: 20px;
        padding-bottom: 4px;
    }

    .landing-actions {
        justify-content: flex-start;
    }

    .hero-section {
        grid-template-columns: 1fr;
    }

    .dashboard-preview {
        min-height: 0;
    }

    .preview-topbar {
        grid-template-columns: 1fr 42px;
    }

    .preview-search,
    .preview-bell,
    .preview-user {
        display: none;
    }

    .preview-body {
        grid-template-columns: 1fr;
    }

    .preview-sidebar {
        display: none;
    }

    .feature-strip,
    .preview-stats,
    .preview-panels {
        grid-template-columns: 1fr 1fr;
    }

    .dossier-filters,
    .dossier-row,
    .dossier-items-head,
    .dossier-item-row,
    .add-item-inline {
        grid-template-columns: 1fr;
    }

    .dossier-row,
    .dossier-item-row {
        align-items: stretch;
    }

    .dossier-items {
        padding-left: 0;
    }

    .folder-actions {
        justify-content: flex-start;
    }

    .status-pill {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 576px) {
    .content {
        padding: 18px;
    }

    .topbar {
        padding: 0 16px;
    }

    .stats-grid,
    .stats-grid.compact,
    .filters {
        grid-template-columns: 1fr;
    }

    .landing-actions,
    .hero-buttons {
        flex-direction: column;
    }

    .landing-actions .btn,
    .hero-buttons .btn {
        width: 100%;
    }

    .hero-copy h1 {
        font-size: 2.7rem;
    }

    .preview-stats,
    .preview-panels,
    .feature-strip {
        grid-template-columns: 1fr;
    }

    .preview-content {
        padding: 20px 12px;
    }

    .feature-strip article {
        grid-template-columns: 56px 1fr;
    }
}

/* Final connected UI overrides */
.app-shell {
    grid-template-columns: 235px 1fr;
    background: #f3f7fc;
}

.sidebar {
    background: #142943;
    border-right: 0;
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    color: #fff;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    margin-bottom: 34px;
}

.brand:hover {
    color: #fff;
}

.brand-icon {
    color: #2f78ff;
    font-size: 1.95rem;
}

.brand small {
    display: block;
    color: #93a8c3;
    font-size: .86rem;
    font-weight: 600;
    margin-top: 4px;
}

.brand > span:last-child {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.settings-submenu {
    flex-wrap: nowrap;
}

.app-nav {
    gap: 8px;
}

.sidebar .nav-link,
.settings-toggle {
    width: 100%;
    min-height: 52px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #d8e4f4;
    padding: 12px 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.settings-toggle {
    justify-content: space-between;
}

.settings-toggle span {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active,
.settings-toggle:hover {
    color: #2f83ff;
    background: rgba(47, 131, 255, .18);
}

.settings-submenu {
    display: none;
    margin: 6px 0 4px 36px;
    flex-direction: column;
    gap: 4px;
}

.nav-settings.open .settings-submenu {
    display: flex;
}

.settings-submenu a {
    color: #b8c7dc;
    border-radius: 6px;
    padding: 8px 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 9px;
}

.sidebar-logout {
    margin-top: auto;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    padding: 14px;
}

.topbar {
    height: 86px;
    padding: 0 22px;
    justify-content: flex-end;
    background: #fff;
}

.menu-button,
.top-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid #d7e0ed;
    border-radius: 8px;
    background: #fff;
    color: #536984;
}

.menu-button {
    margin-right: auto;
}

.top-search {
    width: min(360px, 38vw);
    height: 46px;
    background: #f1f5fb;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    color: #71829a;
}

.top-search input {
    border: 0;
    outline: 0;
    background: transparent;
    width: 100%;
}

.top-user {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 190px;
}

.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #bbd4ff, #1763e8);
}

.top-user strong,
.top-user small {
    display: block;
}

.top-user small {
    color: #63728a;
    font-weight: 700;
}

.content {
    padding: 36px 22px;
}

@media (max-width: 992px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
        position: fixed;
        z-index: 20;
        width: 270px;
        height: 100vh;
    }

    .sidebar.open {
        display: flex;
    }

    .dashboard-stats,
    .dashboard-panels,
    .settings-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .topbar {
        height: auto;
        flex-wrap: wrap;
        padding: 14px;
    }

    .top-search {
        width: 100%;
        order: 10;
    }

    .dashboard-stats,
    .dashboard-panels,
    .settings-grid {
        grid-template-columns: 1fr;
    }
}
