:root {
  --primary: #1d4e89;
  --primary-soft: color-mix(in srgb, var(--primary) 10%, white);
  --primary-dark: color-mix(in srgb, var(--primary) 80%, black);
}

body {
  font-family: Vazirmatn, Tahoma, sans-serif;
  background: #f5f7fb;
  color: #1f2937;
}

a { color: var(--primary); }
.btn-primary {
  --bs-btn-bg: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-bg: var(--primary-dark);
  --bs-btn-hover-border-color: var(--primary-dark);
  --bs-btn-active-bg: var(--primary-dark);
  --bs-btn-active-border-color: var(--primary-dark);
  --bs-btn-disabled-bg: var(--primary);
  --bs-btn-disabled-border-color: var(--primary);
}
.btn-outline-primary {
  --bs-btn-color: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-bg: var(--primary);
  --bs-btn-hover-border-color: var(--primary);
  --bs-btn-active-bg: var(--primary);
}
.text-brand { color: var(--primary) !important; }
.bg-brand { background: var(--primary) !important; color: #fff; }
.bg-brand-soft { background: var(--primary-soft) !important; }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 .2rem var(--primary-soft); }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }

.card { border: 1px solid #e8ebf0; border-radius: .75rem; box-shadow: 0 1px 2px rgba(0, 0, 0, .03); }
.card-header { background: #fff; font-weight: 700; border-bottom-color: #eef0f4; }
.table > :not(caption) > * > * { vertical-align: middle; }
.ltr { direction: ltr; unicode-bidi: embed; }

/* ---------- panel ---------- */
.panel-sidebar { background: #fff; border-left: 1px solid #e5e7eb; }
@media (min-width: 992px) {
  .panel-sidebar { min-height: calc(100vh - 56px); position: sticky; top: 56px; }
}
.panel-sidebar .nav-link { color: #374151; border-radius: .5rem; padding: .45rem .75rem; font-size: .92rem; }
.panel-sidebar .nav-link:hover { background: #f3f4f6; }
.panel-sidebar .nav-link.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.sidebar-heading { font-size: .75rem; color: #9ca3af; font-weight: 700; margin: 1rem .75rem .25rem; }
.stat-card .num { font-size: 1.75rem; font-weight: 800; }
.page-title { font-weight: 800; font-size: 1.35rem; }

/* ---------- rich text ---------- */
trix-editor { min-height: 220px; background: #fff; border: 1px solid #dee2e6; border-radius: .375rem; padding: .5rem .75rem; }
trix-toolbar .trix-button-group--file-tools { display: none !important; }
trix-toolbar .trix-button-row { flex-wrap: wrap; }
.rich-content img { max-width: 100%; height: auto; }

/* ---------- public site ---------- */
.site { background: #fff; }
.notice-bar { background: #fff8e1; border-bottom: 1px solid #ffe8a1; }
.site-header .navbar-brand img { max-height: 48px; }
.site-header .nav-link { font-weight: 500; }
.hero { padding: 4.5rem 0; position: relative; background-size: cover; background-position: center; }
.hero h1 { font-weight: 800; }
.hero.has-banner::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.hero.has-banner > * { position: relative; }
.section { padding: 2.5rem 0; }
.section-title { font-weight: 800; margin-bottom: 1.5rem; display: flex; align-items: center; gap: .5rem; }
.section-title::before { content: ""; width: 6px; height: 1.4em; background: var(--primary); border-radius: 3px; }
.date-item { border-right: 4px solid var(--primary); }
.date-item.past { opacity: .55; border-right-color: #adb5bd; }
.sponsor-logo { max-height: 70px; max-width: 160px; filter: grayscale(30%); }
.site-footer { background: #111827; color: #d1d5db; }
.site-footer a { color: #fff; }

/* classic: colored top bar + white nav */
.theme-classic .site-header { background: #fff; border-bottom: 3px solid var(--primary); }
.theme-classic .hero { background-color: var(--primary); color: #fff; }

/* modern: gradient hero, floating rounded cards */
.theme-modern .site-header { background: var(--primary); }
.theme-modern .site-header .nav-link, .theme-modern .site-header .navbar-brand { color: #fff; }
.theme-modern .site-header .navbar-toggler { filter: invert(1); }
.theme-modern .hero { background-image: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 45%, #7c3aed)); color: #fff; border-radius: 0 0 2.5rem 2.5rem; }
.theme-modern .card { border: 0; box-shadow: 0 8px 24px rgba(17, 24, 39, .08); border-radius: 1.25rem; }
.theme-modern .section:nth-child(even) { background: #f8fafc; }

/* minimal: white, thin lines, typographic */
.theme-minimal .site-header { background: #fff; border-bottom: 1px solid #e5e7eb; }
.theme-minimal .hero { background: #fff; color: #111827; border-bottom: 1px solid #e5e7eb; }
.theme-minimal .hero h1 { color: var(--primary); }
.theme-minimal .card { box-shadow: none; border-radius: .25rem; }
.theme-minimal .section-title::before { display: none; }
.theme-minimal .section-title { border-bottom: 1px solid #e5e7eb; padding-bottom: .5rem; }
.theme-minimal .hero .btn-light { background: var(--primary); border-color: var(--primary); color: #fff; }
.theme-minimal .hero .btn-outline-light { color: var(--primary); border-color: var(--primary); }
