/* Mathla Platform — Option B Warm Gold (LOCKED) */
/* Fonts loaded via layouts/partials/mobile-shell-head.blade.php (mathla.org pattern) */

:root {
    --mathla-logo-gold: #A68966;
    --mathla-primary: #D4AF37;
    --mathla-primary-dark: #7A5C00;
    --mathla-primary-light: #E8C872;
    --mathla-bg: #FDFBF7;
    --mathla-card: #FFFFFF;
    --mathla-sidebar: #3D3428;
    --mathla-text: #0F172A;
    --mathla-text-body: #334155;
    --mathla-muted: #64748B;
    --mathla-success: #16A34A;
    --mathla-warning: #EA580C;
    --mathla-danger: #DC2626;
}

body {
    font-family: var(--font-sans, 'Zain', system-ui, sans-serif);
    background-color: var(--mathla-bg);
    color: var(--mathla-text-body);
}

.font-display, .mathla-serif {
    font-family: var(--font-display, 'Cinzel', 'Zain', Georgia, serif);
}

.mathla-gold-gradient {
    background: linear-gradient(135deg, var(--mathla-primary-light) 0%, var(--mathla-primary) 100%);
}

.mathla-btn-primary {
    @apply inline-flex items-center justify-center px-5 py-2.5 rounded-full font-semibold text-white transition;
    background-color: var(--mathla-primary);
}
.mathla-btn-primary:hover {
    background-color: var(--mathla-primary-dark);
}

.mathla-btn-outline {
    @apply inline-flex items-center justify-center px-5 py-2.5 rounded-full font-semibold border-2 transition;
    border-color: var(--mathla-primary);
    color: var(--mathla-primary-dark);
}
.mathla-btn-outline:hover {
    background-color: rgba(212, 175, 55, 0.08);
}

.mathla-card {
    @apply bg-white rounded-xl border border-stone-200/80 shadow-sm;
}

.mathla-stat-value {
    @apply text-3xl font-bold;
    color: var(--mathla-primary-dark);
}

.sidebar-link {
    @apply flex items-center gap-3 px-4 py-2.5 rounded-lg text-sm transition;
    color: rgba(255, 255, 255, 0.75);
}
.sidebar-link:hover, .sidebar-link.active {
    background: rgba(212, 175, 55, 0.15);
    color: var(--mathla-primary-light);
}

.mobile-nav-item {
    @apply flex flex-col items-center gap-1 text-xs py-2 px-3 rounded-lg transition;
    color: var(--mathla-muted);
}
.mobile-nav-item.active {
    color: var(--mathla-primary-dark);
}

/* P5 — Review UI */
.mathla-status-pill {
    @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium capitalize;
}
.mathla-pill-success { background: rgba(22, 163, 74, 0.12); color: var(--mathla-success); }
.mathla-pill-danger { background: rgba(220, 38, 38, 0.12); color: var(--mathla-danger); }
.mathla-pill-warning { background: rgba(234, 88, 12, 0.12); color: var(--mathla-warning); }
.mathla-pill-pending { background: rgba(212, 175, 55, 0.15); color: var(--mathla-primary-dark); }
.mathla-pill-muted { background: rgba(100, 116, 139, 0.12); color: var(--mathla-muted); }

[data-review-video-player] video {
    display: block;
    width: 100%;
    min-height: 360px;
    max-height: 480px;
    object-fit: contain;
    background-color: #1c1917;
}
.mathla-review-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 0.75rem;
    background-color: #1c1917;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.mathla-review-tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border-radius: 0.5rem;
    border: 0;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.85rem;
    line-height: 1.25;
    cursor: pointer;
    transition: background-color 0.15s ease;
}
.mathla-review-tool-btn:hover { background-color: rgba(255, 255, 255, 0.22); }
.mathla-review-tool-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 1px;
}
.mathla-review-tool-btn--end { margin-inline-start: auto; }
.mathla-review-speed { position: relative; }
.mathla-review-speed-caret {
    font-size: 0.65rem;
    line-height: 1;
    opacity: 0.7;
}
.mathla-review-speed-menu {
    position: absolute;
    bottom: calc(100% + 0.35rem);
    inset-inline-start: 0;
    min-width: 7.5rem;
    padding: 0.25rem;
    border-radius: 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background-color: rgba(28, 25, 23, 0.96);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
    z-index: 30;
}
.mathla-review-speed-option {
    display: block;
    width: 100%;
    padding: 0.4rem 0.7rem;
    border: 0;
    border-radius: 0.4rem;
    background: transparent;
    color: #fff;
    font-size: 0.85rem;
    text-align: start;
    cursor: pointer;
}
.mathla-review-speed-option:hover { background-color: rgba(255, 255, 255, 0.12); }
.mathla-review-speed-option--active {
    background-color: rgba(212, 175, 55, 0.22);
    color: #f0dfa6;
}
.mathla-kbd {
    display: inline-block;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    border: 1px solid #cbd5e1;
    background-color: #f5f5f4;
    color: #57534e;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.7rem;
    line-height: 1.4;
}

/* P6 — Dictionary & Learn */
.mathla-verify-badge {
    @apply text-xs px-2.5 py-1 rounded-full font-medium;
}
.mathla-verify-teacher {
    background: rgba(212, 175, 55, 0.15);
    color: var(--mathla-primary-dark);
}
.mathla-verify-deaf {
    background: rgba(22, 163, 74, 0.12);
    color: var(--mathla-success);
}
.mathla-progress-ring text {
    font-family: var(--font-sans, 'Zain', system-ui, sans-serif);
}
.dictionary-page[dir="rtl"] input,
.dictionary-page[dir="rtl"] select {
    text-align: right;
}

