/* Admin Appointments Page - Stats Cards */
.admin-appointments-page .stat-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.admin-appointments-page .stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.admin-appointments-page .stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.admin-appointments-page .stat-card .stat-content {
    display: flex;
    flex-direction: column;
}

.admin-appointments-page .stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.admin-appointments-page .stat-card .stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    line-height: 1;
}

/* Stat card variants */
.admin-appointments-page .stat-pending {
    border-color: #ffc107;
}

.admin-appointments-page .stat-pending .stat-icon {
    background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%);
    color: white;
}

.admin-appointments-page .stat-pending .stat-value {
    color: #ffc107;
}

.admin-appointments-page .stat-confirmed {
    border-color: #28a745;
}

.admin-appointments-page .stat-confirmed .stat-icon {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.admin-appointments-page .stat-confirmed .stat-value {
    color: #28a745;
}

.admin-appointments-page .stat-completed {
    border-color: #17a2b8;
}

.admin-appointments-page .stat-completed .stat-icon {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
}

.admin-appointments-page .stat-completed .stat-value {
    color: #17a2b8;
}

.admin-appointments-page .stat-cancelled {
    border-color: #dc3545;
}

.admin-appointments-page .stat-cancelled .stat-icon {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.admin-appointments-page .stat-cancelled .stat-value {
    color: #dc3545;
}

.admin-appointments-page .stat-today {
    border-color: #04243c;
}

.admin-appointments-page .stat-today .stat-icon {
    background: linear-gradient(135deg, #04243c 0%, #1aa677 100%);
    color: white;
}

.admin-appointments-page .stat-today .stat-value {
    color: #04243c;
}

/* Admin Card */
.admin-appointments-page .admin-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Appointment Booking Modal Styles */

.booking-modal-dialog {
    max-width: 900px;
}

.booking-modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--light-color));
    color: white;
    border-bottom: none;
    padding: 1.5rem;
}

.booking-modal-header .modal-title {
    font-weight: 600;
    font-size: 1.25rem;
}

.booking-modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.booking-modal-body {
    padding: 2rem;
}

.booking-section {
    margin-bottom: 2rem;
}

.booking-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-color);
}

/* Calendar Styles */
.booking-calendar-wrapper {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 1rem;
}

.calendar-header {
    text-align: center;
    margin-bottom: 1rem;
}

.calendar-header h6 {
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
}

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

.calendar-day-header {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--medium-gray);
    padding: 0.5rem;
}

.calendar-day-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.calendar-day-cell.empty {
    cursor: default;
}

.calendar-day-cell.disabled {
    color: #ccc;
    cursor: not-allowed;
    background: #f9f9f9;
}

.calendar-day-cell.unavailable {
    color: #999;
    background: #f5f5f5;
    cursor: not-allowed;
    text-decoration: line-through;
}

.calendar-day-cell.available {
    color: var(--dark-gray);
    background: white;
    border-color: #e0e0e0;
}

.calendar-day-cell.available:hover {
    background: var(--light-color);
    color: white;
    border-color: var(--light-color);
    transform: scale(1.05);
}

.calendar-day-cell.today {
    border-color: var(--primary-color);
    font-weight: 700;
}

.calendar-day-cell.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Time Slots Styles */
.booking-time-wrapper {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 1rem;
    min-height: 300px;
}

.time-slots-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 250px;
    color: var(--medium-gray);
    font-size: 0.95rem;
}

.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
}

