
:root {
    --da-navy: #172554;
    --da-indigo: #312e81;
    --da-violet: #5b21b6;
    --da-teal: #0f766e;
    --da-cyan: #0891b2;
    --da-blue-soft: #eef2ff;
    --da-bg: #f5f7fb;
    --da-card: #ffffff;
    --da-border: #e2e8f0;
    --da-text: #172033;
    --da-muted: #64748b;
    --da-sidebar-width: 270px;
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--da-bg);
    color: var(--da-text);
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: var(--da-sidebar-width);
    min-width: var(--da-sidebar-width);
    min-height: 100vh;
    position: fixed;
    inset: 0 auto 0 0;
    padding: 26px 18px 22px;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 10% 0%, rgba(91,33,182,.42), transparent 36%),
        linear-gradient(180deg, #172554 0%, #1e1b4b 55%, #111827 100%);
    box-shadow: 10px 0 30px rgba(15,23,42,.12);
    z-index: 1040;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 24px;
}

.brand-symbol,
.login-logo {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: .95rem;
    letter-spacing: -.02em;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    box-shadow: 0 10px 25px rgba(6,182,212,.22);
}

.brand-symbol-lg {
    width: 62px;
    height: 62px;
    font-size: 1.15rem;
    border-radius: 18px;
}

.brand-name {
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    line-height: 1.1;
}

.brand-module {
    color: #a5f3fc;
    font-size: .83rem;
    font-weight: 600;
    letter-spacing: .05em;
}

.sidebar-section-label {
    color: rgba(255,255,255,.42);
    font-size: .68rem;
    letter-spacing: .12em;
    font-weight: 700;
    padding: 0 12px 8px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: rgba(255,255,255,.72);
    border-radius: 12px;
    padding: 11px 13px;
    font-size: .92rem;
    font-weight: 600;
    transition: all .18s ease;
}

.sidebar-link:hover {
    color: #fff;
    background: rgba(255,255,255,.08);
}

.sidebar-link.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(139,92,246,.35), rgba(6,182,212,.18));
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: inset 3px 0 0 #22d3ee;
}

.nav-icon {
    width: 22px;
    text-align: center;
    font-size: 1rem;
}

.sidebar-footer {
    margin-top: auto;
    padding: 18px 12px 0;
    border-top: 1px solid rgba(255,255,255,.08);
}

/* MAIN */
.main-area {
    flex: 1;
    min-width: 0;
    margin-left: var(--da-sidebar-width);
}

.topbar {
    height: 72px;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,.94);
    border-bottom: 1px solid var(--da-border);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1020;
}

.topbar-title {
    font-size: .9rem;
    font-weight: 600;
    color: var(--da-muted);
}

.user-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(135deg, var(--da-indigo), var(--da-cyan));
}

.user-name {
    font-size: .86rem;
    font-weight: 700;
}

.user-role {
    font-size: .72rem;
    color: var(--da-muted);
}

.mobile-menu-btn {
    display: none;
    border: 0;
    background: transparent;
    font-size: 1.45rem;
    margin-right: 10px;
}

.content-area {
    padding: 30px;
    max-width: 1700px;
    margin: 0 auto;
}

/* HEADINGS */
.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 26px;
}

.page-heading h1 {
    margin: 0 0 6px;
    font-size: clamp(1.7rem, 2.4vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -.035em;
    color: #111827;
}

.page-heading p {
    margin: 0;
    color: var(--da-muted);
}

.page-eyebrow {
    margin-bottom: 5px;
    color: var(--da-violet);
    font-weight: 800;
    font-size: .72rem;
    letter-spacing: .13em;
}

/* CARDS */
.card,
.analytics-card {
    border-radius: 16px !important;
    border: 1px solid rgba(226,232,240,.9) !important;
}

.card-header {
    padding: 16px 20px;
    border-bottom-color: var(--da-border);
}

.kpi-card {
    position: relative;
    overflow: hidden;
    border: 0 !important;
}

.kpi-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, var(--da-violet), var(--da-cyan));
}

.kpi-card .card-body {
    padding: 22px 24px;
}

.kpi-card .kpi-value {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: 1.15;
    margin-top: 7px;
    color: var(--da-navy);
}

.card-section-title {
    font-weight: 800;
    margin-bottom: 18px;
    font-size: 1rem;
}

/* BUTTONS */
.btn-analytics {
    border: 0;
    color: #fff;
    font-weight: 700;
    background: linear-gradient(135deg, var(--da-indigo), var(--da-violet));
    box-shadow: 0 8px 20px rgba(49,46,129,.18);
}

.btn-analytics:hover,
.btn-analytics:focus {
    color: #fff;
    background: linear-gradient(135deg, #252166, #4c1d95);
}

.btn-outline-analytics {
    color: var(--da-indigo);
    border-color: #a5b4fc;
    font-weight: 700;
    background: #fff;
}

.btn-outline-analytics:hover {
    color: #fff;
    background: var(--da-indigo);
    border-color: var(--da-indigo);
}

/* FORMS */
.form-label {
    color: #334155;
}

.form-control {
    border-radius: 10px;
    min-height: 44px;
    border-color: #cbd5e1;
}

.form-control:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 .2rem rgba(99,102,241,.12);
}

