/**
 * Site Público Anuarite — UI completa (páginas, modais, formulários, chat)
 */
:root {
    --sp-primary: #4a96cc;
    --sp-primary-dark: #3a7aad;
    --sp-primary-light: #e8f1f9;
    --sp-ink: #0f172a;
    --sp-muted: #64748b;
    --sp-border: #e2e8f0;
    --sp-surface: #f8fafc;
    --sp-white: #ffffff;
    --sp-radius: 8px;
    --sp-radius-lg: 12px;
    --sp-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    --sp-shadow-md: 0 8px 30px rgba(15, 23, 42, 0.08);
    --sp-header-offset: 84px;
}

/* —— Layout páginas internas —— */
.sp-main {
    padding-top: var(--sp-header-offset);
    min-height: 60vh;
    background: var(--sp-surface);
}

.sp-content {
    padding: 1.75rem 0 2.5rem;
}

.sp-container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1rem;
}

.sp-page-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 1.75rem;
}

.sp-page-head .sp-kicker {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--sp-primary);
    margin-bottom: 0.35rem;
}

.sp-page-head h1 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--sp-ink);
    margin: 0 0 0.5rem;
    line-height: 1.2;
}

.sp-page-head p {
    margin: 0;
    color: var(--sp-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Hero interno (substitui ca-page-hero) */
.sp-hero {
    margin-top: var(--sp-header-offset);
    padding: 2.25rem 1rem 2rem;
    background: linear-gradient(135deg, var(--sp-primary-dark) 0%, var(--sp-primary) 100%);
    color: #fff;
    text-align: center;
}

.sp-hero .sp-kicker { color: rgba(255,255,255,0.85); }
.sp-hero h1 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.15rem); margin: 0.25rem 0 0.5rem; }
.sp-hero p { color: rgba(255,255,255,0.9); max-width: 560px; margin: 0 auto; font-size: 0.95rem; }

.sp-main--after-hero { padding-top: 0; }

/* —— Tipografia / prose —— */
.sp-prose { color: var(--sp-muted); line-height: 1.75; font-size: 0.95rem; }
.sp-prose h2, .sp-prose h3 { color: var(--sp-ink); margin: 1.5rem 0 0.75rem; font-size: 1.15rem; }
.sp-prose p { margin-bottom: 1rem; }
.sp-prose ul { padding-left: 1.25rem; margin-bottom: 1rem; }

/* —— Cards —— */
.sp-card {
    background: var(--sp-white);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-lg);
    padding: 1.25rem;
    box-shadow: var(--sp-shadow);
}

.sp-card--hover {
    transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
}

.sp-card--hover:hover {
    box-shadow: var(--sp-shadow-md);
    transform: translateY(-3px);
    border-color: #cbd5e1;
}

.sp-card--clickable { cursor: pointer; }

.sp-icon-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}
.sp-icon-circle--blue { background: #e0f2fe; }
.sp-icon-circle--green { background: #dcfce7; }
.sp-icon-circle--purple { background: #f3e8ff; }

.sp-link {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--sp-primary);
}

.sp-step-num {
    width: 44px;
    height: 44px;
    margin: 0 auto 0.75rem;
    border-radius: 50%;
    background: var(--sp-primary-light);
    color: var(--sp-primary-dark);
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sp-box-muted {
    background: var(--sp-surface);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-lg);
    padding: 1.5rem;
}

.sp-list {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--sp-body);
    line-height: 1.7;
    font-size: 0.9rem;
}

.sp-article {
    background: var(--sp-white);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-lg);
    overflow: hidden;
    box-shadow: var(--sp-shadow-sm);
}

.sp-article__hero img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    display: block;
}

.sp-article__body { padding: 1.5rem 1.75rem; }

.sp-breadcrumb {
    font-size: 0.8rem;
    color: var(--sp-muted);
    margin-bottom: 1rem;
}
.sp-breadcrumb a { color: var(--sp-primary); text-decoration: none; }
.sp-breadcrumb a:hover { text-decoration: underline; }

