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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.header h1 {
    color: #2c3e50;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    color: #7f8c8d;
    font-size: 1.1em;
}

/* Draft Status */
.draft-status {
    background: #2c3e50;
    color: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    border-left: 5px solid #3498db;
}

.status-complete, .status-active, .status-pending {
    text-align: center;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
    margin-right: 8px;
}

.status-active-badge {
    background: #27ae60;
    color: white;
}

.status-complete-badge {
    background: #3498db;
    color: white;
}

.draft-status h2 {
    margin-bottom: 15px;
    font-size: 1.5em;
}

.current-picker {
    font-size: 1.3em;
    margin: 15px 0;
}

.weeks-count {
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 20px;
}

/* Progress Bar */
.progress-bar {
    background: rgba(255,255,255,0.2);
    height: 30px;
    border-radius: 15px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-fill {
    background: #4CAF50;
    height: 100%;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.progress-text {
    text-align: center;
    opacity: 0.9;
    margin-top: 10px;
}

/* Calendar Grid */
.calendar-section {
    margin: 40px 0;
}

.calendar-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 30px;
}

.week-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    transition: all 0.2s ease;
    position: relative;
}

.week-card.available {
    border-color: #4CAF50;
    background: #f1f8f4;
    cursor: pointer;
}

.week-card.partial {
    border-color: #ff9800;
    background: #fff8e1;
    cursor: pointer;
}

.week-card.available:hover,
.week-card.partial:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

.week-card.taken {
    background: #f5f5f5;
    border-color: #bdbdbd;
    opacity: 0.7;
}

.week-card.blocked {
    background: #e0e0e0;
    border-color: #9e9e9e;
    cursor: not-allowed;
    position: relative;
}

.week-card.blocked::after {
    content: '🚫';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2em;
    color: rgba(0, 0, 0, 0.3);
}

.week-card.selected {
    background: #667eea !important;
    border-color: #667eea !important;
    color: white;
}

.week-card.selected .week-number,
.week-card.selected .week-dates {
    color: white;
}

.week-number {
    font-weight: bold;
    color: #2c3e50;
    font-size: 0.9em;
    margin-bottom: 4px;
}

.week-dates {
    color: #7f8c8d;
    font-size: 0.85em;
}

.week-assignee {
    margin-top: 8px;
    font-size: 0.8em;
    color: #e74c3c;
    font-weight: 600;
}

.checkmark {
    position: absolute;
    top: 8px;
    right: 8px;
    color: white;
    font-size: 1.2em;
    opacity: 0;
    transition: opacity 0.2s;
}

.week-card.selected .checkmark {
    opacity: 1;
}

/* Legend */
.legend {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

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

.legend-box {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    border: 2px solid;
}

.legend-box.available {
    background: #f1f8f4;
    border-color: #4CAF50;
}

.legend-box.partial {
    background: #fff8e1;
    border-color: #ff9800;
}

.legend-box.taken {
    background: #f5f5f5;
    border-color: #bdbdbd;
}

.legend-box.empty-slot-legend {
    background: #f0f8f4;
    border-color: #4CAF50;
}

.legend-box.occupied-full-legend {
    background: #ffe6e6;
    border-color: #e74c3c;
}

.legend-box.partial-occupied-legend {
    background: linear-gradient(90deg, #ffe6e6 50%, #f0f8f4 50%);
    border-color: #e74c3c;
}

/* Doctor List */
.doctor-list {
    margin-top: 40px;
}

.doctor-list h2 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.doctors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.doctor-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.doctor-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.doctor-weeks {
    color: #7f8c8d;
    font-size: 0.9em;
}

/* Picker Page */
.picker-instructions {
    background: #2c3e50;
    color: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    text-align: center;
    border-left: 5px solid #3498db;
}

.instruction-box h2 {
    margin-bottom: 15px;
}

.turn-info {
    margin-top: 10px;
    opacity: 0.9;
}

.selection-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: center;
}

.selection-info a {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
}

.selection-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin: 30px 0;
}