/* TABLES */
.table {
    --bs-table-bg: transparent;
}

.table thead th {
    padding: 13px 16px;
    white-space: nowrap;
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #64748b;
    font-weight: 800;
    background: #f8fafc;
    border-bottom: 1px solid var(--da-border);
}

.table tbody td {
    padding: 13px 16px;
    border-color: #eef2f7;
}

.table-hover tbody tr:hover {
    --bs-table-hover-bg: #f8fafc;
}

/* CHARTS */
.chart-container {
    position: relative;
    min-height: 320px;
}

/* UPLOAD */
.upload-zone {
    border: 2px dashed #c7d2fe;
    border-radius: 18px;
    padding: 42px 24px;
    text-align: center;
    background:
        radial-gradient(circle at 50% 0%, rgba(224,231,255,.75), transparent 55%),
        #fbfdff;
}

.upload-icon {
    width: 62px;
    height: 62px;
    margin: 0 auto 16px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--da-indigo);
    background: #eef2ff;
}

.selected-file {
    font-size: .88rem;
    font-weight: 600;
    color: var(--da-muted);
}

.validation-list {
    display: grid;
    gap: 13px;
    font-size: .9rem;
}

.validation-list span {
    display: inline-flex;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 7px;
    color: #0f766e;
    background: #ccfbf1;
    font-weight: 800;
}

.info-panel {
    padding: 15px;
    border-radius: 12px;
    background: #eef2ff;
    color: #3730a3;
}

/* ACERCA */
.acerca-hero {
    background:
        radial-gradient(circle at 100% 0%, rgba(34,211,238,.18), transparent 35%),
        linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
    border-bottom: 1px solid var(--da-border);
}

.feature-box {
    padding: 1rem 1.1rem;
    border: 1px solid var(--da-border);
    border-radius: .75rem;
    background: #fff;
    font-weight: 700;
}

.demo-note {
    padding: 1rem;
    border-radius: .75rem;
    background: #f8fafc;
    color: var(--da-muted);
    font-size: .9rem;
}

/* LOGIN */
.analytics-login {
    min-height: 100vh;
    background: #f6f7fb;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(420px, 1.05fr) minmax(420px, .95fr);
}

.login-brand-panel {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 70px;
    color: #fff;
    background:
        radial-gradient(circle at 15% 10%, rgba(34,211,238,.26), transparent 34%),
        radial-gradient(circle at 80% 80%, rgba(139,92,246,.34), transparent 38%),
        linear-gradient(145deg, #172554, #312e81 58%, #111827);
}

.login-brand-panel::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 50%;
    right: -170px;
    top: -120px;
}

.login-brand-content {
    position: relative;
    z-index: 2;
    max-width: 610px;
}

.login-logo {
    margin-bottom: 35px;
    width: 62px;
    height: 62px;
    border-radius: 18px;
    font-size: 1.1rem;
}

.login-kicker,
.login-form-kicker {
    font-size: .72rem;
    letter-spacing: .16em;
    font-weight: 800;
}

.login-kicker {
    color: #67e8f9;
    margin-bottom: 12px;
}

.login-form-kicker {
    color: var(--da-violet);
    margin-bottom: 8px;
}

.login-brand-panel h1 {
    max-width: 520px;
    font-size: clamp(2.2rem, 4vw, 4rem);
    line-height: 1.02;
    letter-spacing: -.05em;
    font-weight: 850;
    margin-bottom: 22px;
}

.login-brand-panel p {
    max-width: 540px;
    color: rgba(255,255,255,.72);
    font-size: 1.08rem;
    line-height: 1.65;
}

.login-feature-list {
    margin-top: 34px;
    display: grid;
    gap: 12px;
    color: rgba(255,255,255,.86);
}

.login-feature-list span {
    color: #67e8f9;
    margin-right: 8px;
}

.login-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 45px;
}

.login-card-pro {
    width: min(100%, 460px);
    padding: 38px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 25px 70px rgba(15,23,42,.12);
}

.demo-access-box {
    border-radius: 12px;
    padding: 13px 15px;
    background: #f1f5f9;
    color: #475569;
}

/* MOBILE */
.sidebar-overlay {
    display: none;
}

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

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

    .mobile-menu-btn {
        display: inline-block;
    }

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

    body.menu-open .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15,23,42,.48);
        z-index: 1030;
    }

    .content-area {
        padding: 22px;
    }

    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-brand-panel {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .topbar {
        padding: 0 16px;
    }

    .topbar-title {
        display: none;
    }

    .content-area {
        padding: 18px 14px;
    }

    .page-heading {
        flex-direction: column;
    }

    .login-form-panel {
        padding: 22px;
    }

    .login-card-pro {
        padding: 26px 22px;
    }
}
