/* ============================================================
   INSTRUCTOR APPOINTMENTS PAGE
   Scoped under .instructor-appts
   ============================================================ */

.instructor-appts {
    --ia-primary:       var(--primary-color, #8a356a);
    --ia-primary-dark:  var(--primary-dark, #6f2a56);
    --ia-primary-light: rgba(138, 53, 106, 0.12);
    --ia-border:        #e8d4e0;
    --ia-today-accent:  #f59e0b;   /* amber-400 */
    --ia-today-bg:      #fffbeb;   /* amber-50  */
    --ia-radius:        12px;
    --ia-radius-sm:     8px;
}

/* ---- Stats row ---- */
.ia-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.875rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 991px) {
    .ia-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 575px) {
    .ia-stats { grid-template-columns: 1fr 1fr; gap: 0.625rem; }
}

.ia-stat {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: var(--ia-radius);
    padding: 1rem 1.125rem;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s;
}

.ia-stat:hover {
    box-shadow: 0 3px 10px rgba(0,0,0,0.09);
}

.ia-stat__icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.ia-stat--pending  .ia-stat__icon { background: #fef3c7; color: #d97706; }
.ia-stat--approved .ia-stat__icon { background: #d1fae5; color: #059669; }
.ia-stat--completed .ia-stat__icon { background: #dbeafe; color: #2563eb; }
.ia-stat--cancelled .ia-stat__icon { background: #fee2e2; color: #dc2626; }

.ia-stat__body {}

.ia-stat__value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    line-height: 1;
    margin-bottom: 4px;
}

.ia-stat__label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: #6b7280;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ---- Panel (shared card shell) ---- */
.ia-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: var(--ia-radius);
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
    margin-bottom: 1.25rem;
}

.ia-panel__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid #f3f4f6;
    background: #fafafa;
}

.ia-panel__title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ia-panel__title i { color: var(--ia-primary); }

.ia-panel__body {
    padding: 1.125rem 1.25rem;
}

.ia-panel__body--flush {
    padding: 0;
}

/* ---- Today panel special styling ---- */
.ia-panel--today {
    border-color: #fde68a;
    border-left: 4px solid var(--ia-today-accent);
}

.ia-panel--today .ia-panel__header {
    background: var(--ia-today-bg);
    border-bottom-color: #fde68a;
}

.ia-panel--today .ia-panel__title {
    color: #92400e;
}

.ia-panel--today .ia-panel__title i {
    color: var(--ia-today-accent);
}

.ia-today-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ---- Filter panel ---- */
.ia-filter {
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: var(--ia-radius-sm);
    padding: 1rem 1.125rem;
    margin-bottom: 1.25rem;
}

.ia-filter__label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.ia-filter__label i { color: var(--ia-primary); font-size: 0.75rem; }

.ia-filter .form-control,
.ia-filter .form-select {
    font-size: 0.8125rem;
    border-radius: var(--ia-radius-sm);
    border-color: #e5e7eb;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}

.ia-filter .form-control:focus,
.ia-filter .form-select:focus {
    border-color: var(--ia-primary);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.15);
}

.ia-filter__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.875rem;
}

.ia-btn-filter {
    background: var(--ia-primary);
    border-color: var(--ia-primary);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: var(--ia-radius-sm);
    padding: 0.45rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: background 0.2s, box-shadow 0.2s;
}

.ia-btn-filter:hover {
    background: var(--ia-primary-dark);
    border-color: var(--ia-primary-dark);
    color: #fff;
    box-shadow: 0 3px 8px rgba(8, 145, 178, 0.3);
}

.ia-filter-result {
    font-size: 0.8125rem;
    font-weight: 600;
}

/* ---- Table ---- */
.ia-table {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.ia-table thead th {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    padding: 0.7rem 1rem;
    white-space: nowrap;
}

.ia-table tbody td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

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

.ia-table tbody tr:hover {
    background: #f0f9ff;
}

/* ---- Student cell ---- */
.ia-student {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.ia-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ia-primary), #8a356a);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.72rem;
    flex-shrink: 0;
}

.ia-avatar--sm {
    width: 30px;
    height: 30px;
    font-size: 0.65rem;
}

.ia-student__name {
    font-weight: 600;
    font-size: 0.875rem;
    color: #111827;
    line-height: 1.3;
}

.ia-student__email {
    font-size: 0.72rem;
    color: #9ca3af;
}

/* ---- Date cell ---- */
.ia-datetime__date {
    font-weight: 600;
    font-size: 0.875rem;
    color: #1f2937;
}

.ia-datetime__sub {
    font-size: 0.72rem;
    color: #9ca3af;
    margin-top: 2px;
}

/* ---- Subject cell ---- */
.ia-subject__main {
    font-weight: 600;
    font-size: 0.875rem;
    color: #374151;
}

.ia-subject__desc {
    font-size: 0.72rem;
    color: #9ca3af;
    margin-top: 2px;
}

/* ---- Status badges ---- */
.ia-badge {
    display: inline-block;
    padding: 0.25rem 0.675rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.ia-badge--pending   { background: #fef3c7; color: #92400e; }
.ia-badge--approved  { background: #d1fae5; color: #065f46; }
.ia-badge--rejected  { background: #fee2e2; color: #991b1b; }
.ia-badge--completed { background: #dbeafe; color: #1e40af; }
.ia-badge--cancelled { background: #f3f4f6; color: #4b5563; }

/* ---- Action buttons ---- */
.ia-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.ia-btn-action {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--ia-radius-sm);
    font-size: 0.8125rem;
    border: 1px solid transparent;
    transition: all 0.15s ease;
    cursor: pointer;
    text-decoration: none;
}

.ia-btn-action:hover {
    transform: translateY(-1px);
}

.ia-btn-approve {
    background: #d1fae5;
    color: #065f46;
    border-color: #6ee7b7;
}

.ia-btn-approve:hover {
    background: #059669;
    color: #fff;
    border-color: #059669;
    box-shadow: 0 3px 8px rgba(5, 150, 105, 0.3);
}

.ia-btn-reject {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}

.ia-btn-reject:hover {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
    box-shadow: 0 3px 8px rgba(220, 38, 38, 0.3);
}

.ia-btn-complete {
    background: #dbeafe;
    color: #1e40af;
    border-color: #93c5fd;
}

.ia-btn-complete:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.3);
}

.ia-btn-video {
    background: #f0fdf4;
    color: #166534;
    border-color: #86efac;
}

.ia-btn-video:hover {
    background: #16a34a;
    color: #fff;
    border-color: #16a34a;
    box-shadow: 0 3px 8px rgba(22, 163, 74, 0.3);
}

.ia-btn-attend {
    background: #f0f9ff;
    color: #0369a1;
    border-color: #7dd3fc;
}

.ia-btn-attend:hover {
    background: #0369a1;
    color: #fff;
    border-color: #0369a1;
    box-shadow: 0 3px 8px rgba(3, 105, 161, 0.3);
}

.ia-btn-late {
    background: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}

.ia-btn-late:hover {
    background: #d97706;
    color: #fff;
    border-color: #d97706;
    box-shadow: 0 3px 8px rgba(217, 119, 6, 0.3);
}

.ia-btn-info {
    background: #f3f4f6;
    color: #4b5563;
    border-color: #d1d5db;
}

.ia-btn-info:hover {
    background: #4b5563;
    color: #fff;
    border-color: #4b5563;
}

.ia-btn-edit {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #93c5fd;
}

.ia-btn-edit:hover {
    background: #1d4ed8;
    color: #fff;
    border-color: #1d4ed8;
    box-shadow: 0 3px 8px rgba(29, 78, 216, 0.3);
}

/* Text approve / reject buttons for pending state */
.ia-btn-approve-text {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--ia-radius-sm);
    border: 1px solid #6ee7b7;
    background: #d1fae5;
    color: #065f46;
    cursor: pointer;
    transition: all 0.15s;
    height: 32px;
}

.ia-btn-approve-text:hover {
    background: #059669;
    color: #fff;
    border-color: #059669;
    box-shadow: 0 3px 8px rgba(5, 150, 105, 0.3);
}

.ia-btn-reject-text {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--ia-radius-sm);
    border: 1px solid #fca5a5;
    background: #fee2e2;
    color: #991b1b;
    cursor: pointer;
    transition: all 0.15s;
    height: 32px;
}

.ia-btn-reject-text:hover {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
    box-shadow: 0 3px 8px rgba(220, 38, 38, 0.3);
}

/* ---- Pagination ---- */
.ia-pagination-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    border-top: 1px solid #f3f4f6;
    background: #fafafa;
}

.ia-pagination-wrap .dashboard-page-size {
    margin-inline-start: auto;
}

.ia-pagination-info {
    font-size: 0.8125rem;
    color: #6b7280;
}

.ia-pagination .page-link {
    color: var(--ia-primary);
    border-color: #e5e7eb;
    border-radius: var(--ia-radius-sm) !important;
    font-size: 0.8125rem;
    padding: 0.35rem 0.65rem;
}

.ia-pagination .page-item.active .page-link {
    background: var(--ia-primary);
    border-color: var(--ia-primary);
    color: #fff;
}

.ia-pagination .page-item.disabled .page-link {
    color: #d1d5db;
    border-color: #f3f4f6;
}

/* ---- Empty state ---- */
.ia-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    background: linear-gradient(180deg, #f0f9ff 0%, #fff 100%);
    border-radius: var(--ia-radius-sm);
    border: 1px dashed var(--ia-border);
    margin: 1rem;
}

.ia-empty__icon {
    font-size: 2.5rem;
    color: var(--ia-primary-light);
    margin-bottom: 0.875rem;
}

.ia-empty__title {
    font-size: 1rem;
    font-weight: 700;
    color: #6f2a56;
    margin-bottom: 0.375rem;
}

.ia-empty__text {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
}

/* ---- Modals ---- */
.instructor-appts .modal-content {
    border: none;
    border-radius: var(--ia-radius);
    box-shadow: 0 16px 48px rgba(0,0,0,0.14);
}

.instructor-appts .modal-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f3f4f6;
}

.instructor-appts .modal-header .modal-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.instructor-appts .modal-body {
    padding: 1.25rem;
}

.instructor-appts .modal-footer {
    padding: 0.875rem 1.25rem;
    border-top: 1px solid #f3f4f6;
    gap: 0.5rem;
}

.instructor-appts .modal-footer .btn {
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--ia-radius-sm);
    padding: 0.45rem 1.1rem;
}

.instructor-appts .form-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
}

.instructor-appts .form-text {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* ---- Responsive ---- */
@media (max-width: 767px) {
    .ia-panel__body {
        padding: 0.875rem 1rem;
    }

    .ia-table thead th,
    .ia-table tbody td {
        padding: 0.625rem 0.75rem;
    }

    .ia-btn-approve-text span,
    .ia-btn-reject-text span {
        display: none;
    }

}
