/* ── Admin-specific styles ──────────────────────────────────────────────── */

/* Login screen */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px 36px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 4px 24px rgba(0,0,0,.1);
    text-align: center;
}

.login-logo { font-size: 40px; margin-bottom: 12px; }

.login-card h2 { font-size: 22px; font-weight: 700; margin-bottom: 4px; }

.login-sub { color: #64748b; font-size: 14px; margin-bottom: 24px; }

.back-link {
    display: inline-block;
    margin-top: 20px;
    font-size: 13px;
    color: #64748b;
    text-decoration: none;
}
.back-link:hover { color: #2563eb; text-decoration: underline; }

/* Danger nav button */
.btn-nav-danger {
    background: transparent !important;
    border-color: rgba(248,113,113,.6) !important;
    color: #fca5a5 !important;
    font-family: inherit;
    cursor: pointer;
    font-size: 13px;
}
.btn-nav-danger:hover { background: rgba(220,38,38,.3) !important; }

/* Tabs */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0;
}

.tab-btn {
    background: none;
    border: none;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    border-radius: 4px 4px 0 0;
    font-family: inherit;
    transition: color .15s;
}

.tab-btn:hover { color: #1e293b; }
.tab-btn.active { color: #2563eb; border-bottom-color: #2563eb; }

/* Tab panels */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Panel grid */
.panel-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
    align-items: start;
}

@media (max-width: 700px) {
    .panel-grid { grid-template-columns: 1fr; }
}

/* Cards */
.card {
    background: #fff;
    border-radius: 12px;
    padding: 22px 24px;
    box-shadow: 0 1px 6px rgba(0,0,0,.07);
}

.card-wide { grid-column: span 1; }

.card-title { font-size: 15px; font-weight: 700; color: #1e293b; margin-bottom: 18px; }

.card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}
.card-title-row .card-title { margin-bottom: 0; }

/* Forms */
.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #1e293b;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

.form-check label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
}

.form-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: opacity .15s, transform .1s;
}

.btn:active { transform: scale(.97); }

.btn-primary  { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; }

