/* =========================================================
   AMIT Calendar and Events — v3.1.3
   Responsive | Bilingual EN/AR | LTR/RTL
   ========================================================= */

/* ---------------------------------------------------------
   CSS Variables
   --------------------------------------------------------- */
:root {
    --ac-bg:           #f4f6f9;
    --ac-card-bg:      #ffffff;
    --ac-border:       #e2e8f0;
    --ac-text:         #1a202c;
    --ac-text-muted:   #64748b;
    --ac-header-bg:    #232629;
    --ac-header-text:  #ffffff;
    --ac-today-ring:   #75b12f;
    --ac-shadow:       0 2px 12px rgba(0,0,0,.08);
    --ac-radius:       12px;
    --ac-cell-radius:  8px;
    --ac-font:         'Calibri', 'Segoe UI', sans-serif;
    --ac-font-ar:      'Calibri', 'Noto Sans Arabic', sans-serif;
    --ac-transition:   .18s ease;
}

/* ---------------------------------------------------------
   Wrapper
   --------------------------------------------------------- */
.amit-cal-wrap {
    font-family: var(--ac-font);
    padding: 24px 16px;
    min-width: 300px;
    box-sizing: border-box;
    color: var(--ac-text);
}

.amit-cal-wrap[dir="rtl"],
.amit-cal-wrap.rtl {
    font-family: var(--ac-font-ar);
    direction: rtl;
    text-align: right;
}

/* ---------------------------------------------------------
   Year Header
   --------------------------------------------------------- */
.amit-cal-year-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.amit-cal-year-title {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 700;
    color: var(--ac-header-bg);
    letter-spacing: -.5px;
    margin: 0 0 4px;
}

.ac-cal-hint {
    font-size: .78rem;
    color: var(--ac-text-muted);
    margin: 0;
    line-height: 1.5;
    opacity: .85;
}

/* ---------------------------------------------------------
   12-Month Grid
   --------------------------------------------------------- */
