/* ================================================================
   Quran Competition — Modern Stylesheet v2
   Colors: Deep Forest Green #1B4332 | Warm Gold #C9A84C
================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:        #1B4332;
  --green-2:      #2D6A4F;
  --green-3:      #40916C;
  --green-4:      #52B788;
  --gold:         #C9A84C;
  --gold-2:       #E8C97A;
  --gold-3:       #F5E09A;
  --gold-dim:     rgba(201,168,76,.15);
  --white:        #FFFFFF;
  --bg:           #F4F6F3;
  --bg-2:         #ECEEE9;
  --gray:         #F0F2EE;
  --gray-2:       #DDE0D9;
  --gray-3:       #B5B9B2;
  --text:         #1A1E18;
  --text-2:       #3D4239;
  --text-3:       #727870;
  --red:          #C62828;
  --red-2:        #E53935;
  --red-bg:       #FFF0F0;
  --green-bg:     #EDF7F2;
  --yellow-bg:    #FFFBEC;
  --blue-bg:      #EDF2FF;
  --radius:       14px;
  --radius-sm:    8px;
  --radius-xs:    5px;
  --shadow-xs:    0 1px 4px rgba(27,67,50,.06);
  --shadow:       0 2px 14px rgba(27,67,50,.09);
  --shadow-md:    0 4px 24px rgba(27,67,50,.13);
  --shadow-lg:    0 8px 40px rgba(27,67,50,.18);
  --border:       1px solid rgba(27,67,50,.10);
  --border-gold:  1px solid rgba(201,168,76,.3);
  --transition:   .22s cubic-bezier(.4,0,.2,1);
  --transition-slow: .35s cubic-bezier(.4,0,.2,1);
}

html { scroll-behavior: smooth; font-size: 15px; }

body {
  font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
  direction: rtl;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green-2); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--green); }
img { max-width: 100%; display: block; }

/* ── Islamic geometric border accent ─────────────────────────────────────── */
.geo-border {
  height: 4px;
  background: linear-gradient(90deg,
    var(--green)  0%,
    var(--gold)   25%,
    var(--gold-2) 50%,
    var(--gold)   75%,
    var(--green)  100%);
  flex-shrink: 0;
}
.geo-border-bottom {
  background: linear-gradient(90deg,
    var(--gold) 0%, var(--gold-2) 30%,
    var(--gold) 70%, var(--green-3) 100%);
  height: 3px;
  opacity: .7;
}

/* ── Header ───────────────────────────────────────────────────────────────── */
.site-header {
  background: linear-gradient(160deg, #132f25 0%, var(--green) 45%, #1e5040 100%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 4px 24px rgba(0,0,0,.28);
}

/* subtle geometric pattern overlay */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(201,168,76,.07) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(201,168,76,.05) 0%, transparent 40%);
  pointer-events: none;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 28px;
  max-width: 1260px;
  margin: 0 auto;
  position: relative;
}

.header-logo {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(201,168,76,.12);
  border: 2px solid rgba(201,168,76,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 18px rgba(201,168,76,.2), inset 0 1px 0 rgba(255,255,255,.08);
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
}
.header-logo:hover {
  transform: rotate(15deg) scale(1.05);
  box-shadow: 0 0 28px rgba(201,168,76,.35);
}

.header-titles { text-align: center; flex: 1; }

.header-sub {
  font-size: .78rem;
  color: rgba(255,255,255,.68);
  line-height: 1.5;
  letter-spacing: .01em;
}

.header-main {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--gold-2);
  line-height: 1.45;
  margin: 3px 0;
  text-shadow: 0 1px 8px rgba(0,0,0,.25);
}

/* ── Main nav ─────────────────────────────────────────────────────────────── */
.main-nav {
  background: rgba(0,0,0,.18);
  border-top: 1px solid rgba(255,255,255,.07);
  padding: 0 28px;
  position: relative;
}

.nav-inner {
  max-width: 1260px;
  margin: 0 auto;
  display: flex;
  gap: 2px;
  align-items: center;
  height: 46px;
  flex-wrap: wrap;
}

