/* Theme overrides: add custom styles here */

.smart-calendar-wrap {
    border: 1px solid #e8ebf1;
    border-radius: 10px;
}

.smart-calendar-table th,
.smart-calendar-table td {
    min-width: 170px;
    vertical-align: top;
    background-color: #fff;
}

.smart-calendar-table .smart-time-col {
    min-width: 160px;
    background: #f8f9fb;
}

.smart-cell-empty {
    background: #fcfdff;
}

.smart-cell-filled {
    background: #f5f9ff;
}

.smart-event {
    border-left: 4px solid #3d7ff9;
    background: #ffffff;
    border-radius: 8px;
    padding: 8px 10px;
    box-shadow: 0 1px 4px rgba(17, 24, 39, 0.08);
}

.smart-event-locked {
    border-left-color: #f59f00;
    background: #fff9e8;
}

.smart-event-subject {
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 2px;
}

.smart-event-meta {
    color: #64748b;
    font-size: 12px;
    line-height: 1.4;
}

.iti { width: 100%; }
.table-row-summary__avatar-image {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid rgba(var(--ct-primary-rgb), 0.15);
    background: #fff;
}

.table-row-summary__name {
    font-weight: 600;
    color: #1f2a5a;
}

.table-row-summary__meta {
    margin-top: 0.2rem;
    font-size: 0.82rem;
    color: #6c757d;
}

.table-row-collapse-toggle {
    border-radius: 12px;
}

.table-row-details {
    padding: 1rem 1.25rem;
    background: rgba(var(--ct-primary-rgb), 0.04);
    border-radius: 14px;
}

.table-row-details__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem 1.25rem;
}

.table-row-details__label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6c757d;
    margin-bottom: 0.3rem;
}

.table-row-details__value {
    color: #1f2a5a;
    word-break: break-word;
}

.smart-schedule-toolbar,
.smart-schedule-card,
.smart-schedule-calendar-card,
.smart-schedule-side-card {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.smart-schedule-toolbar {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
}

.smart-schedule-toolbar__heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.smart-schedule-toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.smart-schedule-toolbar__secondary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.smart-schedule-toolbar__generate {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    flex: 1 1 520px;
}

.smart-schedule-toolbar__generate .form-select {
    min-width: 240px;
    flex: 1 1 240px;
}

.smart-schedule-toolbar__check {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 38px;
    margin: 0;
}

.smart-schedule-toolbar__button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.smart-schedule-filter-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.45rem;
    letter-spacing: 0.04em;
}

.smart-schedule-view-switch {
    display: inline-flex;
    gap: 0.5rem;
    padding: 0.35rem;
    background: #eef2ff;
    border-radius: 999px;
}

.smart-schedule-view-switch .form-check {
    margin: 0;
}

.smart-schedule-view-switch .form-check-label {
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
    transition: 0.2s ease;
}

.smart-schedule-view-switch .form-check-input {
    display: none;
}

.smart-schedule-view-switch .form-check-input:checked + .form-check-label {
    background: #3157d5;
    color: #fff;
    box-shadow: 0 8px 20px rgba(49, 87, 213, 0.25);
}

.smart-schedule-stat {
    border-radius: 18px;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.2);
    padding: 1rem 1.1rem;
    height: 100%;
}

.smart-schedule-stat__label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.smart-schedule-stat__value {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
}

.smart-schedule-calendar-card {
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.smart-schedule-scope {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.smart-schedule-scope__title {
    margin: 0;
    font-weight: 800;
    color: #0f172a;
}

.smart-schedule-scope__meta {
    color: #64748b;
    font-size: 0.9rem;
}

.smart-schedule-grid-wrap {
    overflow-x: auto;
}

.smart-schedule-grid {
    min-width: 940px;
    border-collapse: separate;
    border-spacing: 0;
}

.smart-schedule-grid thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #eff6ff;
    color: #1e3a8a;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.smart-schedule-grid th,
.smart-schedule-grid td {
    border: 1px solid rgba(148, 163, 184, 0.18);
    vertical-align: top;
    padding: 0.85rem;
}

.smart-schedule-grid__period {
    min-width: 180px;
    background: #f8fafc;
}

.smart-schedule-grid__cell {
    min-width: 150px;
    background: #fff;
}

.smart-schedule-grid__cell.is-empty {
    background: #f8fafc;
}

.smart-schedule-grid__cell.is-conflict {
    background: #fff1f2;
    box-shadow: inset 0 0 0 1px rgba(225, 29, 72, 0.2);
}

.smart-schedule-period-name {
    font-weight: 700;
    color: #0f172a;
}

.smart-schedule-period-time {
    font-size: 0.85rem;
    color: #64748b;
}

.smart-schedule-event-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.smart-schedule-event {
    border-radius: 16px;
    padding: 0.8rem;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid rgba(96, 165, 250, 0.25);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
}

.smart-schedule-event.is-manual {
    background: linear-gradient(135deg, #ecfeff 0%, #cffafe 100%);
    border-color: rgba(34, 211, 238, 0.35);
}

.smart-schedule-event.is-locked {
    border-color: rgba(245, 158, 11, 0.35);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.1);
}

.smart-schedule-event.is-conflict {
    background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
    border-color: rgba(225, 29, 72, 0.35);
}

.smart-schedule-event--clickable {
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.smart-schedule-event--clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.14);
}

.smart-schedule-event__subject {
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.2rem;
}

.smart-schedule-event__meta {
    font-size: 0.86rem;
    color: #475569;
}

.smart-schedule-event__badges {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin-top: 0.55rem;
}

.smart-schedule-event__empty {
    color: #94a3b8;
    font-size: 0.9rem;
}

.smart-schedule-side-card .card-header,
.smart-schedule-calendar-card .card-header,
.smart-schedule-card .card-header {
    background: transparent;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    padding-bottom: 0.9rem;
}

.smart-schedule-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.smart-schedule-list__item {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    padding: 0.85rem 0.95rem;
    background: #fff;
}

.smart-schedule-list__item strong {
    display: block;
    margin-bottom: 0.2rem;
    color: #0f172a;
}

.smart-schedule-list__item small {
    color: #64748b;
}

.smart-schedule-recognition-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.82rem;
    font-weight: 700;
}

.smart-schedule-settings-hero {
    background: linear-gradient(135deg, #f8fbff 0%, #eef4ff 55%, #ffffff 100%);
    border: 1px solid rgba(49, 87, 213, 0.12);
    border-radius: 24px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.smart-schedule-settings-checklist {
    display: grid;
    gap: 0.85rem;
}

.smart-schedule-settings-step {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
}

.smart-schedule-settings-step__number {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #3157d5;
    color: #fff;
    font-weight: 700;
    flex-shrink: 0;
}

.smart-schedule-settings-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
    background: #fff;
}

.smart-schedule-row--active {
    animation: smart-schedule-row-pulse 1.6s ease;
}

@keyframes smart-schedule-row-pulse {
    0%,
    100% {
        background-color: transparent;
    }

    30%,
    70% {
        background-color: rgba(49, 87, 213, 0.08);
    }
}

@media (max-width: 991.98px) {
    .smart-schedule-grid {
        min-width: 760px;
    }

    .smart-schedule-toolbar__secondary {
        flex-direction: column;
        align-items: stretch;
    }

    .smart-schedule-toolbar__generate,
    .smart-schedule-toolbar__button-group {
        width: 100%;
    }
}