#selected-count {
    font-size: 1.2em;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 10px;
}

#selected-weeks {
    color: #7f8c8d;
}

/* Buttons */
.button-container {
    text-align: center;
    margin: 30px 0;
}

.btn-primary {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1.1em;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
}

.btn-primary:hover:not(:disabled) {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-primary:disabled {
    background: #bdbdbd;
    cursor: not-allowed;
}

.btn-secondary {
    background: #7f8c8d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
}

.btn-secondary:hover {
    background: #6c7a89;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(127, 140, 141, 0.4);
}

.btn-danger {
    background: #c0392b;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
}

.btn-danger:hover {
    background: #a93226;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(192, 57, 43, 0.4);
}

.btn-small {
    padding: 5px 10px;
    font-size: 0.9em;
    vertical-align: middle;
}

.btn-large {
    padding: 20px 50px;
    font-size: 1.3em;
}

/* Messages */
.message {
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
    display: none;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Admin Page */
.admin-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.admin-section h2 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.coming-soon-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #eef1f4;
    border: 1px solid #d5dbe2;
    border-radius: 8px;
    padding: 14px 16px;
    opacity: 0.75;
}

.coming-soon-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: #4a5968;
    margin-bottom: 4px;
}

.coming-soon-copy {
    margin: 0;
    color: #6d7885;
    font-size: 0.9rem;
}

.btn-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.link-box {
    margin: 15px 0;
}

.link-box label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #2c3e50;
}

.link-box input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
}

.doctor-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.doctor-table th,
.doctor-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.doctor-table th {
    background: #34495e;
    color: white;
    font-weight: 600;
}

.doctor-table tr:hover {
    background: #f8f9fa;
}

.badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

.badge.active {
    background: #4CAF50;
    color: white;
}

.badge.complete {
    background: #2196F3;
    color: white;
}

.badge.pending {
    background: #ff9800;
    color: white;
}

.help-text {
    margin-top: 10px;
    font-size: 0.9em;
    color: #7f8c8d;
}

/* Landing Page */
.landing {
    text-align: center;
    padding: 40px 0;
}

.landing h1 {
    color: #2c3e50;
    font-size: 3em;
    margin-bottom: 20px;
}

.tagline {
    color: #7f8c8d;
    font-size: 1.3em;
    margin-bottom: 50px;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 50px 0;
}

.feature {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
}

.feature h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.cta {
    margin-top: 50px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    font-size: 1.2em;
}

/* Error Page */
.error-page {
    text-align: center;
    padding: 60px 20px;
}

.error-page h1 {
    color: #e74c3c;
    font-size: 3em;
    margin-bottom: 20px;
}

.error-message {
    color: #7f8c8d;
    font-size: 1.2em;
    margin-bottom: 30px;
}

/* Settings Grid */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 25px;
}

