:root {
    --bg: #0d0d0d;
    --surface: #161616;
    --surface-2: #1f1f1f;
    --border: #2a2a2a;
    --text: #e8e8e8;
    --text-muted: #6b6b6b;
    --accent: #e62117;
    --accent-hover: #ff2d22;
    --radius: 6px;
    --radius-lg: 10px;
    --gradient-spot: #1a0a0a;
}

[data-theme="light"] {
    --bg: #f5f5f5;
    --surface: #ffffff;
    --surface-2: #efefef;
    --border: #e0e0e0;
    --text: #1a1a1a;
    --text-muted: #888888;
    --gradient-spot: rgba(230, 33, 23, 0.06);
}

[data-theme="light"] .alert-success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

[data-theme="light"] .alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

[data-theme="light"] .alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    margin-bottom: 30px;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
}

.nav {
    display: flex;
    gap: 20px;
}

.nav a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: var(--radius);
    transition: color 0.2s, background-color 0.2s;
}

.nav a:hover,
.nav button:hover {
    background-color: var(--surface-2);
    color: var(--text);
}

.nav button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px 16px;
    border-radius: var(--radius);
    transition: color 0.2s, background-color 0.2s;
    font-size: inherit;
    font-family: inherit;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 16px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    transition: all 0.2s;
    letter-spacing: 0.02em;
}

.btn-primary {
    background-color: var(--accent);
    color: white;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
}

.btn-secondary {
    background-color: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background-color: var(--border);
}

.card {
    background-color: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 24px;
    margin-bottom: 20px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text);
}

.input-group input,
.input-group textarea,
.input-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 16px;
    font-family: 'DM Sans', sans-serif;
    background-color: var(--surface-2);
    color: var(--text);
    transition: border-color 0.2s;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--accent);
}

.input-group input::placeholder,
.input-group textarea::placeholder {
    color: var(--text-muted);
}

@keyframes progressShimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.progress-bar {
    width: 100%;
    height: 6px;
    background-color: var(--surface-2);
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, #ff6b63 50%, var(--accent) 100%);
    background-size: 200% auto;
    animation: progressShimmer 2s linear infinite;
    transition: width 0.3s;
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    border: 1px solid;
}

.alert-success {
    background-color: #0f1f12;
    color: #6ee7a0;
    border-color: #1a3d24;
}

.alert-error {
    background-color: #1f0d0d;
    color: #f87171;
    border-color: #3d1a1a;
}

.alert-info {
    background-color: #0d1520;
    color: #7dd3fc;
    border-color: #1a3050;
}

/* Utility classes */
.text-muted  { color: var(--text-muted); }
.text-sm     { font-size: 0.875rem; }
.text-xs     { font-size: 0.75rem; }
.mono        { font-family: 'IBM Plex Mono', monospace; }
.mt-4        { margin-top: 4px; }
.mt-8        { margin-top: 8px; }
.mt-12       { margin-top: 12px; }
.mt-16       { margin-top: 16px; }

/* Skeleton loader */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

.skeleton-card {
    height: 90px;
    background: var(--surface-2);
    border-radius: var(--radius);
    margin-bottom: 12px;
    animation: pulse 1.5s ease-in-out infinite;
}

/* Global select & date inputs */
select, input[type="date"] {
    background-color: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 6px 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
}

select:focus, input[type="date"]:focus {
    outline: none;
    border-color: var(--accent);
}

option {
    background-color: var(--surface-2);
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Details/summary */
details summary { cursor: pointer; color: var(--text-muted); }
details summary:hover { color: var(--text); }