.main-nav .nav-inner a {
  color: rgba(255,255,255,.78);
  font-size: .83rem;
  padding: 6px 15px;
  border-radius: var(--radius-xs);
  transition: var(--transition);
  position: relative;
}
.main-nav .nav-inner a::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 50%; right: 50%;
  height: 2px;
  background: var(--gold-2);
  border-radius: 2px;
  transition: left var(--transition), right var(--transition);
}
.main-nav .nav-inner a:hover::after,
.main-nav .nav-inner a.active::after { left: 12px; right: 12px; }
.main-nav .nav-inner a:hover,
.main-nav .nav-inner a.active { color: #fff; }

.nav-sep { color: rgba(255,255,255,.22); padding: 0 6px; font-size: .8rem; }
.nav-user { color: var(--gold-2); font-size: .82rem; font-weight: 600; }
.nav-logout {
  color: rgba(255,255,255,.72);
  font-size: .82rem;
  padding: 4px 12px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(255,255,255,.18);
  transition: var(--transition);
}
.nav-logout:hover { background: rgba(255,255,255,.1); color: #fff; }

/* ── Main content ─────────────────────────────────────────────────────────── */
.main-content {
  flex: 1;
  padding: 32px 24px;
  max-width: 1260px;
  margin: 0 auto;
  width: 100%;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--green);
  color: rgba(255,255,255,.65);
  text-align: center;
  font-size: .8rem;
  margin-top: auto;
}
.footer-inner {
  max-width: 1260px;
  margin: 0 auto;
  padding: 20px 24px;
}
.footer-sub { opacity: .65; margin-top: 4px; }

/* ── Flash messages ───────────────────────────────────────────────────────── */
.flash-container {
  max-width: 1260px;
  margin: 0 auto;
  padding: 12px 24px 0;
}
.flash {
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  font-size: .9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-xs);
  animation: slideIn .25s ease;
}
@keyframes slideIn { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:none; } }
.flash-close {
  margin-right: auto;
  cursor: pointer;
  background: none;
  border: none;
  font-size: 1.1rem;
  opacity: .5;
  transition: opacity var(--transition);
}
.flash-close:hover { opacity: 1; }
.flash-success { background: #EAF7EF; border: 1px solid #86C99A; color: #1B5E20; }
.flash-error   { background: var(--red-bg); border: 1px solid #FFADAD; color: var(--red); }
.flash-info    { background: var(--blue-bg); border: 1px solid #93B4F5; color: #1A3A7A; }
.flash-warning { background: var(--yellow-bg); border: 1px solid #F0CF72; color: #7A5000; }

/* ── Card ─────────────────────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: var(--border);
  padding: 24px;
  margin-bottom: 20px;
  transition: box-shadow var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header {
  font-size: 1rem;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gold);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Countdown banner ─────────────────────────────────────────────────────── */
.countdown-banner {
  background: linear-gradient(135deg, var(--green) 0%, #1e5a40 60%, #2d6a4f 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 22px 28px;
  margin-bottom: 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.countdown-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='40,5 45,25 65,15 53,32 75,38 53,44 65,63 45,53 40,73 35,53 15,63 27,44 5,38 27,32 15,15 35,25' fill='none' stroke='rgba(201,168,76,0.08)' stroke-width='1'/%3E%3C/svg%3E") repeat;
  opacity: .7;
}
.countdown-label {
  font-size: .92rem;
  color: var(--gold-3);
  margin-bottom: 16px;
  position: relative;
  font-weight: 500;
}
.countdown-boxes {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  position: relative;
}
.countdown-box {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(201,168,76,.35);
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  min-width: 74px;
  text-align: center;
  backdrop-filter: blur(4px);
}
.countdown-box span { display: block; font-size: 1.7rem; font-weight: 800; color: var(--gold-2); }
.countdown-box small { display: block; font-size: .7rem; color: rgba(255,255,255,.6); margin-top: 2px; }

/* Countdown IDs */
#cd-days, #cd-hours, #cd-mins, #cd-secs { display: block; font-size: 1.7rem; font-weight: 800; color: var(--gold-2); }

.deadline-passed {
  background: var(--red-bg);
  border: 1px solid #FFADAD;
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  text-align: center;
  font-weight: 600;
  color: var(--red);
  margin-bottom: 24px;
}

/* ── Section header ───────────────────────────────────────────────────────── */
.form-section { max-width: 860px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 30px; }
.section-header h2 {
  font-size: 1.4rem;
  color: var(--green);
  margin-bottom: 8px;
  font-weight: 700;
  position: relative;
  display: inline-block;
}
.section-header h2::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--gold);
  border-radius: 3px;
  margin: 8px auto 0;
}
.section-header p { color: var(--text-3); font-size: .9rem; }

/* ── Info/alert boxes ─────────────────────────────────────────────────────── */
.info-box {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: .9rem;
  line-height: 1.7;
}
.info-box-warn { background: var(--yellow-bg); border: 1px solid #F0CF72; color: #7A4E00; }
.info-box strong { display: block; margin-bottom: 4px; }

.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 14px; font-size: .9rem; }
.alert-danger { background: var(--red-bg); border: 1px solid #FFADAD; color: var(--red); }

/* ── Form cards ───────────────────────────────────────────────────────────── */
.form-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: var(--border);
  padding: 28px;
  margin-bottom: 22px;
  transition: box-shadow var(--transition);
}
.form-card:hover { box-shadow: var(--shadow-md); }
.form-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gold);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Form elements ────────────────────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-grid .full { grid-column: 1 / -1; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: .84rem;
  font-weight: 600;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 4px;
}
.form-group label .req { color: var(--red-2); font-size: .85em; }

.form-group input,
.form-group select,
.form-group textarea {
  padding: 11px 15px;
  border: 1.5px solid var(--gray-2);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .92rem;
  color: var(--text);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  direction: rtl;
  width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--green-3);
  box-shadow: 0 0 0 3px rgba(64,145,108,.12);
  background: #FAFFFE;
}
.form-group input.error-field { border-color: var(--red-2); }
.form-group input:hover:not(:focus),
.form-group select:hover:not(:focus),
.form-group textarea:hover:not(:focus) { border-color: var(--gray-3); }

.field-hint { font-size: .78rem; color: var(--text-3); margin-top: 3px; }

/* Radio group */
.radio-group { display: flex; gap: 14px; flex-wrap: wrap; }
.radio-item {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  padding: 11px 20px;
  border: 1.5px solid var(--gray-2);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  user-select: none;
  background: #fff;
  font-size: .92rem;
}
.radio-item:hover { border-color: var(--green-3); background: var(--green-bg); }
.radio-item input[type=radio] { accent-color: var(--green); width: 16px; height: 16px; flex-shrink: 0; }
.radio-item.checked {
  border-color: var(--green-2);
  background: var(--green-bg);
  color: var(--green);
  box-shadow: 0 0 0 3px rgba(45,106,79,.08);
}
.radio-box { display: none; }

/* File drop zone */
.file-drop {
  border: 2px dashed var(--gray-2);
  border-radius: var(--radius);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  background: #FAFAF8;
}
.file-drop:hover, .file-drop.drag-over {
  border-color: var(--green-3);
  background: var(--green-bg);
  box-shadow: 0 0 0 4px rgba(64,145,108,.08);
}
.file-drop input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.file-drop-icon { font-size: 2.4rem; margin-bottom: 10px; }
.file-drop-text { font-size: .9rem; color: var(--text-2); font-weight: 500; }
.file-drop-hint { font-size: .78rem; color: var(--text-3); margin-top: 6px; }
.file-info {
  display: none;
  background: var(--green-bg);
  border: 1px solid #86C99A;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  margin-top: 12px;
  font-size: .85rem;
  color: var(--green);
  text-align: right;
}

/* Progress bar */
.progress-wrap { display: none; margin-top: 18px; }
.progress-bar-outer {
  background: var(--gray-2);
  border-radius: 20px;
  height: 10px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.08);
}
.progress-bar-inner {
  height: 100%;
  background: linear-gradient(90deg, var(--green-3), var(--green-4));
  border-radius: 20px;
  width: 0%;
  transition: width .35s ease;
  position: relative;
  overflow: hidden;
}
.progress-bar-inner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.progress-label {
  text-align: center;
  font-size: .82rem;
  color: var(--text-3);
  margin-top: 8px;
}