.sp-prose-content {
    color: var(--sp-body);
    line-height: 1.75;
    font-size: 1rem;
}
.sp-prose-content p { margin-bottom: 1rem; }
.sp-prose-content h2, .sp-prose-content h3 { color: var(--sp-ink); margin: 1.5rem 0 0.75rem; }
.sp-prose-content img { max-width: 100%; border-radius: var(--sp-radius); margin: 1rem 0; }
.sp-prose-content a { color: var(--sp-primary-dark); }

.sp-share { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--sp-border); }
.sp-share a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    border-radius: var(--sp-radius);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
}
.sp-share .fb { background: #1877f2; }
.sp-share .wa { background: #25d366; }
.sp-share .tw { background: #0ea5e9; }

.sp-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
}
.sp-photo-grid button {
    border: none;
    padding: 0;
    cursor: pointer;
    border-radius: var(--sp-radius);
    overflow: hidden;
    aspect-ratio: 4/3;
}
.sp-photo-grid img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s; }
.sp-photo-grid button:hover img { transform: scale(1.05); }

.sp-card__icon {
    width: 48px;
    height: 48px;
    border-radius: var(--sp-radius);
    background: var(--sp-primary-light);
    color: var(--sp-primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
}

.sp-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--sp-ink);
    margin: 0 0 0.35rem;
    text-align: center;
}

.sp-card p { font-size: 0.875rem; color: var(--sp-muted); margin: 0; text-align: center; }

.sp-card__link {
    display: block;
    margin-top: 0.75rem;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--sp-primary);
}

/* —— Grids —— */
.sp-grid { display: grid; gap: 1rem; }
.sp-grid-2 { grid-template-columns: 1fr; }
.sp-grid-3 { grid-template-columns: 1fr; }
.sp-grid-4 { grid-template-columns: repeat(2, 1fr); }

@media (min-width: 640px) {
    .sp-grid-2 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
    .sp-grid-3 { grid-template-columns: repeat(3, 1fr); }
    .sp-grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.sp-section { margin-bottom: 2rem; }
.sp-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--sp-ink);
    text-align: center;
    margin: 0 0 1.25rem;
}

/* —— Botões —— */
.sp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.55rem 1.1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: var(--sp-radius);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    font-family: inherit;
}

.sp-btn--primary {
    background: var(--sp-primary);
    color: #fff;
    border-color: var(--sp-primary);
}
.sp-btn--primary:hover { background: var(--sp-primary-dark); border-color: var(--sp-primary-dark); color: #fff; }

.sp-btn--outline {
    background: transparent;
    color: var(--sp-primary-dark);
    border-color: var(--sp-primary);
}
.sp-btn--outline:hover { background: var(--sp-primary); color: #fff; }

.sp-btn--white {
    background: #fff;
    color: var(--sp-primary-dark);
    border-color: #fff;
}

.sp-btn--block { width: 100%; }

.sp-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--sp-muted);
    background: var(--sp-white);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius);
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
}
.sp-back:hover { color: var(--sp-primary-dark); border-color: var(--sp-primary); }

