/* --- DESIGN SYSTEM & CSS VARIABLES --- */
:root {
    --bg-primary: #faf9f6;       /* Linen / Off-white */
    --bg-secondary: #f0eee8;     /* Slightly darker linen */
    --text-primary: #3b3633;     /* Charcoal / Dark Brown */
    --text-secondary: #6b635c;   /* Medium warm grey */
    --text-muted: #9a938c;       /* Light warm grey */
    
    /* Neon gradients & Highlights -> Soft Natural Highlights */
    --primary-grad: linear-gradient(135deg, #10b981, #059669); /* Mint/Sage Green */
    --success-grad: linear-gradient(135deg, #34d399, #059669); /* Mint to dark sage */
    --danger-grad: linear-gradient(135deg, #fecaca, #f87171);  /* Soft peach to red */
    --warning-grad: linear-gradient(135deg, #fde68a, #fbbf24); /* Amber */
    --btn-disabled: #e5e2db;
    
    /* Glassmorphism properties */
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(0, 0, 0, 0.06);
    --glass-shadow: 0 8px 32px 0 rgba(107, 99, 92, 0.08);
    --glass-blur: blur(16px);
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
    line-height: 1.5;
}

/* Animated Glow Background Nodes */
.bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
}
.bg-glow-1 {
    top: -200px;
    left: -200px;
    background: #a7f3d0;
}
.bg-glow-2 {
    bottom: -200px;
    right: -200px;
    background: #fef08a;
}

/* --- APP LAYOUT --- */
.app-container {
    width: 100%;
    max-width: 1200px;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    z-index: 1;
}

/* --- HEADER --- */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--glass-shadow);
}

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

.logo-icon {
    font-size: 2rem;
    background: var(--primary-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.logo-text span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    letter-spacing: 2px;
    font-weight: 600;
}

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

.server-ip-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    color: #059669;
    font-weight: 600;
}

.user-status-widget {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--glass-border);
    padding: 6px 14px;
    border-radius: 50px;
}

.user-avatar {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.user-name {
    font-weight: 700;
    font-size: 0.95rem;
}

/* --- TAB NAVIGATION --- */
.tab-navigation {
    display: flex;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 4px;
    gap: 4px;
}

.tab-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent;
    border: none;
    padding: 12px 24px;
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.04);
}

.tab-btn.active {
    color: var(--text-primary);
    background: var(--glass-bg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--glass-border);
}

.tab-content {
    display: none;
    flex-direction: column;
    gap: 24px;
}

.tab-content.active {
    display: flex;
    animation: fadeIn 0.3s ease forwards;
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-primary {
    background: var(--primary-grad);
    color: white;
}
.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.03);
    border-color: var(--glass-border);
    color: var(--text-primary);
}
.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.06);
}

.btn-danger {
    background: var(--danger-grad);
    color: white;
}
.btn-danger:hover {
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.4);
    transform: translateY(-2px);
}

.btn-icon {
    padding: 8px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--text-secondary);
}
.btn-icon:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.06);
}

.btn-logout {
    color: #ef4444;
}
.btn-logout:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

/* --- CARDS & SECTIONS --- */
.card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--glass-shadow);
    padding: 24px;
}

.section-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    padding: 40px 32px;
    display: none;
}

.section-card.active {
    display: block;
    animation: fadeIn 0.4s ease forwards;
}

.section-header {
    text-align: center;
    margin-bottom: 32px;
}

.section-header h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 8px;
}

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

/* --- SECTION 1: USER SELECTION --- */
.user-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
    max-height: 350px;
    overflow-y: auto;
    padding: 8px;
}

.user-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.user-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(14, 165, 233, 0.35);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.user-card-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-grad);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.25);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.user-card-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.user-notice {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.admin-link {
    color: #38bdf8;
    text-decoration: none;
    font-weight: 700;
}
.admin-link:hover {
    text-decoration: underline;
}

/* --- SECTION 2: WORKSPACE --- */
#main-workspace {
    display: flex;
    flex-direction: column;
    gap: 24px;
    animation: fadeIn 0.4s ease forwards;
}

/* Stamping Top Block */
.stamping-workspace {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 24px;
}

@media (max-width: 768px) {
    .stamping-workspace {
        grid-template-columns: 1fr;
    }
}

/* Digital Clock Card */
.clock-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(240, 238, 232, 0.9));
}

