/* Admin Panel Styles */
body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
}

/* Login Screen */
.login-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.login-header {
    margin-bottom: 2rem;
}

.login-header i {
    font-size: 3rem;
    color: #6366f1;
    margin-bottom: 1rem;
}

.login-header h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #666;
    font-size: 1rem;
}

.login-form {
    margin-bottom: 2rem;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.login-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.login-form input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.login-form input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.login-footer a {
    color: #6366f1;
    text-decoration: none;
    font-size: 0.9rem;
}

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

/* Admin Dashboard */
.admin-dashboard {
    min-height: 100vh;
    background: #f8fafc;
}

.admin-header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 2rem;
}

.admin-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.admin-nav h1 {
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.admin-nav h1 i {
    color: #6366f1;
    margin-right: 0.5rem;
}

.admin-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-welcome {
    color: #666;
    font-weight: 500;
}

/* Dashboard Content */
.admin-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon i {
    font-size: 1.5rem;
    color: white;
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 0.25rem 0;
}

.stat-info p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.dashboard-card.full-width {
    grid-column: 1 / -1;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.card-header h2 i {
    color: #6366f1;
    margin-right: 0.5rem;
}

.notification-badge {
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.card-content {
    padding: 1.5rem;
}

/* Admin Calendar */
.admin-calendar {
    max-width: 100%;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.calendar-nav {
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.calendar-nav:hover {
    background: #5b21b6;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
    position: relative;
}

.calendar-day:hover {
    background: #e2e8f0;
}

.calendar-day.available {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
}

.calendar-day.booked {
    background: #fef3c7;
    border: 1px solid #fbbf24;
}

.calendar-day.blocked {
    background: #fee2e2;
    border: 1px solid #f87171;
    color: #dc2626;
}

.calendar-day.disabled {
    color: #cbd5e1;
    cursor: not-allowed;
}

.appointment-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 6px;
    height: 6px;
    background: #6366f1;
    border-radius: 50%;
}

.calendar-day.fully-booked {
    background: #fca5a5 !important;
    color: #dc2626 !important;
    border-color: #ef4444 !important;
}

.full-booked-icon {
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: 0.4rem;
    color: #dc2626;
    line-height: 1;
    letter-spacing: -1px;
}

/* Appointments List */
.appointments-list {
    max-height: 400px;
    overflow-y: auto;
}

.appointment-item {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.appointment-item:hover {
    border-color: #6366f1;
    background: #f8fafc;
}

.appointment-item.pending {
    border-left: 4px solid #f59e0b;
}

.appointment-item.confirmed {
    border-left: 4px solid #10b981;
}

.appointment-item.cancelled {
    border-left: 4px solid #ef4444;
    opacity: 0.7;
}

.appointment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.appointment-service {
    font-weight: 600;
    color: #333;
}

.appointment-status {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.appointment-status.pending {
    background: #fef3c7;
    color: #92400e;
}

.appointment-status.confirmed {
    background: #d1fae5;
    color: #065f46;
}

.appointment-status.cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.appointment-details {
    color: #666;
    font-size: 0.9rem;
}

.appointment-time {
    font-weight: 500;
    color: #6366f1;
}

/* Schedule Timeline */
.schedule-timeline {
    display: grid;
    gap: 0.5rem;
}

.timeline-slot {
    display: grid;
    grid-template-columns: 100px 1fr;
    align-items: center;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.timeline-slot.occupied {
    background: #f0f9ff;
    border-color: #6366f1;
}

.timeline-slot.blocked {
    background: #fee2e2;
    border-color: #ef4444;
}

.timeline-time {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.timeline-content {
    padding-left: 1rem;
}

.timeline-appointment {
    font-weight: 500;
    color: #6366f1;
}

.timeline-customer {
    color: #666;
    font-size: 0.9rem;
}

.timeline-empty {
    color: #94a3b8;
    font-style: italic;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #f3f4f6;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Current Date */
.current-date {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-content {
        padding: 1rem;
    }
    
    .admin-nav {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .appointment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .timeline-slot {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .timeline-content {
        padding-left: 0;
    }
    
    /* Calendar Mobile Fixes */
    .calendar-header {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }
    
    .calendar-header h3 {
        font-size: 1rem;
        margin: 0.5rem 0;
        order: 3;
        width: 100%;
        text-align: center;
    }
    
    .calendar-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        flex-shrink: 0;
    }
    
    /* Calendar grid mobile improvements */
    .calendar-grid {
        gap: 0.15rem;
    }
    
    .calendar-day {
        min-height: 35px;
        font-size: 0.8rem;
    }
    
    #adminPrevMonth {
        order: 1;
    }
    
    #adminNextMonth {
        order: 2;
    }
    
    /* Schedule actions mobile */
    .schedule-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .schedule-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Extra Small Mobile Devices */
@media (max-width: 480px) {
    .calendar-header {
        padding: 0.5rem;
    }
    
    .calendar-nav {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .calendar-header h3 {
        font-size: 0.9rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 0.5rem;
    }
    
    .card-header h2 {
        font-size: 1.2rem;
    }
    
    .schedule-actions {
        gap: 0.25rem;
    }
    
    .schedule-actions .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    /* Calendar grid for extra small screens */
    .calendar-grid {
        gap: 0.1rem;
    }
    
    .calendar-day {
        min-height: 30px;
        font-size: 0.7rem;
        padding: 0.2rem;
    }
}

/* Button Overrides for Admin */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.btn-primary {
    background: #6366f1;
    color: white;
}

.btn-primary:hover {
    background: #5b21b6;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

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

.btn-warning {
    background: #f59e0b;
    color: white;
}

.btn-warning:hover {
    background: #d97706;
}

/* Reschedule Form Styles */
.reschedule-form {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.reschedule-form h4 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

/* Schedule Actions */
.schedule-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Blocked Times List */
.blocked-time-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.blocked-time-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.blocked-time-info {
    flex: 1;
}

.blocked-time-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    color: #374151;
}

.blocked-time-info p {
    margin: 0;
    color: #6b7280;
    font-size: 0.875rem;
}

.blocked-time-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-unblock {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-unblock:hover {
    background: #dc2626;
}

.blocked-time-date {
    font-weight: 600;
    color: #1f2937;
}

.blocked-time-duration {
    color: #6366f1;
    font-weight: 500;
}

/* Multi-Select Unblock Modal */
.blocked-slot-checkbox {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.blocked-slot-checkbox:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.blocked-slot-checkbox.selected {
    background: #fef2f2;
    border-color: #ef4444;
}

.blocked-slot-checkbox input[type="checkbox"] {
    margin-right: 0.75rem;
    transform: scale(1.2);
    cursor: pointer;
}

.blocked-slot-info {
    flex: 1;
}

.blocked-slot-time {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.25rem;
}

.blocked-slot-reason {
    color: #6b7280;
    font-size: 0.875rem;
}

.selected-date-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.selected-date-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e40af;
    margin-bottom: 0.25rem;
}

.selected-date-subtitle {
    color: #6b7280;
    font-size: 0.875rem;
}

#unblockSelectedBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#unblockSelectedBtn:not(:disabled) {
    background: #ef4444;
}

#unblockSelectedBtn:not(:disabled):hover {
    background: #dc2626;
}

/* Blocked time slots in admin timeline */
.timeline-slot.blocked {
    background: #fef2f2 !important;
    border-color: #fca5a5 !important;
    color: #dc2626 !important;
}

.timeline-slot.blocked .timeline-time {
    color: #dc2626 !important;
    font-weight: 600;
}

.timeline-slot.blocked .timeline-empty {
    color: #dc2626 !important;
    font-weight: 500;
    font-style: italic;
}