.amit-cal-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 1100px) {
    .amit-cal-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
    .amit-cal-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 500px) {
    .amit-cal-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------
   Month Card
   --------------------------------------------------------- */
.amit-cal-month {
    background: var(--ac-card-bg);
    border-radius: var(--ac-radius);
    box-shadow: var(--ac-shadow);
    overflow: hidden;
    border: 1px solid var(--ac-border);
}

.amit-cal-month-header {
    background: var(--ac-header-bg);
    color: var(--ac-header-text);
    padding: 8px 10px;
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: .3px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    min-height: 38px;
}

.ac-month-name {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ac-month-admin-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.ac-month-badge {
    font-size: .62rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    line-height: 1.4;
}

.ac-badge-visible {
    background: #16a34a;
    color: #fff;
}

.ac-badge-hidden {
    background: #94a3b8;
    color: #fff;
}

.ac-month-toggle-btn {
    background: #f59e0b;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: .68rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.4;
    flex-shrink: 0;
}

.ac-month-toggle-btn:hover {
    background: #d97706;
}

/* ---------------------------------------------------------
   Day Grid inside Month
   --------------------------------------------------------- */
.amit-cal-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    padding: 8px 6px 10px;
}

.amit-cal-day-name {
    text-align: center;
    font-size: .6rem;
    font-weight: 600;
    color: var(--ac-text-muted);
    padding: 4px 0;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.amit-cal-day {
    position: relative;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(.6rem, 1.4vw, .82rem);
    font-weight: 500;
    border-radius: var(--ac-cell-radius);
    cursor: default;
    transition: transform var(--ac-transition);
    min-width: 0;
    min-height: 22px;
    box-sizing: border-box;
    overflow: visible;
}

.amit-cal-day:hover {
    z-index: 2;
}

.amit-cal-day.empty {
    background: transparent;
    cursor: default;
    pointer-events: none;
}

/* Default day */
.amit-cal-day.normal {
    color: var(--ac-text);
    background: transparent;
}

/* Weekend */
.amit-cal-day.ev-weekend {
    background: #1a1a1a;
    color: #ffffff;
    border-radius: var(--ac-cell-radius);
}

/* Islamic events */
.amit-cal-day.ev-ramadan        { background: #4AADA0; color: #fff; }
.amit-cal-day.ev-eid_alfitr     { background: #C8B87A; color: #fff; }
.amit-cal-day.ev-day_of_arafah  { background: #E8D44D; color: #333; }
.amit-cal-day.ev-eid_aladha     { background: #A8D5B0; color: #333; }
.amit-cal-day.ev-islamic_newyear { background: #7B9EC9; color: #fff; }
.amit-cal-day.ev-prophets_bday  { background: #C97BA8; color: #fff; }

/* Saudi national */
.amit-cal-day.ev-founding_day   { background: #7B5C3A; color: #fff; }
.amit-cal-day.ev-flag_day       { background: #1a5c38; color: #fff; }
.amit-cal-day.ev-national_day   { background: #1a5c38; color: #fff; }

/* Custom event types */
.amit-cal-day.ev-symposium      { background: #6A5ACD; color: #fff; }
.amit-cal-day.ev-workshop       { background: #7A8C2A; color: #fff; }
.amit-cal-day.ev-webinar        { background: #E8734A; color: #fff; }
.amit-cal-day.ev-idor           { background: #E8C44A; color: #333; }

/* Multi-event split (left/right halves) */
.amit-cal-day.multi-event {
    background: transparent !important;
    padding: 0;
}

.amit-cal-day.multi-event .ac-split {
    position: absolute;
    inset: 0;
    display: flex;
    border-radius: var(--ac-cell-radius);
    overflow: hidden;
}

.amit-cal-day.multi-event .ac-split-seg {
    flex: 1;
}

.amit-cal-day.multi-event .ac-day-num {
    position: relative;
    z-index: 1;
    font-size: inherit;
    font-weight: 600;
    mix-blend-mode: normal;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,.5);
}

/* Today ring */
.amit-cal-day.today {
    box-shadow: 0 0 0 2px var(--ac-today-ring);
}

/* Day with icon badge */
.amit-cal-day .ac-icon-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 55%;
    height: 55%;
    flex-shrink: 0;
}

.amit-cal-day .ac-icon-badge svg {
    width: 100%;
    height: 100%;
}

/* When a cell has an icon: icon centered, day number at top-right corner */
.amit-cal-day:has(.ac-icon-badge) {
    flex-direction: row;
    padding: 0;
}

.amit-cal-day:has(.ac-icon-badge) .ac-icon-badge {
    width: 72%;
    height: 72%;
}

.amit-cal-day:has(.ac-icon-badge) .ac-day-num {
    position: absolute;
    top: 2px;
    right: 3px;
    font-size: .55em;
    font-weight: 700;
    line-height: 1;
}

[dir="rtl"] .amit-cal-day:has(.ac-icon-badge) .ac-day-num,
.rtl .amit-cal-day:has(.ac-icon-badge) .ac-day-num {
    right: auto;
    left: 3px;
}

/* ---------------------------------------------------------
   Legend
   --------------------------------------------------------- */
.amit-cal-legend {
    margin-top: 28px;
    background: var(--ac-card-bg);
    border-radius: var(--ac-radius);
    box-shadow: var(--ac-shadow);
    border: 1px solid var(--ac-border);
    padding: 20px 24px;
}

.amit-cal-legend-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ac-header-bg);
    margin: 0 0 16px;
    display: block;
    line-height: 25px;
}

.amit-cal-legend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px 24px;
}

.amit-cal-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.amit-cal-legend-swatch {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.amit-cal-legend-swatch svg {
    width: 20px;
    height: 20px;
}

.amit-cal-legend-swatch.split-swatch {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
}

.amit-cal-legend-swatch.split-swatch span {
    flex: 1;
    height: 100%;
    display: block;
}

.amit-cal-legend-label {
    font-size: .85rem;
    color: var(--ac-text);
    line-height: 1.3;
}

.amit-cal-legend-note {
    margin-top: 16px;
    font-size: .8rem;
    color: #e53e3e;
    font-style: italic;
}

/* ---------------------------------------------------------
   Admin Panel Styles
   --------------------------------------------------------- */
.amit-admin-wrap {
    font-family: var(--ac-font);
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px 40px;
}

.amit-admin-wrap[dir="rtl"],
.amit-admin-wrap.rtl {
    font-family: var(--ac-font-ar);
    direction: rtl;
    text-align: right;
}

/* Admin Header */
.amit-admin-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 0 18px;
    border-bottom: 2px solid var(--ac-border);
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.amit-admin-logo {
    width: 40px;
    height: 40px;
    background: var(--ac-header-bg);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.3rem;
    font-weight: 700;
    flex-shrink: 0;
}

.amit-admin-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ac-header-bg);
    margin: 0;
}

.amit-admin-version {
    font-size: .75rem;
    color: var(--ac-text-muted);
    margin: 0;
}

/* Admin Nav Tabs */
.amit-admin-nav {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--ac-border);
    flex-wrap: wrap;
}

.amit-admin-nav a {
    display: inline-block;
    padding: 9px 18px;
    font-size: .88rem;
    font-weight: 600;
    color: var(--ac-text-muted);
    text-decoration: none;
    border-radius: 8px 8px 0 0;
    border: 1px solid transparent;
    border-bottom: none;
    margin-bottom: -2px;
    transition: all var(--ac-transition);
}

.amit-admin-nav a:hover {
    color: var(--ac-text);
    background: var(--ac-bg);
}

.amit-admin-nav a.active {
    color: var(--ac-header-bg);
    background: var(--ac-card-bg);
    border-color: var(--ac-border);
    border-bottom-color: var(--ac-card-bg);
}

/* ---------------------------------------------------------
   Events Page — Side-by-side forms row
   Fix: use flex instead of grid so Osclass admin wrapper
   width constraints don't collapse it; gap + equal halves
   --------------------------------------------------------- */
.ac-forms-row {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: stretch;
    margin-bottom: 0;
    width: 100%;
    box-sizing: border-box;
}

.ac-form-panel {
    flex: 1 1 0;
    min-width: 0;
    margin-bottom: 0;
    box-sizing: border-box;
}

@media (max-width: 560px) {
    .ac-forms-row {
        flex-direction: column;
    }
    .ac-form-panel {
        flex: none;
        width: 100%;
    }
}

/* Two-col layout inside a form panel (start/end dates) */
.ac-two-col {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.ac-two-col > .amit-admin-form-group {
    flex: 1 1 0;
    min-width: 0;
}

/* Keep labels top-aligned so OPTIONAL span never shifts the row height */
.ac-two-col > .amit-admin-form-group label {
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-wrap: wrap;
}

@media (max-width: 420px) {
    .ac-two-col { flex-direction: column; }
}

/* Form body wrapper — neutralises Osclass admin float:left on div children */
.ac-form-body {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 14px;
    padding-bottom: 16px !important;
}
.ac-form-body > * {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    float: none !important;
}

/* Form action buttons row */
.ac-form-actions,
.amit-form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-start;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--ac-border);
    flex-wrap: wrap;
}

/* Inline row actions */
.amit-actions-group {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.amit-actions-group-compact {
    gap: 10px;
}

.amit-actions-form {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.amit-actions-form button {
    margin: 0;
}

@media (max-width: 640px) {
    .amit-actions-group,
    .amit-actions-group-compact {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Cancel button */
.ac-btn-cancel {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid var(--ac-border);
}
.ac-btn-cancel:hover {
    background: #e2e8f0;
    color: #334155;
}

/* Checkbox label */
.ac-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: .88rem;
    color: var(--ac-text);
    font-weight: 500;
    user-select: none;
    margin-top: 14px;
}

/* Slug locked display */
.ac-slug-locked {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 45px;
    padding: 0 12px;
    background: #f8fafc;
    border: 1px solid var(--ac-border);
    border-radius: 8px;
    box-sizing: border-box;
}

.ac-slug-locked code {
    font-size: .85rem;
    color: var(--ac-text);
    background: none !important;
    padding: 0;
    font-family: 'Courier New', monospace;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ac-locked-badge {
    font-size: .72rem;
    font-weight: 600;
    color: var(--ac-text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Color picker row */
.ac-color-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 45px;
    flex-wrap: wrap;
}

.ac-color-preview {
    display: block;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 2px solid var(--ac-border);
    flex-shrink: 0;
    transition: background var(--ac-transition);
    /* force override any Osclass admin rules */
    background-color: #6A5ACD !important;
}

.ac-color-hex {
    font-size: .82rem;
    color: var(--ac-text-muted);
    font-family: 'Courier New', monospace;
    letter-spacing: .5px;
}

/* ---------------------------------------------------------
   Events & Types tables — section header with filter
   --------------------------------------------------------- */
.ac-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--ac-border);
    flex-wrap: wrap;
}

.ac-filter-select {
    height: 36px;
    padding: 4px 10px;
    border: 1px solid var(--ac-border);
    border-radius: 8px;
    font-size: .85rem;
    font-family: inherit;
    color: var(--ac-text);
    background: #fff;
    cursor: pointer;
}

.ac-empty-msg {
    color: var(--ac-text-muted);
    font-size: .9rem;
    padding: 20px 0 8px;
    margin: 0;
    text-align: center;
}


.ac-types-note {
    font-size: .82rem;
    color: var(--ac-text-muted);
}

.ac-bulk-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 14px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid var(--ac-border);
    border-radius: 10px;
    flex-wrap: wrap;
}

.ac-bulk-check-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .86rem;
    font-weight: 600;
    color: var(--ac-text);
    cursor: pointer;
    user-select: none;
}

.ac-bulk-delete-btn {
    margin-inline-end: 0;
    margin-bottom: 0;
}

.ac-cell-check {
    width: 42px;
    text-align: center;
}

.ac-cell-check input,
#ac-select-all-types,
#ac-select-all-types-head {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

@media (max-width: 560px) {
    .ac-bulk-toolbar {
        align-items: stretch;
    }

    .ac-bulk-delete-btn {
        width: 100%;
        justify-content: center;
    }
}


/* Highlighted row when editing */
.ac-row-editing > td {
    background-color: #fefce8 !important;
}

/* Name cell */
.ac-td-name {
    font-weight: 500;
    color: var(--ac-text);
}

/* Date cell */
.ac-td-date {
    font-size: .85rem;
    color: var(--ac-text-muted);
    white-space: nowrap;
}

.ac-date-arrow {
    margin: 0 5px;
    color: #94a3b8;
}

/* Mini badge (recurring icon) */
.ac-mini-badge {
    display: inline-flex;
    align-items: center;
    font-size: .72rem;
    margin-inline-start: 6px;
    vertical-align: middle;
}

/* Type pill badge in events table */
.ac-type-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px 3px 7px;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 600;
    border: 1px solid transparent;
    white-space: nowrap;
    line-height: 1.4;
}

.ac-pill-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    /* force override Osclass resets */
    min-width: 8px;
    min-height: 8px;
}

/* Color swatch in types table —
   Using div to avoid Osclass admin CSS overriding
   inline background on span elements               */
.ac-swatch-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ac-swatch {
    display: block;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 2px solid rgba(0,0,0,.1);
    flex-shrink: 0;
    /* !important to beat Osclass admin global resets */
    background-color: #cccccc !important;
}

/* Slug pill in types table */
.ac-slug-pill {
    display: inline-block;
    padding: 3px 8px;
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: .78rem;
    font-family: 'Courier New', monospace;
    color: #475569;
    white-space: nowrap;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    line-height: 1.6;
}

/* Action buttons in table */

.ac-row-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.ac-inline-delete-form {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.ac-td-actions {
    white-space: nowrap;
    min-width: 130px;
}

.ac-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 11px;
    border-radius: 6px;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    font-family: inherit;
    transition: all var(--ac-transition);
    margin-inline-end: 4px;
    margin-bottom: 2px;
    vertical-align: middle;
    line-height: 1.4;
}

.ac-action-edit {
    background: #fef3c7 !important;
    color: #92400e !important;
    border-color: #fde68a !important;
}
.ac-action-edit:hover {
    background: #fde68a !important;
    color: #78350f !important;
}

.ac-action-delete {
    background: #fee2e2 !important;
    color: #991b1b !important;
    border-color: #fecaca !important;
}
.ac-action-delete:hover {
    background: #fecaca !important;
    color: #7f1d1d !important;
}

.ac-protected-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .78rem;
    color: var(--ac-text-muted);
    font-style: italic;
    vertical-align: middle;
}

/* System / Custom badges in Event Types table —
   square-cornered to match Edit button, not round pills */
.ac-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: 6px !important;
    font-size: .78rem;
    font-weight: 600;
    border: 1px solid transparent;
    white-space: nowrap;
    line-height: 1.4;
}

.ac-type-system {
    background: #f0fdf4 !important;
    color: #15803d !important;
    border-color: #bbf7d0 !important;
}

.ac-type-custom {
    background: #fffbeb !important;
    color: #b45309 !important;
    border-color: #fde68a !important;
}


.ac-row-linked > td {
    background-color: #fffdfa !important;
}

.ac-type-linked {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border-color: #bfdbfe !important;
    margin-inline-start: 6px;
}

.ac-action-disabled,
.ac-action-disabled:hover {
    background: #f8fafc !important;
    color: #94a3b8 !important;
    border-color: #e2e8f0 !important;
    cursor: not-allowed;
    opacity: 1;
}

/* Admin Cards */
.amit-admin-card {
    background: var(--ac-card-bg);
    border: 1px solid var(--ac-border);
    border-radius: var(--ac-radius);
    box-shadow: var(--ac-shadow);
    padding: 24px;
    margin-bottom: 20px;
}

.amit-admin-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ac-header-bg);
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--ac-border);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Admin Table */
.amit-admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
}

.amit-admin-table th {
    background: var(--ac-bg);
    color: var(--ac-text-muted);
    font-weight: 600;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .4px;
    padding: 10px 12px;
    border-bottom: 2px solid var(--ac-border);
    text-align: left;
}

[dir="rtl"] .amit-admin-table th,
.rtl .amit-admin-table th {
    text-align: right;
}

.amit-admin-table td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--ac-border);
    vertical-align: middle;
    color: var(--ac-text);
}

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

