:root {
    --ink: #111827;
    --muted: #64748b;
    --line: rgba(148, 163, 184, 0.24);
    --panel: rgba(255, 255, 255, 0.88);
    --panel-solid: #ffffff;
    --navy: #07111f;
    --green: #19c37d;
    --cyan: #22d3ee;
    --blue: #2563eb;
    --shadow: 0 22px 60px rgba(15, 23, 42, 0.14);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
}

a {
    text-decoration: none;
}

.portal-bg {
    background:
        radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.16), transparent 28%),
        radial-gradient(circle at 80% 10%, rgba(25, 195, 125, 0.13), transparent 24%),
        linear-gradient(135deg, #07111f 0%, #101827 48%, #0f172a 100%);
}

.auth-bg,
.dashboard-bg {
    background: #f6f8fb;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: #fff;
    font-weight: 800;
    letter-spacing: 0;
}

.brand-mark:hover {
    color: #fff;
}

.brand-icon {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 8px;
    color: #04111f;
    background: linear-gradient(135deg, var(--green), var(--cyan));
    box-shadow: 0 10px 24px rgba(34, 211, 238, 0.25);
}

.portal-navbar {
    background: rgba(7, 17, 31, 0.78);
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(18px);
}

.portal-navbar .nav-link {
    color: rgba(255, 255, 255, 0.78);
    font-weight: 600;
}

.portal-navbar .nav-link:hover {
    color: #fff;
}

.btn {
    border-radius: 8px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-gradient {
    color: #04111f;
    border: 0;
    background: linear-gradient(135deg, var(--green), var(--cyan));
    box-shadow: 0 14px 30px rgba(25, 195, 125, 0.25);
}

.btn-gradient:hover,
.btn-gradient:focus {
    color: #04111f;
    box-shadow: 0 18px 42px rgba(34, 211, 238, 0.28);
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.28);
}

.btn-soft {
    color: #0f766e;
    background: #e7fbf6;
    border: 1px solid #baf3e4;
}

.hero-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 7rem 0 3rem;
}

.hero-section {
    color: #fff;
}

.hero-kicker {
    display: inline-flex;
    gap: 0.55rem;
    align-items: center;
    padding: 0.55rem 0.75rem;
    margin-bottom: 1.4rem;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.84);
    background: rgba(255, 255, 255, 0.06);
}

.hero-title {
    max-width: 760px;
    margin: 0;
    font-size: clamp(3rem, 6vw, 5.8rem);
    line-height: 0.96;
    letter-spacing: 0;
    font-weight: 800;
}

.hero-subtitle {
    max-width: 570px;
    margin: 1.35rem 0 2rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 1.25rem;
}

.terminal-card {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    padding: 1.25rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(24px);
}

.terminal-header {
    display: flex;
    gap: 0.45rem;
    margin-bottom: 1.5rem;
}

.terminal-header span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
}

.terminal-metric,
.metric-grid > div {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(6, 15, 28, 0.5);
}

.terminal-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

.terminal-metric i {
    color: var(--green);
    font-size: 2rem;
}

.terminal-card small,
.metric-grid small {
    color: rgba(255, 255, 255, 0.58);
}

.terminal-card strong,
.metric-grid strong {
    display: block;
    margin-top: 0.2rem;
    font-size: 1.4rem;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin: 0.85rem 0;
}

.metric-grid > div {
    padding: 1rem;
}

.chart-lines {
    display: grid;
    gap: 0.65rem;
    margin-top: 1.25rem;
}

.chart-lines span {
    display: block;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--green), rgba(34, 211, 238, 0.25));
}

.chart-lines span:nth-child(2) {
    width: 72%;
}

.chart-lines span:nth-child(3) {
    width: 86%;
}

.chart-lines span:nth-child(4) {
    width: 58%;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
}

.auth-brand {
    position: fixed;
    top: 1.25rem;
    left: 1.25rem;
    color: var(--ink);
}

.auth-brand:hover {
    color: var(--ink);
}

.auth-card {
    width: min(100%, 440px);
    padding: 2rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-solid);
    box-shadow: var(--shadow);
}

.auth-heading {
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-icon {
    display: inline-grid;
    width: 54px;
    height: 54px;
    place-items: center;
    margin-bottom: 1rem;
    border-radius: 8px;
    color: #04111f;
    background: linear-gradient(135deg, var(--green), var(--cyan));
    font-size: 1.35rem;
}

.auth-heading h1 {
    font-size: 1.8rem;
    font-weight: 800;
}

.auth-heading p,
.auth-switch {
    color: var(--muted);
}

.form-label {
    font-weight: 700;
    color: #334155;
}

.form-control {
    border-radius: 8px;
    border-color: #dbe3ef;
}

.form-control:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 0.2rem rgba(34, 211, 238, 0.16);
}

.auth-switch {
    margin: 1.4rem 0 0;
    text-align: center;
}

.auth-switch a {
    color: #0f766e;
    font-weight: 800;
}

.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    width: 280px;
    padding: 1.25rem;
    background: #07111f;
    color: #fff;
    transition: transform 0.25s ease;
}

.sidebar-brand {
    margin-bottom: 2rem;
}

.sidebar-nav {
    display: grid;
    gap: 0.5rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 700;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.dashboard-main {
    width: 100%;
    margin-left: 280px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--line);
    background: rgba(246, 248, 251, 0.85);
    backdrop-filter: blur(16px);
}

.topbar-label,
.section-heading span {
    color: #0f766e;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.topbar h1,
.section-heading h2 {
    margin: 0.1rem 0 0;
    font-weight: 800;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.icon-btn {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: #fff;
}

.user-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 42px;
    padding: 0 0.85rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font-weight: 700;
}

.content-area {
    padding: 1.5rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.summary-card,
.product-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-solid);
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.07);
}

.summary-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}

.summary-card span,
.product-icon {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 8px;
    color: #0f766e;
    background: #e7fbf6;
    font-size: 1.35rem;
}

.summary-card small,
.license-row span,
.product-card p {
    color: var(--muted);
}

.summary-card strong {
    display: block;
    font-size: 1.5rem;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.product-card {
    height: 100%;
    padding: 1.25rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.product-card h3 {
    margin: 1rem 0 0.5rem;
    font-size: 1.1rem;
    font-weight: 800;
}

.license-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 1.25rem 0;
    padding: 0.85rem;
    border-radius: 8px;
    background: #f8fafc;
}

.license-row strong {
    white-space: nowrap;
}

.status-active {
    color: #0f766e;
}

.status-warning {
    color: #a16207;
}

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

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

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

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

@media (max-width: 575.98px) {
    .hero-title {
        font-size: 3rem;
    }

    .auth-card {
        padding: 1.5rem;
    }

    .auth-brand {
        position: static;
        margin-bottom: 1.25rem;
    }

    .auth-shell {
        align-content: center;
    }

    .topbar {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .topbar-actions {
        width: 100%;
        justify-content: space-between;
    }

    .content-area {
        padding: 1rem;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}
