:root {
    --bg-app: #0b1120;
    --bg-surface: #111827;
    --bg-surface-2: #172033;
    --bg-surface-3: #1f2937;
    --bg-border: rgba(148, 163, 184, 0.15);
    --text-primary: #e5eefb;
    --text-secondary: #8fa4c2;
    --accent: #4f7cff;
    --accent-2: #37b7ff;
    --success-soft: rgba(34, 197, 94, 0.14);
    --warning-soft: rgba(245, 158, 11, 0.14);
    --danger-soft: rgba(239, 68, 68, 0.14);
    --info-soft: rgba(59, 130, 246, 0.14);
}

* {
    font-family: 'Inter', sans-serif;
}

body {
    background: radial-gradient(circle at top right, rgba(55, 183, 255, 0.12), transparent 30%), linear-gradient(180deg, #070b15 0%, #0b1120 100%);
    color: var(--text-primary);
}

.bg-surface,
.card,
.table-card,
.metric-card,
.btn-surface,
.notification-menu,
.dropdown-menu-dark,
.bg-surface-secondary {
    background-color: var(--bg-surface) !important;
}

.bg-surface-secondary {
    background-color: var(--bg-surface-2) !important;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 300px 1fr;
}

.sidebar {
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.98) 0%, rgba(9, 14, 25, 1) 100%);
    border-right: 1px solid var(--bg-border);
    position: sticky;
    top: 0;
    height: 100vh;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
}

.brand-name {
    color: white;
    font-weight: 800;
}

.brand-subtitle,
.text-secondary,
.form-text,
.page-kicker,
.eyebrow {
    color: var(--text-secondary) !important;
}

.sidebar .nav-link {
    color: #b7c6dd;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    font-weight: 500;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: rgba(79, 124, 255, 0.14);
    color: white;
}

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

.topbar {
    border-bottom: 1px solid var(--bg-border);
    background: rgba(11, 17, 32, 0.85);
    backdrop-filter: blur(18px);
    position: sticky;
    top: 0;
    z-index: 20;
}

.profile-pill,
.btn-surface,
.metric-card,
.card,
.table-card,
.login-panel {
    border: 1px solid var(--bg-border);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
}

.avatar-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(79, 124, 255, 0.18);
    color: white;
    font-weight: 700;
}

.page-title {
    font-weight: 700;
}

.content-wrapper {
    padding-bottom: 4rem;
}

.card,
.metric-card,
.table-card {
    border-radius: 20px;
    border-color: var(--bg-border);
}

.metric-card .metric-value {
    font-size: 2rem;
    font-weight: 800;
}

.metric-card .metric-label {
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
}

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-primary);
    --bs-table-border-color: var(--bg-border);
}

.table thead th {
    color: var(--text-secondary);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom-width: 1px;
}

.form-control,
.form-select,
.form-check-input {
    background-color: rgba(15, 23, 42, 0.85);
    border-color: var(--bg-border);
    color: var(--text-primary);
}

.form-control:focus,
.form-select:focus {
    background-color: rgba(15, 23, 42, 1);
    border-color: rgba(79, 124, 255, 0.7);
    box-shadow: 0 0 0 0.25rem rgba(79, 124, 255, 0.15);
    color: var(--text-primary);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border: none;
}

.btn-outline-light,
.btn-surface {
    border-color: var(--bg-border);
}

.login-page {
    background: radial-gradient(circle at top left, rgba(79, 124, 255, 0.18), transparent 24%), var(--bg-app);
}

.login-panel {
    max-width: 1080px;
    width: 100%;
    background: rgba(11, 17, 32, 0.95);
}

.login-panel-brand {
    background: linear-gradient(160deg, rgba(79, 124, 255, 0.18), rgba(17, 24, 39, 0.8));
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-soft-success,
.badge-soft-warning,
.badge-soft-danger,
.badge-soft-info {
    border-radius: 999px;
    padding: 0.55rem 0.75rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.badge-soft-success { background: var(--success-soft); color: #86efac; }
.badge-soft-warning { background: var(--warning-soft); color: #fcd34d; }
.badge-soft-danger { background: var(--danger-soft); color: #fca5a5; }
.badge-soft-info { background: var(--info-soft); color: #93c5fd; }

.chart-panel {
    min-height: 340px;
}

.notification-menu {
    width: 360px;
}

.task-progress {
    height: 6px;
    border: none;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(148, 163, 184, 0.12);
}

.task-progress::-webkit-progress-bar {
    background: rgba(148, 163, 184, 0.12);
    border-radius: 999px;
}

.task-progress::-webkit-progress-value {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-radius: 999px;
}

.task-progress::-moz-progress-bar {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-radius: 999px;
}

.task-progress-lg {
    height: 8px;
}

.list-group-item {
    border-color: var(--bg-border) !important;
}

.timeline-item {
    padding-left: 1rem;
    border-left: 2px solid rgba(79, 124, 255, 0.18);
}

.empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--text-secondary);
}

.status-pill {
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}

@media (max-width: 991.98px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        height: auto;
    }

    .topbar {
        position: relative;
    }
}
