:root {
    --green: #10b981;
    --green-dark: #059669;
    --green-deep: #047857;
    --green-soft: #ecfdf5;

    --black: #07130f;
    --dark: #0b1713;
    --dark-2: #102019;

    --text: #101817;
    --muted: #71807a;
    --border: #e8eeeb;
    --bg: #f6f9f7;
    --white: #ffffff;

    --danger: #ef4444;
    --warning: #f59e0b;
    --blue: #3b82f6;

    --radius: 18px;
    --shadow: 0 15px 45px rgba(10, 30, 22, .07);
    --shadow-lg: 0 25px 70px rgba(10, 30, 22, .12);

    --sidebar-width: 238px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family:
        Tahoma,
        "Segoe UI",
        Arial,
        sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font-family: inherit;
}

button {
    cursor: pointer;
}

/* =========================
   GLOBAL
========================= */

.container {
    width: min(1180px, calc(100% - 40px));
    margin: auto;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -.6px;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 42px;
    height: 34px;

    padding: 0 9px;

    border-radius: 11px;

    color: #fff;
    background:
        linear-gradient(
            145deg,
            #34d399,
            #059669
        );

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.35),
        0 8px 18px rgba(16,185,129,.25);

    font-size: 12px;
    letter-spacing: .4px;
}

/* =========================
   BUTTONS
========================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 44px;

    padding: 0 17px;

    border: 0;
    border-radius: 12px;

    font-size: 13px;
    font-weight: 800;

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #fff;

    background:
        linear-gradient(
            145deg,
            var(--green),
            var(--green-dark)
        );

    box-shadow:
        0 10px 25px rgba(16,185,129,.22),
        inset 0 1px 0 rgba(255,255,255,.25);
}

.btn-primary:hover {
    box-shadow:
        0 15px 32px rgba(16,185,129,.30),
        inset 0 1px 0 rgba(255,255,255,.25);
}

.btn-soft {
    color: var(--green-deep);
    background: var(--green-soft);
}

.btn-ghost {
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border);
}

.btn-full {
    width: 100%;
}

/* =========================
   LANDING
========================= */

.site-shell {
    min-height: 100vh;

    background:
        radial-gradient(
            circle at 80% 0%,
            rgba(16,185,129,.13),
            transparent 30%
        ),
        var(--bg);
}

.topbar {
    height: 82px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    color: #68756f;
    font-size: 13px;
}

.hero {
    min-height: 650px;

    display: grid;
    grid-template-columns: 1fr .9fr;
    align-items: center;

    gap: 80px;

    padding: 70px 0;
}

.hero-copy {
    max-width: 650px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    color: var(--green-dark);

    font-size: 11px;
    font-weight: 900;
}

.dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: var(--green);

    box-shadow: 0 0 0 5px rgba(16,185,129,.10);
}

.hero h1 {
    margin: 15px 0;

    font-size: clamp(42px, 5vw, 68px);
    line-height: 1.05;

    letter-spacing: -2.8px;
}

.hero h1 span {
    color: var(--green-dark);
}

.hero-copy > p {
    max-width: 600px;

    color: var(--muted);

    font-size: 17px;
}

.hero-actions {
    display: flex;
    gap: 10px;
    margin-top: 28px;
}

.hero-card {
    position: relative;

    padding: 18px;

    border-radius: 28px;

    background: rgba(255,255,255,.82);

    border: 1px solid rgba(16,185,129,.12);

    box-shadow: var(--shadow-lg);

    transform:
        perspective(1000px)
        rotateY(-4deg)
        rotateX(2deg);
}

.hero-card::before {
    content: "";

    position: absolute;

    width: 180px;
    height: 180px;

    right: -50px;
    top: -50px;

    border-radius: 50%;

    background: rgba(16,185,129,.10);

    filter: blur(2px);
}

.window-head {
    display: flex;
    justify-content: space-between;

    padding: 8px;

    font-size: 12px;
    font-weight: 900;

    border-bottom: 1px solid var(--border);
}

.chat {
    min-height: 360px;

    padding: 28px 12px;

    background: linear-gradient(
        180deg,
        #fff,
        #f5faf7
    );

    border-radius: 18px;
}