/* Form submit area */
.form-submit { text-align: center; margin-top: 12px; }
.form-note { font-size: .78rem; color: var(--text-3); margin-top: 10px; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn:not(:disabled):active { transform: scale(.97); }

.btn-primary {
  background: var(--green-2);
  color: #fff;
  box-shadow: 0 2px 8px rgba(27,67,50,.25);
}
.btn-primary:hover:not(:disabled) {
  background: var(--green);
  color: #fff;
  box-shadow: 0 4px 16px rgba(27,67,50,.3);
  transform: translateY(-1px);
}

.btn-gold {
  background: var(--gold);
  color: var(--green);
  box-shadow: 0 2px 8px rgba(201,168,76,.3);
}
.btn-gold:hover:not(:disabled) {
  background: var(--gold-2);
  color: var(--green);
  box-shadow: 0 4px 16px rgba(201,168,76,.4);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border-color: var(--green-2);
  color: var(--green-2);
}
.btn-outline:hover:not(:disabled) {
  background: var(--green-2);
  color: #fff;
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
  box-shadow: 0 2px 8px rgba(198,40,40,.2);
}
.btn-danger:hover:not(:disabled) {
  background: #B71C1C;
  color: #fff;
  transform: translateY(-1px);
}

.btn-sm  { padding: 5px 12px; font-size: .78rem; border-radius: var(--radius-xs); }
.btn-lg  { padding: 14px 36px; font-size: 1.02rem; border-radius: var(--radius-sm); letter-spacing: .02em; }

/* ── Badges ───────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 20px;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .01em;
}
.badge-pending  { background: #FFF3CD; color: #8A5000; border: 1px solid #F0CF72; }
.badge-approved { background: #D8F3E3; color: #1B5E20; border: 1px solid #86C99A; }
.badge-rejected { background: var(--red-bg); color: var(--red); border: 1px solid #FFADAD; }
.badge-student  { background: #E8F0FE; color: #1a56c4; border: 1px solid #A8C4FA; }
.badge-professor{ background: #F5EEFF; color: #6B21A8; border: 1px solid #D4A8FA; }
.badge-employee { background: #FFF0E6; color: #C2410C; border: 1px solid #FDBEA5; }
.badge-sisters  { background: #FDF2F8; color: #9D174D; border: 1px solid #FBCFE8; }
.badge-brothers { background: #EEF2FF; color: #3730A3; border: 1px solid #C7D2FE; }
.badge-comp     { background: #ECFDF5; color: #065F46; border: 1px solid #6EE7B7; font-size: .72rem; }

/* Status badge aliases */
.status-badge { }

/* ── Table ────────────────────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: var(--border);
  box-shadow: var(--shadow);
  background: #fff;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
  font-size: .83rem;
}
thead tr {
  background: linear-gradient(90deg, var(--green) 0%, #245940 100%);
  color: #fff;
}
thead th {
  padding: 12px 13px;
  text-align: right;
  font-weight: 600;
  white-space: nowrap;
  font-size: .8rem;
  letter-spacing: .02em;
}
thead th:first-child { border-radius: var(--radius) 0 0 0; }
thead th:last-child  { border-radius: 0 var(--radius) 0 0; }
tbody tr {
  border-bottom: 1px solid rgba(27,67,50,.06);
  transition: background var(--transition);
}
tbody tr:hover { background: #F2FAF5; }
tbody tr.selected { background: #E6F4EC; }
tbody tr.row-approved { background: #F0FBF4; }
tbody tr.row-rejected { background: #FFF5F5; }
tbody td { padding: 10px 13px; vertical-align: middle; }
tbody td:last-child { white-space: nowrap; }

/* Action buttons in table */
.action-btns { display: flex; gap: 4px; flex-wrap: wrap; }
.action-btns .btn-sm { padding: 4px 9px; font-size: .74rem; }

/* ── Filters bar ──────────────────────────────────────────────────────────── */
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
  padding: 14px 18px;
  background: var(--white);
  border-radius: var(--radius);
  border: var(--border);
  box-shadow: var(--shadow-xs);
}
.filters select,
.filters input[type=text] {
  padding: 8px 12px;
  border: 1.5px solid var(--gray-2);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .85rem;
  background: var(--bg);
  min-width: 130px;
  transition: border-color var(--transition);
  direction: rtl;
}
.filters select:focus,
.filters input[type=text]:focus {
  outline: none;
  border-color: var(--green-3);
  box-shadow: 0 0 0 3px rgba(64,145,108,.1);
  background: #fff;
}
.filter-count {
  font-size: .82rem;
  color: var(--text-3);
  white-space: nowrap;
  margin-right: auto;
}

