:root {
    --ink: #16211f;
    --muted: #66736f;
    --line: #dde5e1;
    --surface: #ffffff;
    --soft: #f4f7f5;
    --teal: #0f766e;
    --coral: #e96b56;
    --amber: #f2b84b;
    --blue: #4f6f9f;
}

* {
    box-sizing: border-box;
}

body {
    color: var(--ink);
    background: var(--soft);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

a {
    color: var(--teal);
    text-decoration: none;
}

.btn {
    border-radius: 8px;
    display: inline-flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    white-space: nowrap;
}

.btn span,
.nav-link,
.sidebar-nav a span,
.navbar-brand,
.sidebar-brand span:last-child {
    overflow-wrap: anywhere;
}

.btn-dark {
    background: var(--ink);
    border-color: var(--ink);
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--teal);
    color: #fff;
    font-weight: 800;
    flex: 0 0 36px;
}

.eyebrow {
    color: var(--teal);
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: #eef3ef;
}

.auth-wrap {
    width: min(100%, 460px);
    padding: 24px;
}

.auth-panel,
.panel,
.form-panel,
.stat-card,
.feature-grid article {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.auth-panel {
    padding: 30px;
    box-shadow: 0 18px 50px rgba(22, 33, 31, .12);
}

.auth-brand,
.sidebar-brand,
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-weight: 800;
}

.auth-brand {
    margin-bottom: 28px;
}

.auth-brand span:last-child {
    color: var(--muted);
    display: block;
    font-size: .85rem;
    font-weight: 600;
}

.auth-title h1,
.site-hero h1,
.static-page h1 {
    font-size: 2.35rem;
    line-height: 1.08;
    margin: 0 0 12px;
}

.stack-form {
    display: grid;
    gap: 16px;
}

.stack-form label span {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
}

.demo-note,
.panel-switcher {
    margin-top: 18px;
    color: var(--muted);
    font-size: .9rem;
}

.panel-switcher {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

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

.admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 252px;
    background: var(--ink);
    color: #fff;
    padding: 24px 18px;
    overflow-y: auto;
}

.admin-sidebar .sidebar-brand {
    color: #fff;
    margin-bottom: 28px;
}

.sidebar-nav {
    display: grid;
    gap: 6px;
}

.sidebar-nav a {
    color: rgba(255, 255, 255, .78);
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 11px 12px;
    border-radius: 8px;
}

.sidebar-nav a.active,
.sidebar-nav a:hover {
    color: #fff;
    background: rgba(15, 118, 110, .9);
}

.admin-main {
    margin-left: 252px;
    min-height: 100vh;
}

.admin-topbar {
    min-height: 92px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 28px;
}

.admin-topbar h1 {
    font-size: 1.7rem;
    margin: 0;
}

.topbar-actions,
.action-bar,
.hero-actions,
.card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--soft);
    border-radius: 8px;
    font-weight: 700;
}

.admin-content {
    padding: 28px;
    max-width: 100%;
    overflow-x: hidden;
}

.stat-grid,
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.stat-card {
    padding: 18px;
}

.stat-card span {
    color: var(--muted);
    font-weight: 700;
}

.stat-card strong {
    display: block;
    font-size: 2rem;
    margin-top: 8px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
    gap: 18px;
}

.panel,
.form-panel {
    padding: 20px;
}

.theme-select {
    min-height: 42px;
}