.bubble {
    max-width: 80%;

    padding: 13px 15px;

    margin-bottom: 13px;

    border-radius: 17px;

    font-size: 12px;
}

.user-bubble {
    margin-left: auto;

    background: #edf1ef;
}

.ai-bubble {
    margin-right: auto;

    color: #fff;

    background:
        linear-gradient(
            145deg,
            #16221d,
            #0c1511
        );

    box-shadow:
        0 10px 25px rgba(0,0,0,.12);
}

.tool-pill {
    display: inline-flex;

    padding: 7px 10px;

    border-radius: 50px;

    color: var(--green-dark);
    background: var(--green-soft);

    font-size: 9px;
    font-weight: 800;
}

/* =========================
   AUTH
========================= */

.auth-page {
    min-height: 100vh;

    display: grid;
    place-items: center;

    padding: 30px;

    background:
        radial-gradient(
            circle at 20% 10%,
            rgba(16,185,129,.12),
            transparent 30%
        ),
        var(--bg);
}

.auth-brand {
    position: fixed;

    top: 25px;
    right: 30px;
}

.auth-card {
    width: min(440px, 100%);

    padding: 35px;

    border-radius: 24px;

    background: rgba(255,255,255,.92);

    border: 1px solid var(--border);

    box-shadow: var(--shadow-lg);

    backdrop-filter: blur(15px);
}

.auth-card.wide {
    width: min(530px, 100%);
}

.auth-heading h1 {
    margin: 8px 0;

    font-size: 27px;
    line-height: 1.3;
}

.auth-heading p {
    margin-bottom: 25px;

    color: var(--muted);

    font-size: 13px;
}

.form {
    display: grid;
    gap: 16px;
}

.form label {
    display: block;

    color: #37423e;

    font-size: 12px;
    font-weight: 900;
}

.form input,
.form textarea,
.form select {
    display: block;

    width: 100%;

    margin-top: 7px;

    padding: 12px 13px;

    border: 1px solid #dfe7e3;
    border-radius: 12px;

    outline: none;

    background: #fff;

    font-size: 13px;

    transition: .2s;
}

