/* ── Amelia Instructor Calendar ───────────────────────── */

#aic-wrapper {
    font-family: 'Segoe UI', system-ui, sans-serif;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 0 40px;
}

/* Header */
.aic-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0 24px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.aic-header-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.aic-instructor-name {
    font-size: 20px;
    font-weight: 700;
    color: #1e2d5a;
}

.aic-subtitle {
    font-size: 13px;
    color: #64748b;
    letter-spacing: .03em;
}

.aic-nav {
    display: flex;
    align-items: center;
    gap: 14px;
}

.aic-nav button {
    background: #1e2d5a;
    color: #fff;
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    font-size: 16px;
    cursor: pointer;
    transition: background .15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aic-nav button:hover { background: #2d4080; }

#aic-month-label {
    font-size: 17px;
    font-weight: 600;
    color: #1e2d5a;
    min-width: 160px;
    text-align: center;
}

/* Grid */
.aic-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.aic-day-name {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 4px 0 10px;
}

.aic-cell {
    min-height: 88px;
    border-radius: 10px;
    border: 1.5px solid #e8edf5;
    background: #f8fafc;
    padding: 8px 7px 6px;
    position: relative;
    transition: border-color .15s;
}

.aic-cell.empty {
    background: transparent;
    border-color: transparent;
}

.aic-cell.has-bookings {
    background: #fff;
    border-color: #c7d4f0;
    cursor: pointer;
}

.aic-cell.has-bookings:hover {
    border-color: #1e2d5a;
    box-shadow: 0 2px 8px rgba(30,45,90,.10);
}

.aic-cell.today {
    border-color: #3b59c4;
    background: #eef1fc;
}

.aic-cell-date {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 5px;
}

.aic-cell.today .aic-cell-date {
    color: #1e2d5a;
}

/* Booking pills inside cell */
.aic-pill {
    background: #d4e2ff;
    color: #1e2d5a;
    font-size: 10.5px;
    font-weight: 500;
    border-radius: 4px;
    padding: 2px 5px;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.aic-pill.status-pending  { background: #fef9c3; color: #854d0e; }
.aic-pill.status-approved { background: #d4e2ff; color: #1e2d5a; }
.aic-pill.status-waiting  { background: #fce7f3; color: #9d174d; }

.aic-more {
    font-size: 10px;
    color: #64748b;
    margin-top: 2px;
    display: block;
}

/* Loading */
.aic-loading {
    text-align: center;
    padding: 60px 0;
    color: #94a3b8;
    font-size: 14px;
    grid-column: 1 / -1;
}

/* Popup */
.aic-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 40px rgba(0,0,0,.18);
    min-width: 300px;
    max-width: 420px;
    width: 92%;
    padding: 28px 24px 24px;
}

.aic-popup h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1e2d5a;
    margin: 0 0 16px;
}

.aic-popup-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #94a3b8;
    line-height: 1;
}

.aic-popup-close:hover { color: #1e2d5a; }

#aic-popup-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#aic-popup-list li {
    background: #f0f4ff;
    border-radius: 8px;
    padding: 10px 14px;
}

#aic-popup-list li .popup-time {
    font-size: 13px;
    font-weight: 700;
    color: #1e2d5a;
}

#aic-popup-list li .popup-student {
    font-size: 13px;
    color: #334155;
    margin-top: 2px;
}

#aic-popup-list li .popup-service {
    font-size: 11px;
    color: #64748b;
    margin-top: 1px;
}

#aic-popup-list li .popup-status {
    display: inline-block;
    margin-top: 4px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 4px;
}

.popup-status.status-approved { background: #d4e2ff; color: #1e2d5a; }
.popup-status.status-pending  { background: #fef9c3; color: #854d0e; }
.popup-status.status-waiting  { background: #fce7f3; color: #9d174d; }

#aic-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 10000;
}

.hidden { display: none !important; }

/* Responsive */
@media (max-width: 600px) {
    .aic-cell { min-height: 60px; padding: 5px 4px; }
    .aic-pill { display: none; }
    .aic-cell.has-bookings::after {
        content: attr(data-count);
        display: block;
        font-size: 11px;
        font-weight: 700;
        color: #1e2d5a;
        text-align: center;
        margin-top: 4px;
    }
    .aic-cell-date { font-size: 11px; }
    #aic-month-label { min-width: 120px; font-size: 14px; }
}
