/* Judith Management System - Modern Design */

/* ==================== CSS Variables ==================== */
:root {
    /* Brand Colors - Theatre/Dramatic theme */
    --primary: #7c3aed;
    --primary-dark: #6d28d9;
    --primary-light: #a78bfa;
    --primary-bg: rgba(124, 58, 237, 0.08);

    /* Semantic Colors */
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.1);

    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Semantic Mappings */
    --background: var(--gray-50);
    --surface: #ffffff;
    --surface-hover: var(--gray-50);
    --text: var(--gray-900);
    --text-secondary: var(--gray-600);
    --text-muted: var(--gray-400);
    --border: var(--gray-200);
    --border-light: var(--gray-100);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Layout */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --sidebar-width: 260px;
    --header-height: 64px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition: 200ms ease;
    --transition-slow: 300ms ease;
}

/* ==================== Reset & Base ==================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

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

img {
    max-width: 100%;
    height: auto;
}

/* ==================== Typography ==================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text);
}

h1 { font-size: 1.875rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }

.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }

/* ==================== App Layout ==================== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ==================== Sidebar ==================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform var(--transition);
}

.sidebar-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo img {
    height: 36px;
    width: auto;
}

.sidebar-logo-text {
    height: 24px;
    width: auto;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 0 12px;
    margin-bottom: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    margin-bottom: 2px;
}

.nav-link:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.nav-link.active {
    background: var(--primary-bg);
    color: var(--primary);
}

.nav-link .icon {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

.nav-link .badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid var(--border-light);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.user-menu:hover {
    background: var(--surface-hover);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-bg);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ==================== Main Content ==================== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ==================== Top Header ==================== */
.top-header {
    height: var(--header-height);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 50;
}

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

.page-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb-separator {
    color: var(--text-muted);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==================== Header Actions ==================== */
.header-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.25rem;
    transition: all var(--transition-fast);
}

.header-btn:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.header-btn .notification-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 18px;
    height: 18px;
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* ==================== Page Container ==================== */
.page-container {
    flex: 1;
    padding: 32px;
    max-width: 1400px;
}

.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    margin-bottom: 8px;
}

.page-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ==================== Cards ==================== */
.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-light);
    background: var(--gray-50);
}

/* Stat Cards */
.stat-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-light);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.stat-card .stat-icon.primary {
    background: var(--primary-bg);
    color: var(--primary);
}

.stat-card .stat-icon.success {
    background: var(--success-bg);
    color: var(--success);
}

.stat-card .stat-icon.warning {
    background: var(--warning-bg);
    color: var(--warning);
}

.stat-card .stat-icon.info {
    background: var(--info-bg);
    color: var(--info);
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-card .stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ==================== Buttons ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--text);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--gray-200);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-outline:hover:not(:disabled) {
    background: var(--surface-hover);
    border-color: var(--gray-300);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
    background: var(--surface-hover);
    color: var(--text);
}

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

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
}

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

.btn-success:hover:not(:disabled) {
    background: #059669;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
}

.btn-icon.btn-sm {
    width: 28px;
    height: 28px;
}

/* ==================== Forms ==================== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text);
}

.form-label.required::after {
    content: '*';
    color: var(--danger);
    margin-left: 4px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    color: var(--text);
    background: var(--surface);
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

select.form-input option,
select.form-select option {
    color: var(--text);
    background: var(--surface);
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.form-error {
    font-size: 0.8rem;
    color: var(--danger);
    margin-top: 6px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* Checkbox & Radio */
.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.form-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* ==================== Tables ==================== */
.table-container {
    overflow-x: auto;
}

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

.table th,
.table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.table th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: var(--gray-50);
}

.table tr:hover td {
    background: var(--surface-hover);
}

.table td {
    font-size: 0.9rem;
}

.table .actions {
    display: flex;
    gap: 4px;
}