/* ── Bulk action bar ──────────────────────────────────────────────────────── */
.bulk-bar {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--yellow-bg);
  border: 1px solid #F0CF72;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  font-size: .85rem;
  flex-wrap: wrap;
  animation: slideIn .2s ease;
}
.bulk-bar.visible { display: flex; }
.bulk-count { font-weight: 700; color: var(--text); }

/* ── Stats cards ──────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  border: var(--border);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card .stat-icon { font-size: 1.7rem; }
.stat-card .stat-val, .stat-num {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--green);
  line-height: 1;
}
.stat-card .stat-lbl, .stat-label { font-size: .78rem; color: var(--text-3); }

.stat-card.green, .stat-total    { border-right: 4px solid var(--green-3); }
.stat-card.gold                  { border-right: 4px solid var(--gold); }
.stat-card.red,  .stat-rejected  { border-right: 4px solid var(--red-2); }
.stat-card.blue                  { border-right: 4px solid #3B82F6; }
.stat-pending  { border-right: 4px solid #F59E0B; }
.stat-approved { border-right: 4px solid #10B981; }

/* ── Competition type stats ───────────────────────────────────────────────── */
.comp-stats {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 22px;
}
.comp-stats-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gold);
}
.comp-stats-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.comp-stat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 9px 18px;
  min-width: 180px;
  flex: 1;
  border: var(--border);
  transition: var(--transition);
}
.comp-stat-item:hover { background: var(--green-bg); border-color: rgba(64,145,108,.25); }
.comp-stat-name { font-size: .88rem; color: var(--text-2); }
.comp-stat-count { font-size: 1.2rem; font-weight: 800; color: var(--green); }