.amit-admin-table tr:hover td {
    background: #f8fafc;
}

/* Color dot in table */
.ac-color-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    vertical-align: middle;
    margin-inline-end: 6px;
    border: 1px solid rgba(0,0,0,.1);
}

/* Admin Forms */
.amit-admin-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.amit-admin-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.amit-admin-form-group label {
    font-size: .82rem;
    font-weight: 600;
    color: var(--ac-text-muted);
    text-transform: uppercase;
    letter-spacing: .4px;
}

.amit-admin-form-group input[type="text"],
.amit-admin-form-group input[type="date"],
.amit-admin-form-group input[type="number"],
.amit-admin-form-group input[type="color"],
.amit-admin-form-group select,
.amit-admin-form-group textarea {
    height: 45px;
    padding: 9px 12px;
    border: 1px solid var(--ac-border);
    border-radius: 8px;
    font-size: .9rem;
    font-family: inherit;
    color: var(--ac-text);
    background: #fff;
    transition: border-color var(--ac-transition), box-shadow var(--ac-transition);
    width: 100%;
    box-sizing: border-box;
}

.amit-admin-form-group input[type="color"] {
    padding: 4px 6px;
    height: 40px;
    cursor: pointer;
}

.amit-admin-form-group input:focus,
.amit-admin-form-group select:focus,
.amit-admin-form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

