/* ===== جمعية رابطة آل بيطار وخزعل ===== */
:root {
    --black: #0e0e0c;
    --black-2: #1a1915;
    --gold: #c9a24a;
    --gold-light: #e9cf86;
    --gold-dark: #9a7a2e;
    --green: #2f5d34;
    --green-light: #e7f0e4;
    --red: #c8102e;
    --bg: #f7f4ec;
    --card: #ffffff;
    --text: #1e1d1a;
    --muted: #6d6a60;
    --border: #e5ddc8;
    --radius: 14px;
    --shadow: 0 6px 24px rgba(20, 16, 4, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Cairo', Tahoma, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 16px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
main { flex: 1; }
a { color: var(--gold-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.35; margin: 0 0 .6em; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 560px; }
.medium { max-width: 860px; }
[hidden] { display: none !important; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 22px; border-radius: 10px; border: 1px solid transparent;
    background: var(--black); color: #fff; font: inherit; font-weight: 700;
    cursor: pointer; transition: .2s; text-decoration: none !important; white-space: nowrap;
}
.btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-gold { background: linear-gradient(135deg, var(--gold-light), var(--gold) 55%, var(--gold-dark)); color: #1b1505; }
.btn-green { background: var(--green); }
.btn-red { background: var(--red); }
.btn-outline { background: transparent; border-color: currentColor; color: var(--gold-dark); }
.btn-light { background: #fff; color: var(--text); border-color: var(--border); }
.btn-sm { padding: 6px 14px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-link { background: none; border: none; color: var(--gold-dark); font: inherit; cursor: pointer; padding: 0; font-weight: 600; }
.btn-link:disabled { color: var(--muted); cursor: default; }

/* ---------- Header ---------- */
.site-header {
    background: var(--black);
    border-bottom: 2px solid var(--gold);
    position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none !important; }
.brand img { width: 52px; height: 52px; object-fit: contain; }
.brand strong { display: block; color: var(--gold-light); font-size: 17px; }
.brand small { display: block; color: #bdb49c; font-size: 12px; margin-top: -4px; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a:not(.btn) { color: #e8e2d0; padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: 15px; text-decoration: none; }
.main-nav a:not(.btn):hover, .main-nav a.active { color: var(--gold-light); background: rgba(201, 162, 74, .12); }
.main-nav .nav-account { color: var(--gold-light) !important; }
.main-nav .nav-muted { color: #9d9684 !important; }
.nav-sep { width: 1px; height: 24px; background: #3a372e; margin: 0 6px; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 26px; height: 2px; background: var(--gold); margin: 6px 0; transition: .2s; }

@media (max-width: 960px) {
    .nav-toggle { display: block; }
    .main-nav {
        display: none; position: absolute; top: 100%; right: 0; left: 0;
        flex-direction: column; align-items: stretch; background: var(--black);
        padding: 12px 20px 20px; border-bottom: 2px solid var(--gold);
    }
    .main-nav.open { display: flex; }
    .nav-sep { width: 100%; height: 1px; margin: 6px 0; }
    .main-nav .btn { margin-top: 6px; }
}

/* ---------- Hero ---------- */
.hero {
    position: relative; overflow: hidden;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(201,162,74,.22), transparent 55%),
        radial-gradient(ellipse at 85% 80%, rgba(47,93,52,.35), transparent 50%),
        linear-gradient(160deg, #0b0b09, #1d1b15 60%, #0b0b09);
    color: #fff; padding: 64px 0 80px;
}
.hero::after {
    content: ''; position: absolute; inset: auto 0 0 0; height: 5px;
    background: linear-gradient(90deg, var(--red) 0 25%, #fff 25% 75%, var(--red) 75%);
    opacity: .85;
}
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 40px; }
.hero h1 { font-family: 'Amiri', 'Cairo', serif; font-size: clamp(32px, 5vw, 54px); color: var(--gold-light); margin-bottom: 8px; }
.hero .kicker { display: inline-block; color: var(--gold); border: 1px solid rgba(201,162,74,.5); border-radius: 30px; padding: 3px 16px; font-size: 14px; margin-bottom: 18px; }
.hero p.lead { font-size: 19px; color: #ddd6c2; max-width: 560px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero-actions .btn-outline { color: var(--gold-light); }
.hero-logo { text-align: center; }
.hero-logo img { width: min(420px, 90%); filter: drop-shadow(0 10px 40px rgba(201,162,74,.25)); }
@media (max-width: 820px) {
    .hero { padding: 40px 0 60px; text-align: center; }
    .hero-inner { grid-template-columns: 1fr; }
    .hero-logo { order: -1; }
    .hero-logo img { width: 260px; }
    .hero p.lead { margin: 0 auto; }
    .hero-actions { justify-content: center; }
}

/* ---------- Sections ---------- */
.section { padding: 70px 0; }
.section-alt { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: 32px; margin-bottom: 6px; }
.section-title h2::after {
    content: ''; display: block; width: 70px; height: 3px; margin: 12px auto 0;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold-light), var(--gold-dark)); border-radius: 3px;
}
.section-title p { color: var(--muted); margin: 0; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.about-grid .about-text p { font-size: 17px; }
.stat-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.stat {
    background: var(--black); color: #fff; border-radius: var(--radius); padding: 22px 12px; text-align: center;
    border: 1px solid var(--gold-dark);
}
.stat b { display: block; font-size: 28px; color: var(--gold-light); }
.stat span { color: #cfc7b1; font-size: 14px; }
@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; } }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.feature {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 26px; box-shadow: var(--shadow); transition: .2s;
}
.feature:hover { transform: translateY(-3px); border-color: var(--gold); }
.feature .icon {
    width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center;
    background: var(--green-light); color: var(--green); margin-bottom: 14px;
}
.feature .icon svg { width: 26px; height: 26px; }
.feature h3 { font-size: 19px; }
.feature p { color: var(--muted); margin: 0; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.step { text-align: center; padding: 20px 14px; position: relative; }
.step::before {
    counter-increment: step; content: counter(step);
    display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 12px;
    border-radius: 50%; background: var(--black); color: var(--gold-light); font-weight: 800; font-size: 22px;
    border: 2px solid var(--gold);
}
.step h3 { font-size: 17px; margin-bottom: 4px; }
.step p { color: var(--muted); font-size: 14px; margin: 0; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr 1fr; } }

.cta-band {
    background: linear-gradient(135deg, var(--black), #26231a); color: #fff;
    border-radius: 20px; padding: 40px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
    border: 1px solid var(--gold-dark); flex-wrap: wrap;
}
.cta-band h2 { color: var(--gold-light); margin: 0 0 4px; }
.cta-band p { margin: 0; color: #d5cdb6; }

.empty-news { text-align: center; color: var(--muted); padding: 40px; border: 2px dashed var(--border); border-radius: var(--radius); background: #fff; }

.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.contact-item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; }
.contact-item b { display: block; color: var(--gold-dark); margin-bottom: 4px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--black); color: #cfc7b1; border-top: 2px solid var(--gold); margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 28px 20px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { width: 56px; }
.footer-brand strong { display: block; color: var(--gold-light); }
.footer-brand small { color: #9d9684; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: #cfc7b1; }
.footer-copy { text-align: center; border-top: 1px solid #2c2a23; padding: 14px; font-size: 13px; color: #8d8672; }

/* ---------- Cards / Forms ---------- */
.page { padding: 40px 0 20px; }
.card {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 28px; box-shadow: var(--shadow); margin-bottom: 20px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.auth-card { text-align: center; }
.auth-card .auth-logo { width: 110px; margin-bottom: 6px; }
.auth-card form { text-align: right; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.mt { margin-top: 18px; }

.form-head { text-align: center; border-bottom: 1px solid var(--border); padding-bottom: 18px; margin-bottom: 24px; }
.form-head img { width: 90px; }
.form-head h1 { font-size: 26px; margin: 4px 0; }
.form-head p { margin: 0; color: var(--muted); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.span-2 { grid-column: span 2; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } .span-2 { grid-column: auto; } }

.form-label { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.name-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.name-row .field > label { font-weight: 600; font-size: 13px; color: var(--muted); }
.name-row-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 640px) { .name-row, .name-row-2 { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.field > label { font-weight: 700; font-size: 15px; }
.req { color: var(--red); }
.verified { color: var(--green); font-size: 13px; font-weight: 600; }
input, select, textarea {
    font: inherit; width: 100%; padding: 11px 14px; border: 1px solid #d8cfb8; border-radius: 10px;
    background: #fffdf8; color: var(--text); transition: .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,74,.2); background: #fff; }
input:disabled { background: #f1ede2; color: var(--muted); }
.has-error input, .has-error textarea, .has-error select { border-color: var(--red); }
.field-error { color: var(--red); font-size: 13px; }
.radio-group { display: flex; gap: 12px; flex-wrap: wrap; }
.radio, .check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; }
.radio { border: 1px solid #d8cfb8; border-radius: 10px; padding: 8px 18px; background: #fffdf8; }
.radio input, .check input { width: auto; accent-color: var(--green); transform: scale(1.2); }
.radio:has(input:checked) { border-color: var(--green); background: var(--green-light); }
.pledge { background: #fbf6e8; border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; margin-top: 22px; }
.form-section-title { font-size: 18px; margin: 28px 0 14px; padding-top: 18px; border-top: 1px dashed var(--border); }
.form-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

.phone-input { display: flex; direction: ltr; }
.phone-input span { display: grid; place-items: center; padding: 0 14px; background: #efe8d6; border: 1px solid #d8cfb8; border-left: 0; border-radius: 10px 0 0 10px; font-weight: 700; }
.phone-input input { border-radius: 0 10px 10px 0; min-width: 0; flex: 1; }
.phone-input .phone-cc {
    width: 200px; flex: 0 0 200px; border-radius: 10px 0 0 10px; border-right: 0;
    background: #efe8d6; font-weight: 700; font-size: 15px; padding: 11px 8px; direction: ltr; cursor: pointer;
}
.phone-input input { min-width: 120px; }
@media (max-width: 480px) {
    .phone-input .phone-cc { width: 160px; flex-basis: 160px; font-size: 14px; padding: 11px 4px; }
}
.phone-hint { font-size: 13px; color: var(--muted); }
.otp-input { text-align: center; letter-spacing: 12px; font-size: 28px; font-weight: 800; direction: ltr; }

.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; border: 1px solid; }
.alert-success { background: #e9f5e6; border-color: #b7d8ae; color: #1f4d24; }
.alert-error { background: #fdecec; border-color: #f2b8b8; color: #8b1c1c; }
.alert-warning { background: #fff6e0; border-color: #f0d68e; color: #7a5a06; }
.alert-info { background: #e8f1fb; border-color: #b6d0ee; color: #1d4570; }

/* ---------- Badges / Tables ---------- */
.badge { display: inline-block; padding: 3px 12px; border-radius: 30px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.badge-pending { background: #fff3d1; color: #8a6200; }
.badge-on_hold { background: #e5e9f5; color: #34457a; }
.badge-approved { background: #dff0da; color: #22562a; }
.badge-rejected { background: #fbe0e0; color: #8f1d1d; }
.badge-paper { background: #efe6d0; color: #6b5310; border: 1px dashed #b89c52; }

.status-hero { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.status-hero .badge { font-size: 17px; padding: 6px 20px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 12px; text-align: right; border-bottom: 1px solid #eee7d6; vertical-align: top; }
th { background: #faf6ea; font-size: 14px; color: #5d5647; white-space: nowrap; }
tr:hover td { background: #fffcf3; }
.dl { display: grid; grid-template-columns: 180px 1fr; }
.dl > div { padding: 10px 0; border-bottom: 1px solid #f0eadb; }
.dl > div:nth-child(odd) { color: var(--muted); font-weight: 600; }
@media (max-width: 560px) { .dl { grid-template-columns: 1fr; } .dl > div:nth-child(odd) { border: 0; padding-bottom: 0; } }

/* ---------- Admin ---------- */
.admin-body { background: #f3f1ea; }
.admin-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.admin-side { background: var(--black); color: #cfc7b1; padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-side .brand { margin-bottom: 26px; padding: 0 6px; }
.admin-side nav a { display: flex; align-items: center; gap: 10px; color: #d9d2bd; padding: 10px 12px; border-radius: 9px; font-weight: 600; margin-bottom: 2px; text-decoration: none; }
.admin-side nav a:hover, .admin-side nav a.active { background: rgba(201,162,74,.15); color: var(--gold-light); }
.admin-side nav .count { margin-inline-start: auto; background: var(--gold); color: #1b1505; border-radius: 20px; font-size: 12px; padding: 0 8px; font-weight: 800; }
.admin-side .who { border-top: 1px solid #2c2a23; margin-top: 20px; padding: 14px 8px 0; font-size: 14px; }
.admin-main { padding: 26px 30px; min-width: 0; }
.admin-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }
.admin-top h1 { font-size: 24px; margin: 0; }
.admin-menu-btn { display: none; }
@media (max-width: 900px) {
    .admin-shell { grid-template-columns: 1fr; }
    .admin-side { position: fixed; inset: 0 0 0 auto; width: 260px; z-index: 60; transform: translateX(100%); transition: .25s; }
    .admin-side.open { transform: none; box-shadow: -10px 0 40px rgba(0,0,0,.4); }
    .admin-main { padding: 18px 14px; }
    .admin-menu-btn { display: inline-flex; }
}
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: block; color: inherit; text-decoration: none !important; border-top: 4px solid var(--gold); }
.kpi b { font-size: 30px; display: block; }
.kpi span { color: var(--muted); font-weight: 600; }
.kpi.k-pending { border-top-color: #e0a800; }
.kpi.k-on_hold { border-top-color: #5a6fb0; }
.kpi.k-approved { border-top-color: var(--green); }
.kpi.k-rejected { border-top-color: var(--red); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs a { padding: 7px 14px; border-radius: 30px; background: #fff; border: 1px solid var(--border); color: var(--text); font-weight: 600; font-size: 14px; text-decoration: none; }
.tabs a.active { background: var(--black); color: var(--gold-light); border-color: var(--black); }
.tabs a small { color: var(--muted); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input { max-width: 320px; }
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 5px 12px; border-radius: 8px; border: 1px solid var(--border); background: #fff; }
.pagination .current { background: var(--black); color: var(--gold-light); }
.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .grid-2 { grid-template-columns: 1fr; } }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 22px 16px 0; border-right: 2px solid #eadfc2; }
.timeline li::before { content: ''; position: absolute; right: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); border: 2px solid #fff; }
.timeline li.t-status_changed::before { background: var(--green); }
.timeline li.t-created::before { background: var(--black); }
.timeline .t-meta { font-size: 13px; color: var(--muted); }
.timeline .t-change { font-size: 14px; background: #faf7ee; border-radius: 8px; padding: 6px 10px; margin-top: 4px; }
.timeline del { color: #a33; }
.timeline ins { color: #1f5e27; text-decoration: none; font-weight: 600; }

.note { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; background: #fffdf6; }
.note .t-meta { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.perm-list { display: grid; gap: 8px; }
.perm-list .check { font-weight: 500; }

/* ---------- Eligibility / Documents ---------- */
.eligibility {
    background: #f4f8f0; border: 1px solid #c9dcbf; border-right: 4px solid var(--green);
    border-radius: 10px; padding: 12px 16px; margin: 0 0 18px; color: #24411f; line-height: 1.9; text-align: right;
}
.eligibility b { color: var(--green); }
.doc-section { background: #fbf8ef; border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.doc-status { font-size: 14px; color: var(--green); font-weight: 600; }
.doc-slot input[type="file"] { background: #fff; }
.doc-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 10px; }
.doc-thumb { border: 1px solid var(--border); border-radius: 10px; padding: 8px; background: #fff; text-align: center; font-size: 13px; }
.doc-thumb img { width: 100%; height: 150px; object-fit: contain; background: #f4f1e8; border-radius: 6px; display: block; margin-bottom: 6px; }
.doc-thumb .pdf { display: grid; place-items: center; height: 150px; background: #f4f1e8; border-radius: 6px; font-weight: 800; color: var(--red); margin-bottom: 6px; }
.doc-missing { color: var(--red); font-weight: 700; }
.photo-box { flex-direction: row; align-items: center; gap: 18px; }
.photo-preview {
    flex: 0 0 120px; width: 120px; height: 150px; border-radius: 14px; overflow: hidden;
    background: #efe8d6; border: 2px dashed #cdbf9b; display: grid; place-items: center;
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-preview span { font-size: 54px; opacity: .5; }
.photo-input { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
@media (max-width: 480px) { .photo-box { flex-direction: column; align-items: stretch; } .photo-preview { margin: 0 auto; } }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); vertical-align: middle; background: #efe8d6; }
.avatar-lg { width: 110px; height: 138px; border-radius: 14px; object-fit: cover; border: 3px solid var(--gold); box-shadow: var(--shadow); }
.avatar-none { display: inline-grid; place-items: center; color: #b9ad8c; font-size: 20px; }

/* ---------- AI import ---------- */
.ai-review { border-color: var(--gold); }
.ai-source { display: block; width: 100%; max-height: 640px; object-fit: contain; background: #f4f1e8; border: 1px solid var(--border); border-radius: 10px; }
iframe.ai-source { height: 640px; }

/* ---------- Contact ---------- */
.contact-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 820px) { .contact-layout { grid-template-columns: 1fr; } }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.msg-body { white-space: pre-wrap; background: #faf7ee; border: 1px solid var(--border); border-radius: 10px; padding: 16px; line-height: 1.9; }
tr.msg-new td { font-weight: 700; }
.reply-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Security log ---------- */
.sec-log tr.lvl-warn td { background: #fffaf0; }
.sec-log tr.lvl-danger td { background: #fdf0f0; }
.sec-log tr.lvl-danger td:nth-child(2) { color: var(--red); font-weight: 700; }
.admin-alert { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- Posts ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.post-card {
    display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; color: inherit; text-decoration: none !important; box-shadow: var(--shadow); transition: .2s;
}
.post-card:hover { transform: translateY(-3px); border-color: var(--gold); }
.post-card-img { position: relative; aspect-ratio: 16 / 10; background: var(--black); }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card-img img.placeholder { object-fit: contain; padding: 18px; opacity: .85; }
.post-card-body { padding: 16px 18px 20px; }
.post-card-body h3 { font-size: 18px; margin: 4px 0 6px; }
.post-card-body p { color: var(--muted); margin: 0; font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-meta { color: var(--muted); font-size: 13px; }
.post-type { display: inline-block; padding: 2px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.post-card-img .post-type { position: absolute; top: 10px; right: 10px; }
.post-type-news { background: var(--gold); color: #1b1505; }
.post-type-activity { background: var(--green); color: #fff; }
.post-cat { display: inline-block; padding: 2px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; color: #fff; }
.post-cat.on-img { position: absolute; top: 10px; right: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.post-cat-1 { background: var(--gold); color: #1b1505; }
.post-cat-2 { background: var(--green); }
.post-cat-3 { background: #b4446c; }
.post-cat-4 { background: #3d5a8a; }
.post-cat-5 { background: #6b4f9e; }
.post-cat-6 { background: #4a4a4a; }
.read-more { display: inline-block; margin-top: 10px; color: var(--gold-dark); font-weight: 700; font-size: 14px; }
.post-card:hover .read-more { text-decoration: underline; }
.news-tabs { justify-content: center; margin-bottom: 24px; }
.cat-row { display: grid; grid-template-columns: 1fr 90px 90px 80px auto; gap: 10px; align-items: center; padding: 10px 12px; }
.cat-row .cat-name { display: flex; align-items: center; gap: 8px; }
.cat-row .cat-name .post-cat { flex: 0 0 auto; }
.cat-row .cat-active { justify-content: center; }
.cat-row .cat-count { text-align: center; }
.cat-row .cat-actions { display: flex; gap: 6px; }
@media (max-width: 700px) { .cat-row { grid-template-columns: 1fr 70px 50px; } .cat-row .cat-count { display: none; } .cat-row .cat-actions { grid-column: 1 / -1; } }
.post-lock { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,.7); color: var(--gold-light); font-size: 12px; padding: 2px 10px; border-radius: 20px; }
.post-article h1 { font-size: clamp(24px, 4vw, 34px); margin: 10px 0 16px; }
.post-article .post-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.post-cover { width: 100%; border-radius: 12px; margin-bottom: 18px; }
.lead-text { font-size: 18px; color: #4a463b; font-weight: 600; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gallery a { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 10px; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: .3s; }
.gallery a:hover img { transform: scale(1.06); }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(0,0,0,.92); }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 8px; }
.lightbox button { position: fixed; background: rgba(255,255,255,.12); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 26px; cursor: pointer; }
.lightbox button:hover { background: rgba(255,255,255,.25); }
.lb-close { top: 16px; left: 16px; font-size: 20px !important; }
.lb-prev { right: 16px; top: 50%; }
.lb-next { left: 16px; top: 50%; }
.admin-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.admin-gallery-item { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; text-align: center; padding-bottom: 8px; background: #fff; }
.admin-gallery-item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; margin-bottom: 8px; }

/* ---------- Rich text / Modal ---------- */
.rich-text { font-size: 16px; line-height: 2; }
.rich-text h3 { font-size: 18px; margin: 22px 0 6px; color: var(--gold-dark); }
.rich-text p { margin: 0 0 12px; }
.modal {
    width: min(760px, calc(100% - 24px)); max-height: 88vh; padding: 0; border: 1px solid var(--gold-dark);
    border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.4); display: none; flex-direction: column;
    color: var(--text); background: #fff;
}
.modal[open] { display: flex; }
.modal::backdrop { background: rgba(10, 9, 6, .65); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; background: var(--black); color: var(--gold-light); }
.modal-head h2 { margin: 0; font-size: 19px; }
.modal-close { background: none; border: 0; color: #fff; font-size: 20px; cursor: pointer; }
.modal-body { padding: 18px 22px; overflow-y: auto; flex: 1; }
.modal-foot { display: flex; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.check input:disabled + span { opacity: .75; }

@media print {
    .site-header, .site-footer, .admin-side, .no-print, .admin-top .btn { display: none !important; }
    .admin-shell { display: block; }
    .card { box-shadow: none; border: 0; }
    body { background: #fff; }
}