.form input:focus,
.form textarea:focus,
.form select:focus {
    border-color: var(--green);

    box-shadow:
        0 0 0 4px rgba(16,185,129,.09);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.auth-footer {
    margin-top: 20px;

    text-align: center;

    color: var(--muted);

    font-size: 12px;
}

.auth-footer a {
    color: var(--green-dark);
    font-weight: 900;
}

.alert {
    padding: 12px 14px;

    margin-bottom: 18px;

    border-radius: 12px;

    font-size: 12px;
}

.alert-danger {
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.alert-success {
    color: #047857;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}

/* =========================================================
   DASHBOARD
========================================================= */

.dashboard-shell {
    min-height: 100vh;

    display: flex;

    direction: rtl;

    background:
        radial-gradient(
            circle at 75% 0%,
            rgba(16,185,129,.06),
            transparent 30%
        ),
        #f7faf8;
}

/* =========================
   SIDEBAR
========================= */

.sidebar {
    position: fixed;

    top: 0;
    right: 0;
    bottom: 0;

    width: var(--sidebar-width);

    padding: 20px 14px;

    display: flex;
    flex-direction: column;

    color: #dce7e2;

    background:
        linear-gradient(
            180deg,
            #0b1713,
            #08110e
        );

    border-left: 1px solid rgba(255,255,255,.05);

    z-index: 100;

    overflow-y: auto;
}

.sidebar-brand {
    padding: 5px 8px 25px;

    color: #fff;
}

.workspace-mini {
    display: flex;
    align-items: center;

    gap: 10px;

    padding: 11px;

    margin-bottom: 18px;

    border-radius: 15px;

    background: rgba(255,255,255,.045);

    border: 1px solid rgba(255,255,255,.06);
}

.workspace-avatar {
    width: 37px;
    height: 37px;

    display: grid;
    place-items: center;

    flex: 0 0 auto;

    border-radius: 11px;

    color: #fff;

    background:
        linear-gradient(
            145deg,
            #34d399,
            #059669
        );

    box-shadow:
        0 8px 20px rgba(16,185,129,.20);
}

.workspace-mini b,
.workspace-mini small {
    display: block;

    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;
}

.workspace-mini b {
    color: #fff;
    font-size: 11px;
}

.workspace-mini small {
    margin-top: 2px;

    color: #7e9188;

    font-size: 9px;
}

.side-nav {
    display: grid;
    gap: 4px;
}

.side-nav a {
    position: relative;

    display: flex;
    align-items: center;

    gap: 11px;

    min-height: 43px;

    padding: 0 12px;

    border-radius: 11px;

    color: #879a91;

    font-size: 11px;
    font-weight: 700;

    transition: .2s;
}

.side-nav a span {
    width: 23px;
    height: 23px;

    display: grid;
    place-items: center;

    flex: 0 0 auto;

    border-radius: 7px;

    color: #9eafa7;

    background: rgba(255,255,255,.04);

    font-size: 12px;

    transition: .2s;
}

.side-nav a:hover {
    color: #fff;

    background: rgba(255,255,255,.05);

    transform: translateX(-2px);
}

.side-nav a.active {
    color: #fff;

    background:
        linear-gradient(
            90deg,
            rgba(16,185,129,.16),
            rgba(16,185,129,.05)
        );

    box-shadow:
        inset 3px 0 0 var(--green);
}

.side-nav a.active span {
    color: #fff;

    background:
        linear-gradient(
            145deg,
            var(--green),
            var(--green-dark)
        );

    box-shadow:
        0 6px 15px rgba(16,185,129,.18);
}

/* =========================
   SIDEBAR BOTTOM
========================= */

.side-bottom {
    margin-top: auto;
    padding-top: 20px;
}

.plan-card {
    padding: 14px;

    margin-bottom: 10px;

    border-radius: 15px;

    background:
        linear-gradient(
            145deg,
            rgba(16,185,129,.13),
            rgba(255,255,255,.035)
        );

    border: 1px solid rgba(16,185,129,.12);
}

.plan-card small,
.plan-card span {
    display: block;

    color: #789088;

    font-size: 9px;
}

.plan-card b {
    display: block;

    margin: 3px 0;

    color: #fff;

    font-size: 13px;
}

.logout-btn {
    width: 100%;

    padding: 10px;

    border: 0;

    border-radius: 10px;

    color: #879a91;

    background: transparent;

    text-align: right;

    font-size: 11px;
}

.logout-btn:hover {
    color: #fff;
    background: rgba(255,255,255,.04);
}

/* =========================
   MAIN
========================= */

.dashboard-main {
    width: calc(100% - var(--sidebar-width));

    min-width: 0;

    margin-right: var(--sidebar-width);

    padding: 30px 34px;
}

.narrow-main {
    max-width: 1050px;
}

/* =========================
   HEADER
========================= */

.dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 25px;
}

.dash-header h1 {
    margin: 5px 0 0;

    font-size: 26px;

    letter-spacing: -.7px;
}

.header-sub {
    margin: 4px 0 0;

    color: var(--muted);

    font-size: 12px;
}

.header-actions {
    display: flex;
    align-items: center;

    gap: 9px;
}

.round-btn {
    width: 39px;
    height: 39px;

    display: grid;
    place-items: center;

    border: 1px solid var(--border);
    border-radius: 11px;

    color: var(--muted);

    background: #fff;

    box-shadow: 0 4px 15px rgba(10,30,22,.03);
}

.profile-chip {
    display: flex;
    align-items: center;

    gap: 8px;

    padding: 5px 11px 5px 5px;

    border: 1px solid var(--border);
    border-radius: 999px;

    background: #fff;

    font-size: 11px;

    box-shadow: 0 4px 15px rgba(10,30,22,.03);
}

.profile-chip span {
    width: 30px;
    height: 30px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    color: var(--green-dark);

    background: var(--green-soft);

    font-weight: 900;
}

/* =========================
   SETUP BANNER
========================= */

.setup-banner {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 25px 27px;

    margin-bottom: 20px;

    overflow: hidden;

    border-radius: 20px;

    color: #fff;

    background:
        radial-gradient(
            circle at 15% 20%,
            rgba(16,185,129,.28),
            transparent 35%
        ),
        linear-gradient(
            145deg,
            #0d1b15,
            #111d18
        );

    box-shadow:
        0 18px 45px rgba(10,30,22,.12);
}

.setup-banner::after {
    content: "✦";

    position: absolute;

    left: 25px;
    bottom: -22px;

    color: rgba(255,255,255,.04);

    font-size: 130px;
}

.setup-banner h2 {
    margin: 4px 0;

    font-size: 20px;
}

.setup-banner p {
    margin: 0;

    color: #9cafa7;

    font-size: 11px;
}

/* =========================
   STATS
========================= */

.stats-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 14px;

    margin-bottom: 18px;
}

.stat-card {
    position: relative;

    min-width: 0;

    padding: 19px;

    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: 17px;

    background: rgba(255,255,255,.9);

    box-shadow: var(--shadow);

    transition: .2s;
}

.stat-card:hover {
    transform: translateY(-3px);

    box-shadow: 0 20px 45px rgba(10,30,22,.10);
}

.stat-card::after {
    content: "";

    position: absolute;

    width: 75px;
    height: 75px;

    left: -25px;
    bottom: -35px;

    border-radius: 50%;

    background: rgba(16,185,129,.07);
}

.stat-card span {
    display: block;

    color: #8a9791;

    font-size: 10px;
}

.stat-card strong {
    display: block;

    margin: 5px 0;

    font-size: 25px;

    letter-spacing: -.7px;
}

.stat-card small {
    color: #9ca8a2;

    font-size: 9px;
}

.muted-value {
    color: #87938e;

    font-size: 16px !important;
}

.online-value {
    color: var(--green-dark);

    font-size: 16px !important;
}

/* =========================
   PANELS
========================= */

.dashboard-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1.45fr)
        minmax(280px, .8fr);

    gap: 18px;
}