/* Buttons */
.amit-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all var(--ac-transition);
    font-family: inherit;
}

.amit-btn-primary {
    background: var(--ac-header-bg);
    color: #fff;
}
.amit-btn-primary:hover { background: #334155; color: #fff; }

.amit-btn-success {
    background: #16a34a;
    color: #fff;
}
.amit-btn-success:hover { background: #15803d; color: #fff; }

.amit-btn-warning {
    background: #d97706;
    color: #fff;
}
.amit-btn-warning:hover { background: #b45309; color: #fff; }

.amit-btn-danger {
    background: #dc2626;
    color: #fff;
}
.amit-btn-danger:hover { background: #b91c1c; color: #fff; }

.amit-btn-sm {
    padding: 5px 12px;
    font-size: .8rem;
}

/* Conflict badge */
.amit-conflict-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.amit-conflict-badge.conflict {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.amit-conflict-badge.ok {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.amit-conflict-badge.pending {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}

/* Stats cards on dashboard */
.amit-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.amit-stat-card {
    background: var(--ac-card-bg);
    border: 1px solid var(--ac-border);
    border-radius: var(--ac-radius);
    padding: 18px 20px;
    box-shadow: var(--ac-shadow);
    text-align: center;
}

.amit-stat-num {
    font-size: 2rem;
    font-weight: 700;
    color: var(--ac-header-bg);
    line-height: 1;
    margin-bottom: 6px;
}

.amit-stat-label {
    font-size: .8rem;
    color: var(--ac-text-muted);
    font-weight: 500;
}

/* Alerts */
.amit-alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: .88rem;
    margin-bottom: 16px;
    border-left: 4px solid transparent;
}

[dir="rtl"] .amit-alert,
.rtl .amit-alert {
    border-left: none;
    border-right: 4px solid transparent;
}

.amit-alert-success {
    background: #f0fdf4;
    border-color: #16a34a;
    color: #15803d;
}

.amit-alert-danger {
    background: #fef2f2;
    border-color: #dc2626;
    color: #dc2626;
}

.amit-alert-warning {
    background: #fffbeb;
    border-color: #d97706;
    color: #92400e;
}

.amit-alert-info {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1d4ed8;
}

/* Responsive admin */
@media (max-width: 600px) {
    .amit-admin-wrap { padding: 0 10px 30px; }
    .amit-admin-card { padding: 16px; }
    .amit-admin-table { font-size: .8rem; }
    .amit-admin-table th, .amit-admin-table td { padding: 8px 8px; }
    .amit-admin-nav a { padding: 7px 12px; font-size: .82rem; }
}

/* Overflow scroll on small screens for tables */
.amit-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--ac-radius);
}

/* ---------------------------------------------------------
   Field hint text & checkbox group (admin forms)
   --------------------------------------------------------- */
.ac-field-hint {
    font-size: 0.78rem;
    color: var(--ac-text-muted, #64748b);
    margin: 4px 0 0;
    line-height: 1.4;
}
.ac-checkbox-group {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 8px;
}
.ac-checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #22c55e;
}
.ac-checkbox-group label {
    font-weight: 500;
    cursor: pointer;
    margin: 0;
}

/* -------------------------------------------------------
   Clickable event day cells — v3.1.3
   ------------------------------------------------------- */
.amit-cal-day.ac-day-clickable {
    cursor: pointer !important;
}

.amit-cal-day.ac-day-clickable:hover {
    transform: scale(1.12);
    z-index: 3;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
}

.amit-cal-day.ac-day-clickable.ac-detail-open {
    outline: 2px solid #fff;
    outline-offset: -2px;
    z-index: 3;
}

/* -------------------------------------------------------
   Day detail panel — shown below month card on click
   ------------------------------------------------------- */
.ac-day-detail {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 4px;
    animation: acDetailIn .22s ease;
}

@keyframes acDetailIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ac-detail-inner {
    position: relative;
    background: var(--ac-card-bg);
    border: 1px solid var(--ac-border);
    border-radius: var(--ac-radius);
    box-shadow: var(--ac-shadow);
    padding: 18px 20px 16px;
    margin-bottom: 4px;
}

.ac-detail-close {
    position: absolute;
    top: 10px;
    inset-inline-end: 12px;
    background: none;
    border: none;
    font-size: 1rem;
    color: var(--ac-text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 4px 6px;
    border-radius: 4px;
    transition: background .15s;
}
.ac-detail-close:hover {
    background: var(--ac-border);
    color: var(--ac-text);
}

/* Each event card inside the panel */
.ac-detail-event {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--ac-border);
}
.ac-detail-event:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.ac-detail-bar {
    width: 5px;
    min-height: 44px;
    border-radius: 3px;
    flex-shrink: 0;
    margin-top: 2px;
}

.ac-detail-info {
    flex: 1;
    min-width: 0;
}

.ac-detail-name {
    font-size: .92rem;
    font-weight: 700;
    color: var(--ac-text);
    line-height: 1.3;
    margin-bottom: 3px;
}

.ac-detail-speaker {
    font-size: .82rem;
    color: var(--ac-text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 2px;
}

.ac-detail-date {
    font-size: .78rem;
    color: var(--ac-text-muted);
    margin-top: 4px;
}

.ac-detail-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    font-size: .78rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity .15s;
    direction: ltr;
}
.ac-detail-link:hover { opacity: .75; }

/* Speaker tag in admin tables */
.ac-speaker-tag {
    font-size: .75rem;
    color: var(--ac-text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

@media (max-width: 600px) {
    .ac-detail-inner { padding: 14px 14px 12px; }
    .ac-detail-name  { font-size: .86rem; }
}

/* -------------------------------------------------------
   Symposium admin — speaker profile cards
   ------------------------------------------------------- */
.ac-speaker-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 8px;
}

.ac-spk-card {
    background: var(--ac-card-bg);
    border: 1px solid var(--ac-border);
    border-radius: var(--ac-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

/* Coloured top band with avatar */
.ac-spk-card-top {
    background: linear-gradient(160deg, #75b12f 0%, #232629 100%);
    padding: 20px 16px 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.ac-spk-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,.9);
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
    background: #fff;
    position: relative;
    z-index: 1;
}

.ac-spk-photo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    border: 3px solid rgba(255,255,255,.4);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.ac-spk-card-body {
    padding: 0 16px 12px;
    margin-top: -24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
}

.ac-spk-name {
    font-weight: 700;
    font-size: .9rem;
    color: var(--ac-text);
    line-height: 1.3;
    margin-top: 6px;
}

.ac-spk-spec {
    font-size: .75rem;
    color: var(--ac-text-muted);
    line-height: 1.3;
    font-style: italic;
}

.ac-spk-email {
    font-size: .72rem;
    text-decoration: none;
    word-break: break-all;
    margin-top: 2px;
}
.ac-spk-email:hover { text-decoration: underline; }

.ac-spk-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 14px 12px;
    border-top: 1px solid var(--ac-border);
    justify-content: flex-end;
    align-items: center;
    margin-top: auto;
    background: var(--ac-bg);
}

/* Full-width speaker edit panel — sits below the cards grid */
.ac-spk-edit-panel {
    background: var(--ac-card-bg);
    border-radius: var(--ac-radius);
    margin-top: 12px;
    box-shadow: 0 4px 16px rgba(106,90,205,.12);
    overflow: hidden;
}

.ac-spk-edit-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: linear-gradient(90deg, #75b12f, #232629);
    color: #fff;
    font-size: .88rem;
    font-weight: 600;
}

.ac-spk-edit-close {
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.3);
    color: #fff;
    border-radius: 6px;
    padding: 3px 10px;
    font-size: .82rem;
    cursor: pointer;
    line-height: 1.4;
    transition: background var(--ac-transition);
}
.ac-spk-edit-close:hover {
    background: rgba(255,255,255,.28);
}


.ac-sym-wrap {
    font-family: var(--ac-font);
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding: 8px 0;
    margin-bottom: 20px;
}

.ac-sym-wrap[dir="rtl"] {
    font-family: var(--ac-font-ar);
    direction: rtl;
    text-align: right;
}

.ac-sym-card {
    background: var(--ac-card-bg);
    border: 1px solid var(--ac-border);
    border-radius: var(--ac-radius);
    box-shadow: var(--ac-shadow);
    overflow: hidden;
}

.ac-sym-header {
    background: linear-gradient(135deg, #232629 0%, #3a3d42 100%);
    color: var(--ac-header-text);
    padding: 24px 28px 20px;
    position: relative;
}
.ac-sym-header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #a5d76a, #5cadb8, #a5d76a);
}

.ac-sym-title {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.3;
}

.ac-sym-date {
    font-size: .85rem;
    opacity: .75;
    margin-bottom: 4px;
}

.ac-sym-desc {
    font-size: .88rem;
    opacity: .7;
    margin-top: 10px;
    line-height: 1.7;
}

.ac-sym-speakers-label {
    padding: 18px 28px 4px;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.ac-sym-speakers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 16px 24px 24px;
}

/* Individual speaker card */
.ac-sym-speaker {
    background: var(--ac-card-bg);
    border: 1px solid var(--ac-border);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
}

/* Photo band */
.ac-sym-spk-photo-wrap {
    width: 100%;
    background: linear-gradient(160deg, #75b12f 0%, #232629 100%);
    padding: 24px 16px 32px;
    display: flex;
    justify-content: center;
    position: relative;
}
.ac-sym-spk-photo-wrap::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0; right: 0;
    height: 18px;
    background: var(--ac-card-bg);
}

.ac-sym-spk-photo {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255,255,255,.95);
    box-shadow: 0 4px 16px rgba(0,0,0,.3);
    position: relative;
    z-index: 1;
}

.ac-sym-spk-placeholder {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    border: 4px solid rgba(255,255,255,.4);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.ac-sym-spk-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 6px 16px 20px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.ac-sym-spk-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--ac-text);
    line-height: 1.3;
}

.ac-sym-spk-spec {
    font-size: .8rem;
    line-height: 1.4;
    font-style: italic;
    font-weight: 500;
}

.ac-sym-spk-email {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .75rem;
    text-decoration: none;
    margin-top: 6px;
    padding: 5px 12px;
    border: 1px solid var(--ac-border);
    border-radius: 5px;
}

@media (max-width: 600px) {
    .ac-sym-speakers-grid { grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px 14px 18px; }
    .ac-sym-header { padding: 16px 18px; }
}
@media (max-width: 400px) {
    .ac-sym-speakers-grid { grid-template-columns: 1fr; }
}
@media (max-width: 500px) {
    .ac-speaker-cards-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

/* ---------------------------------------------------------
   Backup & Restore page
   --------------------------------------------------------- */
.ac-backup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 4px;
}
@media (max-width: 760px) {
    .ac-backup-grid { grid-template-columns: 1fr; }
}
.ac-backup-card { display: flex; flex-direction: column; gap: 14px; }
.ac-backup-desc {
    color: var(--ac-text-muted, #64748b);
    font-size: 0.9rem;
    line-height: 1.55;
    margin: 0;
}
.ac-backup-summary {
    background: var(--ac-bg-subtle, #f8fafc);
    border: 1px solid var(--ac-border, #e2e8f0);
    border-radius: 8px;
    padding: 12px 14px;
}
.ac-backup-summary-title {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--ac-text-muted, #64748b);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.ac-backup-summary-grid { display: flex; flex-direction: column; gap: 5px; }
.ac-backup-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    padding: 2px 0;
    border-bottom: 1px solid var(--ac-border, #e2e8f0);
}
.ac-backup-summary-row:last-child { border-bottom: none; }
.ac-backup-total { font-weight: 700; margin-top: 4px; padding-top: 6px; border-top: 2px solid var(--ac-border, #e2e8f0) !important; }
.ac-backup-btn { width: 100%; justify-content: center; margin-top: 4px; }
.ac-backup-note {
    font-size: 0.78rem;
    color: var(--ac-text-muted, #64748b);
    margin: 0;
    line-height: 1.4;
}
.ac-backup-file-input {
    display: block;
    width: 100%;
    padding: 8px;
    border: 1px solid var(--ac-border, #e2e8f0);
    border-radius: 6px;
    font-size: 0.88rem;
    background: var(--ac-bg, #fff);
    cursor: pointer;
}
.ac-backup-howto {
    background: var(--ac-bg-subtle, #f8fafc);
    border: 1px solid var(--ac-border, #e2e8f0);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 0.85rem;
    line-height: 1.6;
}
.ac-backup-howto strong { display: block; margin-bottom: 6px; }
.ac-backup-howto ol { margin: 0; padding-inline-start: 18px; }
.ac-backup-results { margin-bottom: 4px; }
.ac-backup-result-grid { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.ac-backup-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: var(--ac-bg-subtle, #f8fafc);
    border-radius: 6px;
    font-size: 0.9rem;
}
.ac-backup-result-count {
    font-weight: 700;
    color: var(--ac-success, #16a34a);
    font-size: 1rem;
}

/* =========================================================
   AMIT Calendar — v2.8.2 utility classes
   Extracted from inline styles in PHP files
   ========================================================= */

/* ---------------------------------------------------------
   Generic layout helpers
   --------------------------------------------------------- */
/* Inline forms (display:inline for action forms inside td) */
.ac-inline-form { display: inline; margin: 0; }

/* Flex row wrappers */
.ac-flex-row          { display: flex; gap: 10px; flex-wrap: wrap; }
.ac-flex-row-between  { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.ac-flex-row-end      { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ac-flex-actions      { display: flex; gap: 10px; flex-wrap: wrap; }

/* td that holds flex action buttons */
.ac-td-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* Table column widths */
.ac-th-check  { width: 42px; text-align: center; }
.ac-th-color  { width: 44px; }
.ac-th-sort   { width: 60px; }
.ac-th-system { width: 90px; }
.ac-td-center { text-align: center; }
.ac-td-note   { font-size: .82rem; }
.ac-td-title  { font-size: .82rem; max-width: 180px; }

/* ---------------------------------------------------------
   Cards
   --------------------------------------------------------- */
/* Compact card padding (year selector, webinar year bar, etc.) */
.ac-card-compact { padding: 14px 24px !important; }

/* Card title flush — override Osclass admin margins */
.ac-card-title-flush { margin: 0 !important; border: none !important; padding: 0 !important; }

/* Symposium list card accent */
.ac-sym-card-accent { }

/* ---------------------------------------------------------
   Symposium card inner layout
   --------------------------------------------------------- */
.ac-sym-card-row  { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.ac-sym-card-left { flex: 1; min-width: 0; }
.ac-sym-card-title { font-size: 1rem; font-weight: 700; color: var(--ac-text); }
.ac-sym-card-meta  { font-size: .82rem; color: var(--ac-text-muted); margin-top: 3px; }
.ac-sym-card-meta a { }
.ac-sym-card-desc  { font-size: .82rem; color: var(--ac-text-muted); margin-top: 4px; }

/* Edit panel toggle wrapper */
.ac-sym-edit-wrap { display: none; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--ac-border); }

/* Edit save/cancel button row */
.ac-sym-edit-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--ac-border); }

/* Speakers section */
.ac-sym-spk-section { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--ac-border); }
.ac-sym-spk-heading { font-size: .9rem; font-weight: 700; margin: 0 0 14px; color: var(--ac-text); }

/* Add speaker <details> */
.ac-spk-details { margin-top: 14px; }
.ac-spk-summary {
    cursor: pointer;
    font-size: .85rem;
    font-weight: 600;
    user-select: none;
    list-style: none;
}
.ac-spk-summary::-webkit-details-marker { display: none; }

/* Add speaker body */
.ac-spk-add-body {
    margin-top: 12px;
    padding: 16px;
    background: var(--ac-bg);
    border-radius: 10px;
    border: 1px solid var(--ac-border);
}

/* Speaker edit panel form body padding */
.ac-form-body-padded { padding: 16px; }

/* Photo preview row */
.ac-spk-photo-preview { display: flex; align-items: center; gap: 8px; }
.ac-spk-photo-thumb {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--ac-border);
}
.ac-spk-current-label { font-size: .75rem; color: var(--ac-text-muted); }
.ac-spk-hint          { font-size: .72rem; color: var(--ac-text-muted); }

/* Sort field narrow wrapper */
.ac-sort-wrap { max-width: 120px; }

/* Form actions with extra top spacing */
.ac-form-actions-top { margin-top: 4px; padding-top: 12px; }

/* ---------------------------------------------------------
   Conflict badges inline spacing
   --------------------------------------------------------- */
.ac-badge-inline-start { margin-inline-start: 8px; }

/* ---------------------------------------------------------
   Index / Dashboard
   --------------------------------------------------------- */
.ac-hook-desc { color: var(--ac-text-muted); font-size: .88rem; margin: 0 0 12px; }
.ac-hook-pre  {
    background: #1e293b;
    color: #93c5fd;
    padding: 16px;
    border-radius: 8px;
    font-size: .88rem;
    overflow-x: auto;
    margin: 0;
}
.ac-year-btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.ac-stat-num-ok   { color: #16a34a; }
.ac-stat-num-warn { color: #dc2626; }

/* ---------------------------------------------------------
   Years page
   --------------------------------------------------------- */
.ac-year-add-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.ac-year-input   { max-width: 150px; }
.ac-no-years     { color: var(--ac-text-muted); }

/* ---------------------------------------------------------
   Islamic / Webinar / Workshop shared edit row styles
   --------------------------------------------------------- */
.ac-edit-row  { display: none; background: #f8fafc; }
.ac-edit-cell { padding: 14px; }
.ac-edit-cell-lg { padding: 16px; }

.ac-edit-date-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.ac-islamic-form-row { margin-bottom: 12px; }
.ac-islamic-btn-row  { display: flex; gap: 8px; }

/* ---------------------------------------------------------
   Webinar / Workshop year selector row
   --------------------------------------------------------- */
.ac-webinar-year-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
    justify-content: space-between;
}

/* ---------------------------------------------------------
   Shared form element helpers
   --------------------------------------------------------- */
/* Optional hint spans inside labels */
.ac-opt-span { font-weight: 400; font-size: .78rem; color: var(--ac-text-muted); }
.ac-opt-span-sm { font-weight: 400; font-size: .75rem; color: var(--ac-text-muted); }

/* Full-width text/url inputs */
.ac-full-input { width: 100%; box-sizing: border-box; }

/* Full-width textarea */
.ac-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--ac-border);
    border-radius: 8px;
    font-size: .9rem;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}
.ac-textarea-sm { font-size: .88rem; }

/* Confirm checkbox label */
.ac-confirm-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: .88rem;
    font-weight: 500;
    color: var(--ac-text);
}
/* Confirm checkbox label (webinar inline variant) */
.ac-confirm-label-sm {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: .88rem;
}
/* Confirm checkbox input */
.ac-confirm-input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Date input max-width */
.ac-date-input    { max-width: 260px; }
.ac-date-input-sm { max-width: 240px; }

/* Two-col with bottom margin */
.ac-two-col-mb   { margin-bottom: 10px; }
.ac-two-col-mb2  { margin-bottom: 12px; }

/* Form group with margin-top */
.ac-form-group-mt  { margin-top: 12px; }
.ac-form-group-mt2 { margin-top: 14px; }
.ac-form-group-mt3 { margin-top: 10px; }

/* Form group with margin-bottom */
.ac-form-group-mb  { margin-bottom: 12px; }

/* Narrow field */
.ac-narrow-field { max-width: 160px; }

/* Color picker row */
.ac-color-picker-row { display: flex; align-items: center; gap: 10px; min-height: 45px; }

/* Recurring fields toggle (hidden by default, shown by JS) */
.ac-recurring-fields { margin-top: 10px; display: none; }

/* Compact alert info variant */
.ac-alert-compact { margin: 0 0 14px; font-size: .82rem; padding: 10px 14px; }

/* ---------------------------------------------------------
   Note / conflict / muted spans in tables
   --------------------------------------------------------- */
.ac-note-text     { color: var(--ac-text); }
.ac-conflict-text { color: #dc2626; }
.ac-muted-dash    { color: var(--ac-text-muted); }
.ac-month-subdiv  { font-size: .78rem; color: var(--ac-text-muted); }

/* ---------------------------------------------------------
   Cancel / Delete button utility classes
   --------------------------------------------------------- */
.ac-cancel-btn { background: #e2e8f0 !important; color: #333 !important; }
.ac-cancel-btn-alt { background: #e2e8f0 !important; color: #475569 !important; }
.ac-delete-btn { background: #fee2e2 !important; color: #991b1b !important; border-color: #fecaca !important; }


/* =========================================================
   KSA Events Admin Module — v3.1.3
   ========================================================= */
.amit-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.amit-form-grid .amit-admin-form-group textarea,
.amit-form-grid .amit-admin-form-group select,
.amit-form-grid .amit-admin-form-group input[type="url"],
.amit-form-grid .amit-admin-form-group input[type="color"] {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.ac-inline-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.ac-checkline {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding-top: 24px;
}
.ac-checkline label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    font-weight: 700;
}
.ac-form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}
.ac-admin-note {
    margin: -4px 0 16px;
    color: #64748b;
    font-size: 14px;
}
@media (max-width: 700px) {
    .amit-form-grid { grid-template-columns: 1fr; }
    .ac-checkline { padding-top: 0; }
}


/* ---------------------------------------------------------
   Today KSA Facts One-Line Hook — v3.1.3
   --------------------------------------------------------- */
.amit-today-facts {
    width: 100%;
    margin: 0px auto 35px auto;
    padding: 18px;
    box-sizing: border-box;
    border: 1px solid rgba(26, 92, 56, .16);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(26, 92, 56, .08), rgba(255,255,255,.98));
    box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
    color: var(--ac-text, #1a202c);
    font-family: var(--ac-font, 'Calibri', 'Segoe UI', sans-serif);
}

.amit-today-facts[dir="rtl"] {
    direction: rtl;
    text-align: right;
    font-family: var(--ac-font-ar, 'Calibri', 'Noto Sans Arabic', sans-serif);
    background: linear-gradient(225deg, rgba(26, 92, 56, .08), rgba(255,255,255,.98));
}

.amit-today-facts-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.amit-today-facts-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #1a5c38;
    color: #fff;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(26, 92, 56, .18);
}

.amit-today-facts-icon img {
    width: 30px;
    height: 30px;
    display: block;
    object-fit: contain;
}

.amit-today-facts-title-wrap {
    min-width: 0;
}

.amit-today-facts-title {
    margin: 0;
    font-size: clamp(1.15rem, 3vw, 1.55rem);
    line-height: 1.25;
    font-weight: 800;
    color: #123524;
}

.amit-today-facts-subtitle {
    margin: 4px 0 0;
    color: var(--ac-text-muted, #64748b);
    font-size: .92rem;
    line-height: 1.45;
}

.amit-today-facts-list {
    position: relative;
    min-height: 116px;
}

.amit-today-fact {
    display: none;
    padding: 16px;
    border-radius: 16px;
    background: rgba(255,255,255,.88);
    border: 1px solid rgba(226, 232, 240, .9);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.65);
}

.amit-today-fact.is-active {
    display: block;
}

.amit-today-fact p {
    margin: 8px 0 0;
    font-size: clamp(1rem, 2.4vw, 1.18rem);
    line-height: 1.75;
    color: #1f2937;
}

.amit-today-fact-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.amit-today-fact-year {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .82rem;
    line-height: 1.3;
    font-weight: 700;
}


.amit-today-fact-year {
    background: rgba(117, 177, 47, .14);
    color: #385d15;
}

@media (max-width: 480px) {
    .amit-today-facts {
        margin: 18px auto;
        padding: 14px;
        border-radius: 14px;
    }

    .amit-today-facts-head {
        align-items: flex-start;
    }

    .amit-today-facts-icon {
        width: 38px;
        height: 38px;
        min-width: 38px;
        border-radius: 12px;
        font-size: 1.1rem;
    }

    .amit-today-fact {
        padding: 13px;
    }
}


.amit-code-line {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #0f172a;
    color: #f8fafc;
    direction: ltr;
    text-align: left;
    font-family: Consolas, Monaco, 'Courier New', monospace;
    font-size: .9rem;
    overflow-x: auto;
}