.settings-group {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.settings-group h3 {
    color: #667eea;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.settings-group .link-box input,
.settings-group .link-box select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.settings-group .doctor-table input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.settings-group .doctor-table .pos-input {
    width: 60px;
}

.settings-group .doctor-table .weeks-input {
    width: 60px;
}

@media (max-width: 900px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 1.8em;
    }
    
    .calendar-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }
    
    .doctors-grid {
        grid-template-columns: 1fr;
    }
    
    .features {
        grid-template-columns: 1fr;
    }

    .coming-soon-option {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Admin Calendar for blocking weeks */
.admin-calendar {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}

.week-card-container {
    position: relative;
}

.week-checkbox {
    display: none; /* Hide the actual checkbox */
}

.week-card-container .week-card {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-align: center;
    background-color: #fff;
    display: block; /* Make label a block element */
}

.week-card-container .week-card:hover {
    border-color: #2980b9;
    transform: translateY(-2px);
}

.week-checkbox:checked + .week-card {
    background-color: #c0392b;
    color: white;
    border-color: #a93226;
}

.week-checkbox:checked + .week-card .week-number,
.week-checkbox:checked + .week-card .week-dates {
    color: white;
}

/* Picker 2 Week Card */
.week-card-p2 {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.2s ease;
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.week-card-p2:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.week-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.week-slots {
    display: flex;
    gap: 6px;
    min-height: 55px;
}

.time-slot {
    flex: 1;
    border: 2px dashed #d0d0d0;
    border-radius: 6px;
    padding: 6px 4px;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.75em;
    color: #999;
    transition: all 0.2s ease;
}

.time-slot.available {
    background: #fafafa;
    border-color: #d0d0d0;
}

.time-slot.taken {
    background: #f5f5f5;
    border: 2px solid #9e9e9e;
    color: #424242;
    font-weight: 600;
}

.time-slot.full-week {
    flex: 2;
    background: #f5f5f5;
    border: 2px solid #9e9e9e;
}

.time-slot-label {
    font-size: 0.7em;
    color: #999;
    margin-bottom: 4px;
    text-align: center;
}

.time-slot.taken .time-slot-label {
    color: #666;
}

.slot-doctor-name {
    font-size: 0.8em;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    word-break: break-word;
}

.selection-indicator {
    margin-top: 8px;
    font-size: 0.95em;
    font-weight: bold;
    color: #1976d2;
}

/* Selection states - when user is actively selecting */
.week-card-p2.selected-full {
    background-color: #e3f2fd;
    border-color: #1976d2;
    border-width: 3px;
}

.week-card-p2.selected-full .time-slot.available {
    background-color: #90caf9;
    border-color: #1976d2;
    border-style: solid;
    color: #0d47a1;
}

.week-card-p2.selected-mw .time-slot:first-child.available {
    background-color: #ce93d8;
    border-color: #7b1fa2;
    border-style: solid;
    color: #4a148c;
}

.week-card-p2.selected-thf .time-slot:last-child.available {
    background-color: #ce93d8;
    border-color: #7b1fa2;
    border-style: solid;
    color: #4a148c;
}

.week-card-p2.selected-full .week-header,
.week-card-p2.selected-mw .week-header,
.week-card-p2.selected-thf .week-header {
    color: #1976d2;
    font-weight: 600;
}
/* Blocked weeks */

.week-card-p2.blocked {
    background: #eeeeee;
    border-color: #757575;
    border-width: 2px;
    cursor: not-allowed;
    opacity: 0.75;
}

.week-card-p2.blocked:hover {
    transform: none;
    box-shadow: none;
}

.week-card-p2.blocked .time-slot {
    background: #e0e0e0;
    border-color: #9e9e9e;
    color: #757575;
}

.blocked-indicator {
    font-weight: bold;
    color: #d32f2f;
    font-size: 0.85em;
    text-align: center;
    margin-top: 4px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(44, 62, 80, 0.7);
    animation: fadeIn 0.2s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: #ffffff;
    margin: 80px auto;
    padding: 0;
    border: none;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    position: relative;
    animation: slideDown 0.3s ease-out;
}

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

.modal-content h2 {
    background: linear-gradient(135deg, #3498db 0%, #2c3e50 100%);
    color: white;
    margin: 0;
    padding: 20px 30px;
    border-radius: 12px 12px 0 0;
    font-size: 1.3em;
    font-weight: 600;
}

.modal-content form,
.modal-content > p {
    padding: 30px;
}

.close {
    color: rgba(255, 255, 255, 0.8);
    position: absolute;
    top: 18px;
    right: 25px;
    font-size: 32px;
    font-weight: 300;
    line-height: 1;
    transition: all 0.2s;
}

.close:hover,
.close:focus {
    color: white;
    text-decoration: none;
    cursor: pointer;
    transform: rotate(90deg);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95em;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1em;
    transition: all 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-control:hover {
    border-color: #bdc3c7;
}

/* Checkbox styles in forms */
.form-group input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-group input[type="checkbox"] + label {
    display: inline;
    font-weight: normal;
    cursor: pointer;
    margin-bottom: 0;
}

/* Modal button container */
.modal-content .button-container {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.modal-content .button-container button {
    min-width: 120px;
}

/* Delete modal specific styles */
#delete-doctor-modal p {
    color: #2c3e50;
    line-height: 1.6;
    margin-bottom: 12px;
}

#delete-doctor-modal p:last-of-type {
    padding: 12px;
    background: #fff5f5;
    border-left: 4px solid #e74c3c;
    border-radius: 4px;
    font-weight: 500;
}

/* Login Form */
.login-form {
    max-width: 400px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form .form-control {
    font-size: 1.1em;
    padding: 15px;
}

.login-form .btn-large {
    width: 100%;
}

.btn-back {
    display: inline-block;
    margin-bottom: 20px;
    padding: 8px 15px;
    background-color: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9em;
    transition: background-color 0.2s;
}

.btn-back:hover {
    background-color: #e0e0e0;
}

/* Dashboard Week Block Styles */
.week-block {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.week-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.week-block-header {
    background: #f8f9fa;
    padding: 10px;
    text-align: center;
    border-bottom: 2px solid #e0e0e0;
}

.week-block-header .week-number {
    font-weight: bold;
    color: #2c3e50;
    font-size: 0.95em;
    margin-bottom: 2px;
}

.week-block-header .week-dates {
    color: #7f8c8d;
    font-size: 0.75em;
}

.week-block-content {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

/* Individual Doctor Slot */
.doctor-slot {
    min-height: 35px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px;
    position: relative;
}

.doctor-slot.occupied-full {
    background: #ffe6e6;
    border-left: 4px solid #e74c3c;
}

.doctor-slot.empty-slot {
    background: #f0f8f4;
    border-left: 4px solid #4CAF50;
}

.doctor-slot.split-slot {
    display: flex;
    flex-direction: row;
    padding: 0;
    gap: 0;
}

.doctor-slot .slot-info {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.8em;
    text-align: center;
    line-height: 1.2;
}

.doctor-slot .slot-type {
    font-size: 0.65em;
    color: #7f8c8d;
    text-align: center;
    margin-top: 8px;
}

.doctor-slot .empty-label {
    font-size: 0.7em;
    color: #95a5a6;
    font-weight: 500;
    text-align: center;
}

/* Split Slot (for partial weeks) */
.split-slot .half-slot {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-height: 35px;
    padding: 6px 4px;
}

.split-slot .half-slot:first-child {
    border-right: 1px solid #e0e0e0;
}

.split-slot .half-slot.occupied {
    background: #ffe6e6;
    border-left: 4px solid #e74c3c;
}

.split-slot .half-slot.empty {
    background: #f0f8f4;
    border-left: 4px solid #4CAF50;
}

.split-slot .half-slot .slot-info {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.7em;
    text-align: center;
    line-height: 1.2;
}

.split-slot .half-slot .slot-type {
    font-size: 0.6em;
    color: #7f8c8d;
    text-align: center;
    margin-top: 6px;
}

.split-slot .half-slot .empty-label {
    font-size: 0.6em;
    color: #95a5a6;
    font-weight: 500;
    text-align: center;
}

/* Picker-specific styles */
.picker-week {
    cursor: pointer;
    position: relative;
}

.picker-week:not(.blocked):hover {
    border-color: #667eea;
}

.picker-week.blocked {
    opacity: 0.6;
    cursor: not-allowed;
}

.picker-week.blocked:hover {
    transform: none;
    box-shadow: none;
    border-color: #e0e0e0;
}

.doctor-slot.blocked-slot {
    background: #f5f5f5;
    border-left: 4px solid #9e9e9e;
}

/* Selection states for picker */
.picker-week.selected-full .week-block-header {
    background: #3498db;
    color: white;
}

.picker-week.selected-full .week-block-header .week-number,
.picker-week.selected-full .week-block-header .week-dates {
    color: white;
}

.picker-week.selected-full .doctor-slot.empty-slot {
    background: #ebf5fb;
    border-left-color: #3498db;
}

.picker-week.selected-mw .week-block-header {
    background: #16a085;
    color: white;
}

.picker-week.selected-mw .week-block-header .week-number,
.picker-week.selected-mw .week-block-header .week-dates {
    color: white;
}

.picker-week.selected-mw .split-slot .half-slot:first-child.empty {
    background: #d5f4e6;
    border-left-color: #16a085;
}

.picker-week.selected-thf .week-block-header {
    background: #16a085;
    color: white;
}

.picker-week.selected-thf .week-block-header .week-number,
.picker-week.selected-thf .week-block-header .week-dates {
    color: white;
}

.picker-week.selected-thf .split-slot .half-slot:last-child.empty {
    background: #d5f4e6;
    border-left-color: #16a085;
}

.selection-indicator {
    text-align: center;
    padding: 6px;
    font-size: 0.75em;
    font-weight: 600;
    color: #3498db;
    min-height: 20px;
}

/* Simple Picker Styles */
.simple-calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.simple-week-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
    cursor: pointer;
}

.simple-week-card:hover:not(.blocked) {
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

.simple-week-card.blocked {
    opacity: 0.5;
    cursor: not-allowed;
}

.simple-week-card.has-selection {
    border-color: #3498db;
    border-width: 3px;
    background: #ebf5fb;
}

.simple-week-header {
    background: #f8f9fa;
    padding: 12px;
    text-align: center;
    border-bottom: 2px solid #e0e0e0;
}

.simple-week-header strong {
    display: block;
    font-size: 1.1em;
    color: #2c3e50;
    margin-bottom: 4px;
}

.simple-week-header .week-date {
    font-size: 0.8em;
    color: #7f8c8d;
}

.simple-week-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.selection-btn {
    padding: 10px;
    border: 2px solid #3498db;
    background: white;
    color: #3498db;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.2s;
    width: 100%;
}

.selection-btn:hover {
    background: #3498db;
    color: white;
}

.selection-btn.selected {
    background: #3498db;
    color: white;
    border-width: 3px;
}

.selection-btn.partial {
    border-color: #16a085;
    color: #16a085;
}

.selection-btn.partial:hover {
    background: #16a085;
    color: white;
}

.selection-btn.partial.selected {
    background: #16a085;
    color: white;
    border-width: 3px;
}

.blocked-badge {
    text-align: center;
    padding: 15px;
    color: #95a5a6;
    font-weight: 600;
}

.availability-info {
    font-size: 0.8em;
    color: #7f8c8d;
    text-align: center;
    padding: 6px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 8px;
    font-weight: 600;
}

.assigned-doctors {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
}

.assigned-label {
    font-size: 0.75em;
    color: #95a5a6;
    margin-bottom: 4px;
    font-weight: 600;
}

.assigned-tag {
    font-size: 0.75em;
    color: #2c3e50;
    padding: 4px 8px;
    background: #ffe6e6;
    border-left: 3px solid #e74c3c;
    border-radius: 4px;
    margin-bottom: 4px;
}

.week-full-badge {
    text-align: center;
    padding: 8px;
    background: #ffebee;
    color: #c62828;
    font-weight: 600;
    font-size: 0.85em;
    border-radius: 4px;
    margin-top: 8px;
}

.doctor-already-selected {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 2px solid #4CAF50;
}

.selected-badge {
    text-align: center;
    padding: 10px;
    background: #e8f5e9;
    color: #2e7d32;
    font-weight: 600;
    font-size: 0.85em;
    border-radius: 4px;
    border: 2px solid #4CAF50;
}

.simple-week-card.doctor-selected {
    border-color: #4CAF50;
    border-width: 3px;
    background: #f1f8f4;
}

/* Flash messages */
.flash-stack {
    margin-bottom: 20px;
}

.flash {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 0.95rem;
    border: 1px solid transparent;
}

.flash-success {
    background: #ecfdf3;
    color: #0e5f35;
    border-color: #b7f0cb;
}

.flash-error {
    background: #fef2f2;
    color: #9f1239;
    border-color: #fecaca;
}

.flash-warning {
    background: #fff7ed;
    color: #9a3412;
    border-color: #fed7aa;
}

/* Call admin forms */
.simple-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0;
    align-items: center;
}

.simple-form input,
.simple-form select {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 0.95rem;
}

.simple-form button {
    padding: 8px 12px;
}

.inline-danger {
    background: #dc2626;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
}

.inline-danger:hover {
    opacity: 0.9;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0 24px;
}

.data-table th,
.data-table td {
    border: 1px solid #e5e7eb;
    padding: 8px;
    text-align: left;
}

.data-table th {
    background: #f9fafb;
}

.flash-message {
    background: #eff6ff;
    color: #1e3a8a;
    border-color: #bfdbfe;
}

/* Superadmin inline form row */
.form-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 180px;
}

.form-group-btn {
    flex: 0 0 auto !important;
}

/* Action links in tables */
.action-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-link {
    display: inline-block;
    padding: 4px 12px;
    background: #667eea;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    white-space: nowrap;
}

.btn-link:hover {
    background: #5a6fd6;
}

/* ── Doctors page ───────────────────────────────────────── */

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.page-header h1 {
    margin: 0;
}

.page-header .subtitle {
    margin: 4px 0 0;
    color: #6b7280;
    font-size: 14px;
}

.btn-back {
    display: inline-block;
    padding: 6px 14px;
    background: #f3f4f6;
    color: #374151;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    border: 1px solid #d1d5db;
    white-space: nowrap;
    margin-top: 4px;
}

.btn-back:hover { background: #e5e7eb; }

/* Add panel */
.add-panel {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    margin-bottom: 24px;
}

.add-panel-toggle {
    padding: 14px 18px;
    font-weight: 600;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.add-panel-toggle::-webkit-details-marker { display: none; }
.add-panel[open] .add-panel-toggle { border-bottom: 1px solid #e5e7eb; }

.add-form {
    padding: 18px;
}

/* Doctor card */
.doctor-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.doctor-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.doctor-card[open] {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.15);
}

.doctor-card-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    list-style: none;
    user-select: none;
    flex-wrap: wrap;
}

.doctor-card-summary::-webkit-details-marker { display: none; }
.doctor-card-summary:hover { background: #f9fafb; }
.doctor-card[open] .doctor-card-summary { background: #f5f3ff; border-bottom: 1px solid #e5e7eb; }

.doctor-card-main {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.doctor-name {
    font-weight: 600;
    font-size: 15px;
    color: #111827;
}

.doctor-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.meta-stat {
    font-size: 12px;
    color: #6b7280;
    background: #f3f4f6;
    padding: 2px 7px;
    border-radius: 4px;
}

.edit-hint {
    font-size: 12px;
    color: #9ca3af;
    margin-left: 4px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-class   { background: #e0e7ff; color: #3730a3; }
.badge-smc     { background: #dcfce7; color: #166534; }
.badge-tmc     { background: #fef9c3; color: #854d0e; }
.badge-cardiac { background: #fee2e2; color: #991b1b; }

/* Doctor edit form */
.doctor-form {
    padding: 0;
}

.edit-form {
    padding: 20px;
    background: #fff;
}

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

.field-group:last-of-type {
    margin-bottom: 0;
}

.field-group-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9ca3af;
    margin: 0 0 10px;
}

.field-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 140px;
}

.field-sm { flex: 0 0 110px; min-width: 0; }
.field-xs { flex: 0 0 80px;  min-width: 0; }

.field span {
    font-size: 12px;
    font-weight: 500;
    color: #374151;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="number"] {
    padding: 7px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #111827;
    background: #fff;
    width: 100%;
    box-sizing: border-box;
}

.field input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.req { color: #ef4444; }

.check-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.check-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    user-select: none;
}

.check-label input[type="checkbox"] {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: #667eea;
}

.form-actions {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
}

.form-actions-split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.btn-danger {
    padding: 8px 16px;
    background: #fff;
    color: #dc2626;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}

.btn-danger:hover {
    background: #fef2f2;
    border-color: #dc2626;
}

.empty-state {
    text-align: center;
    color: #9ca3af;
    padding: 40px 20px;
    font-size: 14px;
}