/* ── Modal ────────────────────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(3px);
}
.modal-overlay.open { display: flex; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
.modal {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 820px;
  width: 100%;
  max-height: 92vh;
  overflow: auto;
  box-shadow: 0 16px 60px rgba(0,0,0,.28);
  animation: scaleIn .22s cubic-bezier(.34,1.4,.64,1);
}
@keyframes scaleIn { from { transform: scale(.94); opacity:0; } to { transform: scale(1); opacity:1; } }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: var(--border);
  background: linear-gradient(90deg, var(--green) 0%, #245940 100%);
  color: #fff;
  border-radius: var(--radius) var(--radius) 0 0;
}
.modal-title { font-weight: 700; font-size: 1rem; }
.modal-close {
  background: none;
  border: none;
  color: rgba(255,255,255,.8);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: color var(--transition), transform var(--transition);
}
.modal-close:hover { color: #fff; transform: scale(1.15); }
.modal-body { padding: 22px; }
.modal video { width: 100%; border-radius: var(--radius-sm); background: #000; max-height: 52vh; }
.modal-info { margin-top: 16px; font-size: .85rem; }
.modal-info table { min-width: unset; }
.modal-info td { padding: 6px 10px; }
.modal-info tr:hover { background: none; }

/* ── Pagination ───────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 22px;
  flex-wrap: wrap;
}
.page-link, .page-current, .page-dots {
  padding: 7px 14px;
  border-radius: var(--radius-xs);
  font-family: inherit;
  font-size: .82rem;
  text-decoration: none;
  display: inline-block;
  transition: var(--transition);
}
.page-link {
  border: 1.5px solid var(--gray-2);
  background: var(--white);
  color: var(--text-2);
}
.page-link:hover { border-color: var(--green-3); color: var(--green); background: var(--green-bg); }
.page-current {
  background: var(--green-2);
  color: #fff;
  border: 1.5px solid var(--green-2);
  font-weight: 700;
}
.page-dots { border: none; color: var(--text-3); padding: 7px 4px; cursor: default; }

/* ── Admin header bar ─────────────────────────────────────────────────────── */
.admin-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  gap: 14px;
  flex-wrap: wrap;
}
.admin-bar h2 { font-size: 1.1rem; font-weight: 700; color: var(--green); }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Charts row ───────────────────────────────────────────────────────────── */
.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}
.chart-wrap {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  position: relative;
  height: 240px;
}
.chart-wrap h3 { font-size: .9rem; color: var(--green); margin-bottom: 16px; font-weight: 700; }

/* ── Toggle switch ────────────────────────────────────────────────────────── */
.toggle-wrap { display: flex; align-items: center; gap: 12px; }
.toggle { position: relative; width: 46px; height: 24px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--gray-3);
  border-radius: 24px;
  cursor: pointer;
  transition: var(--transition);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  right: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: var(--transition);
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.toggle input:checked + .toggle-slider { background: var(--green-3); }
.toggle input:checked + .toggle-slider::before { transform: translateX(-22px); }

/* ── Settings page ────────────────────────────────────────────────────────── */
.settings-section {
  background: var(--white);
  border-radius: var(--radius);
  border: var(--border);
  box-shadow: var(--shadow);
  padding: 26px;
  margin-bottom: 22px;
}
.settings-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 20px;
  padding-bottom: 11px;
  border-bottom: 2px solid var(--gold);
}