/* —— Filtros —— */
.sp-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.sp-filters { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.sp-filter-btn {
    padding: 0.4rem 0.85rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--sp-radius);
    border: 1px solid var(--sp-border);
    background: var(--sp-white);
    color: var(--sp-muted);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.sp-filter-btn:hover { border-color: var(--sp-primary); color: var(--sp-primary-dark); }
.sp-filter-btn.is-active {
    background: var(--sp-primary);
    border-color: var(--sp-primary);
    color: #fff;
}

.sp-search {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 280px;
}

.sp-search input {
    width: 100%;
    padding: 0.45rem 0.75rem 0.45rem 2.25rem;
    font-size: 0.875rem;
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius);
    background: var(--sp-white);
    font-family: inherit;
}
.sp-search input:focus {
    outline: none;
    border-color: var(--sp-primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}
.sp-search svg {
    position: absolute;
    left: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: #94a3b8;
}

/* —— Formulários —— */
.sp-form .sp-field { margin-bottom: 1rem; }
.sp-form label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--sp-ink);
    margin-bottom: 0.35rem;
}
.sp-input, .sp-textarea, .sp-select {
    width: 100%;
    padding: 0.55rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius);
    background: var(--sp-white);
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.sp-input:focus, .sp-textarea:focus {
    outline: none;
    border-color: var(--sp-primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}
.sp-textarea { min-height: 120px; resize: vertical; }

/* —— Info cards (contacto) —— */
.sp-info-card {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--sp-white);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-lg);
    margin-bottom: 0.75rem;
}
.sp-info-card svg { flex-shrink: 0; width: 1.25rem; height: 1.25rem; color: var(--sp-primary); margin-top: 0.15rem; }
.sp-info-card h3 { font-size: 0.9rem; font-weight: 600; margin: 0 0 0.25rem; color: var(--sp-ink); }
.sp-info-card p { margin: 0; font-size: 0.85rem; color: var(--sp-muted); line-height: 1.5; }

/* —— Stats / highlight boxes —— */
.sp-stat-box {
    background: var(--sp-white);
    border: 1px solid var(--sp-border);
    border-left: 3px solid var(--sp-primary);
    border-radius: var(--sp-radius);
    padding: 0.85rem 1rem;
}
.sp-stat-box strong { display: block; font-size: 1.5rem; color: var(--sp-primary-dark); }
.sp-stat-box span { font-size: 0.75rem; color: var(--sp-muted); }

.sp-box-primary {
    background: linear-gradient(135deg, var(--sp-primary-dark), var(--sp-primary));
    color: #fff;
    border-radius: var(--sp-radius-lg);
    padding: 1.5rem;
    border: none;
}
.sp-box-primary h3 { color: #fff; margin: 0 0 0.5rem; font-size: 1.1rem; }
.sp-box-primary p { color: rgba(255,255,255,0.9); margin: 0; font-size: 0.9rem; line-height: 1.6; }

/* —— Notícias card —— */
.sp-news-card {
    background: var(--sp-white);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-lg);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
    height: 100%;
}
.sp-news-card:hover { box-shadow: var(--sp-shadow-md); transform: translateY(-2px); }
.sp-news-card a { text-decoration: none; color: inherit; display: block; height: 100%; }
.sp-news-card img { width: 100%; height: 180px; object-fit: cover; background: var(--sp-surface); }
.sp-news-card__body { padding: 1rem; }
.sp-news-card .sp-badge { margin-bottom: 0.5rem; }
.sp-news-card h3 { font-size: 1rem; font-weight: 600; color: var(--sp-ink); margin: 0 0 0.35rem; line-height: 1.35; }
.sp-news-card time { font-size: 0.75rem; color: var(--sp-muted); }

.sp-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
    background: var(--sp-primary-light);
    color: var(--sp-primary-dark);
}

/* —— Galeria —— */
.sp-gallery-card {
    background: var(--sp-white);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-lg);
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.sp-gallery-card:hover { box-shadow: var(--sp-shadow-md); }
.sp-gallery-card a { text-decoration: none; color: inherit; }
.sp-gallery-thumb { height: 200px; overflow: hidden; background: var(--sp-surface); }
.sp-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sp-gallery-card__body { padding: 1rem; }
.sp-gallery-card h3 { font-size: 1rem; margin: 0 0 0.25rem; color: var(--sp-ink); }

/* —— Steps (admissões) —— */
.sp-step {
    text-align: center;
    padding: 1.25rem 1rem;
}
.sp-step__num {
    width: 44px;
    height: 44px;
    margin: 0 auto 0.75rem;
    border-radius: 50%;
    background: var(--sp-primary-light);
    color: var(--sp-primary-dark);
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* —— Modais (unificado) —— */
.sp-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
}

.sp-modal.is-open { display: flex; }