.time-slot {
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    color: var(--dark-gray);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.time-slot:hover:not(:disabled) {
    background: var(--light-color);
    color: white;
    border-color: var(--light-color);
    transform: translateY(-2px);
}

.time-slot.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.time-slot.booked,
.time-slot:disabled {
    background: #f5f5f5;
    color: #999;
    border-color: #e0e0e0;
    cursor: not-allowed;
    opacity: 0.6;
}

.time-slot small {
    font-size: 0.7rem;
    margin-top: 0.25rem;
}

/* Modal Footer */
.booking-modal-footer {
    padding: 1.5rem 2rem;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

/* Appointment Card Styles (for profile page) */
.appointment-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

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

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

.appointment-listing {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.appointment-listing img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.listing-placeholder {
    width: 60px;
    height: 60px;
    background: var(--light-gray);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--medium-gray);
    font-size: 1.5rem;
}

.listing-info h6 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.listing-info small {
    font-size: 0.85rem;
}

.appointment-card-body {
    margin-bottom: 1rem;
}

.appointment-datetime {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.datetime-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--dark-gray);
}

.datetime-item i {
    color: var(--light-color);
}

.appointment-notes {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 8px;
    border-left: 3px solid var(--light-color);
}

.appointment-card-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* Status Badges */
.badge {
    padding: 0.5rem 1rem;
    font-weight: 500;
    font-size: 0.85rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .booking-modal-dialog {
        max-width: 100%;
        margin: 0.5rem;
    }
    
    .booking-modal-body {
        padding: 1rem;
    }
    
    .booking-section {
        margin-bottom: 1.5rem;
    }
    
    .calendar-days {
        gap: 0.25rem;
    }
    
    .calendar-day-cell {
        font-size: 0.75rem;
    }
    
    .time-slots-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 0.5rem;
    }
    
    .time-slot {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    .appointment-datetime {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .appointment-card-footer {
        flex-direction: column;
    }
    
    .appointment-card-footer .btn {
        width: 100%;
    }
}

/* Admin Appointment Management Styles */
.appointment-filters {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.appointment-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--primary-color);
}

.stat-card.pending {
    border-left-color: #ffc107;
}

.stat-card.confirmed {
    border-left-color: #28a745;
}

.stat-card.cancelled {
    border-left-color: #dc3545;
}

.stat-card.completed {
    border-left-color: #17a2b8;
}

.stat-card h6 {
    font-size: 0.85rem;
    color: var(--medium-gray);
    margin-bottom: 0.5rem;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Appointment Table */
.appointment-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.appointment-table table {
    width: 100%;
    margin: 0;
}

.appointment-table th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    padding: 1rem;
}

.appointment-table td {
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.appointment-table tr:last-child td {
    border-bottom: none;
}

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

.appointment-actions .btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
}


/* ========================================
   Appointment Detail Modal Styles
   ======================================== */

.appointment-detail-header {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.appointment-card {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.2s ease;
}

.appointment-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.appointment-card.bg-light {
    background: #f8f9fa !important;
    border-color: #dee2e6;
}

.appointment-card.border-warning {
    border-left: 4px solid #ffc107;
}

.appointment-card.border-danger {
    border-left: 4px solid #dc3545;
}

.appointment-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.appointment-listing-image {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.appointment-listing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.appointment-listing-placeholder {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.appointment-datetime {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.appointment-date,
.appointment-time {
    display: flex;
    align-items: center;
    font-size: 1rem;
    color: #212529;
}

.appointment-contact {
    font-size: 0.95rem;
}

.appointment-contact a {
    color: #1aa677;
    transition: color 0.2s ease;
}

.appointment-contact a:hover {
    color: #04243c;
}

.appointment-note {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #495057;
}

.appointment-actions {
    border-top: 2px solid #f0f0f0;
    padding-top: 1.5rem;
}

.appointment-actions .btn {
    font-size: 0.9rem;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.appointment-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.appointment-actions .btn i {
    font-size: 0.85rem;
}

/* Modal Enhancements */
#appointmentDetailModal .modal-dialog {
    max-width: 900px;
}

#appointmentDetailModal .modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

#appointmentDetailModal .modal-header {
    background: linear-gradient(135deg, #04243c 0%, #1aa677 100%);
    color: white;
    border-radius: 16px 16px 0 0;
    padding: 1.5rem;
}

#appointmentDetailModal .modal-header .modal-title {
    font-weight: 600;
    font-size: 1.25rem;
}

#appointmentDetailModal .modal-header .btn-close {
    filter: brightness(0) invert(1);
}

#appointmentDetailModal .modal-body {
    padding: 2rem;
}

#appointmentDetailModal .modal-footer {
    border-top: 2px solid #f0f0f0;
    padding: 1.25rem 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    #appointmentDetailModal .modal-dialog {
        max-width: 100%;
        margin: 0.5rem;
    }
    
    .appointment-listing-image {
        width: 80px;
        height: 80px;
    }
    
    .appointment-actions .btn {
        font-size: 0.85rem;
        padding: 0.4rem 1rem;
    }
    
    .appointment-card {
        padding: 1rem;
    }
    
    #appointmentDetailModal .modal-body {
        padding: 1.25rem;
    }
}