.panel {
    min-width: 0;

    padding: 20px;

    border: 1px solid var(--border);
    border-radius: 18px;

    background: rgba(255,255,255,.92);

    box-shadow: var(--shadow);
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;
}

.panel-head h3 {
    margin: 2px 0 0;

    font-size: 15px;
}

.panel-head > a {
    color: var(--green-dark);

    font-size: 10px;
    font-weight: 900;
}

.empty-state {
    padding: 60px 20px;

    text-align: center;

    color: #87938e;
}

.empty-icon {
    width: 54px;
    height: 54px;

    display: grid;
    place-items: center;

    margin: auto;

    border-radius: 17px;

    color: var(--green-dark);

    background:
        linear-gradient(
            145deg,
            #ecfdf5,
            #dff9ed
        );

    box-shadow:
        0 12px 25px rgba(16,185,129,.12);

    font-size: 21px;
}

.empty-state h3 {
    margin: 13px 0 3px;

    color: #37423e;

    font-size: 14px;
}

.empty-state p {
    max-width: 350px;

    margin: auto;

    font-size: 10px;
}

/* =========================
   CHECKLIST
========================= */

.check-list {
    display: grid;

    gap: 13px;

    margin-top: 22px;
}

.check-list > div {
    display: flex;
    align-items: center;

    gap: 10px;
}

.check {
    width: 29px;
    height: 29px;

    display: grid;
    place-items: center;

    flex: 0 0 auto;

    border-radius: 9px;

    color: #89958f;

    background: #f1f4f2;

    font-size: 10px;
    font-weight: 900;
}

.check.done {
    color: #fff;

    background:
        linear-gradient(
            145deg,
            var(--green),
            var(--green-dark)
        );

    box-shadow:
        0 6px 15px rgba(16,185,129,.18);
}

.check-list b,
.check-list small {
    display: block;
}

.check-list b {
    font-size: 11px;
}

.check-list small {
    color: #8b9892;

    font-size: 9px;
}

/* =========================
   WIZARD
========================= */

.wizard-card {
    width: 100%;
    max-width: 760px;

    padding: 30px;

    border: 1px solid var(--border);
    border-radius: 20px;

    background: #fff;

    box-shadow: var(--shadow-lg);
}