.clock-date {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.clock-time {
    font-family: 'Outfit', sans-serif;
    font-size: 3.5rem;
    font-weight: bold;
    color: #059669;
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
    letter-spacing: 2px;
    margin-bottom: 16px;
}

.work-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.03);
    padding: 6px 14px;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #64748b;
}

/* Colors for Status dot based on state */
.work-status-indicator.status-off .status-dot { background-color: #64748b; }
.work-status-indicator.status-working .status-dot {
    background-color: #10b981;
    box-shadow: 0 0 10px #10b981;
    animation: pulseGlow 1.5s infinite;
}
.work-status-indicator.status-done .status-dot { background-color: #f59e0b; }

.status-label {
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.work-status-indicator.status-working .status-label { color: #34d399; }
.work-status-indicator.status-done .status-label { color: #fbbf24; }

/* Stamp Action Buttons */
.stamp-actions-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
}

.btn-stamp-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.btn-stamp {
    border: none;
    border-radius: var(--radius-md);
    padding: 32px 16px;
    cursor: pointer;
    font-family: inherit;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    transition: var(--transition-normal);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-clock-in {
    background: var(--success-grad);
}
.btn-clock-in::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 70%);
    opacity: 0;
    transition: var(--transition-fast);
}
.btn-clock-in:hover:not(:disabled) {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}
.btn-clock-in:hover:not(:disabled)::before {
    opacity: 1;
}

.btn-clock-out {
    background: var(--danger-grad);
}
.btn-clock-out::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%);
    opacity: 0;
    transition: var(--transition-fast);
}
.btn-clock-out:hover:not(:disabled) {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(244, 63, 94, 0.4);
}
.btn-clock-out:hover:not(:disabled)::before {
    opacity: 1;
}

.btn-stamp.pulse-recommend {
    animation: btnPulse 2s infinite;
}

.btn-stamp:disabled {
    background: var(--btn-disabled);
    cursor: not-allowed;
    opacity: 0.3;
    transform: none !important;
    box-shadow: none !important;
}

.stamp-icon {
    font-size: 2.2rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.stamp-text {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 4px;
}

.stamp-sub {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    opacity: 0.7;
}

/* Today Summary Block */
.today-summary {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 12px 20px;
    justify-content: space-around;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.summary-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
}

.summary-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-primary);
}

.summary-separator {
    width: 1px;
    height: 20px;
    background: var(--glass-border);
}

/* --- HISTORY & TABLES --- */
.history-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 24px 32px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 16px;
}

.history-title h2 {
    font-size: 1.3rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.history-title h2 i {
    color: #38bdf8;
}

.history-subtitle {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Month Navigation */
.month-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.03);
    padding: 4px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
}

.current-month-display {
    font-weight: 800;
    font-size: 1rem;
    padding: 0 16px;
    min-width: 130px;
    text-align: center;
}

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

/* Table Design */
.table-container {
    overflow-x: auto;
    max-height: 480px;
    overflow-y: auto;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.history-table th {
    background: rgba(250, 249, 246, 0.85);
    backdrop-filter: blur(8px);
    color: var(--text-secondary);
    font-weight: 700;
    padding: 12px 16px;
    border-bottom: 2px solid var(--glass-border);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 2;
}

.history-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition-fast);
}

.history-table tr:hover td {
    background: rgba(0, 0, 0, 0.02);
}

.history-table tr.today-row td {
    background: rgba(16, 185, 129, 0.05);
    border-top: 1px solid rgba(16, 185, 129, 0.2);
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
}

/* Day of Week colors */
.day-sat { color: #60a5fa !important; }
.day-sun { color: #f87171 !important; }

/* Time columns */
.time-col {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
}

.time-modified {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    font-size: 0.65rem;
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    padding: 1px 5px;
    border-radius: 4px;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.work-hours {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: #34d399;
}

.note-cell {
    color: var(--text-secondary);
    font-size: 0.85rem;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.actions-col {
    text-align: center;
    width: 80px;
}

.btn-edit-row {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.2);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition-fast);
}
.btn-edit-row:hover {
    background: #38bdf8;
    color: var(--bg-primary);
    transform: scale(1.05);
}

/* Dropdown styling */
.shift-select {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    border-radius: 4px;
    padding: 4px 8px;
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
    width: 100%;
    max-width: 130px;
    cursor: pointer;
    transition: var(--transition-fast);
}
.shift-select:focus {
    border-color: rgba(16, 185, 129, 0.5);
    background: rgba(0, 0, 0, 0.05);
}

/* Fix dropdown options readability in dark theme */
.shift-select option,
.form-control option,
select option {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

/* Autocomplete Suggestions */
#log-user-suggestions li {
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}
#log-user-suggestions li:last-child {
    border-bottom: none;
}
#log-user-suggestions li:hover {
    background-color: rgba(16, 185, 129, 0.1);
}
.retired-badge {
    background-color: #f3f4f6;
    color: #9ca3af;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    font-weight: 600;
}