body.sp-modal-open { overflow: hidden; }

.sp-modal__dialog {
    background: var(--sp-white);
    border-radius: var(--sp-radius-lg);
    width: 100%;
    max-width: 720px;
    max-height: min(90vh, 800px);
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    animation: spModalIn 0.25s ease;
}

@keyframes spModalIn {
    from { opacity: 0; transform: scale(0.96) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.sp-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--sp-border);
    flex-shrink: 0;
}

.sp-modal__header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--sp-ink);
    margin: 0;
    line-height: 1.3;
}

.sp-modal__close {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--sp-surface);
    border-radius: var(--sp-radius);
    font-size: 1.35rem;
    line-height: 1;
    color: var(--sp-muted);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.sp-modal__close:hover { background: var(--sp-primary-light); color: var(--sp-primary-dark); }

.sp-modal__body {
    padding: 1.25rem;
    overflow-y: auto;
    flex: 1;
}

.sp-modal__dialog--wide { max-width: 900px; }

.sp-modal__body h3 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--sp-primary-dark);
    margin: 1.25rem 0 0.5rem;
}
.sp-modal__body h3:first-child { margin-top: 0; }
.sp-modal__body ul { margin: 0 0 1rem; padding-left: 1.25rem; color: var(--sp-body); }
.sp-modal__body p { margin: 0 0 0.75rem; line-height: 1.65; color: var(--sp-body); }

/* —— Modal portal (inscrições / painel) —— */
.sp-portal-modal__box {
    width: 100%;
    max-width: 440px;
    background: var(--sp-white);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.22);
    animation: spModalIn 0.28s ease;
}

.sp-portal-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.25rem 1rem;
    background: linear-gradient(135deg, var(--sp-primary-dark) 0%, var(--sp-primary) 100%);
    color: #fff;
}

.sp-portal-modal__head h2 {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #fff;
}

.sp-portal-modal__head p {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.88);
    max-width: 280px;
}

.sp-portal-modal__close {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
}

.sp-portal-modal__close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.sp-portal-modal__list {
    padding: 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: min(70vh, 420px);
    overflow-y: auto;
}

.sp-portal-option {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 0.9rem;
    text-decoration: none;
    color: var(--sp-ink);
    background: var(--sp-surface);
    border: 1px solid var(--sp-border);
    border-radius: 4px;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.sp-portal-option:hover {
    border-color: var(--sp-primary);
    background: #fff;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.1);
}

.sp-portal-option--featured {
    background: #eef5fb;
    border-color: #b8d4eb;
}

.sp-portal-option--featured:hover {
    border-color: var(--sp-primary-dark);
    box-shadow: 0 4px 14px rgba(13, 148, 136, 0.15);
}

.sp-portal-option__icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--sp-white);
    border: 1px solid var(--sp-border);
    border-radius: 4px;
    color: var(--sp-primary-dark);
}

.sp-portal-option--featured .sp-portal-option__icon {
    background: var(--sp-primary);
    border-color: var(--sp-primary);
    color: #fff;
}

.sp-portal-option__icon--tech {
    color: #7c3aed;
}

.sp-portal-option--featured .sp-portal-option__icon--tech,
.sp-portal-option:hover .sp-portal-option__icon--tech {
    background: #7c3aed;
    border-color: #7c3aed;
    color: #fff;
}

.sp-portal-option__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.sp-portal-option__label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--sp-ink);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.sp-portal-option__meta {
    font-size: 0.75rem;
    color: var(--sp-muted);
    line-height: 1.35;
}

.sp-portal-option__badge {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    background: var(--sp-primary);
    color: #fff;
}

.sp-portal-option__arrow {
    flex-shrink: 0;
    color: var(--sp-muted);
    transition: transform 0.2s, color 0.2s;
}

.sp-portal-option:hover .sp-portal-option__arrow {
    color: var(--sp-primary-dark);
    transform: translateX(3px);
}

