/* ===== Admin Calendar (appointments page) ===== */
.ec-admin-cal {
    width: 100%; border-collapse: collapse; table-layout: fixed;
}
.ec-admin-cal th {
    padding: 10px 4px; text-align: center; font-size: 0.75rem;
    font-weight: 600; color: #64748b; text-transform: uppercase;
    background: #f8fafc; border-bottom: 1px solid #e2e8f0;
}
.ec-admin-cal td {
    border: 1px solid #e2e8f0; vertical-align: top;
    padding: 4px; height: 100px; position: relative;
}
.ec-admin-cal td.ec-empty { background: #f8fafc; }
.ec-admin-cal td.ec-today { background: #fef2f2; }
.ec-admin-cal td.ec-today .ec-day-num { color: #e50914; font-weight: 700; }
.ec-day-num {
    font-size: 0.8rem; font-weight: 600; color: #1e293b;
    padding: 2px 6px; display: inline-block;
}
.ec-cal-event {
    display: block; padding: 2px 6px; margin: 1px 0;
    border-radius: 4px; font-size: 0.7rem; color: #fff;
    text-decoration: none; white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; line-height: 1.4;
}
.ec-cal-event:hover { opacity: 0.85; color: #fff; }
.ec-cal-more {
    display: block; font-size: 0.65rem; color: #64748b;
    padding: 1px 6px; cursor: default;
}
@media (max-width: 768px) {
    .ec-admin-cal td { height: 70px; }
    .ec-admin-cal td .ec-cal-event { font-size: 0.6rem; padding: 1px 3px; }
}

/* ===== Appointment Booking Widget ===== */
.ab-widget {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    max-width: 620px; margin: 0 auto;
    background: #fff; border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.08);
    overflow: hidden;
}

/* Progress Steps */
.ab-steps {
    display: flex; background: #f8fafc;
    border-bottom: 1px solid #e2e8f0; padding: 0;
}
.ab-step {
    flex: 1; text-align: center; padding: 14px 8px;
    font-size: 0.75rem; font-weight: 600; color: #94a3b8;
    position: relative; transition: all 0.3s;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.ab-step .ab-step-num {
    width: 28px; height: 28px; line-height: 28px;
    border-radius: 50%; background: #e2e8f0; color: #94a3b8;
    font-size: 0.8rem; font-weight: 700; transition: all 0.3s;
}
.ab-step.active { color: #1e293b; }
.ab-step.active .ab-step-num { background: #e50914; color: #fff; }
.ab-step.completed .ab-step-num { background: #22c55e; color: #fff; }
.ab-step.completed { color: #22c55e; }
.ab-step::after {
    content: ''; position: absolute; top: 26px; right: -50%;
    width: 100%; height: 2px; background: #e2e8f0; z-index: 0;
}
.ab-step:last-child::after { display: none; }
.ab-step.completed::after { background: #22c55e; }

/* Panel body */
.ab-body { padding: 24px; min-height: 300px; }
.ab-body h3 {
    font-size: 1.15rem; font-weight: 700; color: #1e293b;
    margin: 0 0 4px;
}
.ab-body .ab-subtitle {
    font-size: 0.85rem; color: #64748b; margin-bottom: 20px;
}

/* Service cards */
.ab-service-list { display: flex; flex-direction: column; gap: 10px; }
.ab-service-card {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px; border: 2px solid #e2e8f0;
    border-radius: 12px; cursor: pointer; transition: all 0.2s;
}
.ab-service-card:hover { border-color: #e50914; background: #fef2f2; }
.ab-service-card.selected { border-color: #e50914; background: #fef2f2; }
.ab-service-dot {
    width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
}
.ab-service-info { flex: 1; min-width: 0; }
.ab-service-name { font-weight: 600; font-size: 0.95rem; color: #1e293b; }
.ab-service-meta { font-size: 0.8rem; color: #64748b; display: flex; gap: 12px; margin-top: 2px; }
.ab-service-price {
    font-weight: 700; font-size: 1rem; color: #e50914;
    white-space: nowrap;
}
.ab-service-cat {
    font-size: 0.7rem; font-weight: 600; color: #64748b;
    text-transform: uppercase; letter-spacing: 0.5px;
    padding: 8px 0 4px; margin-top: 6px;
}

/* Staff cards */
.ab-staff-list { display: flex; flex-direction: column; gap: 10px; }
.ab-staff-card {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px; border: 2px solid #e2e8f0;
    border-radius: 12px; cursor: pointer; transition: all 0.2s;
}
.ab-staff-card:hover { border-color: #e50914; background: #fef2f2; }
.ab-staff-card.selected { border-color: #e50914; background: #fef2f2; }
.ab-staff-avatar {
    width: 48px; height: 48px; border-radius: 50%;
    object-fit: cover; flex-shrink: 0;
}
.ab-staff-avatar-placeholder {
    width: 48px; height: 48px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 1.1rem; flex-shrink: 0;
}
.ab-staff-name { font-weight: 600; font-size: 0.95rem; color: #1e293b; }
.ab-staff-bio { font-size: 0.8rem; color: #64748b; margin-top: 2px; }

/* Date picker */
.ab-date-section { margin-bottom: 20px; }
.ab-cal-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px;
}
.ab-cal-header h4 { margin: 0; font-size: 1rem; font-weight: 700; color: #1e293b; }
.ab-cal-nav-btn {
    background: none; border: 1px solid #e2e8f0; color: #64748b;
    width: 32px; height: 32px; border-radius: 8px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: all 0.2s; font-size: 0.85rem;
}
.ab-cal-nav-btn:hover { background: #e50914; color: #fff; border-color: #e50914; }
.ab-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.ab-cal-dow { font-size: 0.7rem; font-weight: 600; color: #94a3b8; padding: 4px 0; text-transform: uppercase; }
.ab-cal-day {
    padding: 8px 4px; border-radius: 8px; font-size: 0.85rem;
    color: #475569; cursor: pointer; transition: all 0.15s;
    font-weight: 500;
}
.ab-cal-day:hover { background: #fef2f2; color: #e50914; }
.ab-cal-day.disabled { color: #cbd5e1; cursor: default; pointer-events: none; }
.ab-cal-day.selected { background: #e50914; color: #fff; font-weight: 700; }
.ab-cal-day.today { border: 2px solid #e50914; font-weight: 700; }
.ab-cal-day.empty { pointer-events: none; }

/* Time slots */
.ab-time-section h4 { font-size: 0.95rem; font-weight: 700; color: #1e293b; margin-bottom: 10px; }
.ab-time-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.ab-time-slot {
    padding: 10px 8px; border: 2px solid #e2e8f0;
    border-radius: 8px; text-align: center; cursor: pointer;
    font-size: 0.85rem; font-weight: 600; color: #475569;
    transition: all 0.2s;
}
.ab-time-slot:hover { border-color: #e50914; color: #e50914; background: #fef2f2; }
.ab-time-slot.selected { border-color: #e50914; background: #e50914; color: #fff; }
.ab-no-slots {
    text-align: center; padding: 30px; color: #94a3b8; font-size: 0.9rem;
}

/* Details form */
.ab-form-group { margin-bottom: 14px; }
.ab-form-group label {
    display: block; font-size: 0.8rem; font-weight: 600;
    color: #475569; margin-bottom: 4px;
}
.ab-form-group input, .ab-form-group textarea {
    width: 100%; padding: 10px 14px; border: 2px solid #e2e8f0;
    border-radius: 10px; font-size: 0.9rem; color: #1e293b;
    outline: none; transition: border-color 0.2s; font-family: inherit;
}
.ab-form-group input:focus, .ab-form-group textarea:focus { border-color: #e50914; }
.ab-form-group textarea { resize: vertical; min-height: 70px; }
.ab-form-row { display: flex; gap: 12px; }
.ab-form-row > * { flex: 1; }

/* Confirmation */
.ab-confirmation { text-align: center; padding: 20px 0; }
.ab-confirmation .ab-check-icon {
    width: 64px; height: 64px; border-radius: 50%;
    background: #f0fdf4; display: inline-flex;
    align-items: center; justify-content: center;
    margin-bottom: 16px;
}
.ab-confirmation .ab-check-icon i { font-size: 2rem; color: #22c55e; }
.ab-confirmation h3 { font-size: 1.3rem; font-weight: 800; color: #1e293b; margin-bottom: 8px; }
.ab-confirmation p { color: #64748b; font-size: 0.9rem; }
.ab-confirm-details {
    background: #f8fafc; border-radius: 12px; padding: 16px 20px;
    margin: 20px 0; text-align: left;
}
.ab-confirm-row {
    display: flex; justify-content: space-between; padding: 6px 0;
    font-size: 0.88rem; border-bottom: 1px solid #e2e8f0;
}
.ab-confirm-row:last-child { border-bottom: none; }
.ab-confirm-row .ab-label { color: #64748b; }
.ab-confirm-row .ab-value { font-weight: 600; color: #1e293b; }

/* Footer / Navigation */
.ab-footer {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 24px; border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}
.ab-btn {
    padding: 10px 24px; border: none; border-radius: 10px;
    font-size: 0.9rem; font-weight: 600; cursor: pointer;
    transition: all 0.2s; display: inline-flex;
    align-items: center; gap: 6px;
}
.ab-btn-primary { background: #e50914; color: #fff; }
.ab-btn-primary:hover { background: #c73652; }
.ab-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.ab-btn-secondary { background: #e2e8f0; color: #475569; }
.ab-btn-secondary:hover { background: #cbd5e1; }
.ab-btn-link { background: none; border: none; color: #64748b; font-size: 0.85rem; cursor: pointer; padding: 0; }
.ab-btn-link:hover { color: #e50914; }

/* Summary sidebar */
.ab-summary {
    background: #f8fafc; border-radius: 10px; padding: 14px;
    margin-bottom: 16px; font-size: 0.82rem;
}
.ab-summary-row { display: flex; justify-content: space-between; padding: 3px 0; }
.ab-summary-row .ab-s-label { color: #64748b; }
.ab-summary-row .ab-s-value { font-weight: 600; color: #1e293b; }

/* Loading */
.ab-loading {
    display: flex; align-items: center; justify-content: center;
    padding: 40px; color: #94a3b8;
}
.ab-spinner {
    width: 24px; height: 24px; border: 3px solid #e2e8f0;
    border-top-color: #e50914; border-radius: 50%;
    animation: abSpin 0.6s linear infinite; margin-right: 10px;
}
@keyframes abSpin { to { transform: rotate(360deg); } }

/* Error */
.ab-error {
    padding: 12px 16px; background: #fef2f2; border: 1px solid #fecaca;
    border-radius: 10px; color: #dc2626; font-size: 0.85rem;
    margin-bottom: 12px;
}

/* Modal overlay for button trigger */
.ab-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    z-index: 10000; display: flex; align-items: center;
    justify-content: center; padding: 20px;
    animation: abFadeIn 0.2s ease;
}
.ab-modal-overlay .ab-widget { max-width: 620px; width: 100%; max-height: 90vh; overflow-y: auto; }
@keyframes abFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Responsive */
@media (max-width: 640px) {
    .ab-widget { border-radius: 0; }
    .ab-body { padding: 16px; }
    .ab-time-grid { grid-template-columns: repeat(2, 1fr); }
    .ab-form-row { flex-direction: column; gap: 0; }
    .ab-step { font-size: 0.65rem; padding: 10px 4px; }
    .ab-step .ab-step-num { width: 24px; height: 24px; line-height: 24px; font-size: 0.7rem; }
    .ab-steps { overflow-x: auto; }
}
