/* ============================================================
   CÔNG ĐOÀN CƠ SỞ — HOPE BLUE LIGHT THEME v4.0
   Powered by Bootstrap 5 + Supabase
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  --primary:       #2563eb;
  --primary-light: #3b82f6;
  --primary-dark:  #1d4ed8;
  --accent:        #f59e0b;
  --success:       #10b981;
  --danger:        #ef4444;
  --text:          #1e293b;
  --text-muted:    #64748b;
  --card-shadow:   0 2px 16px rgba(37,99,235,.10);
  --glass:         #ffffff;
  --glass-border:  rgba(37,99,235,.12);
  --glass-hover:   #f8faff;
}

/* ===== BASE ===== */
* { box-sizing: border-box; }
body {
  font-family: 'Be Vietnam Pro', 'Segoe UI', system-ui, sans-serif;
  background:
    radial-gradient(ellipse 70% 55% at 0% 0%,   rgba(219,234,254,.85) 0%, transparent 55%),
    radial-gradient(ellipse 60% 60% at 100% 100%, rgba(191,219,254,.65) 0%, transparent 60%),
    linear-gradient(160deg, #f0f6ff 0%, #eaf1ff 50%, #f5f9ff 100%);
  background-attachment: fixed;
  min-height: 100vh;
  color: var(--text);
}

/* ===== BACKGROUND BLOBS (subtle on light bg) ===== */
.bg-blob-1, .bg-blob-2, .bg-blob-3 {
  position: fixed; border-radius: 50%;
  filter: blur(120px); pointer-events: none; z-index: -1;
}
.bg-blob-1 { width:500px;height:500px; background:rgba(37,99,235,.07); top:-150px; left:-150px; }
.bg-blob-2 { width:400px;height:400px; background:rgba(251,191,36,.06); bottom:-100px; right:-100px; }
.bg-blob-3 { width:300px;height:300px; background:rgba(59,130,246,.05); top:45%; left:50%; transform:translate(-50%,-50%); }

@keyframes toastIn { from{transform:translateX(80px);opacity:0} to{transform:none;opacity:1} }
@keyframes fadeUp  { from{opacity:0;transform:translateY(14px)} to{opacity:1;transform:none} }
.fade-up { animation: fadeUp .45s ease both; }

/* Bootstrap overrides for light theme */
.text-muted    { color: var(--text-muted) !important; }
.text-success  { color: var(--success) !important; }
.text-primary  { color: var(--primary) !important; }
.text-warning  { color: #d97706 !important; }
.text-danger   { color: var(--danger) !important; }
a.text-muted:hover { color: var(--primary) !important; }

/* ===== TOPBAR ===== */
.topbar {
  background: var(--primary-dark);
  border-bottom: none;
  color: rgba(255,255,255,.80);
  font-size: .78rem;
  padding: 6px 0;
}

/* ===== NAVBAR ===== */
.main-navbar {
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(37,99,235,.10);
  padding: .65rem 0;
  position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 2px 20px rgba(37,99,235,.08);
}
.brand-icon {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
  box-shadow: 0 4px 14px rgba(37,99,235,.25);
}
.brand-name { font-size: 1.18rem; font-weight: 800; color: var(--primary-dark); line-height: 1.2; }
.brand-sub  { font-size: .68rem; color: var(--text-muted); letter-spacing: .6px; text-transform: uppercase; }
.nav-pill   {
  border-radius: 20px !important; padding: .36rem .95rem !important;
  font-size: .86rem; color: #475569 !important;
  transition: all .18s; text-decoration: none;
}
.nav-pill:hover  { background: rgba(37,99,235,.08) !important; color: var(--primary) !important; }
.nav-pill.active { background: rgba(37,99,235,.12) !important; color: var(--primary-dark) !important; font-weight: 600; }
.admin-link      { color: #b45309 !important; }
.admin-link.active { background: rgba(245,158,11,.12) !important; }

/* ===== NAV LOGOS ===== */
.nav-brand-row {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: .5rem;
  border-bottom: 1px solid rgba(37,99,235,.08);
}
.nav-brand-center { flex-grow: 1; text-align: center; padding: 0 .75rem; }
.nav-logo-box {
  width: 84px; min-width: 84px; height: 84px;
  border-radius: 50%; overflow: hidden; flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(37,99,235,.15);
}
.nav-logo {
  width: 84px; height: 84px;
  object-fit: cover; display: block;
  transition: transform .2s;
}
.nav-logo:hover { transform: scale(1.06); }
.nav-links-row {
  display: flex; flex-direction: row; justify-content: center;
  align-items: center; gap: .25rem; flex-wrap: wrap;
  padding-top: .4rem; margin-bottom: 0;
  list-style: none; padding-left: 0;
}
@media (max-width: 576px) {
  .nav-logo-box { width: 54px; min-width: 54px; height: 54px; }
  .nav-logo { width: 54px; height: 54px; }
}

/* ===== PAGE HEADER BAND ===== */
.page-header-band {
  background: linear-gradient(135deg, #1e3a8a 0%, var(--primary-dark) 50%, var(--primary) 100%);
  border-bottom: none;
  box-shadow: 0 4px 24px rgba(37,99,235,.20);
  color: #fff;
  padding: 2rem 0 3.5rem;
  position: relative; overflow: hidden;
}
.page-header-band::after {
  content: '';
  position: absolute; bottom: 0; left: 5%; right: 5%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), rgba(251,191,36,.35), transparent);
}

/* ===== HERO ===== */
.hero {
  padding: 3.8rem 0 3.2rem;
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 55%, #2563eb 100%);
  color: #fff;
}
.hero::before, .hero::after { display: none; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.30);
  border-radius: 20px; padding: .32rem .95rem; font-size: .78rem;
  color: rgba(255,255,255,.95); margin-bottom: 1.2rem; letter-spacing: .3px;
}
.hero-title  {
  font-size: clamp(1.9rem, 4.5vw, 3rem); font-weight: 800; color: #fff;
  line-height: 1.15; text-shadow: 0 2px 16px rgba(0,0,0,.20);
}
.hero-sub    { font-size: 1.05rem; color: rgba(255,255,255,.80); max-width: 560px; }
.hero-stats  { display: flex; gap: 2.5rem; margin-top: 2.5rem; flex-wrap: wrap; }
.hero-stat-num   { font-size: 2.1rem; font-weight: 800; line-height: 1; color: #fff; }
.hero-stat-label { font-size: .72rem; color: rgba(255,255,255,.65); margin-top: .3rem; }

/* Hero CTA buttons */
.hero .btn-warning {
  background: linear-gradient(135deg, #f59e0b, #fbbf24) !important;
  border: none !important; color: #1e3a8a !important; font-weight: 700 !important;
  border-radius: 12px !important; box-shadow: 0 4px 18px rgba(251,191,36,.35) !important;
}
.hero .btn-outline-light {
  background: rgba(255,255,255,.12) !important;
  border: 1px solid rgba(255,255,255,.35) !important;
  color: rgba(255,255,255,.95) !important; border-radius: 12px !important;
}
.hero .btn-outline-light:hover { background: rgba(255,255,255,.22) !important; }

.container[style*="margin-top:-2.5rem"] { margin-top: 0 !important; }

/* ===== GLASS UTILITIES → WHITE CARDS ===== */
.glass {
  background: #fff;
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--card-shadow);
}
.glass-card {
  background: #fff;
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--card-shadow);
  transition: all .25s;
}
.glass-card:hover {
  background: var(--glass-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(37,99,235,.15);
}

/* ===== SECTION TITLE ===== */
.section-title {
  font-size: 1.15rem !important; font-weight: 800 !important; color: var(--text) !important;
  position: relative; padding-left: 1rem !important; margin-bottom: 1.3rem !important;
  display: flex; align-items: center;
}
.section-title::before {
  content: '';
  position: absolute; left: 0; top: 10%; bottom: 10%;
  width: 3px; border-radius: 2px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  box-shadow: 0 0 6px rgba(37,99,235,.35);
}

/* ===== APP CARD ===== */
.app-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}
.app-card .card-header {
  background: rgba(37,99,235,.06); color: var(--text); font-weight: 600;
  border: none; border-bottom: 1px solid var(--glass-border); padding: .9rem 1.25rem;
}

/* ===== HERO STAT ITEMS ===== */
.hero-stat-item { display: flex; align-items: center; gap: .75rem; }
.hero-stat-icon-box {
  width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
  border: 1px solid rgba(255,255,255,.20);
}
.hero-stat-icon-box.s-red   { background: rgba(255,255,255,.15); color: #fff; }
.hero-stat-icon-box.s-amber { background: rgba(255,255,255,.15); color: #fde68a; }
.hero-stat-icon-box.s-teal  { background: rgba(255,255,255,.15); color: #6ee7b7; }

/* ===== QUICK ACCESS CARDS V2 ===== */
.qa-card-v2 {
  background: #fff;
  border: 1px solid var(--glass-border);
  border-radius: 20px; box-shadow: var(--card-shadow);
  display: flex; flex-direction: column;
  text-decoration: none; color: var(--text);
  height: 100%; overflow: hidden;
  transition: transform .28s cubic-bezier(.25,.8,.25,1), box-shadow .28s;
}
.qa-card-v2:hover {
  background: #f8faff;
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(37,99,235,.15);
  color: var(--text);
}
.qa-top-bar { height: 4px; }
.qa-card-v2.qa-red   .qa-top-bar { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.qa-card-v2.qa-amber .qa-top-bar { background: linear-gradient(90deg, #f97316, #fbbf24); }
.qa-card-v2.qa-teal  .qa-top-bar { background: linear-gradient(90deg, #0d9488, #34d399); }

.qa-inner { padding: 1.6rem 1.5rem 1.4rem; flex: 1; display: flex; flex-direction: column; }

.qa-icon-v2 {
  width: 64px; height: 64px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.9rem; margin-bottom: 1rem;
  transition: transform .25s;
}
.qa-card-v2:hover .qa-icon-v2 { transform: scale(1.08); }
.qa-card-v2.qa-red   .qa-icon-v2 { background: rgba(37,99,235,.09);  color: var(--primary); }
.qa-card-v2.qa-amber .qa-icon-v2 { background: rgba(249,115,22,.10); color: #ea580c; }
.qa-card-v2.qa-teal  .qa-icon-v2 { background: rgba(13,148,136,.10); color: #0d9488; }

.qa-title-v2 { font-size: 1.05rem; font-weight: 700; color: var(--text); margin-bottom: .4rem; }
.qa-desc-v2  { font-size: .83rem; color: var(--text-muted); line-height: 1.55; margin: 0; flex: 1; }
.qa-link-v2  {
  display: inline-flex; align-items: center; gap: .1rem;
  margin-top: 1.2rem; font-size: .86rem; font-weight: 700;
  transition: gap .2s;
}
.qa-card-v2:hover .qa-link-v2 { gap: .4rem; }
.qa-card-v2.qa-red   .qa-link-v2 { color: var(--primary); }
.qa-card-v2.qa-amber .qa-link-v2 { color: #ea580c; }
.qa-card-v2.qa-teal  .qa-link-v2 { color: #0d9488; }

/* ===== STEP ICON CIRCLES ===== */
.step-icon-circle {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
  border: 1px solid var(--glass-border);
  transition: transform .2s;
}
.list-group-item:hover .step-icon-circle { transform: scale(1.12); }

/* ===== QUICK ACCESS (legacy) ===== */
.qa-card {
  background: #fff;
  border: 1px solid var(--glass-border); border-radius: 20px;
  box-shadow: var(--card-shadow); transition: all .25s;
  text-decoration: none; color: var(--text);
  display: block; padding: 1.85rem 1.5rem; text-align: center; height: 100%;
}
.qa-card:hover { background: #f8faff; transform: translateY(-6px); box-shadow: 0 16px 48px rgba(37,99,235,.15); color: var(--text); }
.qa-icon {
  width: 66px; height: 66px; border-radius: 18px; margin: 0 auto 1.1rem;
  display: flex; align-items: center; justify-content: center; font-size: 1.85rem;
}
.qa-card h6 { font-weight: 700; font-size: 1rem; margin-bottom: .4rem; color: var(--text); }
.qa-card p  { font-size: .82rem; color: var(--text-muted); margin: 0; line-height: 1.5; }

/* ===== STAT CARDS ===== */
.stat-card {
  background: #fff;
  border: 1px solid var(--glass-border);
  border-radius: 18px; padding: 1.4rem 1.25rem;
  box-shadow: var(--card-shadow); display: flex; align-items: center; gap: 1rem;
}
.stat-icon {
  width: 54px; height: 54px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}
.stat-val   { font-size: 1.85rem; font-weight: 800; line-height: 1; color: var(--primary); }
.stat-label { font-size: .78rem; color: var(--text-muted); margin-top: .25rem; }

/* ===== TICKER ===== */
.ticker-wrap {
  background: #fffbeb;
  border: 1px solid rgba(251,191,36,.30);
  border-radius: 12px;
  padding: .9rem 1.15rem; display: flex; align-items: center; gap: .8rem;
}
.ticker-wrap .bi-megaphone-fill { color: #d97706 !important; font-size: 1.1rem; }
.ticker-wrap .fw-semibold { color: var(--text); }

/* ===== ANNOUNCEMENT CARDS ===== */
.anc-card {
  background: #fff;
  border: 1px solid var(--glass-border);
  border-left: 3px solid var(--primary);
  border-radius: 14px; padding: 1.15rem 1.3rem;
  transition: all .22s; text-decoration: none; color: var(--text);
  display: block; margin-bottom: .9rem; cursor: pointer;
}
.anc-card:hover { background: #f8faff; transform: translateX(3px); box-shadow: 0 8px 28px rgba(37,99,235,.12); color: var(--text); }
.anc-card.pinned { border-left-color: var(--accent); }
.anc-title   { font-weight: 700; font-size: .97rem; color: var(--text); margin-bottom: .4rem; }
.anc-excerpt { font-size: .83rem; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.55; }
.anc-meta    { font-size: .74rem; color: #94a3b8; margin-top: .55rem; display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }

/* ===== DOCUMENT CARDS ===== */
.doc-card {
  background: #fff;
  border: 1px solid var(--glass-border); border-radius: 14px;
  padding: 1.15rem 1.25rem; display: flex; align-items: flex-start; gap: 1rem;
  transition: all .22s; height: 100%;
}
.doc-card:hover { background: #f8faff; box-shadow: 0 8px 28px rgba(37,99,235,.12); }
.doc-title { font-weight: 700; font-size: .95rem; color: var(--text); }
.doc-meta  { font-size: .78rem; color: #94a3b8; }

/* ===== FEEDBACK ITEMS ===== */
.fb-item {
  background: #fff;
  border: 1px solid var(--glass-border);
  border-left: 3px solid var(--primary);
  border-radius: 14px; padding: 1.15rem 1.3rem; margin-bottom: .9rem;
}
.fb-item.replied { border-left-color: var(--success); }
.fb-reply {
  background: #f0fdf4; border-radius: 10px; padding: .9rem 1rem;
  border-left: 3px solid var(--success); margin-top: .8rem;
  font-size: .88rem; color: #166534;
}

/* ===== FORMS ===== */
.form-section {
  background: #fff;
  border: 1px solid var(--glass-border); border-radius: 18px;
  padding: 1.85rem; box-shadow: var(--card-shadow); margin-bottom: 1.25rem;
}
.form-section-title {
  font-size: .85rem; font-weight: 700; color: var(--primary-dark);
  text-transform: uppercase; letter-spacing: .6px;
  border-bottom: 1px solid rgba(37,99,235,.15); padding-bottom: .45rem; margin-bottom: 1.1rem;
}
.form-label { font-size: .875rem; font-weight: 600; color: #374151; }
.form-control, .form-select {
  background: #fff !important; color: var(--text) !important;
  border-radius: 10px; border: 1px solid #d1d5db !important;
  padding: .68rem .95rem; font-size: .93rem;
  transition: border-color .18s, box-shadow .18s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(37,99,235,.12) !important;
  background: #fff !important; color: var(--text) !important;
}
.form-control::placeholder { color: #9ca3af !important; }
.form-select option { background: #fff; color: var(--text); }

/* ===== BUTTONS ===== */
.btn-primary-custom {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff; border: none; border-radius: 12px;
  padding: .68rem 1.55rem; font-weight: 600; font-size: .93rem;
  transition: all .22s; box-shadow: 0 4px 14px rgba(37,99,235,.25);
}
.btn-primary-custom:hover { filter: brightness(1.08); color: #fff; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(37,99,235,.35); }
.btn-primary-custom:active { transform: none; }
.btn { border-radius: 10px !important; font-size: .88rem; }
.btn-outline-danger {
  border-color: rgba(37,99,235,.30) !important; color: var(--primary) !important;
  background: transparent !important;
}
.btn-outline-danger:hover { background: rgba(37,99,235,.08) !important; border-color: var(--primary) !important; }
.btn-sm { font-size: .82rem !important; padding: .36rem .88rem !important; }
.btn-success { background: linear-gradient(135deg, #059669, #10b981) !important; border: none !important; color: #fff !important; }

/* ===== BADGES ===== */
.badge-cat { font-size: .72rem; padding: .26rem .68rem; border-radius: 12px; font-weight: 600; }
.status-cho {
  background: #fffbeb; color: #92400e;
  border: 1px solid #fde68a; border-radius: 20px;
  padding: .26rem .78rem; font-size: .78rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: .3rem;
}
.status-da  {
  background: #f0fdf4; color: #166534;
  border: 1px solid #bbf7d0; border-radius: 20px;
  padding: .26rem .78rem; font-size: .78rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: .3rem;
}
.badge.bg-danger  { background: #fee2e2 !important; color: #991b1b !important; }
.badge.bg-success { background: #dcfce7 !important; color: #166534 !important; }
.badge.bg-warning { background: #fef3c7 !important; color: #92400e !important; }
.badge.text-bg-light { background: #f1f5f9 !important; color: #475569 !important; border-color: #e2e8f0 !important; }
.badge.text-bg-secondary { background: #e2e8f0 !important; color: #475569 !important; }

/* ===== TABLE ===== */
.data-table { font-size: .85rem; color: var(--text); }
.data-table thead th {
  background: rgba(37,99,235,.07); color: var(--primary-dark); font-weight: 700;
  border: none; white-space: nowrap; padding: .72rem .88rem;
  border-bottom: 2px solid rgba(37,99,235,.15);
}
.data-table tbody tr:hover { background: #f8faff; }
.data-table td { vertical-align: middle; padding: .62rem .88rem; border-color: #f1f5f9; color: var(--text); }
.table { --bs-table-bg: transparent; --bs-table-border-color: #f1f5f9; }
.table-striped > tbody > tr:nth-of-type(odd) > * { background-color: #fafbff; color: var(--text); }

/* ===== MODAL ===== */
.modal-content {
  background: #fff !important;
  border: 1px solid rgba(37,99,235,.12) !important; border-radius: 18px !important;
  box-shadow: 0 20px 60px rgba(37,99,235,.20) !important;
}
.modal-header {
  background: rgba(37,99,235,.06) !important;
  border-bottom: 1px solid rgba(37,99,235,.10) !important;
}
.modal-header .modal-title { color: var(--text); }
.modal-body { color: var(--text); }
.modal-footer { border-top: 1px solid #f1f5f9 !important; }

/* ===== FOOTER ===== */
.site-footer {
  background: #fff;
  border-top: 1px solid rgba(37,99,235,.10);
  box-shadow: 0 -2px 20px rgba(37,99,235,.06);
}
.site-footer .text-dark,
.site-footer .fw-bold    { color: var(--text) !important; }
.site-footer .text-muted { color: var(--text-muted) !important; }
.site-footer a.text-muted { color: var(--text-muted) !important; transition: color .18s; }
.site-footer a.text-muted:hover { color: var(--primary) !important; }
.site-footer hr  { border-color: #e2e8f0 !important; }
.site-footer p   { color: var(--text-muted) !important; }

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
  position: fixed; inset: 0;
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 10000;
}

/* ===== ADMIN LAYOUT ===== */
.admin-layout  { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 258px;
  background: #fff;
  border-right: 1px solid rgba(37,99,235,.10);
  box-shadow: 2px 0 16px rgba(37,99,235,.06);
  flex-shrink: 0; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-brand  { padding: 1.45rem 1.25rem 1rem; border-bottom: 1px solid rgba(37,99,235,.08); }
.sidebar-brand .s-title { font-size: .88rem; font-weight: 700; color: var(--text); margin-top: .5rem; line-height: 1.3; }
.sidebar-brand .s-sub   { font-size: .67rem; color: var(--text-muted); }
.admin-nav { padding: .9rem .7rem; flex: 1; }
.nav-section-label {
  font-size: .62rem; text-transform: uppercase; letter-spacing: 1px;
  color: #94a3b8; padding: .8rem .55rem .3rem; font-weight: 700;
}
.admin-nav-link {
  display: flex; align-items: center; gap: .68rem;
  padding: .65rem .9rem; border-radius: 10px; color: #475569;
  text-decoration: none; font-size: .87rem; font-weight: 500;
  transition: background .16s, color .16s; margin-bottom: .14rem;
}
.admin-nav-link:hover        { background: rgba(37,99,235,.07); color: var(--primary); }
.admin-nav-link.active       { background: rgba(37,99,235,.12); color: var(--primary-dark); font-weight: 700; }
.admin-nav-link .bi          { font-size: 1rem; width: 18px; text-align: center; }
.sidebar-footer  { padding: .9rem .7rem; border-top: 1px solid rgba(37,99,235,.08); }
.admin-main      { flex: 1; background: #f5f8ff; overflow: auto; min-width: 0; }
.admin-topbar    {
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(37,99,235,.08);
  padding: .95rem 1.55rem; display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 12px rgba(37,99,235,.06);
}
.admin-content   { padding: 1.6rem; }
.page-title      { font-size: 1.35rem; font-weight: 700; color: var(--text); margin: 0; }
.page-sub        { font-size: .82rem; color: var(--text-muted); margin: 0; }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 3.5rem 1rem; color: #94a3b8; }
.empty-state .bi { font-size: 3.5rem; opacity: .35; }

/* ===== LIST GROUPS ===== */
.list-group-item {
  background: transparent !important;
  border-color: #f1f5f9 !important;
  color: var(--text) !important;
}
.list-group-item small, .list-group-item .text-muted { color: var(--text-muted) !important; }
.list-group-item strong { color: var(--text) !important; }
.list-group-item .fw-semibold { color: var(--text) !important; }

/* ===== ADMIN LOGIN PAGE ===== */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
}
.login-box {
  width: 100%; max-width: 420px;
  background: #fff;
  border: 1px solid rgba(37,99,235,.12); border-radius: 24px;
  padding: 2.5rem; box-shadow: 0 20px 60px rgba(37,99,235,.15);
}

/* ===== ALERT OVERRIDES ===== */
.alert-success { background: #f0fdf4 !important; border-color: #bbf7d0 !important; color: #166534 !important; }
.alert-danger  { background: #fef2f2 !important; border-color: #fecaca !important; color: #991b1b !important; }
.alert-warning { background: #fffbeb !important; border-color: #fde68a !important; color: #92400e !important; }
.alert-info    { background: #eff6ff !important; border-color: #bfdbfe !important; color: #1e40af !important; }

/* ===== PAGINATION ===== */
.page-link { background: #fff !important; border-color: #e2e8f0 !important; color: #475569 !important; }
.page-link:hover { background: #f0f6ff !important; color: var(--primary) !important; border-color: rgba(37,99,235,.25) !important; }
.page-item.active .page-link { background: var(--primary) !important; color: #fff !important; border-color: var(--primary) !important; }

/* ===== INPUT GROUP ===== */
.input-group-text { background: #f8fafc !important; border-color: #d1d5db !important; color: #6b7280 !important; }

/* ===== DROPDOWN ===== */
.dropdown-menu { background: #fff !important; border-color: rgba(37,99,235,.12) !important; box-shadow: 0 8px 28px rgba(37,99,235,.15); }
.dropdown-item { color: var(--text) !important; }
.dropdown-item:hover { background: #f0f6ff !important; color: var(--primary) !important; }

/* ===== SPINNER ===== */
.spinner-border.text-danger { color: var(--primary) !important; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: rgba(37,99,235,.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(37,99,235,.45); }

/* ===== HERO UNION ICON ===== */
.hero-union-wrap {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: 2.5rem;
}
.hero-union-frame {
  position: relative;
  width: 210px; height: 210px;
  border-radius: 48px;
  background: linear-gradient(150deg, rgba(255,255,255,.22) 0%, rgba(255,255,255,.10) 55%, rgba(255,255,255,.18) 100%);
  border: 1px solid rgba(255,255,255,0.30);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.35),
    0 24px 64px rgba(0,0,0,0.20),
    0 0 90px rgba(255,255,255,0.10);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  animation: heroFloat 3.8s ease-in-out infinite;
  z-index: 2;
}
.hero-union-frame::before {
  content: '';
  position: absolute; inset: 0; border-radius: 48px;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 3px,
    rgba(255,255,255,0.03) 3px, rgba(255,255,255,0.03) 6px
  );
  pointer-events: none;
}
.hero-union-frame::after {
  content: '';
  position: absolute; top: 0; left: 22%; right: 22%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.50), transparent);
  pointer-events: none;
}
.hero-union-svg {
  width: 130px; height: auto;
  position: relative; z-index: 2;
  filter: drop-shadow(0 3px 14px rgba(0,0,0,0.25));
}
.hero-union-bar {
  position: absolute;
  bottom: 46px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.9) 30%, #fbbf24 70%, transparent);
  border-radius: 50%; z-index: 3;
  box-shadow:
    0 0 8px  rgba(255,255,255,0.8),
    0 0 20px rgba(251,191,36,0.55);
  animation: neonPulse 2.2s ease-in-out infinite;
}
.hero-union-ambient {
  position: absolute;
  bottom: 16px; left: 50%; transform: translateX(-50%);
  width: 150px; height: 70px;
  background: radial-gradient(ellipse, rgba(255,255,255,0.20) 0%, rgba(251,191,36,0.08) 45%, transparent 70%);
  filter: blur(18px);
  pointer-events: none;
  animation: neonPulse 2.2s ease-in-out infinite;
}
.hero-union-ring {
  position: absolute; inset: -28px; border-radius: 72px;
  background: radial-gradient(ellipse at 50% 75%, rgba(255,255,255,0.12) 0%, transparent 65%);
  pointer-events: none; z-index: 1;
  animation: neonPulse 2.2s ease-in-out infinite;
}

/* ===== HERO EMAIL ICON ===== */
.hero-email-wrap {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: 2.5rem;
}
.hero-email-frame {
  position: relative;
  width: 210px; height: 210px;
  border-radius: 48px;
  background: linear-gradient(150deg, rgba(255,255,255,.22) 0%, rgba(255,255,255,.10) 55%, rgba(255,255,255,.18) 100%);
  border: 1px solid rgba(255,255,255,0.30);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.35),
    0 24px 64px rgba(0,0,0,0.20),
    0 0 90px rgba(0,212,170,0.12);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  animation: heroFloat 3.8s ease-in-out infinite;
  z-index: 2;
}
.hero-email-frame::before {
  content: '';
  position: absolute; inset: 0; border-radius: 48px;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 3px,
    rgba(255,255,255,0.03) 3px, rgba(255,255,255,0.03) 6px
  );
  pointer-events: none;
}
.hero-email-frame::after {
  content: '';
  position: absolute; top: 0; left: 22%; right: 22%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.50), transparent);
  pointer-events: none;
}
.hero-envelope-svg {
  width: 140px; height: auto;
  position: relative; z-index: 2;
  filter: drop-shadow(0 3px 14px rgba(0,0,0,0.20));
}
.hero-neon-bar {
  position: absolute;
  bottom: 52px; left: 50%; transform: translateX(-50%);
  width: 108px; height: 2px;
  background: linear-gradient(90deg, transparent, #00d4aa 30%, #60a5fa 70%, transparent);
  border-radius: 50%; z-index: 3;
  box-shadow:
    0 0 6px  rgba(0,212,170,0.8),
    0 0 18px rgba(0,212,170,0.5),
    0 0 36px rgba(96,165,250,0.30);
  animation: neonPulse 2.2s ease-in-out infinite;
}
.hero-ambient {
  position: absolute;
  bottom: 20px; left: 50%; transform: translateX(-50%);
  width: 150px; height: 70px;
  background: radial-gradient(ellipse, rgba(0,212,170,0.20) 0%, rgba(96,165,250,0.08) 45%, transparent 70%);
  filter: blur(18px);
  pointer-events: none;
  animation: neonPulse 2.2s ease-in-out infinite;
}
.hero-ring {
  position: absolute; inset: -28px;
  border-radius: 72px;
  background: radial-gradient(ellipse at 50% 75%, rgba(0,212,170,0.12) 0%, transparent 65%);
  pointer-events: none; z-index: 1;
  animation: neonPulse 2.2s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-15px); }
}
@keyframes neonPulse {
  0%, 100% { opacity: 0.65; }
  50%       { opacity: 1; }
}

/* ===== CONTENT IMAGES (thông báo, nội dung rich text) ===== */
#mContent img,
.anc-content img,
.fb-item img {
  max-width: 100% !important;
  height: auto !important;
  display: block;
  border-radius: 8px;
  margin: .5rem auto;
}

/* ===== ANNOUNCEMENT CAROUSEL ===== */
.anc-carousel-wrap {
  display: flex; align-items: center; gap: .6rem;
}
.anc-carousel-viewport {
  flex: 1; overflow: hidden; border-radius: 16px;
}
.anc-carousel-track {
  display: flex;
  transition: transform .38s cubic-bezier(.25,.8,.25,1);
  will-change: transform;
}
.anc-slide {
  flex: 0 0 100%;
  background: #fff;
  border: 1px solid var(--glass-border);
  border-left: 4px solid var(--primary);
  border-radius: 16px;
  padding: 1.35rem 1.5rem;
  cursor: pointer;
  transition: box-shadow .22s, background .22s;
  min-height: 160px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.anc-slide:hover { background: #f8faff; box-shadow: 0 8px 32px rgba(37,99,235,.13); }
.anc-slide.pinned { border-left-color: var(--accent); }
.anc-slide-title {
  font-size: 1.05rem; font-weight: 800; color: var(--text);
  line-height: 1.35; margin: .4rem 0 .55rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.anc-slide-excerpt {
  font-size: .84rem; color: var(--text-muted); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  flex: 1;
}
.anc-slide-footer {
  display: flex; align-items: center; margin-top: .85rem; padding-top: .7rem;
  border-top: 1px solid rgba(37,99,235,.08);
}
.anc-nav-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: #fff; border: 1px solid var(--glass-border);
  box-shadow: 0 2px 8px rgba(37,99,235,.10);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--primary); font-size: 1rem;
  transition: all .2s; flex-shrink: 0;
}
.anc-nav-btn:hover:not(:disabled) { background: var(--primary); color: #fff; box-shadow: 0 4px 16px rgba(37,99,235,.28); }
.anc-nav-btn:disabled { opacity: .3; cursor: default; }
.anc-dots {
  display: flex; justify-content: center; gap: .4rem; margin-top: .75rem;
}
.anc-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #cbd5e1; cursor: pointer;
  transition: all .25s;
}
.anc-dot.active { background: var(--primary); width: 22px; border-radius: 4px; }

/* ===== A4 DOCUMENT VIEWER MODAL ===== */
.a4-viewer-dialog { max-width: 860px !important; }
.a4-modal-header {
  background: var(--primary-dark) !important; color: #fff !important;
  border: none !important; padding: .75rem 1.25rem !important;
  border-radius: 12px 12px 0 0 !important;
}
.a4-modal-bg { background: #e8ecf2 !important; padding: 1.5rem !important; }
.a4-page {
  background: #fff;
  max-width: 720px; margin: 0 auto;
  padding: 2.5rem 2.8rem;
  box-shadow: 0 4px 28px rgba(0,0,0,.14);
  border-radius: 6px;
}
.a4-doc-title {
  font-size: 1.35rem; font-weight: 800; color: var(--text);
  line-height: 1.35; margin: .75rem 0 .5rem;
}
.a4-divider { border-color: rgba(37,99,235,.15); margin: .9rem 0 1.4rem; }
.a4-content {
  line-height: 1.85; color: var(--text); font-size: .95rem;
}
.a4-content img {
  max-width: 100% !important; height: auto !important;
  display: block; margin: 1rem auto;
  border-radius: 8px; box-shadow: 0 2px 12px rgba(0,0,0,.10);
}
.a4-attach-img {
  max-width: 100%; height: auto; display: block;
  margin: .5rem auto 0;
  border-radius: 10px; box-shadow: 0 4px 18px rgba(0,0,0,.12);
}
@media (max-width: 600px) {
  .a4-page { padding: 1.2rem 1rem; }
  .a4-doc-title { font-size: 1.1rem; }
  .anc-nav-btn { width: 32px; height: 32px; font-size: .88rem; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero-inner { padding: 2.5rem 0 4rem; }
  .hero-stats { gap: 1.6rem; }
  .hero-stat-num { font-size: 1.55rem; }
  .form-section  { padding: 1.1rem; }
  .data-table    { font-size: .78rem; }
  .admin-sidebar { display: none; }
  .admin-content { padding: 1rem; }
}