.wizard-progress {
    display: flex;
    align-items: center;

    margin-bottom: 30px;
}

.wizard-progress span {
    width: 31px;
    height: 31px;

    display: grid;
    place-items: center;

    flex: 0 0 auto;

    border-radius: 50%;

    color: #89958f;

    background: #eef2ef;

    font-size: 10px;
    font-weight: 900;
}

.wizard-progress span.active {
    color: #fff;

    background:
        linear-gradient(
            145deg,
            var(--green),
            var(--green-dark)
        );

    box-shadow:
        0 8px 18px rgba(16,185,129,.22);
}

.wizard-progress i {
    height: 1px;

    flex: 1;

    background: #e4e9e6;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;

    margin-top: 10px;
}

/* =========================================================
   MOBILE NAV
========================================================= */

.mobile-nav {
    display: none;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1100px) {

    :root {
        --sidebar-width: 215px;
    }

    .dashboard-main {
        padding: 25px 22px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        gap: 45px;
    }
}

@media (max-width: 850px) {

    :root {
        --sidebar-width: 72px;
    }

    .sidebar {
        width: 72px;

        padding:
            18px 9px;
    }

    .sidebar-brand {
        justify-content: center;
        padding-bottom: 20px;
    }

    .sidebar-brand span:last-child,
    .workspace-mini > div:last-child,
    .plan-card,
    .logout-btn {
        display: none;
    }

    .workspace-mini {
        justify-content: center;

        padding: 8px;

        background: transparent;
        border: 0;
    }

    .side-nav a {
        justify-content: center;

        padding: 0;

        font-size: 0;
    }

    .side-nav a span {
        width: 39px;
        height: 39px;

        font-size: 16px;
    }

    .dashboard-main {
        width: calc(100% - 72px);

        margin-right: 72px;
    }

    .hero {
        grid-template-columns: 1fr;

        padding-top: 50px;
    }

    .hero-card {
        max-width: 620px;

        margin: auto;
    }

    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 650px) {

    .container {
        width: min(100% - 28px, 1180px);
    }

    .nav-actions .nav-link,
    .nav-actions .btn-ghost {
        display: none;
    }

    .hero {
        min-height: auto;

        padding:
            45px 0
            65px;
    }

    .hero h1 {
        font-size: 39px;

        letter-spacing: -1.8px;
    }

    .hero-copy > p {
        font-size: 14px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .auth-page {
        padding: 20px;
    }

    .auth-brand {
        top: 18px;
        right: 18px;
    }

    .auth-card {
        padding: 25px 20px;
    }

    .dashboard-main {
        width: 100%;

        margin-right: 0;

        padding:
            20px
            15px
            90px;
    }

    .sidebar {
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;

        width: 100%;
        height: 67px;

        padding: 7px 10px;

        flex-direction: row;

        border-left: 0;
        border-top: 1px solid rgba(255,255,255,.07);

        box-shadow:
            0 -10px 35px rgba(0,0,0,.16);
    }

    .sidebar-brand,
    .workspace-mini,
    .side-bottom {
        display: none;
    }

    .side-nav {
        width: 100%;

        display: flex;

        align-items: center;
        justify-content: space-around;

        gap: 2px;
    }

    .side-nav a {
        width: 52px;
        height: 52px;

        min-height: 52px;

        border-radius: 13px;
    }

    .side-nav a span {
        width: 40px;
        height: 40px;
    }

    .side-nav a.active {
        box-shadow:
            inset 0 2px 0 var(--green);
    }

    .side-nav a.active span {
        transform: translateY(-2px);
    }

    .dash-header {
        align-items: flex-start;
    }

    .dash-header h1 {
        font-size: 22px;
    }

    .profile-chip b {
        display: none;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;

        gap: 10px;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-card strong {
        font-size: 21px;
    }

    .setup-banner {
        align-items: flex-start;

        flex-direction: column;
    }

    .setup-banner .btn {
        width: 100%;
    }

    .panel {
        padding: 16px;
    }

    .wizard-card {
        padding: 20px 16px;
    }
}

@media (max-width: 390px) {

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 34px;
    }

    .side-nav a {
        width: 47px;
    }
}