:root {
    --bg: #0d1117;
    --bg-soft: #161b22;
    --card: #1f2937;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --accent: #14b8a6;
    --accent-2: #0ea5e9;
    --pm-font: "Segoe UI", system-ui, sans-serif;
}

/* Font family */
:root[data-font="sans"]  { --pm-font: "Segoe UI", system-ui, sans-serif; }
:root[data-font="serif"] { --pm-font: Georgia, "Times New Roman", serif; }
:root[data-font="mono"]  { --pm-font: "Cascadia Mono", "Consolas", monospace; }

/* Font size */
:root[data-font-size="sm"] { font-size: 14px; }
:root[data-font-size="md"] { font-size: 16px; }
:root[data-font-size="lg"] { font-size: 18px; }

html, body { font-family: var(--pm-font); }

[data-theme="light"] {
    --bg: #f3f4f6;
    --bg-soft: #ffffff;
    --card: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --accent: #0d9488;
    --accent-2: #0284c7;
}

[data-theme="light"] html,
[data-theme="light"] body {
    background: #f3f4f6;
    color: var(--text);
}

[data-theme="light"] .card {
    background: #ffffff;
    border-color: #d1d5db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .form-control,
[data-theme="light"] .form-select {
    background-color: #ffffff;
    color: var(--text);
    border-color: #d1d5db;
}

[data-theme="light"] .table-dark {
    --bs-table-bg: #f9fafb;
    --bs-table-color: var(--text);
}

[data-theme="light"] .navbar-dark .navbar-brand,
[data-theme="light"] .navbar-dark .nav-link {
    color: var(--text);
}

[data-theme="light"] .sidebar {
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
}

html, body {
    font-family: "Segoe UI", "Trebuchet MS", sans-serif;
    background: radial-gradient(circle at top right, #1f2937, var(--bg));
    color: var(--text);
}

a {
    color: var(--accent);
}

.top-row {
    background: transparent;
    color: var(--muted);
}

.app-header {
    font-weight: 600;
    letter-spacing: 0.03rem;
}

.content {
    padding-top: 1.2rem;
}

.card {
    border-radius: 12px;
    border: 1px solid #334155;
    background: linear-gradient(145deg, #111827, #1f2937);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.asset-edit-card {
    position: sticky;
    top: 4.25rem;
    z-index: 2;
}

.label {
    color: var(--muted);
    font-size: 0.85rem;
}

.metric {
    font-size: 1.4rem;
    font-weight: 700;
}

.btn-primary {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border: none;
}

.form-control,
.form-select {
    background-color: var(--bg-soft);
    color: var(--text);
    border-color: #334155;
}

.table-dark {
    --bs-table-bg: transparent;
}

/* Dashboard cards */
.dashboard-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

.dashboard-card .card-icon {
    font-size: 1.6rem;
    margin-bottom: 0.4rem;
}

/* Notification bell badge */
.badge-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    font-size: 0.7rem;
    font-weight: 700;
    background: #ef4444;
    color: #fff;
    border-radius: 9px;
    padding: 0 4px;
    margin-left: 4px;
    vertical-align: middle;
}

/* Notification list */
.notification-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #334155;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item.is-unread {
    border-left: 3px solid var(--accent);
}

.notification-item.is-read {
    opacity: 0.6;
}

/* Nav user info */
.nav-user-info {
    font-size: 0.8rem;
    color: var(--muted);
    padding: 0.25rem 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Allocation div-bars */
.allocation-track {
    height: 8px;
    border-radius: 4px;
    background: #334155;
    overflow: hidden;
}

.allocation-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.pot-bar {
    position: relative;
    border-radius: 2px 2px 0 0;
}

.pot-marker {
    position: absolute;
    top: -9px;
    left: 50%;
    width: 8px;
    height: 8px;
    transform: translateX(-50%);
    border: 1px solid var(--bg);
    border-radius: 50%;
    background: #f59e0b;
}

.pot-marker-end {
    background: #ef4444;
}