/* P7 — Community */
.community-hub__grid {
    display: grid;
    gap: 1.5rem;
}
@media (min-width: 1024px) {
    .community-hub__grid {
        grid-template-columns: minmax(12rem, 16rem) minmax(0, 1fr) minmax(12rem, 16rem);
    }
}
.community-sidebar-panel {
    background: linear-gradient(180deg, #fff 0%, #faf8f5 100%);
}
.community-hero__gradient {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.14) 0%, rgba(255, 255, 255, 0.95) 55%, rgba(62, 39, 35, 0.04) 100%);
}
.community-hero__stat {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(212, 175, 55, 0.18);
    border-radius: 0.75rem;
    padding: 0.65rem 0.75rem;
}
.community-composer-btn {
    @apply flex flex-col items-center justify-center gap-1 rounded-xl border border-stone-200 bg-white px-2 py-3 text-xs font-medium text-stone-700 transition min-h-[4.5rem];
}
.community-composer-btn:hover {
    border-color: var(--mathla-primary);
    background: rgba(212, 175, 55, 0.08);
    color: var(--mathla-primary-dark);
}
.community-composer-btn__icon {
    @apply text-lg;
}
.community-tab {
    @apply shrink-0 px-4 py-1.5 rounded-full text-sm transition border border-stone-200 bg-white text-stone-600;
}
.community-tab--active {
    background: var(--mathla-primary);
    border-color: var(--mathla-primary);
    color: #fff;
}
.community-topic-chip {
    @apply text-xs px-2.5 py-1 rounded-full bg-stone-100 text-stone-600 hover:bg-amber-50 hover:text-[var(--mathla-primary-dark)] transition;
}
.community-fab {
    position: fixed;
    bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
    inset-inline-end: 1rem;
    z-index: 40;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 9999px;
    background: var(--mathla-primary);
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
    box-shadow: 0 8px 24px rgba(62, 39, 35, 0.22);
}
.community-official-card {
    border-inline-start: 3px solid var(--mathla-primary);
}
.community-sign-request-pill {
    @apply inline-flex px-2 py-0.5 rounded-full bg-orange-50 text-orange-800;
}
.mathla-role-badge {
    @apply inline-flex text-[10px] px-2 py-0.5 rounded-full font-semibold uppercase tracking-wide;
}
.mathla-role-deaf { background: rgba(22, 163, 74, 0.12); color: var(--mathla-success); }
.mathla-role-teacher { background: rgba(212, 175, 55, 0.15); color: var(--mathla-primary-dark); }
.mathla-role-verified { background: rgba(59, 130, 246, 0.12); color: #1d4ed8; }
.mathla-role-admin { background: rgba(62, 39, 35, 0.12); color: #3e2723; }
.mathla-role-moderator { background: rgba(168, 85, 247, 0.12); color: #7e22ce; }
.mathla-role-contributor { background: rgba(234, 88, 12, 0.12); color: var(--mathla-warning); }
.mathla-role-member { background: rgba(100, 116, 139, 0.12); color: var(--mathla-muted); }
.community-post-card__avatar img { display: block; }
.community-group-link {
    @apply block w-full text-left px-3 py-2 rounded-lg text-sm text-stone-600 transition;
}
.community-group-link:hover,
.community-group-link.active {
    background: rgba(212, 175, 55, 0.12);
    color: var(--mathla-primary-dark);
    font-weight: 500;
}
.mathla-post-type-pill {
    @apply inline-flex text-xs px-2.5 py-0.5 rounded-full font-medium;
}
.mathla-post-general { background: rgba(100, 116, 139, 0.12); color: var(--mathla-muted); }
.mathla-post-discussion { background: rgba(100, 116, 139, 0.12); color: var(--mathla-muted); }
.mathla-post-question { background: rgba(212, 175, 55, 0.15); color: var(--mathla-primary-dark); }
.mathla-post-request { background: rgba(234, 88, 12, 0.12); color: var(--mathla-warning); }
.mathla-post-announcement { background: rgba(22, 163, 74, 0.12); color: var(--mathla-success); }
.mathla-post-tip { background: rgba(59, 130, 246, 0.12); color: #1d4ed8; }
.mathla-post-success { background: rgba(168, 85, 247, 0.12); color: #7e22ce; }
.mathla-post-poll { background: rgba(14, 165, 233, 0.12); color: #0369a1; }
.mathla-reaction-btn {
    @apply px-3 py-1.5 rounded-full text-sm bg-stone-100 text-stone-600 hover:bg-amber-50 hover:text-[var(--mathla-primary-dark)] transition;
}

@media (min-width: 1024px) {
    .mobile-bottom-nav { display: none !important; }
}

/* P8 — Campaigns, events, organizations */
.mathla-progress-bar {
    @apply w-full h-2 rounded-full bg-stone-200 overflow-hidden;
}
.mathla-progress-bar-lg {
    @apply h-3;
}
.mathla-progress-bar-fill {
    @apply h-full rounded-full transition-all duration-500;
    background: linear-gradient(90deg, var(--mathla-primary-light), var(--mathla-primary));
}
.mathla-partner-badge {
    @apply inline-flex items-center px-3 py-1 rounded-full text-xs font-semibold;
    background: rgba(212, 175, 55, 0.18);
    color: var(--mathla-primary-dark);
}
.mathla-event-calendar-month {
    @apply text-lg font-semibold mb-3;
    color: var(--mathla-primary-dark);
}

/* P9 — Dataset dashboard */
.dataset-table th, .dataset-table td { @apply px-2; }
.mathla-export-status { @apply inline-flex items-center; }