/* ==================== Badges ==================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-primary {
    background: var(--primary-bg);
    color: var(--primary);
}

.badge-success {
    background: var(--success-bg);
    color: var(--success);
}

.badge-danger {
    background: var(--danger-bg);
    color: var(--danger);
}

.badge-warning {
    background: var(--warning-bg);
    color: var(--warning);
}

.badge-info {
    background: var(--info-bg);
    color: var(--info);
}

.badge-secondary {
    background: var(--gray-100);
    color: var(--text-secondary);
}

/* ==================== Modal ==================== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 24px;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--surface);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.25rem;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ==================== Toast ==================== */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--gray-800);
    color: white;
    padding: 14px 20px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-success {
    background: var(--success);
}

.toast-error {
    background: var(--danger);
}

.toast-warning {
    background: var(--warning);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==================== Empty State ==================== */
.empty-state {
    text-align: center;
    padding: 64px 24px;
    color: var(--text-muted);
}

.empty-state .icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--text);
    margin-bottom: 8px;
}

.empty-state p {
    margin-bottom: 24px;
}

/* ==================== Loading ==================== */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 48px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== Notification Panel ==================== */
.notification-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 380px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
    display: none;
    z-index: 100;
}

.notification-panel.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.notification-panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notification-panel-header h3 {
    font-size: 1rem;
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.notification-item:hover {
    background: var(--surface-hover);
}

.notification-item.unread {
    background: var(--primary-bg);
}

.notification-item.unread:hover {
    background: rgba(124, 58, 237, 0.12);
}

.notification-item-title {
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.notification-item-content {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-item-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.notification-panel-footer {
    padding: 12px 20px;
    text-align: center;
}

.notification-panel-footer a {
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 500;
}

.notification-panel-footer a:hover {
    text-decoration: underline;
}

/* ==================== Season Countdown Banner ==================== */
.countdown-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.countdown-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.countdown-banner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: 10%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.countdown-content {
    position: relative;
    z-index: 1;
}

.countdown-label {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 8px;
}

.countdown-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.countdown-timer {
    display: flex;
    gap: 24px;
}

.countdown-item {
    text-align: center;
}

.countdown-value {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.countdown-unit {
    font-size: 0.75rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==================== Grid Layouts ==================== */
.grid {
    display: grid;
    gap: 24px;
}

.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ==================== Lists ==================== */
.list {
    list-style: none;
}

.list-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition-fast);
}

.list-item:hover {
    background: var(--surface-hover);
}

.list-item:last-child {
    border-bottom: none;
}

.list-item-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    font-size: 1.25rem;
}

.list-item-content {
    flex: 1;
    min-width: 0;
}

.list-item-title {
    font-weight: 500;
    margin-bottom: 2px;
}

.list-item-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.list-item-actions {
    display: flex;
    gap: 8px;
}

/* ==================== Tabs ==================== */
.tabs {
    display: flex;
    gap: 4px;
    background: var(--gray-100);
    padding: 4px;
    border-radius: var(--radius);
    margin-bottom: 24px;
}

.tab {
    padding: 10px 20px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tab:hover {
    color: var(--text);
}

.tab.active {
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

/* ==================== Login Page ==================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    padding: 24px;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo {
    margin-bottom: 24px;
}

.login-logo img {
    height: 48px;
}

.login-header h1 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-secondary);
}

.login-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}

.login-card .form-group:last-of-type {
    margin-bottom: 24px;
}

.error-message {
    background: var(--danger-bg);
    color: var(--danger);
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    margin-bottom: 16px;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ==================== Admin-Only Visibility ==================== */
.admin-only {
    display: none !important;
}

body.is-admin .admin-only {
    display: block !important;
}

body.is-admin .admin-only-flex {
    display: flex !important;
}

body.is-admin .admin-only-inline {
    display: inline-flex !important;
}

body.is-admin .admin-only-grid {
    display: grid !important;
}

/* ==================== Utilities ==================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }

.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }

.p-16 { padding: 16px; }
.p-24 { padding: 24px; }
.p-32 { padding: 32px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }

.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.hidden { display: none !important; }

.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==================== Responsive ==================== */
@media (max-width: 1024px) {
    .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .page-container {
        padding: 16px;
    }

    .grid-cols-4,
    .grid-cols-3,
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .countdown-timer {
        gap: 16px;
    }

    .countdown-value {
        font-size: 1.75rem;
    }

    .notification-panel {
        position: fixed;
        top: var(--header-height);
        right: 0;
        left: 0;
        width: 100%;
        border-radius: 0;
    }

    .modal {
        margin: 16px;
        max-height: calc(100vh - 32px);
    }

    .top-header {
        padding: 0 16px;
    }

    .header-left {
        gap: 8px;
    }
}

/* ==================== Mobile Menu Toggle ==================== */
.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text);
    font-size: 1.5rem;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Mobile overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

.sidebar-overlay.active {
    display: block;
}

/* ==================== Quick Actions Grid ==================== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}

.quick-action-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    color: var(--text);
}

.quick-action-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.quick-action-card .icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.quick-action-card .label {
    font-weight: 500;
    font-size: 0.9rem;
}

/* ==================== Status Tags ==================== */
.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-active {
    background: var(--success-bg);
    color: var(--success);
}

.status-active::before {
    background: var(--success);
}

.status-preparing {
    background: var(--warning-bg);
    color: var(--warning);
}

.status-preparing::before {
    background: var(--warning);
}

.status-closed {
    background: var(--gray-100);
    color: var(--text-secondary);
}

.status-closed::before {
    background: var(--gray-400);
}

/* ==================== File Upload ==================== */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--gray-50);
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.upload-icon {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.upload-text {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.upload-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ==================== Search Input ==================== */
.search-input-wrapper {
    position: relative;
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-input-wrapper input {
    padding-left: 42px;
}

/* ==================== Floating Action Button ==================== */
.fab {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.fab:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .fab {
        bottom: 24px;
        right: 24px;
    }
}

/* ==================== Role Checkboxes & Tags ==================== */
.roles-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.role-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    background: var(--surface);
}

.role-checkbox:hover {
    border-color: var(--primary-light);
    background: var(--primary-bg);
}

.role-checkbox input {
    width: 14px;
    height: 14px;
    accent-color: var(--primary);
    cursor: pointer;
}

.role-checkbox.full-access {
    border-color: var(--primary-light);
    background: var(--primary-bg);
}

.role-checkbox.full-access span {
    color: var(--primary);
    font-weight: 500;
}

/* Role Tags */
.role-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.role-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    background: var(--gray-100);
    color: var(--text-secondary);
}

.role-tag.full-access {
    background: var(--primary-bg);
    color: var(--primary);
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    line-height: 1.5;
}

.alert-info {
    background: var(--primary-bg);
    border: 1px solid var(--primary-light);
    color: var(--primary-dark);
}

.alert-info strong {
    color: var(--primary);
}

.alert-warning {
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #9a3412;
}

.alert-danger {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

/* Form Section */
.form-section {
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 20px;
}

.form-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.form-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
}

/* ==================== Casting Admin View ==================== */
.casting-admin-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.casting-admin-group {
    padding: 12px;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
}

.casting-admin-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.casting-admin-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.casting-admin-member {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

@media (max-width: 600px) {
    .casting-admin-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== Season Transition ==================== */
.transition-user-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    background: var(--surface);
    transition: all var(--transition-fast);
}

.transition-user-item:hover {
    border-color: var(--primary-light);
}

.transition-user-select {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.transition-user-select .checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.transition-user-select .checkbox-label input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.transition-user-select .current-roles {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: 28px;
}

.transition-user-roles {
    margin-left: 28px;
    padding-top: 8px;
    border-top: 1px dashed var(--border-light);
    transition: opacity var(--transition-fast);
}

.roles-checkbox-group.compact {
    gap: 6px;
}

.roles-checkbox-group.compact .role-checkbox {
    padding: 4px 8px;
    font-size: 0.75rem;
}

.roles-checkbox-group.compact .role-checkbox input {
    width: 12px;
    height: 12px;
}

@media (max-width: 600px) {
    .transition-user-item {
        padding: 12px;
    }

    .transition-user-roles {
        margin-left: 0;
    }
}