.btn-secondary { background: #f1f5f9; color: #1e293b; border: 1px solid #e2e8f0; }
.btn-secondary:hover { background: #e2e8f0; }

.btn-danger   { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }

.btn-ghost {
    background: none;
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 5px 10px;
    font-size: 13px;
}
.btn-ghost:hover { background: #f1f5f9; }

.btn-full { width: 100%; justify-content: center; }

/* Alerts */
.alert {
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 12px;
}
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }

/* Filter pills */
.filter-pills { display: flex; gap: 6px; }

.pill {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    cursor: pointer;
    font-family: inherit;
    transition: all .15s;
}
.pill.active, .pill:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

/* Employee list */
.employees-list { display: flex; flex-direction: column; gap: 6px; min-height: 40px; }

.emp-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    gap: 10px;
    flex-wrap: wrap;
}

.emp-row-info { display: flex; align-items: center; gap: 10px; }

.emp-name { font-weight: 600; font-size: 14px; }

.emp-type-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.badge-ft { background: #dbeafe; color: #1e40af; }
.badge-pt { background: #fef3c7; color: #92400e; }

.emp-actions { display: flex; gap: 6px; }

.emp-stats {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.stat-chip {
    background: #f1f5f9;
    border-radius: 6px;
    padding: 3px 10px;
    font-weight: 600;
}

/* Name chips in admin schedule table */
.name-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px 4px 8px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    margin: 2px 3px;
    font-family: inherit;
    transition: background .15s, color .15s, transform .1s;
}
.name-chip:active { transform: scale(.95); }

.chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Present state → green, hover turns orange/red as warning */
.chip-present {
    background: #dcfce7;
    color: #166534;
}
.chip-present .chip-dot { background: #22c55e; }
.chip-present:hover {
    background: #fee2e2;
    color: #991b1b;
}
.chip-present:hover .chip-dot { background: #ef4444; }

/* Absent state → red with strikethrough */
.chip-absent {
    background: #fee2e2;
    color: #991b1b;
    text-decoration: line-through;
    opacity: .8;
}
.chip-absent .chip-dot { background: #ef4444; }
.chip-absent:hover {
    background: #dcfce7;
    color: #166534;
    text-decoration: none;
    opacity: 1;
}
.chip-absent:hover .chip-dot { background: #22c55e; }

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-box {
    background: #fff;
    border-radius: 14px;
    padding: 28px 28px 24px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 8px 40px rgba(0,0,0,.2);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.modal-header h3 { font-size: 17px; font-weight: 700; }

.modal-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #94a3b8;
    padding: 2px 6px;
    border-radius: 4px;
}
.modal-close:hover { background: #f1f5f9; color: #1e293b; }

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.text-muted { color: #64748b; font-size: 14px; }

/* Override modal checkboxes */
.override-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: #64748b;
    padding: 10px 4px 4px;
    border-top: 1px solid #e2e8f0;
    margin-top: 4px;
}
.override-section-label:first-child {
    border-top: none;
    margin-top: 0;
    padding-top: 2px;
}

.override-check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background .12s;
}
.override-check-item:hover { background: #f1f5f9; }

.override-check-item.is-assigned {
    background: #f0fdf4;
    border-color: #86efac;
    font-weight: 600;
    color: #166534;
}
.override-check-item.is-assigned:hover { background: #dcfce7; }

.override-check-item input { width: 16px; height: 16px; accent-color: #2563eb; cursor: pointer; }

    margin: 0 auto;
    padding: 20px;
}

.admin-section {
    background: white;
    border: 1px solid #e1dfdd;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
}

.admin-section h2 {
    margin-top: 0;
    font-size: 20px;
    font-weight: 600;
    color: #323130;
}

.admin-section h3 {
    margin-top: 0;
    font-size: 18px;
    font-weight: 600;
    color: #323130;
}

/* Form Styles */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #323130;
}

.form-group input[type="text"] {
    width: 100%;
    max-width: 400px;
    padding: 8px 12px;
    border: 1px solid #c8c6c4;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input[type="text"]:focus {
    outline: none;
    border-color: #0078d4;
}

.form-group input[type="checkbox"] {
    margin-right: 8px;
}

/* Buttons */
.btn-primary {
    background-color: #0078d4;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 600;
}

.btn-primary:hover {
    background-color: #106ebe;
}

.btn-secondary {
    background-color: #f3f2f1;
    color: #323130;
    border: 1px solid #c8c6c4;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 600;
}

.btn-secondary:hover {
    background-color: #e1dfdd;
}

.btn-warning {
    background-color: #d83b01;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 600;
}

.btn-warning:hover {
    background-color: #a4262c;
}

.btn-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
}

.btn-icon:hover {
    opacity: 0.7;
}

/* Filter Controls */
.filter-controls {
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
}

.filter-controls label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

/* Stats */
.stats {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat-badge {
    background-color: #f3f2f1;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    color: #323130;
}

/* Employees Grid */
.employees-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.employee-card {
    border: 1px solid #e1dfdd;
    border-radius: 6px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    transition: box-shadow 0.2s;
}

.employee-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.employee-card.fulltime {
    border-left: 4px solid #0078d4;
}

.employee-card.parttime {
    border-left: 4px solid #8764b8;
}

.employee-info {
    flex: 1;
}

.employee-name {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #323130;
    margin-bottom: 4px;
}

.employee-type {
    display: inline-block;
    font-size: 12px;
    color: #605e5c;
    background-color: #f3f2f1;
    padding: 2px 8px;
    border-radius: 3px;
}

.employee-actions {
    display: flex;
    gap: 5px;
}

.empty-state {
    text-align: center;
    color: #605e5c;
    padding: 40px;
    font-style: italic;
}

/* Info Section */
.info-section {
    background-color: #f3f9ff;
    border-color: #cce4f7;
}

.info-section ul {
    margin: 10px 0;
    padding-left: 20px;
}

.info-section li {
    margin-bottom: 8px;
    color: #323130;
    line-height: 1.5;
}

/* Danger Zone */
.danger-zone {
    background-color: #fef6f6;
    border-color: #f1bbbb;
}

.danger-zone .hint {
    margin-top: 10px;
    font-size: 13px;
    color: #605e5c;
    font-style: italic;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    position: relative;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #605e5c;
    cursor: pointer;
}

.close:hover {
    color: #323130;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Notifications */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    max-width: 400px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification.success {
    background-color: #dff6dd;
    border: 1px solid #0b6a0b;
    color: #0b6a0b;
}

.notification.error {
    background-color: #fde7e9;
    border: 1px solid #a4262c;
    color: #a4262c;
}

.notification.info {
    background-color: #f3f9ff;
    border: 1px solid #0078d4;
    color: #0078d4;
}

/* Responsive */
@media (max-width: 768px) {
    .employees-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 20% 10px;
        padding: 20px;
    }
    
    .filter-controls {
        flex-direction: column;
        gap: 10px;
    }
}
