:root {
    --bg: #07111f;
    --bg-elevated: rgba(12, 23, 41, 0.88);
    --bg-soft: rgba(18, 31, 54, 0.82);
    --border: rgba(154, 177, 214, 0.14);
    --border-strong: rgba(154, 177, 214, 0.22);
    --text: #e8eefc;
    --muted: #95a5c3;
    --primary: #57c7ff;
    --primary-strong: #1997ff;
    --success: #3ddc97;
    --warning: #f4b860;
    --danger: #ff6f91;
    --info: #74a4ff;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
    font-family: "Plus Jakarta Sans", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(32, 103, 255, 0.22), transparent 30%),
        radial-gradient(circle at 80% 10%, rgba(54, 226, 199, 0.14), transparent 25%),
        linear-gradient(180deg, #08101b 0%, #03070e 100%);
    color: var(--text);
}

body {
    line-height: 1.55;
}

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

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

.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.login-shell,
.app-shell {
    width: 100%;
}

.login-shell {
    display: grid;
    grid-template-columns: minmax(320px, 480px) minmax(320px, 1fr);
    gap: 28px;
    max-width: 1280px;
}

.login-panel,
.login-highlight,
.panel,
.hero-panel,
.stat-card,
.sidebar,
.topbar,
.sidebar-card {
    backdrop-filter: blur(18px);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.login-panel,
.login-highlight,
.panel,
.hero-panel,
.stat-card,
.sidebar-card {
    border-radius: var(--radius-xl);
}

.login-panel,
.login-highlight {
    min-height: 720px;
}

.login-panel {
    padding: 42px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-highlight {
    position: relative;
    overflow: hidden;
    padding: 42px;
    display: flex;
    align-items: flex-end;
}

.gradient-orb {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    filter: blur(24px);
    opacity: 0.5;
}

.orb-one {
    top: 40px;
    right: 60px;
    background: rgba(25, 151, 255, 0.5);
}

.orb-two {
    bottom: 50px;
    left: 40px;
    background: rgba(61, 220, 151, 0.3);
}

.hero-card {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 28px;
    border-radius: 26px;
    background: rgba(4, 11, 21, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.hero-grid,
.stats-grid,
.account-card-grid,
.grid-two,
.check-grid {
    display: grid;
    gap: 18px;
}

.hero-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 26px;
}

.metric-tile {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.metric-tile span,
.eyebrow {
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 700;
}

.metric-tile strong,
.stat-card strong {
    display: block;
    margin-top: 8px;
    font-size: 22px;
}

.login-panel h2,
.hero-panel h3,
.panel h3,
.topbar h2,
.hero-card h3 {
    margin: 10px 0;
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.15;
}

.login-copy,
.section-copy,
.muted,
.account-card p,
.group-card p,
.topbar p {
    color: var(--muted);
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand h1,
.topbar h2,
.panel h3,
.group-card h4,
.account-card h4 {
    margin: 0;
}

.brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-weight: 800;
    color: #03111f;
    background: linear-gradient(135deg, #9ee2ff 0%, #57c7ff 45%, #3ddc97 100%);
}

.app-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 24px;
    padding: 24px;
}

.sidebar {
    padding: 26px 20px;
    border-radius: 30px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    min-height: calc(100vh - 48px);
    position: sticky;
    top: 24px;
}

.nav-list {
    display: grid;
    gap: 8px;
}

.nav-item {
    padding: 14px 16px;
    border-radius: 16px;
    color: var(--muted);
    transition: all 0.2s ease;
}

.nav-item:hover,
.nav-item.active {
    color: var(--text);
    background: rgba(87, 199, 255, 0.12);
    border: 1px solid rgba(87, 199, 255, 0.16);
}

.sidebar-card {
    margin-top: auto;
    padding: 18px;
}

.main-shell {
    min-width: 0;
}

.topbar {
    border-radius: 24px;
    padding: 22px 26px;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
}

.content {
    padding-top: 24px;
}

.page-grid,
.stack-lg,
.stack-md,
.activity-list,
.group-list {
    display: grid;
    gap: 24px;
}

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

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

.account-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.panel,
.hero-panel {
    padding: 24px;
}

.hero-panel {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
}

.panel-header,
.account-card-head,
.group-card-head,
.activity-item,
.scheduler-row,
.inline-form,
.topbar-actions,
.table-actions,
.inline-compact {
    display: flex;
    gap: 14px;
    align-items: center;
}

.panel-header,
.group-card-head,
.account-card-head {
    justify-content: space-between;
}

.field {
    display: grid;
    gap: 8px;
}

.field input,
.field select,
.field textarea,
.inline-compact input[type="number"] {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-strong);
    color: var(--text);
    padding: 14px 16px;
    border-radius: 14px;
    outline: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: rgba(87, 199, 255, 0.5);
    box-shadow: 0 0 0 4px rgba(87, 199, 255, 0.12);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 14px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

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

.button.primary {
    color: #03111f;
    font-weight: 700;
    background: linear-gradient(135deg, #7ddcff 0%, #57c7ff 45%, #3ddc97 100%);
}

.button.secondary,
.button.ghost {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border);
}

.button.full {
    width: 100%;
}

.danger-text {
    color: #ffb6c7;
}

.pill,
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.pill {
    background: rgba(255, 255, 255, 0.06);
}

.badge.success {
    background: rgba(61, 220, 151, 0.15);
    color: #7af0bd;
}

.badge.warning {
    background: rgba(244, 184, 96, 0.16);
    color: #ffcf84;
}

.badge.danger {
    background: rgba(255, 111, 145, 0.16);
    color: #ff9cb4;
}

.badge.muted {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.badge.info {
    background: rgba(116, 164, 255, 0.18);
    color: #adc6ff;
}

.account-card,
.group-card {
    padding: 20px;
    border-radius: 22px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
}

.account-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 16px 0 10px;
    color: var(--muted);
}

.table-shell {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 16px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.truncate-cell {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.empty-state,
.empty-cell {
    padding: 24px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
    text-align: center;
}

.empty-cell {
    border: none;
}

.activity-item,
.scheduler-row {
    justify-content: space-between;
    padding: 18px 20px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.scheduler-row select {
    min-width: 160px;
}

.check-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.check-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--muted);
}

.check-card input {
    margin-top: 4px;
}

.check-card.static {
    color: var(--text);
}

.alert {
    padding: 16px 18px;
    border-radius: 16px;
    margin-bottom: 18px;
    border: 1px solid transparent;
}

.alert.success {
    background: rgba(61, 220, 151, 0.1);
    border-color: rgba(61, 220, 151, 0.24);
}

.alert.danger {
    background: rgba(255, 111, 145, 0.1);
    border-color: rgba(255, 111, 145, 0.24);
}

.alert.info {
    background: rgba(116, 164, 255, 0.1);
    border-color: rgba(116, 164, 255, 0.24);
}

.code-block {
    padding: 16px;
    border-radius: 16px;
    background: #02060c;
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-family: Consolas, monospace;
    overflow-x: auto;
}

.chart-card {
    padding: 14px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.03);
}

canvas {
    width: 100%;
    height: 260px;
}

@media (max-width: 1100px) {
    .app-shell,
    .login-shell,
    .grid-two,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        min-height: auto;
        position: static;
    }

    .hero-panel,
    .topbar,
    .scheduler-row,
    .inline-form,
    .table-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 720px) {
    .app-shell,
    .login-body {
        padding: 16px;
    }

    .login-panel,
    .login-highlight,
    .panel,
    .hero-panel,
    .sidebar,
    .topbar {
        padding: 18px;
    }

    .hero-grid,
    .check-grid {
        grid-template-columns: 1fr;
    }
}