/* Lightbox galeria */
.sp-lightbox {
    background: rgba(0, 0, 0, 0.92);
    padding: 0;
}
.sp-lightbox .sp-lightbox__img {
    max-width: min(96vw, 1200px);
    max-height: 88vh;
    object-fit: contain;
    margin: auto;
    display: block;
}
.sp-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: var(--sp-radius);
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
}
.sp-lightbox__nav:hover { background: rgba(255,255,255,0.22); }
.sp-lightbox__nav--prev { left: 1rem; }
.sp-lightbox__nav--next { right: 1rem; }
.sp-lightbox__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
}

/* Painel acesso — usa sp-modal */
#access-panel-modal.ca-modal-overlay { display: none; }
#access-panel-modal.ca-modal-overlay.is-open { display: flex; }

/* —— Chat widget —— */
.anuarite-chat-widget {
    position: fixed !important;
    bottom: 1rem !important;
    right: 1rem !important;
    z-index: 9999 !important;
    display: flex !important;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.anuarite-chat-panel {
    width: min(360px, calc(100vw - 2rem));
    max-height: min(480px, 70vh);
    background: var(--sp-white);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-lg);
    box-shadow: var(--sp-shadow-md);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.anuarite-chat-panel.hidden { display: none !important; }

.anuarite-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--sp-primary-dark);
    color: #fff;
}

.anuarite-chat-title { display: block; font-size: 0.9rem; font-weight: 600; }
.anuarite-chat-sub { display: block; font-size: 0.7rem; opacity: 0.85; margin-top: 0.15rem; }

.anuarite-chat-close {
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: var(--sp-radius);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
}

.anuarite-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    min-height: 200px;
    max-height: 320px;
    background: var(--sp-surface);
}

.anuarite-chat-msg {
    max-width: 88%;
    padding: 0.55rem 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    border-radius: var(--sp-radius);
    margin-bottom: 0.5rem;
}

.anuarite-chat-msg--bot {
    background: var(--sp-white);
    border: 1px solid var(--sp-border);
    color: var(--sp-ink);
    margin-right: auto;
}

.anuarite-chat-msg--user {
    background: var(--sp-primary);
    color: #fff;
    margin-left: auto;
}

.anuarite-chat-footer {
    display: flex;
    gap: 0.35rem;
    padding: 0.65rem;
    border-top: 1px solid var(--sp-border);
    background: var(--sp-white);
}

.anuarite-chat-footer input {
    flex: 1;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius);
    font-size: 0.8125rem;
    font-family: inherit;
}

.anuarite-chat-send {
    padding: 0.5rem 0.85rem;
    background: var(--sp-primary);
    color: #fff;
    border: none;
    border-radius: var(--sp-radius);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.anuarite-chat-launcher {
    display: inline-flex !important;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.85rem;
    background: var(--sp-primary-dark);
    color: #fff;
    border: none;
    border-radius: var(--sp-radius);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--sp-shadow-md);
    font-family: inherit;
}

.anuarite-chat-launcher:hover { background: var(--sp-primary); }

/* —— Split layout —— */
.sp-split {
    display: grid;
    gap: 1.5rem;
    align-items: start;
}
@media (min-width: 992px) {
    .sp-split { grid-template-columns: 1fr 1fr; }
}
.sp-split img {
    width: 100%;
    border-radius: var(--sp-radius-lg);
    object-fit: cover;
    max-height: 400px;
}

/* —— Empty / loading —— */
.hidden { display: none !important; }

.sp-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--sp-muted);
    font-size: 0.9rem;
    grid-column: 1 / -1;
}

/* Admissions banner */
.sp-banner {
    background: linear-gradient(135deg, var(--sp-primary-dark), var(--sp-primary));
    color: #fff;
    text-align: center;
    padding: 2rem 1rem;
    margin-bottom: 1.5rem;
}
.sp-banner h1 { margin: 0 0 0.35rem; font-size: 1.65rem; color: #fff; }
.sp-banner p { margin: 0; opacity: 0.9; font-size: 0.95rem; }
