/* Rod's Online Calendar — Design System */
:root {
    --bg-body:        #0f172a;
    --bg-card:        #1e293b;
    --bg-input:       #0f172a;
    --bg-card-hover:  #1a2332;
    --border-default: #1e293b;
    --border-card:    #283548;
    --border-input:   #334155;
    --text-bright:    #f8fafc;
    --text-heading:   #f1f5f9;
    --text-primary:   #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted:     #64748b;
    --text-dim:       #475569;
    --accent-blue:        #60a5fa;
    --accent-blue-dark:   #3b82f6;
    --accent-blue-deeper: #2563eb;
    --accent-indigo:      #1e40af;
    --color-success:      #4ade80;
    --color-success-dark: #059669;
    --color-warning:      #fbbf24;
    --color-warning-dark: #f59e0b;
    --color-danger:       #f87171;
    --color-danger-dark:  #ef4444;
    --color-danger-btn:   #dc2626;
    --color-info:         #38bdf8;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

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

html { font-size: 16px; }

body {
    font-family: var(--font-sans);
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--accent-blue); text-decoration: none; }
a:hover { color: var(--accent-blue-dark); text-decoration: underline; }

h1, h2, h3, h4 { color: var(--text-heading); font-weight: 600; line-height: 1.3; }

/* --- Buttons --- */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 20px;
    font-size: 0.9rem; font-weight: 500;
    border: none; border-radius: 8px; cursor: pointer;
    background: var(--accent-blue-dark); color: #fff;
    transition: background 0.15s, transform 0.1s;
}
.btn:hover { background: var(--accent-blue-deeper); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 6px 14px; font-size: 0.82rem; }
.btn-secondary { background: var(--border-card); color: var(--text-primary); }
.btn-secondary:hover { background: var(--border-input); }
.btn-danger { background: var(--color-danger-btn); }
.btn-danger:hover { background: var(--color-danger-dark); }
.btn-success { background: var(--color-success-dark); }
.btn-success:hover { background: #047857; }
.btn-outline {
    background: transparent; border: 1px solid var(--border-input);
    color: var(--text-primary);
}
.btn-outline:hover { background: var(--bg-card); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* --- Form elements --- */
input, select, textarea {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-input);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-family: var(--font-sans);
    width: 100%;
    transition: border-color 0.15s;
}
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--accent-blue-dark);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }
label { display: block; font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 6px; font-weight: 500; }

/* --- Cards --- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    padding: 24px;
}

/* --- Badge / Tags --- */
.badge {
    display: inline-flex; align-items: center;
    padding: 3px 10px; border-radius: 20px;
    font-size: 0.75rem; font-weight: 600;
}
.badge-success { background: rgba(74,222,128,0.15); color: var(--color-success); }
.badge-warning { background: rgba(251,191,36,0.15); color: var(--color-warning); }
.badge-danger { background: rgba(248,113,113,0.15); color: var(--color-danger); }
.badge-info { background: rgba(56,189,248,0.15); color: var(--color-info); }

/* --- Toast --- */
.toast-container {
    position: fixed; top: 20px; right: 20px; z-index: 10000;
    display: flex; flex-direction: column; gap: 8px;
}
.toast {
    padding: 12px 20px; border-radius: 8px;
    font-size: 0.85rem; font-weight: 500;
    background: var(--color-success-dark); color: #fff;
    animation: slideIn 0.2s ease-out;
    max-width: 380px;
}
.toast.error { background: var(--color-danger-btn); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* --- Modal --- */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6);
    display: flex; align-items: center; justify-content: center;
    z-index: 9000; backdrop-filter: blur(2px);
}
.modal-box {
    background: var(--bg-card); border: 1px solid var(--border-card);
    border-radius: 16px; padding: 28px;
    max-width: 440px; width: 90%;
    text-align: center;
}
.modal-box .modal-icon { font-size: 2rem; margin-bottom: 12px; }
.modal-box .modal-msg { margin-bottom: 20px; color: var(--text-primary); line-height: 1.5; }
.modal-box .modal-btns { display: flex; gap: 10px; justify-content: center; }

/* --- Utility --- */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.hidden { display: none !important; }

/* --- Responsive --- */
@media (max-width: 640px) {
    .card { padding: 16px; }
    .btn { padding: 8px 16px; }
}
