:root {
    --background: #f3f6fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --sidebar: #0f172a;
    --sidebar-soft: #1e293b;
    --primary: #0f766e;
    --primary-hover: #115e59;
    --text: #172033;
    --muted: #64748b;
    --border: #e2e8f0;
    --danger: #b91c1c;
    --danger-soft: #fef2f2;
    --success: #166534;
    --success-soft: #f0fdf4;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    --radius: 20px;
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: light;
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
}

button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

.auth-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.2), transparent 34rem),
        linear-gradient(145deg, #0f172a, #172554);
}

.auth-shell {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 32px 18px;
}

.auth-card {
    width: min(100%, 470px);
    padding: 34px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 30px 80px rgba(2, 6, 23, 0.35);
}

.install-card {
    width: min(100%, 790px);
}

.auth-brand,
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 13px;
}

.auth-brand strong,
.sidebar-brand strong {
    display: block;
    font-size: 15px;
}

.auth-brand span,
.sidebar-brand span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.brand-mark {
    display: grid;
    width: 45px;
    height: 45px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(145deg, #14b8a6, #0f766e);
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    box-shadow: 0 12px 30px rgba(15, 118, 110, 0.28);
}

.auth-heading {
    margin: 34px 0 26px;
}

.auth-heading h1 {
    margin: 0;
    font-size: clamp(27px, 5vw, 34px);
    letter-spacing: -0.04em;
}

.auth-heading p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.65;
}

.form-section {
    margin-top: 30px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

.section-heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
}

.section-heading > span {
    display: grid;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    background: #ccfbf1;
    color: var(--primary);
    font-weight: 800;
}

.section-heading h2 {
    margin: 0;
    font-size: 18px;
}

.section-heading p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.form-grid {
    display: grid;
    gap: 18px;
}

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

.form-span-2 {
    grid-column: span 2;
}

.field {
    display: block;
    margin-bottom: 18px;
}

.form-grid .field {
    margin-bottom: 0;
}

.field > span {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-size: 13px;
    font-weight: 750;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 48px;
    padding: 11px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 13px;
    outline: none;
    background: #fff;
    color: var(--text);
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.13);
}

.form-help {
    margin: 15px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border: 0;
    border-radius: 13px;
    cursor: pointer;
    font-weight: 800;
    transition:
        transform 0.2s ease,
        background 0.2s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    background: var(--primary);
    color: #fff;
}

.button-primary:hover {
    background: var(--primary-hover);
}

.button-muted {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
}

.button-block {
    width: 100%;
}

.alert {
    margin: 22px 0;
    padding: 15px 17px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.6;
}

.alert strong,
.alert span {
    display: block;
}

.alert ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

.alert-danger {
    border: 1px solid #fecaca;
    background: var(--danger-soft);
    color: var(--danger);
}

.alert-success {
    border: 1px solid #bbf7d0;
    background: var(--success-soft);
    color: var(--success);
}

.dashboard-layout {
    display: grid;
    min-height: 100vh;
    grid-template-columns: 270px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    height: 100vh;
    flex-direction: column;
    padding: 25px 20px;
    background: var(--sidebar);
    color: #e2e8f0;
}

.sidebar-brand {
    padding: 0 8px;
}

.sidebar-brand span {
    color: #94a3b8;
}

.sidebar-nav {
    display: grid;
    gap: 5px;
    margin-top: 35px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 700;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: var(--sidebar-soft);
    color: #fff;
}

.sidebar-nav a span {
    display: grid;
    width: 24px;
    place-items: center;
    color: #5eead4;
}

.sidebar-footer {
    margin-top: auto;
}

.sidebar-user {
    margin-bottom: 15px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
}

.sidebar-user strong,
.sidebar-user span {
    display: block;
}

.sidebar-user strong {
    font-size: 13px;
}

.sidebar-user span {
    margin-top: 4px;
    overflow: hidden;
    color: #94a3b8;
    font-size: 11px;
    text-overflow: ellipsis;
}

.dashboard-main {
    padding: 34px;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.dashboard-header h1 {
    margin: 5px 0 0;
    font-size: clamp(27px, 4vw, 38px);
    letter-spacing: -0.045em;
}

.dashboard-header p {
    margin: 9px 0 0;
    color: var(--muted);
}

.eyebrow {
    color: var(--primary);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.header-company {
    min-width: 190px;
    padding: 14px 17px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.header-company span,
.header-company strong {
    display: block;
}

.header-company span {
    color: var(--muted);
    font-size: 11px;
}

.header-company strong {
    margin-top: 4px;
    font-size: 14px;
}

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

.stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 21px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.stat-card div span,
.stat-card div strong {
    display: block;
}

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

.stat-card div strong {
    margin-top: 3px;
    font-size: 28px;
    letter-spacing: -0.04em;
}

.stat-icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 15px;
    font-weight: 900;
}

.stat-blue {
    background: #dbeafe;
    color: #1d4ed8;
}

.stat-green {
    background: #dcfce7;
    color: #15803d;
}

.stat-orange {
    background: #ffedd5;
    color: #c2410c;
}

.stat-purple {
    background: #f3e8ff;
    color: #7e22ce;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 20px;
    margin-top: 20px;
}

.panel-card {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.panel-heading h2 {
    margin: 5px 0 0;
    font-size: 20px;
    letter-spacing: -0.025em;
}

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

.quick-action {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--surface-soft);
    transition:
        transform 0.2s ease,
        border-color 0.2s ease;
}

.quick-action:hover {
    transform: translateY(-2px);
    border-color: #5eead4;
}

.quick-action strong,
.quick-action p {
    display: block;
}

.quick-action p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.quick-icon {
    display: grid;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 13px;
    background: #ccfbf1;
    color: var(--primary);
    font-weight: 900;
}

.activity-list {
    display: grid;
}

.activity-item {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
    border-bottom: 0;
}

.activity-item strong {
    display: block;
    font-size: 13px;
}

.activity-item p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.activity-dot {
    width: 9px;
    height: 9px;
    margin-top: 5px;
    border-radius: 50%;
    background: #14b8a6;
    box-shadow: 0 0 0 5px #ccfbf1;
}

.empty-state {
    padding: 30px 15px;
    text-align: center;
}

.empty-state strong {
    display: block;
}

.empty-state p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 1050px) {
    .dashboard-layout {
        grid-template-columns: 220px minmax(0, 1fr);
    }

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

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .dashboard-layout {
        display: block;
    }

    .sidebar {
        position: static;
        width: 100%;
        height: auto;
    }

    .sidebar-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sidebar-footer {
        margin-top: 25px;
    }

    .dashboard-main {
        padding: 22px 16px;
    }

    .dashboard-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .header-company {
        width: 100%;
    }

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

    .form-span-2 {
        grid-column: span 1;
    }

    .auth-card {
        padding: 25px 20px;
    }
}

@media (max-width: 460px) {
    .sidebar-nav {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 17px;
    }
}