/* --- EXCEL-LIKE SHIFT MATRIX --- */
.team-shift-card {
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.matrix-wrapper {
    position: relative;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.matrix-scroll-container {
    overflow-x: auto;
    max-height: 500px;
    overflow-y: auto;
}

.matrix-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.85rem;
}

/* Base header/cell style */
.matrix-table th, 
.matrix-table td {
    border-right: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    padding: 8px 10px;
    text-align: center;
    min-width: 44px;
    height: 40px;
    vertical-align: middle;
}

/* Sticky top row for dates */
.matrix-table th {
    background: #faf9f6;
    color: var(--text-secondary);
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Sticky left column for names */
.matrix-table th:first-child,
.matrix-table td:first-child {
    position: sticky;
    left: 0;
    width: 130px;
    min-width: 130px;
    max-width: 130px;
    background: #faf9f6;
    font-weight: 700;
    text-align: left;
    border-right: 2px solid var(--glass-border);
    z-index: 11;
}

/* Top-left header cell must be on top of everything */
.matrix-table th:first-child {
    z-index: 15;
}

.matrix-table tr:hover td {
    background: rgba(0, 0, 0, 0.02);
}
.matrix-table tr:hover td:first-child {
    background: #f0eee8; /* Keep name column readable on hover */
}

/* Badge tags for matrix cell values */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    padding: 0 6px;
    height: 26px;
    border-radius: 13px;
    font-weight: 800;
    font-size: 0.75rem;
    line-height: 1;
    white-space: nowrap;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.badge-work { background: #3b82f6; } /* 出 (出勤) */
.badge-off { background: #475569; }  /* 公 (公休) */
.badge-paid { background: #f43f5e; } /* 有 (有給) */
.badge-am { background: #d97706; }   /* 前 (午前休) */
.badge-pm { background: #ca8a04; }   /* 後 (午後休) */

.matrix-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* --- MODAL DIALOGS --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 90%;
    max-width: 480px;
    transform: scale(0.9);
    transition: transform var(--transition-normal);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

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

.modal-header h2 {
    font-size: 1.2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #059669;
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
}
.btn-close-modal:hover {
    color: var(--text-primary);
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    position: relative;
}

.form-group-row {
    display: flex;
    gap: 16px;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.form-control {
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-fast);
}

.form-control:focus {
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.form-control[readonly] {
    background: #f0eee8;
    color: var(--text-secondary);
    cursor: not-allowed;
}

input[type="time"]::-webkit-calendar-picker-indicator,
input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
}

.btn-clear-time {
    position: absolute;
    right: 8px;
    bottom: 8px;
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 3px 6px;
    font-size: 0.7rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}
.btn-clear-time:hover {
    background: #ef4444;
    color: white;
}

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

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

/* Utilities */
.text-success { color: #10b981; }
.text-danger { color: #f43f5e; }

/* --- TOAST NOTIFICATIONS --- */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
}

.toast {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 400px;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
    transform: translateX(0);
}

.toast-icon {
    font-size: 1.25rem;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 800;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.toast-success { border-left: 4px solid #10b981; }
.toast-success .toast-icon { color: #10b981; }

.toast-error { border-left: 4px solid #ef4444; }
.toast-error .toast-icon { color: #ef4444; }

.toast-info { border-left: 4px solid #3b82f6; }
.toast-info .toast-icon { color: #3b82f6; }

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

@keyframes pulseGlow {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 15px #10b981; }
    100% { transform: scale(1); opacity: 0.8; }
}

@keyframes btnPulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.loading-spinner {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-size: 1.1rem;
}
.loading-spinner i {
    margin-right: 8px;
    color: #10b981;
}
