:root {
    --sidebar-width: 264px;
    --sidebar: #0b1723;
    --sidebar-soft: #142536;
    --background: #f5f7fb;
    --surface: #ffffff;
    --border: #e3e9f1;
    --text: #172033;
    --muted: #6b778a;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-soft: #eaf1ff;
    --success: #16a34a;
    --success-soft: #dcfce7;
    --warning: #d97706;
    --warning-soft: #fef3c7;
    --danger: #dc2626;
    --danger-soft: #fee2e2;
    --shadow: 0 4px 20px rgba(20, 35, 58, .06);
    --radius: 15px;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    background: var(--background);
    color: var(--text);
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

button,
input,
select {
    font: inherit;
}

.app {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1000;
    display: flex;
    width: var(--sidebar-width);
    flex-direction: column;
    overflow-y: auto;
    background:
        linear-gradient(
            180deg,
            #091521 0%,
            #102130 65%,
            #08131d 100%
        );
    color: white;
}

.brand {
    padding: 25px 22px 19px;
}

.brand a {
    display: block;
}

.brand img {
    display: block;
    width: 205px;
    max-width: 100%;
    height: auto;
}

.brand-name {
    margin-top: 15px;
    color: #f8fafc;
    font-size: 15px;
    font-weight: 800;
}

.brand-version {
    margin-top: 4px;
    color: #77869a;
    font-size: 10px;
}

.menu {
    padding: 7px 12px 20px;
}

.menu-link {
    display: flex;
    min-height: 47px;
    align-items: center;
    gap: 12px;
    margin: 3px 0;
    padding: 10px 13px;
    border-radius: 10px;
    color: #dbe5ef;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition:
        background .18s ease,
        color .18s ease,
        transform .18s ease;
}

.menu-link:hover {
    transform: translateX(2px);
    background: rgba(255,255,255,.07);
    color: white;
}

.menu-link.active {
    background: rgba(37,99,235,.2);
    color: #8cb0ff;
}

.menu-icon {
    display: grid;
    width: 22px;
    place-items: center;
    font-size: 17px;
}

.menu-divider {
    height: 1px;
    margin: 16px 12px;
    background: rgba(255,255,255,.08);
}

.developer-section {
    margin-top: 18px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,.08);
}

.developer-label {
    margin: 7px 13px;
    color: #758397;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.sidebar-footer {
    margin-top: auto;
    padding: 15px 18px 20px;
}

.developer-button,
.developer-exit {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 10px;
    background: rgba(255,255,255,.05);
    color: #dce5ef;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
}

.developer-active {
    display: flex;
    min-height: 43px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(34,197,94,.28);
    border-radius: 10px;
    background: rgba(34,197,94,.12);
    color: #86e5a2;
    font-size: 11px;
    font-weight: 800;
}

.developer-active span,
.connection span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
}

.developer-exit {
    min-height: 35px;
    margin-top: 8px;
    border-color: rgba(220,38,38,.25);
    color: #ffb4b4;
}

.connection {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 13px;
    color: #7f8da0;
    font-size: 10px;
}

.main {
    min-height: 100vh;
    margin-left: var(--sidebar-width);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    min-height: 70px;
    align-items: center;
    justify-content: space-between;
    padding: 0 27px;
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(10px);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 13px;
}

.topbar h1 {
    margin: 0;
    font-size: 18px;
}

.topbar p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    cursor: pointer;
    font-size: 22px;
}

.topbar-action,
.button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 0;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.topbar-action:hover,
.button:hover {
    background: var(--primary-dark);
}

.button.secondary {
    border: 1px solid var(--border);
    background: white;
    color: #475569;
}

.button.secondary:hover {
    border-color: #aebcd0;
    background: #f8fafc;
}

.content {
    max-width: 1480px;
    margin: 0 auto;
    padding: 24px 26px 34px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0,.8fr) minmax(490px,1.2fr);
    gap: 30px;
    align-items: center;
    margin-bottom: 18px;
    padding: 30px;
    border: 1px solid #dce6f4;
    border-radius: 19px;
    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #f2f6ff 100%
        );
    box-shadow: var(--shadow);
}

