/* =========================================================
   مسابقة ارتقاء — الهوية البصرية
   ========================================================= */
:root {
  --primary: #0f5c4d;
  --primary-600: #0c4c40;
  --primary-700: #0a3f35;
  --primary-50: #e8f3f0;
  --primary-100: #cfe6e0;
  --gold: #c9a227;
  --gold-600: #b08a17;
  --gold-50: #fbf5e3;
  --bg: #f7f5ef;
  --surface: #ffffff;
  --surface-2: #faf8f3;
  --text: #1d2b28;
  --muted: #6a7a76;
  --border: #e6e1d6;
  --danger: #b42318;
  --danger-50: #fdecea;
  --success: #157f3c;
  --success-50: #e7f6ec;
  --warning: #b45309;
  --warning-50: #fef3e2;
  --info: #1d5fa8;
  --info-50: #e8f1fb;
  --dark: #2b3634;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(16, 40, 34, .05), 0 6px 20px rgba(16, 40, 34, .06);
  --shadow-lg: 0 18px 50px rgba(10, 63, 53, .18);
  --font: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
  --font-display: 'Amiri', 'Traditional Arabic', serif;
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.09' stroke-width='1.2'%3E%3Cpath d='M40 6l9.9 24.1L74 40l-24.1 9.9L40 74l-9.9-24.1L6 40l24.1-9.9z'/%3E%3Crect x='22' y='22' width='36' height='36' transform='rotate(45 40 40)'/%3E%3Ccircle cx='40' cy='40' r='8'/%3E%3C/g%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.7;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-700); }
h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 .5em; font-weight: 800; }
p { margin: 0 0 1em; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 5px; font-size: .9em; }
:focus-visible { outline: 3px solid rgba(201, 162, 39, .55); outline-offset: 2px; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.mt { margin-top: 1.25rem; }
.mb { margin-bottom: 1.25rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.inline { display: inline; }
.empty { color: var(--muted); text-align: center; padding: 2rem 1rem !important; }
.text-danger { color: var(--danger); }
.ltr-inline { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.pre { white-space: pre-line; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row-between.wrap { flex-wrap: wrap; }

/* ---------- الأزرار ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  padding: .62em 1.25em; border-radius: 10px; border: 1.5px solid transparent;
  font: inherit; font-weight: 700; font-size: .95rem; line-height: 1.3; cursor: pointer;
  transition: background .18s, color .18s, border-color .18s, transform .1s, box-shadow .18s;
  text-decoration: none; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: .42em .9em; font-size: .85rem; border-radius: 8px; }
.btn-lg { padding: .85em 1.6em; font-size: 1.05rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-700); color: #fff; box-shadow: 0 6px 16px rgba(15, 92, 77, .25); }
.btn-gold { background: linear-gradient(180deg, #d8b440, var(--gold-600)); color: #2a1f00; }
.btn-gold:hover { color: #1a1300; box-shadow: 0 6px 18px rgba(201, 162, 39, .35); }
.btn-outline { background: var(--surface); color: var(--primary); border-color: var(--primary-100); }
.btn-outline:hover { border-color: var(--primary); background: var(--primary-50); }
.btn-ghost { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn-ghost:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-disabled { background: rgba(255, 255, 255, .15); color: rgba(255, 255, 255, .8); cursor: default; }
.btn-link { background: none; border: 0; color: var(--primary); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
.btn-link:hover { text-decoration: underline; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; font-size: 1.05rem;
}
.icon-btn:hover { background: var(--primary-50); color: var(--primary); }
.icon-btn.danger:hover { background: var(--danger-50); color: var(--danger); }
.icon-btn.wa { color: #1fa855; }

/* ---------- الشارات ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: .18em .7em; border-radius: 999px;
  font-size: .78rem; font-weight: 700; white-space: nowrap; line-height: 1.6;
}
.badge-success { background: var(--success-50); color: var(--success); }
.badge-danger { background: var(--danger-50); color: var(--danger); }
.badge-warning { background: var(--warning-50); color: var(--warning); }
.badge-info { background: var(--info-50); color: var(--info); }
.badge-dark { background: #e7eaea; color: var(--dark); }
.badge-muted { background: #eef0ef; color: var(--muted); }
.badge-gold { background: var(--gold-50); color: #8a6a0c; border: 1px solid #ecd9a0; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; margin: 2px;
  border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: .85rem;
}
.chip-x { border: 0; background: none; color: var(--danger); cursor: pointer; font-size: 1.1rem; line-height: 1; padding: 0 2px; }
.track { display: inline-block; font-size: .72rem; font-weight: 700; padding: .15em .65em; border-radius: 6px; vertical-align: middle; }
.track-quran { background: var(--primary-50); color: var(--primary); }
.track-hadith { background: var(--gold-50); color: #8a6a0c; }

/* ---------- التنبيهات ---------- */
.alert { padding: .85rem 1.1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; border: 1px solid; font-weight: 500; }
.alert.slim { padding: .55rem .9rem; font-size: .92rem; }
.alert-success { background: var(--success-50); color: #0f5e2d; border-color: #bfe5cc; }
.alert-danger { background: var(--danger-50); color: #8e1b12; border-color: #f4c7c2; }
.alert-warning { background: var(--warning-50); color: #8a3f06; border-color: #f6d9ac; }
.alert-info { background: var(--info-50); color: #164c88; border-color: #c5daf3; }
.flash-wrap { padding-top: 1rem; }

/* ---------- البطاقات ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.35rem; box-shadow: var(--shadow); margin-bottom: 1.25rem;
}
.card.pad-lg { padding: 2.5rem 1.5rem; }
.card-title { font-size: 1.08rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 1rem; color: var(--primary-700); }
.card-title .bi { color: var(--gold-600); }
.sub-title { font-size: 1rem; margin: 1.25rem 0 .6rem; }
.big-icon { font-size: 2.8rem; color: var(--gold); margin-bottom: .5rem; }

/* ---------- النماذج ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: .2rem; min-width: 0; }
.field > label { font-weight: 700; font-size: .92rem; color: #33433f; }
.req { color: var(--danger); }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  width: 100%; font: inherit; font-size: .97rem; color: var(--text);
  background: #fff; border: 1.5px solid var(--border); border-radius: 10px; padding: .6em .85em;
  transition: border-color .15s, box-shadow .15s; min-height: 44px;
}
textarea { min-height: auto; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(15, 92, 77, .12); }
input:disabled, textarea:disabled { background: var(--surface-2); color: var(--muted); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--primary); flex-shrink: 0; }
.hint { color: var(--muted); font-size: .82rem; }
.error { color: var(--danger); font-size: .84rem; font-weight: 600; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); background: #fffafa; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem; }
.field-wide { grid-column: 1 / -1; }
.form-stack { display: flex; flex-direction: column; gap: .9rem; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: .5rem; }
.section-title { font-size: 1rem; color: var(--gold-600); border-bottom: 1px dashed var(--border); padding-bottom: .4rem; margin: .6rem 0 0; }
.name4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; margin: .4rem 0; }
.check.big { font-size: 1.05rem; font-weight: 700; padding: .8rem 1rem; background: var(--primary-50); border-radius: 10px; }
.check.small { font-size: .85rem; margin: 0; }
.input-prefix { display: flex; align-items: stretch; border: 1.5px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.input-prefix:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(15, 92, 77, .12); }
.input-prefix span { background: var(--surface-2); padding: 0 .9em; display: grid; place-items: center; font-weight: 700; color: var(--muted); border-left: 1px solid var(--border); }
.input-prefix input { border: 0 !important; box-shadow: none !important; font-size: 1.1rem; letter-spacing: 1px; }
.input-action { display: flex; gap: 8px; }
.otp-input { text-align: center; font-size: 1.8rem !important; letter-spacing: .5em; font-weight: 800; padding: .4em !important; }
.input-xs { width: 70px !important; }
.input-sm { width: 110px !important; }
.inline-field { flex-direction: row; align-items: center; gap: 10px; margin: 1rem 0; }
.inline-field select { width: auto; }
.level-toggles { display: flex; flex-wrap: wrap; gap: 4px 18px; padding: .6rem .9rem; background: var(--surface-2); border-radius: 10px; border: 1px solid var(--border); }
.checks-row { flex-direction: column; }

/* ---------- الجداول ---------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 10px; }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: right; font-weight: 700; color: var(--muted); font-size: .82rem; background: var(--surface-2); padding: .7rem .8rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: .7rem .8rem; border-bottom: 1px solid #f0ece3; vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table-hover tbody tr:hover { background: #fbfaf6; }
.table-sm td, .table-sm th { padding: .5rem .6rem; }
.table input, .table select, .table textarea { min-height: 38px; padding: .4em .6em; font-size: .9rem; }
.row-disabled td { opacity: .55; }
.row-new td { background: #fcfbf6; }
.rank-badge { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--primary-50); color: var(--primary); font-weight: 800; }
.rank-1 .rank-badge { background: linear-gradient(180deg, #f3d77a, #c9a227); color: #3d2e00; }
.rank-2 .rank-badge { background: linear-gradient(180deg, #e8eaec, #b7bec4); color: #333; }
.rank-3 .rank-badge { background: linear-gradient(180deg, #ecc49b, #c08350); color: #3a2310; }
.pagination { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 1rem; }
.pagination a { min-width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--border); background: #fff; font-weight: 700; }
.pagination a.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .dots { align-self: center; color: var(--muted); }

/* ---------- المفتاح ---------- */
.switch { width: 46px; height: 26px; border-radius: 999px; background: #d5d9d7; border: 0; position: relative; cursor: pointer; transition: background .2s; padding: 0; }
.switch span { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: right .2s; }
.switch.on { background: var(--success); }
.switch.on span { right: 23px; }

/* ---------- التبويبات ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 1.1rem; border-bottom: 2px solid var(--border); }
.tabs a { padding: .6rem 1rem; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -2px; display: inline-flex; gap: 6px; align-items: center; }
.tabs a:hover { color: var(--primary); }
.tabs a.active { color: var(--primary); border-bottom-color: var(--gold); }
.tabs-inline { border: 0; margin: 0; background: var(--surface-2); border-radius: 10px; padding: 4px; }
.tabs-inline a { border: 0; border-radius: 8px; padding: .45rem .9rem; margin: 0; }
.tabs-inline a.active { background: #fff; box-shadow: var(--shadow); }

/* ---------- شريط التقدم ---------- */
.progress { height: 8px; background: #edf0ee; border-radius: 999px; overflow: hidden; flex: 1; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), #1d8a72); border-radius: 999px; transition: width .4s; }
.progress-gold > span { background: linear-gradient(90deg, var(--gold-600), #e0c25b); }
.progress-info > span { background: linear-gradient(90deg, var(--info), #4c8ad1); }
.progress-warning > span { background: linear-gradient(90deg, var(--warning), #e39a3b); }
.mini-bars > div { display: grid; grid-template-columns: 130px 1fr 60px; align-items: center; gap: 12px; padding: .45rem 0; font-size: .92rem; }
.mini-bars b { text-align: left; }

/* =========================================================
   الواجهة العامة
   ========================================================= */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; min-height: 70px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--primary-700); }
.brand span { display: flex; flex-direction: column; line-height: 1.2; }
.brand strong { font-family: var(--font-display); font-size: 1.5rem; }
.brand small { font-size: .78rem; color: var(--muted); font-weight: 500; }
.brand-light, .brand-light:hover { color: #fff; }
.brand-light small { color: rgba(255, 255, 255, .7); }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav > a:not(.btn) { padding: .5rem .85rem; border-radius: 9px; font-weight: 600; color: #3a4a46; }
.main-nav > a:not(.btn):hover, .main-nav > a.active { background: var(--primary-50); color: var(--primary); }
.main-nav .btn { margin-inline-start: 6px; }
.nav-toggle { display: none; border: 0; background: var(--primary-50); color: var(--primary); width: 42px; height: 42px; border-radius: 10px; font-size: 1.4rem; cursor: pointer; }

.hero { position: relative; overflow: hidden; color: #fff; padding: 4.5rem 0 0; background: radial-gradient(1200px 500px at 85% -10%, #1b8670 0%, transparent 60%), linear-gradient(160deg, var(--primary) 0%, var(--primary-700) 70%); }
.hero-pattern { position: absolute; inset: 0; background-image: var(--pattern); background-size: 80px; opacity: .9; pointer-events: none; }
.hero::after { content: ''; position: absolute; inset: auto 0 0; height: 90px; background: linear-gradient(0deg, var(--bg), transparent); pointer-events: none; }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; align-items: center; z-index: 1; }
.eyebrow { display: inline-flex; gap: 6px; align-items: center; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); padding: .3rem .9rem; border-radius: 999px; font-size: .9rem; margin-bottom: 1rem; }
.hero h1 { font-family: var(--font-display); font-size: clamp(2rem, 4.2vw, 3.3rem); font-weight: 700; line-height: 1.35; margin-bottom: .6rem; }
.hero-verse { font-family: var(--font-display); color: #f0d77f; font-size: clamp(1.2rem, 2.2vw, 1.6rem); margin-bottom: 1rem; }
.lead { font-size: 1.08rem; color: rgba(255, 255, 255, .85); max-width: 600px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6rem; }
.hero-emblem { display: grid; place-items: center; }
.hero-emblem img { width: min(320px, 80%); filter: drop-shadow(0 25px 50px rgba(0, 0, 0, .35)); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-12px) rotate(2deg); } }
.hero-stats { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(3, 1fr); background: #fff; color: var(--text); border-radius: var(--radius); box-shadow: var(--shadow-lg); margin: 3.5rem auto 0; max-width: 820px; transform: translateY(0); }
.hero-stats div { text-align: center; padding: 1.3rem 1rem; }
.hero-stats div + div { border-right: 1px solid var(--border); }
.hero-stats strong { display: block; font-size: 2rem; color: var(--primary); font-weight: 800; line-height: 1.2; }
.hero-stats span { color: var(--muted); font-size: .92rem; }

.section { padding: 4rem 0; }
.section-tint { background: linear-gradient(180deg, #f1ede2, #f6f3eb); }
.section-heading { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--primary-700); position: relative; padding-bottom: .6rem; margin-bottom: 1.4rem; }
.section-heading::after { content: ''; position: absolute; bottom: 0; right: 0; width: 64px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--gold), #e8cf7a); }
.section-heading.center::after { right: 50%; transform: translateX(50%); }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.link-more { font-weight: 700; display: inline-flex; gap: 6px; align-items: center; }
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; }
.prose { font-size: 1.05rem; color: #3a4a46; }
.vision-card { display: flex; gap: 16px; align-items: flex-start; background: linear-gradient(135deg, var(--primary-50), #fff); border: 1px solid var(--primary-100); border-radius: var(--radius); padding: 1.3rem; margin-top: 1.5rem; }
.vision-card > .bi { font-size: 1.8rem; color: var(--gold-600); }
.vision-card h3 { margin: 0 0 .2rem; color: var(--primary); }
.vision-card p { margin: 0; font-family: var(--font-display); font-size: 1.25rem; }
.goals { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.goals li { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--border); padding: .85rem 1rem; border-radius: 12px; box-shadow: var(--shadow); }
.goal-num { flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; color: var(--primary); background: var(--primary-50); }

.timeline { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; position: relative; }
.timeline::before { content: ''; position: absolute; top: 26px; right: 8%; left: 8%; height: 3px; background: repeating-linear-gradient(90deg, var(--primary-100) 0 10px, transparent 10px 18px); }
.timeline li { position: relative; text-align: center; padding: 0 .5rem; }
.tl-dot { position: relative; z-index: 1; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 1rem; font-weight: 800; font-size: 1.2rem; background: #fff; color: var(--muted); border: 3px solid var(--primary-100); }
.timeline h3 { font-size: 1.15rem; margin-bottom: .2rem; }
.timeline time { display: block; font-size: .85rem; color: var(--gold-600); font-weight: 700; margin-bottom: .3rem; }
.timeline p { font-size: .9rem; color: var(--muted); margin-bottom: .5rem; }
.tl-done .tl-dot { background: var(--primary); border-color: var(--primary); color: #fff; }
.tl-current .tl-dot { background: var(--gold); border-color: #f0dc95; color: #2a1f00; box-shadow: 0 0 0 8px rgba(201, 162, 39, .18); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 14px rgba(201, 162, 39, .05); } }

.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.level-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow); position: relative; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.level-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--primary), var(--gold)); }
.level-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.level-card h3 { margin: .7rem 0 .2rem; font-size: 1.2rem; }
.scope { color: var(--primary); font-weight: 700; margin-bottom: .6rem; }
.meta { list-style: none; padding: 0; margin: 0; color: var(--muted); font-size: .9rem; }
.meta li { display: flex; gap: 8px; align-items: center; }

.cta { background: linear-gradient(135deg, var(--primary-700), var(--primary)); color: #fff; position: relative; overflow: hidden; }
.cta::before { content: ''; position: absolute; inset: 0; background-image: var(--pattern); background-size: 70px; }
.cta-inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 3rem 16px; flex-wrap: wrap; }
.cta h2 { font-family: var(--font-display); font-size: 2rem; font-weight: 700; margin: 0; }
.cta p { margin: 0; color: rgba(255, 255, 255, .8); }

.page-hero { background: linear-gradient(160deg, var(--primary), var(--primary-700)); color: #fff; padding: 2.8rem 0; position: relative; overflow: hidden; }
.page-hero::before { content: ''; position: absolute; inset: 0; background-image: var(--pattern); background-size: 70px; }
.page-hero .container { position: relative; }
.page-hero h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem, 3.5vw, 2.5rem); margin: 0; }
.page-hero p { margin: .3rem 0 0; color: rgba(255, 255, 255, .8); }
.page-hero + .section { padding-top: 2.5rem; }

.levels-list { display: grid; gap: 1rem; }
.level-row { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.5rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); border-right: 5px solid var(--primary); }
.level-row h2 { margin: .5rem 0 .2rem; font-size: 1.3rem; }
.level-conds { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin: 0; }
.level-conds div { background: var(--surface-2); border-radius: 10px; padding: .6rem .8rem; }
.level-conds dt { font-size: .8rem; color: var(--muted); font-weight: 700; }
.level-conds dd { margin: 0; font-weight: 700; }
.note { color: var(--muted); margin-top: 1rem; }

.stepper { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; justify-content: space-between; position: relative; counter-reset: s; }
.stepper::before { content: ''; position: absolute; top: 19px; right: 10%; left: 10%; height: 3px; background: var(--border); }
.stepper li { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 700; color: var(--muted); font-size: .9rem; flex: 1; }
.stepper li span { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 3px solid var(--border); font-weight: 800; }
.stepper li.done span { background: var(--primary); border-color: var(--primary); color: #fff; }
.stepper li.current { color: var(--primary); }
.stepper li.current span { border-color: var(--gold); color: var(--primary); box-shadow: 0 0 0 5px rgba(201, 162, 39, .18); }
.instructions { padding-right: 1.3rem; margin: 0 0 1.5rem; }
.instructions li { padding: .35rem 0; }
.instructions li::marker { color: var(--gold-600); font-weight: 800; }

.my-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 1rem; }
.contestant-card header { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: .7rem; }
.contestant-card h2 { font-size: 1.15rem; margin: 0; }
.cc-level { font-weight: 700; margin-bottom: .8rem; }
.contestant-card details { margin: .8rem 0; border: 1px solid var(--border); border-radius: 10px; padding: .5rem .9rem; }
.contestant-card summary { cursor: pointer; font-weight: 700; color: var(--primary); }
.data-list { margin: .6rem 0 0; display: grid; gap: 4px; }
.data-list div { display: grid; grid-template-columns: 42% 1fr; gap: 8px; padding: .35rem 0; border-bottom: 1px dashed #eee9df; font-size: .92rem; }
.data-list dt { color: var(--muted); }
.data-list dd { margin: 0; font-weight: 600; }
.score-pill { background: var(--gold-50); border: 1px solid #ecd9a0; border-radius: 10px; padding: .6rem .9rem; font-size: 1.05rem; margin-bottom: .6rem; }

.site-footer { background: #0b2f28; color: rgba(255, 255, 255, .78); padding: 3rem 0 0; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2rem; }
.site-footer h4 { color: #f0d77f; font-size: 1rem; }
.site-footer a { display: block; color: rgba(255, 255, 255, .78); padding: .2rem 0; }
.site-footer a:hover { color: #fff; }
.muted-light { color: rgba(255, 255, 255, .6); margin-top: 1rem; font-size: .92rem; }
.copyright { text-align: center; padding: 1.2rem; margin-top: 2rem; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .85rem; color: rgba(255, 255, 255, .55); }

/* ---------- صفحات الدخول ---------- */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 2rem 16px; background: linear-gradient(160deg, var(--primary), var(--primary-700)); position: relative; }
.auth-page::before { content: ''; position: fixed; inset: 0; background-image: var(--pattern); background-size: 80px; pointer-events: none; }
.auth-card { position: relative; width: 100%; max-width: 440px; background: #fff; border-radius: 20px; padding: 2rem 1.75rem; box-shadow: var(--shadow-lg); }
.auth-card.wide { max-width: 720px; }
.auth-head { text-align: center; margin-bottom: 1.5rem; }
.auth-head h1 { font-family: var(--font-display); font-weight: 700; color: var(--primary-700); font-size: 1.9rem; margin: .5rem 0 .2rem; }
.who-box { display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--primary-50); color: var(--primary); font-weight: 700; padding: .6rem; border-radius: 10px; margin-bottom: 1rem; }
.auth-foot { display: flex; justify-content: space-between; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border); font-size: .9rem; font-weight: 600; }
.checklist { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 1.2rem; font-size: .9rem; }
.checklist .ok { color: var(--success); }
.checklist .bad { color: var(--danger); font-weight: 700; }

/* =========================================================
   لوحات التحكم
   ========================================================= */
.panel { background: #f3f1ea; }
.sidebar { position: fixed; top: 0; bottom: 0; right: 0; width: 262px; background: linear-gradient(180deg, var(--primary-700), #082e27); color: #fff; overflow-y: auto; z-index: 60; padding: 1.1rem .8rem; transition: transform .25s; }
.sidebar::before { content: ''; position: absolute; inset: 0; background-image: var(--pattern); background-size: 70px; opacity: .35; pointer-events: none; }
.sidebar > * { position: relative; }
.sidebar .brand { padding: .3rem .5rem 1.2rem; border-bottom: 1px solid rgba(255, 255, 255, .1); margin-bottom: .8rem; }
.sidebar nav a { display: flex; align-items: center; gap: 12px; padding: .62rem .85rem; border-radius: 10px; color: rgba(255, 255, 255, .78); font-weight: 600; font-size: .94rem; margin-bottom: 2px; }
.sidebar nav a .bi { font-size: 1.1rem; opacity: .85; }
.sidebar nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.sidebar nav a.active { background: linear-gradient(90deg, rgba(201, 162, 39, .1), rgba(201, 162, 39, .28)); color: #fff; box-shadow: inset -3px 0 0 var(--gold); }
.sidebar nav a.active .bi { color: #f0d77f; opacity: 1; }
.menu-label { font-size: .72rem; text-transform: uppercase; color: rgba(255, 255, 255, .45); font-weight: 700; padding: 1rem .85rem .35rem; letter-spacing: .5px; }
.sidebar-backdrop { display: none; }
.panel-main { margin-right: 262px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 0 1.5rem; background: rgba(255, 255, 255, .9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.topbar h1 { font-size: 1.2rem; margin: 0; flex: 1; color: var(--primary-700); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar > .icon-btn { display: none; }
.topbar-user { display: flex; align-items: center; gap: 10px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--gold), #e8cf7a); color: #3d2e00; font-weight: 800; }
.who { display: flex; flex-direction: column; line-height: 1.2; }
.who small { color: var(--muted); font-size: .78rem; }
.panel-content { padding: 1.5rem; flex: 1; }
.panel-footer { padding: 1rem 1.5rem; color: var(--muted); font-size: .82rem; text-align: center; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; align-items: start; }
.grid-2 > .card { margin-bottom: 0; }
.grid-2 { margin-bottom: 1.25rem; }
.grid-main-side { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 1.25rem; align-items: start; }
.side-stack .card:last-child { margin-bottom: 0; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stats-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.05rem; box-shadow: var(--shadow); color: var(--text); transition: transform .15s; }
a.stat:hover { transform: translateY(-2px); color: var(--text); }
.stat-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 1.35rem; background: var(--primary-50); color: var(--primary); flex-shrink: 0; }
.stat strong { display: block; font-size: 1.6rem; line-height: 1.1; font-weight: 800; }
.stat span:not(.stat-icon) { color: var(--muted); font-size: .85rem; }
.stat-warning .stat-icon { background: var(--warning-50); color: var(--warning); }
.stat-success .stat-icon { background: var(--success-50); color: var(--success); }
.stat-info .stat-icon { background: var(--info-50); color: var(--info); }
.stat-gold .stat-icon { background: var(--gold-50); color: var(--gold-600); }

.reg-status { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .9rem 1.2rem; border-radius: var(--radius); margin-bottom: 1.25rem; font-weight: 600; border: 1px solid; }
.reg-status.is-open { background: var(--success-50); border-color: #bfe5cc; color: #0f5e2d; }
.reg-status.is-closed { background: var(--danger-50); border-color: #f4c7c2; color: #8e1b12; }
.quick-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1.2rem; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filters input, .filters select { width: auto; min-width: 150px; flex: 1 1 150px; }
.filters input[type=search] { flex: 2 1 260px; }
.filters .btn { flex: 0 0 auto; }
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: .2rem 0 1rem; }
.bulk-bar select, .bulk-bar input { width: auto; min-width: 200px; }
.bulk-message { margin-bottom: 1rem; }
.simple-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.simple-list li { display: flex; justify-content: space-between; gap: 8px; padding: .5rem 0; border-bottom: 1px dashed var(--border); }
.big-score { text-align: center; font-size: 3rem; font-weight: 800; color: var(--primary); line-height: 1.1; }
.big-score small { font-size: 1rem; color: var(--muted); font-weight: 600; }
.method-options { display: grid; grid-template-columns: 1fr 1fr auto; gap: 1rem; align-items: stretch; }
.option-card { display: flex; flex-direction: column; gap: 4px; padding: 1rem 1.1rem; border: 2px solid var(--border); border-radius: 12px; cursor: pointer; position: relative; }
.option-card input { position: absolute; left: 1rem; top: 1rem; }
.option-card span { color: var(--muted); font-size: .9rem; }
.option-card.selected, .option-card:has(input:checked) { border-color: var(--primary); background: var(--primary-50); }
.method-options .btn { align-self: center; }
.fields-table textarea { min-width: 180px; margin-bottom: 6px; }
.fields-table td:nth-child(2) input { min-width: 180px; }

.segments { display: grid; gap: 8px; }
.segment { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; text-align: right; width: 100%; padding: .7rem .9rem; border-radius: 11px; border: 1.5px solid var(--border); background: var(--surface-2); font: inherit; color: inherit; }
button.segment { cursor: pointer; transition: border-color .15s, background .15s; }
button.segment:hover { border-color: var(--primary-100); background: #fff; }
.segment.active { border-color: var(--gold); background: var(--gold-50); box-shadow: 0 0 0 3px rgba(201, 162, 39, .15); }
.segment small { margin-inline-start: auto; }
.seg-no { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--primary); color: #fff; font-weight: 800; flex-shrink: 0; }

.live-dot { width: 10px; height: 10px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); animation: live 1.6s infinite; display: inline-block; }
@keyframes live { 70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
.judge-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 3px 0; }
.state-done td:first-child { box-shadow: inset -4px 0 0 var(--success); }
.state-in_progress td:first-child { box-shadow: inset -4px 0 0 var(--info); }
.state-waiting td:first-child { box-shadow: inset -4px 0 0 #d9d4c7; }
.score-cell { font-size: 1.15rem; color: var(--primary); }

/* ---------- المحكم ---------- */
.progress-line { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; }
.progress-line > span { white-space: nowrap; }
.judge-list { display: grid; gap: 10px; }
.judge-item { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow); color: var(--text); border-right: 5px solid #d9d4c7; transition: transform .15s, box-shadow .15s; }
.judge-item:hover { transform: translateX(-3px); box-shadow: var(--shadow-lg); color: var(--text); }
.judge-item.is-done { border-right-color: var(--success); opacity: .8; }
.judge-item.is-progress { border-right-color: var(--info); }
.ji-num { width: 38px; height: 38px; border-radius: 11px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; font-weight: 800; flex-shrink: 0; }
.ji-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ji-main strong { font-size: 1.05rem; }
.ji-main small { color: var(--muted); }

.eval-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; border-right: 5px solid var(--gold); }
.eval-header h2 { margin: 0 0 .2rem; color: var(--primary-700); }
.total-box { display: flex; flex-direction: column; align-items: center; background: linear-gradient(160deg, var(--primary), var(--primary-700)); color: #fff; border-radius: 14px; padding: .6rem 1.6rem; min-width: 140px; }
.total-box span { font-size: .8rem; opacity: .8; }
.total-box strong { font-size: 2.4rem; line-height: 1.1; font-weight: 800; }
.total-box small { opacity: .7; }
.total-box.bump strong { animation: bump .35s; }
@keyframes bump { 50% { transform: scale(1.18); color: #f0d77f; } }
.eval-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.eval-errors { grid-column: 1 / -1; }
.sticky-card { position: sticky; top: 80px; }
.err-details { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; margin-bottom: 1rem; }
.deduct-buttons { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.deduct-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 1rem .6rem; border-radius: 14px; border: 0; cursor: pointer; font: inherit; color: #fff; transition: transform .1s, filter .15s, box-shadow .15s; user-select: none; -webkit-tap-highlight-color: transparent; }
.deduct-btn strong { font-size: 1rem; }
.deduct-btn span { font-size: 1.25rem; font-weight: 800; }
.deduct-btn small { font-size: .7rem; font-weight: 500; opacity: .85; display: block; }
.deduct-btn:hover { filter: brightness(1.08); box-shadow: 0 8px 20px rgba(0, 0, 0, .15); }
.deduct-btn:active { transform: scale(.96); }
.deduct-btn.flash { animation: flashbtn .4s; }
@keyframes flashbtn { 50% { box-shadow: 0 0 0 8px rgba(201, 162, 39, .45); } }
.deduct-danger { background: linear-gradient(160deg, #d0362b, #a31d14); }
.deduct-warning { background: linear-gradient(160deg, #e08a1e, #b45d09); }
.deduct-info { background: linear-gradient(160deg, #2f7bd0, #1a5299); }
.deduct-dark { background: linear-gradient(160deg, #4b5a57, #2b3634); }
.criteria-list { display: grid; gap: 10px; }
.crit { border: 1px solid var(--border); border-radius: 12px; padding: .8rem 1rem; background: var(--surface-2); }
.crit-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.crit-head strong { font-size: 1rem; }
.crit-final { font-size: 1.35rem; font-weight: 800; color: var(--primary); }
.crit-body { display: flex; align-items: center; gap: 10px; margin-top: .5rem; font-size: .88rem; color: var(--muted); flex-wrap: wrap; }
.crit-body input { width: 90px !important; min-height: 36px; padding: .3em .5em; }
.crit .progress { margin-top: .5rem; }
.save-status { display: block; font-size: .82rem; color: var(--muted); margin-top: .5rem; min-height: 1.2em; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--dark); color: #fff; padding: .75rem 1.3rem; border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 100; opacity: 0; transition: opacity .2s, transform .2s; font-weight: 600; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--danger); }

/* ---------- النوافذ المنبثقة ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 3vh 16px; background: rgba(10, 30, 26, .5); backdrop-filter: blur(3px); opacity: 0; transition: opacity .18s; }
.modal.is-open { opacity: 1; }
.modal-dialog { width: 100%; max-width: 680px; max-height: 94vh; display: flex; flex-direction: column; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); transform: translateY(14px) scale(.98); transition: transform .2s; overflow: hidden; }
.modal.is-open .modal-dialog { transform: none; }
.modal-lg { max-width: 920px; }
.modal-sm { max-width: 460px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 1rem 1.35rem; border-bottom: 1px solid var(--border); background: var(--surface); flex-shrink: 0; }
.modal-head h2 { font-size: 1.08rem; margin: 0; color: var(--primary-700); display: flex; align-items: center; gap: 8px; }
.modal-head h2 .bi { color: var(--gold-600); }
.modal-body { padding: 1.35rem 1.35rem 0; overflow-y: auto; overscroll-behavior: contain; flex: 1; }
.modal-body .form-actions { position: sticky; bottom: 0; z-index: 2; background: var(--surface); margin: 1rem -1.35rem 0; padding: .9rem 1.35rem; border-top: 1px solid var(--border); }
.modal-loading { padding: 3rem; text-align: center; color: var(--muted); }
body.modal-open { overflow: hidden; }

/* ---------- التبويبات داخل الصفحة ---------- */
.tabs button { padding: .6rem 1rem; font: inherit; font-weight: 700; color: var(--muted); background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.tabs button:hover { color: var(--primary); }
.tabs button.active { color: var(--primary); border-bottom-color: var(--gold); }
.tabs .tab-count { background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; font-size: .74rem; padding: 0 .55em; color: var(--muted); }
.tabs .active .tab-count { background: var(--gold-50); border-color: #ecd9a0; color: #8a6a0c; }
.tabs-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; padding: .3rem .8rem 0; margin-bottom: 0; box-shadow: var(--shadow); }
.tabs-card + .tab-panels > [data-tab-panel] > .card:first-child, .tabs-card + .tab-panels > [data-tab-panel] > .grid-2:first-child > .card { border-top-left-radius: 0; border-top-right-radius: 0; }
.tab-panels { margin-bottom: 1.25rem; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 1.1rem; }
.page-head p { margin: 0; }

/* ---------- إشعارات أعلى الصفحة ---------- */
.flash-stack { position: fixed; top: 76px; left: 50%; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 8px; width: min(560px, calc(100% - 32px)); pointer-events: none; }
.flash-stack .alert { pointer-events: auto; margin: 0; box-shadow: var(--shadow-lg); display: flex; align-items: flex-start; gap: 10px; animation: flash-in .25s ease-out; }
.flash-stack .alert > span { flex: 1; }
.flash-stack .alert.hide { opacity: 0; transform: translateY(-8px); transition: opacity .3s, transform .3s; }
.flash-x { background: none; border: 0; font-size: 1.2rem; line-height: 1; cursor: pointer; color: inherit; opacity: .6; padding: 0; }
.flash-x:hover { opacity: 1; }
@keyframes flash-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* ---------- قائمة الإجراءات في الصف ---------- */
.row-actions { display: inline-flex; gap: 2px; align-items: center; }
.icon-btn[disabled] { opacity: .35; cursor: not-allowed; }
.m-0 { margin: 0 !important; }
.switch.locked { opacity: .5; cursor: not-allowed; display: inline-block; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.2rem; margin: 0; }
.kv dt { color: var(--muted); font-size: .88rem; }
.kv dd { margin: 0; font-weight: 600; }
.profile-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.profile-head .avatar { width: 56px; height: 56px; font-size: 1.4rem; }
.profile-head h2 { margin: 0; font-size: 1.25rem; }
.profile-head .grow { flex: 1; min-width: 200px; }

/* =========================================================
   الاستجابة للشاشات
   ========================================================= */
@media (max-width: 1100px) {
  .stats-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .eval-grid { grid-template-columns: minmax(0, 1fr); }
  .sticky-card { position: static; }
}
@media (max-width: 960px) {
  .sidebar { transform: translateX(100%); box-shadow: var(--shadow-lg); }
  body.sidebar-open .sidebar { transform: none; }
  body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 55; }
  .panel-main { margin-right: 0; }
  .topbar > .icon-btn { display: inline-grid; }
  .grid-main-side { grid-template-columns: 1fr; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-actions { justify-content: center; }
  .lead { margin-inline: auto; }
  .hero-emblem { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .level-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .method-options { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .nav-toggle { display: grid; place-items: center; }
  .main-nav { position: absolute; top: 100%; right: 0; left: 0; flex-direction: column; align-items: stretch; background: #fff; border-bottom: 1px solid var(--border); padding: .8rem 16px 1rem; box-shadow: var(--shadow-lg); display: none; }
  .main-nav.open { display: flex; }
  .main-nav .btn { margin: .3rem 0 0; }
  .timeline::before { display: none; }
}
@media (max-width: 680px) {
  .form-grid, .grid-2 { grid-template-columns: 1fr; }
  .name4 { grid-template-columns: 1fr 1fr; }
  .hero { padding-top: 3rem; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); margin-top: 2.5rem; }
  .hero-stats strong { font-size: 1.5rem; }
  .hero-stats span { font-size: .78rem; }
  .section { padding: 2.8rem 0; }
  .section-heading { font-size: 1.65rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .panel-content { padding: 1rem; }
  .topbar { padding: 0 1rem; }
  .who { display: none; }
  .stats-grid, .stats-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: .8rem; gap: 10px; }
  .stat-icon { width: 40px; height: 40px; font-size: 1.1rem; }
  .stat strong { font-size: 1.3rem; }
  .err-details { grid-template-columns: 1fr 1fr; }
  .err-details .field:first-child { grid-column: 1 / -1; }
  .deduct-buttons { grid-template-columns: 1fr 1fr; }
  .stepper li { font-size: .75rem; }
  .level-conds { grid-template-columns: 1fr; }
  .mini-bars > div { grid-template-columns: 95px 1fr 44px; }
  .checklist { grid-template-columns: 1fr; }
  .my-grid { grid-template-columns: 1fr; }
  .card { padding: 1.1rem; }
  .filters input, .filters select { min-width: 0; flex-basis: 100%; }
  .modal { padding: 0; align-items: flex-end; }
  .modal-dialog { border-radius: 18px 18px 0 0; max-height: 94vh; }
  .modal-body { padding: 1.1rem 1.1rem 0; }
  .modal-body .form-actions { margin: 1rem -1.1rem 0; padding: .8rem 1.1rem; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .tabs a, .tabs button { white-space: nowrap; flex-shrink: 0; }
  .kv { grid-template-columns: 1fr; gap: .1rem; }
  .kv dd { margin-bottom: .5rem; }
}

@media print {
  .sidebar, .topbar, .no-print, .tabs, .panel-footer, .site-header, .site-footer { display: none !important; }
  .panel-main { margin: 0; }
  .card { box-shadow: none; border: 0; }
  body { background: #fff; }
}

/* ---------- إضافات إدارة التقييم ---------- */
.w-30 { width: 30%; min-width: 140px; }
.deduct-preview { display: inline-flex; padding: .45rem .9rem; border-radius: 10px; cursor: default; min-width: 120px; }
.deduct-preview strong { font-size: .82rem; }
.deduct-preview span { font-size: .95rem; }
.color-options { display: flex; flex-wrap: wrap; gap: 8px; }
.color-option { cursor: pointer; }
.color-option input { position: absolute; opacity: 0; pointer-events: none; }
.color-option span { display: inline-block; padding: .4rem 1rem; border-radius: 9px; color: #fff; font-weight: 700; font-size: .88rem; opacity: .55; border: 2px solid transparent; transition: opacity .15s; }
.color-option input:checked + span { opacity: 1; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 162, 39, .25); }
.color-option input:focus-visible + span { outline: 3px solid rgba(201, 162, 39, .55); }
.btn.is-busy { opacity: .7; pointer-events: none; }

/* ---------- البحث الفوري ---------- */
.table-search { position: relative; display: inline-flex; align-items: center; flex: 1 1 240px; max-width: 360px; }
.table-search .bi { position: absolute; right: 12px; color: var(--muted); pointer-events: none; }
.table-search input { padding-right: 36px !important; min-height: 40px !important; }
.list-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 1rem; }
.list-toolbar .grow { flex: 1; }
.tab-attached { border-top-left-radius: 0; border-top-right-radius: 0; border-top: 0; }
.tabs-card + .tab-panels > [data-tab-panel] > .card:first-child { border-top: 0; }
@media (max-width: 680px) { .table-search { max-width: none; flex-basis: 100%; } }
.mt-xs { margin-top: .35rem; }
.text-right { text-align: right; }
.big-score-inline { text-align: center; font-size: 2.2rem; font-weight: 800; color: var(--primary); line-height: 1.1; padding: .4rem 1.2rem; background: var(--primary-50); border-radius: 14px; }
.big-score-inline small { font-size: .9rem; color: var(--muted); margin-right: 3px; }
.big-score-inline span { display: block; font-size: .75rem; font-weight: 500; color: var(--muted); margin-top: 4px; }
.inline-status { display: inline-flex; gap: 6px; align-items: center; margin-inline-start: auto; }
.inline-status select { width: auto; min-height: 36px; padding: .3em .6em; font-size: .88rem; }
@media (max-width: 680px) { .inline-status { margin: 0; width: 100%; } .inline-status select { flex: 1; } }

.btn-group .table-search { min-width: 240px; }
@media (min-width: 681px) { .row-between.wrap > .btn-group { flex-wrap: nowrap; } }

/* ---------- عارض النص: المصحف والحديث ---------- */
.text-viewer { display: flex; flex-direction: column; }
.viewer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: .8rem; }
.viewer-tools { display: flex; align-items: center; gap: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 2px 4px; }
.viewer-pos { font-size: .82rem; font-weight: 700; color: var(--muted); padding: 0 .4rem; white-space: nowrap; }
.viewer-sep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }
.viewer-body {
  --viewer-scale: 1;
  max-height: 62vh; overflow-y: auto; padding: 1.1rem 1.3rem; border-radius: 12px;
  background: #fffdf6; border: 1px solid #eadfbf; box-shadow: inset 0 0 0 4px #fbf6e6, inset 0 0 0 5px #e6d6a5;
  transition: opacity .15s; scroll-behavior: smooth;
}
.viewer-body.is-loading { opacity: .45; }
.mushaf { font-family: 'Amiri Quran', 'Amiri', 'Traditional Arabic', serif; font-size: calc(1.55rem * var(--viewer-scale)); line-height: 2.35; text-align: justify; text-align-last: center; color: #1b1b1b; }
.mushaf .ayah { cursor: pointer; border-radius: 6px; padding: 0 2px; transition: background .12s; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.mushaf .ayah:hover { background: rgba(201, 162, 39, .14); }
.mushaf .ayah:focus-visible { outline: 2px solid var(--gold); }
.mushaf .ayah.is-start { background: rgba(15, 92, 77, .1); box-shadow: inset 0 -2px 0 var(--primary); }
.mushaf .ayah.is-selected { background: rgba(201, 162, 39, .3); }
.mushaf .ayah.has-err { text-decoration: underline wavy rgba(180, 35, 24, .75); text-decoration-thickness: 1px; text-underline-offset: 10px; }
.mushaf .ayah-no { color: var(--gold-600); font-size: .85em; white-space: nowrap; }
.surah-head { margin: .4rem 0 .2rem; text-align: center; }
.surah-head span { display: inline-block; min-width: 60%; padding: .1rem 1.5rem; font-size: .85em; font-weight: 700; color: var(--primary-700); background: linear-gradient(90deg, transparent, var(--gold-50) 15%, var(--gold-50) 85%, transparent); border-top: 1px solid #e6d6a5; border-bottom: 1px solid #e6d6a5; }
.basmala { text-align: center; font-size: .95em; color: var(--primary-700); }
.hadith-text { font-family: 'Amiri', 'Traditional Arabic', serif; font-size: calc(1.25rem * var(--viewer-scale)); line-height: 2.1; text-align: justify; }
.hadith-chapter { text-align: center; font-weight: 700; color: var(--primary-700); margin-bottom: .6rem; padding-bottom: .4rem; border-bottom: 1px dashed #e6d6a5; }
.hadith-item { cursor: pointer; border-radius: 8px; padding: .2rem .4rem; }
.hadith-item:hover { background: rgba(201, 162, 39, .08); }
.hadith-item p { margin: 0 0 .6rem; }
.hadith-item .hadith-note { font-size: .85em; color: var(--muted); border-right: 3px solid var(--gold-50); padding-right: .7rem; }
.hadith-no { float: right; margin-left: .6rem; min-width: 2.2em; height: 2.2em; padding: 0 .4em; border-radius: 999px; display: inline-grid; place-items: center; background: var(--primary); color: #fff; font-family: var(--font); font-size: .7em; font-weight: 800; line-height: 1; }
.viewer-hint { margin: .5rem 0 0; min-height: 1.2em; }
.text-viewer.is-full { position: fixed; inset: 12px; z-index: 90; margin: 0; box-shadow: 0 0 0 100vmax rgba(10, 30, 26, .55), var(--shadow-lg); }
.text-viewer.is-full .viewer-body { max-height: none; flex: 1; }
.text-viewer.is-full .mushaf { font-size: calc(2rem * var(--viewer-scale)); }
@media (max-width: 680px) {
  .viewer-body { max-height: 55vh; padding: .8rem; }
  .mushaf { font-size: calc(1.3rem * var(--viewer-scale)); line-height: 2.2; }
  .text-viewer.is-full { inset: 0; border-radius: 0; }
}
.panel-main { min-width: 0; }
.eval-col, .text-viewer { min-width: 0; }
.viewer-tools { flex-wrap: wrap; }

/* ---------- الدورات السنوية ---------- */
.edition-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 14px; border-radius: 999px; background: rgba(201, 162, 39, .16); color: var(--gold-600); border: 1px solid rgba(201, 162, 39, .35); font-weight: 700; font-size: .9rem; }
.hero .edition-chip { background: rgba(255, 255, 255, .12); color: #f3dc8c; border-color: rgba(243, 220, 140, .4); margin-bottom: .6rem; }
.page-hero .edition-chip { background: rgba(255, 255, 255, .12); color: #f3dc8c; border-color: rgba(243, 220, 140, .4); }
.edition-switch { display: flex; align-items: center; gap: 6px; color: var(--primary); }
.edition-switch select { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--primary-50); color: var(--primary-700); font: inherit; font-weight: 700; font-size: .85rem; max-width: 230px; }
.archive-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: .7rem 1rem; margin-bottom: 1rem; border-radius: 10px; background: var(--gold-50); border: 1px solid rgba(201, 162, 39, .4); color: #6b5208; }
.archive-banner a { font-weight: 700; margin-inline-start: auto; }
@media (max-width: 680px) { .edition-switch select { max-width: 130px; } .topbar h1 { display: none; } }

/* ---------- الشهادات ---------- */
.kv > div { display: contents; }
.row-muted td { opacity: .55; }
.bulk-bar .grow { flex: 1; }
.verify-result { display: flex; align-items: center; gap: 1rem; padding: 1.2rem 1.4rem; border-radius: 14px; margin-bottom: 1.25rem; }
.verify-result > .bi { font-size: 2.4rem; }
.verify-result strong { display: block; font-size: 1.2rem; }
.verify-result span { color: inherit; opacity: .85; }
.verify-result.is-valid { background: #e5f5ec; color: #11633a; border: 1px solid #b6e0c7; }
.verify-result.is-invalid { background: #fdecec; color: #9b1c1c; border: 1px solid #f3c1c1; }
.verify-form label { font-weight: 700; display: block; margin-bottom: .4rem; }
.input-group { display: flex; gap: .5rem; margin-bottom: .4rem; }
.input-group input { flex: 1; letter-spacing: 2px; font-family: monospace; font-size: 1.1rem; }
.cert-card-link { display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; border-radius: 10px; background: var(--gold-50); border: 1px solid rgba(201, 162, 39, .35); color: #6b5208; font-weight: 700; margin-top: .8rem; }
.cert-card-link .bi { font-size: 1.4rem; color: var(--gold); }

/* ---------- صور المتسابقين ---------- */
.avatar-photo { object-fit: cover; padding: 0; background: var(--primary-50); }
.avatar-lg { width: 56px; height: 56px; font-size: 1.4rem; flex: none; }
.avatar-xl { width: 120px; height: 120px; font-size: 2.6rem; }
.avatar-btn { position: relative; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50%; flex: none; }
.avatar-btn > span { position: absolute; bottom: -2px; left: -2px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: #fff; font-size: .75rem; border: 2px solid #fff; }
.profile-head .avatar-lg { width: 64px; height: 64px; }
.photo-pick { display: flex; flex-direction: column; align-items: center; gap: .8rem; text-align: center; }
.eval-photo { width: 72px; height: 72px; border-radius: 14px; object-fit: cover; flex: none; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); font-size: 1.8rem; font-weight: 800; border: 2px solid var(--gold); }
.eval-header .grow { flex: 1; min-width: 220px; }
.contestant-card header { display: flex; align-items: flex-start; gap: .8rem; }

/* ---------- شاشة العرض ---------- */
.screen-ctl { display: flex; flex-direction: column; gap: .3rem; border-right: 5px solid var(--border); padding-block: .9rem; }
.screen-ctl.is-live { border-right-color: #1f9d55; background: linear-gradient(90deg, #fff, #effaf3); }
.screen-ctl strong .bi { color: var(--gold); }
.screen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 1.25rem; margin-bottom: 1rem; }
.screen-grid > .card { margin: 0; display: flex; flex-direction: column; gap: .6rem; }
.screen-preview { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background: #062e27; border: 1px solid var(--border); }
.screen-preview iframe { position: absolute; top: 0; left: 0; width: 400%; height: 400%; border: 0; transform: scale(.25); transform-origin: 0 0; pointer-events: none; }
.copy-row { display: flex; gap: .4rem; }
.copy-row input { flex: 1; min-width: 0; font-size: .8rem; }
.filters .grow { flex: 1; min-width: 180px; }

/* ---------- ملف المؤسسة ---------- */
.org-head { display: flex; align-items: center; flex-wrap: wrap; gap: 1.2rem; }
.org-head-logo { width: 84px; height: 84px; object-fit: contain; }
.org-head h2 { margin: 0 0 .2rem; color: var(--primary-700); }
.org-head .progress { max-width: 360px; }
.identity { display: flex; gap: 2rem; align-items: flex-start; flex-wrap: wrap; }
.identity-preview { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 1.2rem; border: 1px dashed var(--border); border-radius: 14px; background: repeating-conic-gradient(#f3f4f1 0 25%, #fff 0 50%) 0 0 / 18px 18px; }
.identity-preview img { width: 150px; height: 150px; object-fit: contain; }
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: .8rem; }
.member-card { display: flex; align-items: center; gap: .8rem; padding: .8rem; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.member-card img, .member-card .member-initial { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none; }
.member-card .grow { display: flex; flex-direction: column; min-width: 0; }
.member-initial { display: grid; place-items: center; background: linear-gradient(135deg, var(--gold), #e8cf7a); color: #3d2e00; font-weight: 800; font-size: 1.3rem; }
.sponsor-thumb { width: 64px; height: 40px; object-fit: contain; }

/* صفحة عن المؤسسة */
.org-hero-inner { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.org-hero-inner > div { flex: 1; min-width: 220px; }
.org-hero-logo { width: 96px; height: 96px; object-fit: contain; background: rgba(255, 255, 255, .92); border-radius: 22px; padding: 8px; }
.org-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 2.5rem; }
.org-stats > div { text-align: center; padding: 1.2rem .5rem; border-radius: var(--radius); background: linear-gradient(135deg, var(--primary-50), #fff); border: 1px solid var(--primary-100); }
.org-stats strong { display: block; font-size: 2rem; color: var(--primary-700); }
.org-stats span { color: var(--muted); }
.org-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); gap: 2rem; align-items: start; }
.org-facts dt .bi { color: var(--gold); }
.mt-lg { margin-top: 2.6rem; }
.goals-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .2rem 1.5rem; }
.value-chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.value-chips span { padding: .5rem 1rem; border-radius: 999px; background: var(--gold-50); border: 1px solid rgba(201, 162, 39, .35); color: #6b5208; font-weight: 700; }
.edition-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: .8rem; }
.edition-item { display: flex; flex-direction: column; gap: .15rem; padding: 1rem; border-radius: 12px; border: 1px solid var(--border); border-top: 4px solid var(--gold); background: #fff; }
.edition-item strong { color: var(--primary-700); font-size: 1.1rem; }
.edition-nums { margin-top: .3rem; color: var(--muted); font-size: .9rem; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.check-list .bi { color: var(--primary); }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 1rem; }
.team-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .3rem; padding: 1.2rem .8rem; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.team-card img, .team-card .member-initial { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold-50); font-size: 2rem; }
.team-card span { color: var(--muted); font-size: .9rem; }
.sponsor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 1rem; }
.sponsor-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .35rem; padding: 1.1rem; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; color: inherit; transition: transform .15s, box-shadow .15s; }
a.sponsor-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: inherit; }
.sponsor-card img { height: 64px; max-width: 100%; object-fit: contain; }
.sponsor-card > .bi { font-size: 2.2rem; color: var(--primary); }
.sponsor-card small { color: var(--gold-600); font-weight: 700; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: .8rem; }
.contact-item { display: flex; gap: .8rem; align-items: flex-start; padding: .9rem 1rem; border-radius: 12px; background: #fff; border: 1px solid var(--border); }
.contact-item > .bi { font-size: 1.3rem; color: var(--primary); }
.contact-item small { display: block; color: var(--muted); }
.contact-item a, .contact-item span { font-weight: 700; word-break: break-word; }
.social-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.social-row a { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--primary); color: #fff; font-size: 1.2rem; }
.social-row a:hover { background: var(--gold); color: #3d2e00; }
.footer-social { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.footer-social a { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(255, 255, 255, .1); color: #fff; }
.footer-social a:hover { background: var(--gold); color: #3d2e00; }
.print-only { display: none; }
@media (max-width: 820px) { .org-grid, .goals-2 { grid-template-columns: 1fr; } .org-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media print {
  .public .site-header, .public .site-footer, .no-print { display: none !important; }
  .org-hero { background: #0a3f35 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; padding: 1.2rem 0; }
  .org-profile { padding-top: 1rem; }
  .org-profile .section-heading { break-after: avoid; font-size: 1.4rem; }
  .team-card, .sponsor-card, .contact-item, .edition-item { break-inside: avoid; }
  .social-row a { width: auto; height: auto; padding: 4px 8px; gap: 4px; display: inline-flex; background: none; color: var(--primary); border: 1px solid var(--border); }
  .print-only { display: inline; font-size: .8rem; }
  @page { size: A4; margin: 12mm; }
}

/* ---------- دليل المستخدم ---------- */
.guide { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.guide-toc { position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow: auto; padding: 1rem; margin: 0; }
.guide-toc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; color: var(--primary-700); }
.guide-toc .table-search { width: 100%; margin-bottom: .4rem; }
.guide-toc .menu-label { color: var(--muted); font-size: .78rem; font-weight: 700; margin: .9rem .4rem .3rem; }
.guide-toc nav a { display: flex; gap: .5rem; align-items: center; padding: .4rem .6rem; border-radius: 8px; color: #33433f; font-size: .92rem; }
.guide-toc nav a .bi { color: var(--gold-600); }
.guide-toc nav a:hover, .guide-toc nav a.active { background: var(--primary-50); color: var(--primary-700); font-weight: 700; }
.guide-intro h2 { margin: 0 0 .4rem; color: var(--primary-700); font-size: 1.3rem; }
.guide-section { scroll-margin-top: 80px; }
.guide-section header { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; border-bottom: 1px solid var(--border); padding-bottom: .7rem; margin-bottom: .9rem; }
.guide-section h3 { margin: 0; flex: 1; color: var(--primary-700); font-size: 1.15rem; }
.guide-section h3 .bi { color: var(--gold); }
.guide-no { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--primary); color: #fff; font-weight: 800; font-size: .9rem; }
.guide-content { line-height: 1.95; }
.guide-content h4 { margin: 1rem 0 .3rem; color: var(--primary); font-size: 1rem; }
.guide-content ul, .guide-content ol { padding-inline-start: 1.3rem; margin: .4rem 0; }
.guide-content ol.steps { list-style: none; padding: 0; counter-reset: st; display: grid; gap: .45rem; }
.guide-content ol.steps li { counter-increment: st; position: relative; padding: .55rem .9rem .55rem .9rem; padding-inline-start: 2.8rem; background: #fafaf7; border: 1px solid var(--border); border-radius: 10px; }
.guide-content ol.steps li::before { content: counter(st); position: absolute; inset-inline-start: .7rem; top: .6rem; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #3d2e00; font-weight: 800; font-size: .8rem; }
.guide-content ol.steps a { font-weight: 700; margin-inline-start: .3rem; }
.guide-content .tip { margin-top: .9rem; padding: .7rem 1rem; border-radius: 10px; background: var(--gold-50); border-inline-start: 4px solid var(--gold); color: #5c4707; }
.guide-content .kbd { display: inline-block; min-width: 1.6em; padding: 0 .4em; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; background: #fff; font-family: monospace; text-align: center; }
.guide-content .faq dt { font-weight: 800; color: var(--primary-700); margin-top: .8rem; }
.guide-content .faq dd { margin: .2rem 0 0; }
.guide-content table { margin: .5rem 0; }
.guide-section.flash { animation: guideFlash 1.6s ease; }
@keyframes guideFlash { 0%, 40% { box-shadow: 0 0 0 3px var(--gold); } }
.help-btn { color: var(--primary); }
@media (max-width: 980px) { .guide { grid-template-columns: 1fr; } .guide-toc { position: static; max-height: none; } }
@media print {
  .panel .sidebar, .panel .topbar, .guide-toc, .panel-footer { display: none !important; }
  .guide { display: block; }
  .guide-section { break-inside: avoid-page; box-shadow: none; border: 1px solid #ddd; }
}
.hint-list { padding-inline-start: 1.1rem; margin: 0 0 .8rem; font-size: .86rem; line-height: 1.9; }
.hint-list li { margin-bottom: .45rem; }