.theme-palette-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-preview {
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    flex: 0 0 38px;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.panel h2,
.form-panel h2 {
    font-size: 1.18rem;
    margin: 0 0 14px;
}

.table {
    margin-bottom: 0;
    min-width: 680px;
}

.table th {
    color: var(--muted);
    font-size: .78rem;
    text-transform: uppercase;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 9px;
    border-radius: 8px;
    background: #e6f3ef;
    color: #0c5f58;
    font-size: .78rem;
    font-weight: 800;
    text-transform: capitalize;
}

.lead-list,
.mini-list,
.item-stack {
    display: grid;
    gap: 10px;
}

.lead-list article,
.mini-list span {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.admin-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.admin-item strong,
.admin-item small {
    display: block;
    overflow-wrap: anywhere;
}

.admin-item small {
    color: var(--muted);
}

.admin-item .item-edit {
    grid-column: 1 / -1;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.asset-preview {
    width: 86px;
    min-height: 64px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--soft);
    color: var(--muted);
    font-size: .85rem;
}

.asset-preview img {
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.lead-list span,
.table small {
    color: var(--muted);
}

.note-form {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) 38px;
    gap: 6px;
}

.inline-form {
    min-width: 130px;
}

.action-cell {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}

.avatar-sm {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
    border: 1px solid var(--line);
}

.profile-preview {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--line);
}

.chart-bars {
    min-height: 240px;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    overflow-x: auto;
    padding-top: 18px;
}

.chart-bars div {
    width: 34px;
    display: grid;
    justify-items: center;
    gap: 6px;
    flex: 0 0 34px;
}

.chart-bars span {
    width: 16px;
    border-radius: 8px 8px 0 0;
    background: var(--teal);
}

.chart-bars small {
    color: var(--muted);
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.site-shell {
    background: #f5f7f2;
}

.site-nav {
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--line);
}

.site-hero {
    min-height: 680px;
    padding: 74px 0 48px;
    display: flex;
    align-items: center;
}

.hero-layout {
    display: grid;
    grid-template-columns: minmax(300px, .9fr) minmax(360px, 1.1fr);
    align-items: center;
    gap: 44px;
}

.hero-copy p {
    max-width: 680px;
    color: var(--muted);
    font-size: 1.1rem;
}

.hero-preview {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--line);
    box-shadow: 0 22px 60px rgba(22, 33, 31, .16);
}

.site-band {
    padding: 54px 0;
    background: #fff;
}

.feature-grid article {
    padding: 22px;
}

.feature-grid i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: #e6f3ef;
    color: var(--teal);
    font-size: 1.25rem;
    margin-bottom: 14px;
}

.feature-grid h2 {
    font-size: 1.12rem;
}

.feature-grid p {
    color: var(--muted);
    margin-bottom: 0;
}

.static-page {
    min-height: 58vh;
    padding: 92px 0;
}

.static-page p {
    max-width: 760px;
    color: var(--muted);
    font-size: 1.1rem;
}

.site-footer {
    padding: 26px 0;
    background: var(--ink);
    color: rgba(255, 255, 255, .78);
}

.platform-support-dashboard .support-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.platform-support-dashboard strong {
    margin-right: auto;
}

@media (max-width: 992px) {
    .admin-sidebar {
        position: sticky;
        top: 0;
        z-index: 1020;
        width: 100%;
        display: grid;
        gap: 14px;
        padding: 14px 18px;
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-sidebar .sidebar-brand {
        margin-bottom: 0;
    }

    .sidebar-nav {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: thin;
    }

    .sidebar-nav a {
        flex: 0 0 auto;
        min-height: 42px;
        white-space: nowrap;
    }

    .admin-topbar,
    .hero-layout,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .admin-topbar {
        display: grid;
    }

    .stat-grid,
    .feature-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .admin-content,
    .admin-topbar {
        padding: 16px;
    }

    .admin-sidebar {
        padding-inline: 14px;
    }

    .topbar-actions,
    .action-bar,
    .hero-actions {
        width: 100%;
    }

    .topbar-actions .btn,
    .action-bar .btn,
    .hero-actions .btn {
        flex: 1 1 150px;
    }

    .user-chip {
        width: 100%;
        justify-content: center;
    }

    .panel,
    .form-panel,
    .stat-card {
        padding: 16px;
    }

    .lead-list article,
    .mini-list span,
    .admin-item,
    .platform-support-dashboard .support-actions {
        display: grid;
        justify-items: start;
    }

    .admin-item {
        grid-template-columns: 1fr;
    }

    .auth-title h1,
    .site-hero h1,
    .static-page h1 {
        font-size: 1.9rem;
    }

    .site-hero {
        padding-top: 42px;
        min-height: auto;
    }
}