.eyebrow {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.hero h2 {
    margin: 12px 0 10px;
    font-size: clamp(28px,3vw,39px);
    letter-spacing: -.04em;
}

.hero p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.workflow-list {
    display: grid;
    gap: 10px;
}

.workflow {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    gap: 13px;
    align-items: center;
    min-height: 76px;
    padding: 13px 15px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: white;
    text-decoration: none;
    transition:
        transform .18s ease,
        border-color .18s ease,
        box-shadow .18s ease;
}

.workflow:hover {
    transform: translateY(-1px);
    border-color: #b9c9e0;
    box-shadow: 0 8px 24px rgba(20,35,58,.08);
}

.workflow-icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 13px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 21px;
}

.workflow strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

.workflow small {
    color: var(--muted);
    font-size: 11px;
}

.workflow-arrow {
    color: #8c99ab;
    font-size: 24px;
}

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

.stat {
    display: flex;
    min-height: 108px;
    align-items: center;
    gap: 15px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: white;
    box-shadow: var(--shadow);
}

.stat-icon {
    display: grid;
    width: 49px;
    height: 49px;
    flex: 0 0 49px;
    place-items: center;
    border-radius: 13px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 20px;
}

.stat span {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.stat strong {
    font-size: 25px;
}

.columns {
    display: grid;
    grid-template-columns: minmax(0,1.5fr) minmax(320px,.8fr);
    gap: 17px;
}

.panel {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: white;
    box-shadow: var(--shadow);
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid #edf1f5;
}

.panel-head h3 {
    margin: 0 0 4px;
    font-size: 16px;
}

.panel-head p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

.panel-body {
    padding: 20px;
}

.category-row,
.activity-row {
    display: flex;
    min-height: 68px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 18px;
    border-bottom: 1px solid #edf1f5;
}

.category-row:last-child,
.activity-row:last-child {
    border-bottom: 0;
}

.row-main {
    display: flex;
    align-items: center;
    gap: 11px;
}

.row-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 11px;
    background: #f0f4f9;
    color: #5d6b7e;
}

.row-main strong {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
}

.row-main small {
    color: var(--muted);
    font-size: 10px;
}

.status {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--success-soft);
    color: var(--success);
    font-size: 10px;
    font-weight: 900;
}

.page-intro {
    margin-bottom: 18px;
}

.page-intro h2 {
    margin: 0 0 7px;
    font-size: 27px;
}

.page-intro p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.stepper {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 10px;
    margin-bottom: 18px;
}

.step {
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: white;
    color: #718096;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}

.step.active {
    border-color: #9db8f5;
    background: var(--primary-soft);
    color: var(--primary);
}

.form-grid {
    display: grid;
    grid-template-columns: minmax(0,1fr) 220px;
    gap: 14px;
}

.field label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 800;
}

.field select,
.field input {
    width: 100%;
    min-height: 48px;
    padding: 0 13px;
    border: 1px solid #cad5e3;
    border-radius: 10px;
    background: white;
}

.field select:focus,
.field input:focus {
    border-color: var(--primary);
    outline: 3px solid rgba(37,99,235,.12);
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 13px;
}

.action-card {
    min-height: 170px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: white;
    text-decoration: none;
    box-shadow: var(--shadow);
}

.action-card-icon {
    display: grid;
    width: 50px;
    height: 50px;
    margin-bottom: 17px;
    place-items: center;
    border-radius: 14px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 22px;
}

.action-card h3 {
    margin: 0 0 8px;
    font-size: 16px;
}

.action-card p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.empty {
    padding: 50px 20px;
    text-align: center;
}

.empty-icon {
    display: grid;
    width: 58px;
    height: 58px;
    margin: 0 auto 14px;
    place-items: center;
    border-radius: 17px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 25px;
}

.empty h3 {
    margin: 0 0 8px;
}

.empty p {
    margin: 0 0 17px;
    color: var(--muted);
    font-size: 12px;
}

.sidebar-overlay {
    display: none;
}

@media (max-width: 1150px) {
    .hero,
    .columns {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 850px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform .2s ease;
    }

    body.menu-open .sidebar {
        transform: translateX(0);
    }

    .main {
        margin-left: 0;
    }

    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        z-index: 900;
        background: rgba(3,10,18,.55);
    }

    body.menu-open .sidebar-overlay {
        display: block;
    }
}

@media (max-width: 650px) {
    .content {
        padding: 17px 12px 28px;
    }

    .topbar {
        padding: 0 12px;
    }

    .topbar-action {
        display: none;
    }

    .hero {
        padding: 21px;
    }

    .stats,
    .stepper,
    .form-grid,
    .action-grid {
        grid-template-columns: 1fr;
    }
}