/* ── Success page ─────────────────────────────────────────────────────────── */
.success-section { display: flex; justify-content: center; padding: 24px 0; }
.success-box {
  max-width: 540px;
  width: 100%;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 44px 36px;
  text-align: center;
  border-top: 5px solid var(--green-3);
  animation: scaleIn .3s cubic-bezier(.34,1.4,.64,1);
}
.success-icon { font-size: 4rem; margin-bottom: 18px; }
.success-box h2 { color: var(--green); margin-bottom: 10px; font-size: 1.3rem; }
.success-intro { color: var(--text-2); margin-bottom: 22px; font-size: .92rem; line-height: 1.75; }
.success-id { font-weight: 700; color: var(--green); font-size: 1.1rem; }
.success-info {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 22px 0;
  border: var(--border);
}
.success-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--gray-2);
}
.success-row:last-child { border-bottom: none; }
.success-label { color: var(--text-3); font-size: .85rem; }
.success-value { font-weight: 600; color: var(--text); }
.success-note {
  background: var(--green-bg);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 18px 0 26px;
  font-size: .85rem;
  color: #1B5E20;
  line-height: 1.8;
  border: 1px solid #86C99A;
}

/* ── Login page ───────────────────────────────────────────────────────────── */
.login-section { display: flex; justify-content: center; padding: 56px 0; }
.login-box {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 44px 40px;
  width: 100%;
  max-width: 430px;
  text-align: center;
  border-top: 4px solid var(--gold);
  animation: scaleIn .3s cubic-bezier(.34,1.4,.64,1);
}
.login-logo { display: flex; justify-content: center; margin-bottom: 18px; }
.login-box h2 { color: var(--green); margin-bottom: 26px; font-size: 1.1rem; font-weight: 700; }
.login-box .form-group { text-align: right; margin-bottom: 16px; }

/* ── Error page ───────────────────────────────────────────────────────────── */
.error-section { display: flex; justify-content: center; padding: 72px 0; }
.error-box { text-align: center; }
.error-code { font-size: 5.5rem; font-weight: 800; color: var(--green); line-height: 1; margin-bottom: 10px; }
.error-msg  { font-size: 1.3rem; color: var(--text); margin-bottom: 14px; }

/* ── FAQ page ─────────────────────────────────────────────────────────────── */
.faq-section { max-width: 780px; margin: 0 auto; }
.faq-list    { margin-top: 18px; }
.faq-item {
  background: var(--white);
  border-radius: var(--radius-sm);
  border: var(--border);
  margin-bottom: 10px;
  overflow: hidden;
  transition: box-shadow var(--transition);
  box-shadow: var(--shadow-xs);
}
.faq-item:hover { box-shadow: var(--shadow); }
.faq-q {
  width: 100%;
  text-align: right;
  font-family: inherit;
  font-size: .95rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 15px 20px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--green);
  transition: background var(--transition);
}
.faq-q:hover { background: var(--bg); }
.faq-q span { font-size: 1.15rem; flex-shrink: 0; color: var(--gold); transition: transform var(--transition); }
.faq-item.open .faq-q span { transform: rotate(45deg); }
.faq-a {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height .32s ease, padding .32s;
  color: var(--text-2);
  font-size: .9rem;
  line-height: 1.85;
  border-top: 0px solid var(--gray-2);
}
.faq-a.open {
  max-height: 400px;
  padding: 15px 20px;
  border-top: 1px solid var(--gray-2);
}

/* ── Loading spinner ──────────────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .65s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty state ──────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-3);
  font-size: .95rem;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .charts-row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .header-inner { flex-direction: column; padding: 14px 16px; gap: 12px; }
  .header-titles { width: 100%; }
  .header-main { font-size: .95rem; }
  .main-nav { padding: 0 16px; }
  .nav-inner { height: auto; padding: 6px 0; flex-wrap: wrap; gap: 4px; }
  .main-content { padding: 20px 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: 1; }
  .countdown-boxes { gap: 10px; }
  .countdown-box { min-width: 60px; padding: 9px 12px; }
  .countdown-box span { font-size: 1.4rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .filters { flex-direction: column; }
  .admin-bar { flex-direction: column; gap: 10px; align-items: flex-start; }
  .action-btns { flex-wrap: wrap; gap: 3px; }
  .form-card { padding: 20px; }
  .login-box { padding: 32px 24px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .header-logo { width: 46px; height: 46px; }
  .main-nav .nav-inner a { padding: 5px 9px; font-size: .78rem; white-space: nowrap; }
  .btn-lg { padding: 12px 28px; }
  .success-box { padding: 32px 20px; }
}
