:root {
    --bg: #0d0d0d;
    --bg2: #141414;
    --card: #1a1a1a;
    --card-hover: #212121;
    --border: #2a2a2a;
    --red: #e63946;
    --red-dark: #c1121f;
    --text: #f0f0f0;
    --text-muted: #888;
    --accent: #e63946;
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    min-height: 100vh;
}

/* ── NAVBAR ─────────────────────────────────────────── */
.navbar {
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}
.navbar-brand span { color: var(--red); }
.navbar-brand svg { width: 26px; height: 26px; fill: var(--red); flex-shrink: 0; }

.navbar-links { display: flex; align-items: center; gap: 1rem; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .15s ease;
    font-family: inherit;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--text-muted); color: var(--text); }
.btn-danger { background: #7f1d1d; color: #fca5a5; }
.btn-danger:hover { background: #991b1b; }
.btn-sm { padding: 5px 12px; font-size: 0.8rem; }
.btn-block { width: 100%; justify-content: center; padding: 12px; font-size: 1rem; }

/* ── HERO ────────────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, #1a0a0a 0%, #0d0d0d 60%);
    padding: 2.5rem 2rem 2rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}
.hero h1 { font-size: 2.4rem; font-weight: 800; margin-bottom: .5rem; letter-spacing: -.03em; }
.hero h1 span { color: var(--red); }
.hero p { color: var(--text-muted); font-size: 1rem; max-width: 520px; margin: 0 auto; }
.hero-underline { display: none; }

.cat-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    font-size: .8rem;
    color: var(--text-muted);
    margin-bottom: .9rem;
    flex-wrap: wrap;
}
.cat-breadcrumb a { color: var(--text-muted); text-decoration: none; }
.cat-breadcrumb a:hover { color: var(--text); }
.cat-breadcrumb-current { color: var(--red); font-weight: 600; }

/* ── CATEGORY TABS BAR ───────────────────────────────── */
.cattabs-wrap {
    position: sticky;
    top: 64px;
    z-index: 90;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
}

.cattabs-bar {
    display: flex;
    align-items: stretch;
    justify-content: center;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 auto;
    padding: 0 1.5rem;
    gap: 0;
}
.cattabs-bar::-webkit-scrollbar { display: none; }

.cattab {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .9rem 1.1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: color .15s, border-color .15s;
    font-family: inherit;
    flex-shrink: 0;
    text-decoration: none;
}
.cattab:hover { color: var(--text); }
.cattab.active { color: var(--red); border-bottom-color: var(--red); }
.cattab-icon { font-size: 1rem; }

.cattab-chevron {
    width: 10px;
    height: 10px;
    stroke: currentColor;
    margin-left: 2px;
    opacity: .55;
    transition: transform .2s;
    flex-shrink: 0;
}
.cattab:hover .cattab-chevron,
.cattab.active .cattab-chevron { opacity: .9; }

/* ── Dropdown sous-catégories ───────────────────────── */
#cattab-dropdown {
    position: fixed;
    z-index: 300;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,.55), 0 2px 8px rgba(0,0,0,.3);
    padding: .35rem;
    min-width: 180px;
    display: none;
    pointer-events: auto;
}
#cattab-dropdown.visible { display: block; }

.cattab-dd-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    width: 100%;
    padding: .55rem .85rem;
    border-radius: 7px;
    border: none;
    background: none;
    color: var(--text-muted);
    font-size: .84rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    white-space: nowrap;
    text-decoration: none;
    transition: background .12s, color .12s;
}
.cattab-dd-item:hover {
    background: rgba(230,57,70,.12);
    color: var(--text);
}

/* Barre de sous-catégories */
.subcats-bar {
    display: none;
    align-items: center;
    gap: .4rem;
    overflow-x: auto;
    scrollbar-width: none;
    max-width: 1200px;
    margin: 0 auto;
    padding: .55rem 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--bg);
}
.subcats-bar::-webkit-scrollbar { display: none; }
.subcats-bar.active { display: none; }

.subcatpill {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .35rem .9rem;
    border-radius: 99px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--card);
    border: 1px solid var(--border);
    cursor: pointer;
    white-space: nowrap;
    transition: all .15s;
    font-family: inherit;
    flex-shrink: 0;
}
.subcatpill:hover { border-color: rgba(230,57,70,.4); color: var(--text); }
.subcatpill.active { background: rgba(230,57,70,.12); color: var(--red); border-color: rgba(230,57,70,.35); }

/* ── RULES CONTENT ───────────────────────────────────── */
.container-rules {
    max-width: 860px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.cat-section { display: none; }
.cat-section.active { display: block; }

.rule-group { display: flex; flex-direction: column; gap: .55rem; margin-bottom: .55rem; }

/* Sous-catégorie bloc */
.subcat-group { margin-top: 1.75rem; }
.subcat-group-header {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-muted);
    margin-bottom: .75rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--border);
}
.subcat-group-count {
    margin-left: auto;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 99px;
    font-size: .68rem;
    padding: 1px 7px;
    font-weight: 700;
    color: var(--text-muted);
}

.rule-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color .2s;
    cursor: pointer;
}
.rule-item:hover { border-color: rgba(230,57,70,.2); }
.rule-item.open { border-color: rgba(230,57,70,.3); }
.rule-item.no-body { cursor: default; }
.rule-item.no-body:hover { border-color: var(--border); }

/* Rule color accents */
.rule-item.rule-red    { border-color: rgba(230,57,70,.5);  box-shadow: 0 0 22px rgba(230,57,70,.13); }
.rule-item.rule-green  { border-color: rgba(52,199,89,.5);  box-shadow: 0 0 22px rgba(52,199,89,.13); }
.rule-item.rule-blue   { border-color: rgba(59,130,246,.5); box-shadow: 0 0 22px rgba(59,130,246,.13); }
.rule-item.rule-yellow { border-color: rgba(245,158,11,.5); box-shadow: 0 0 22px rgba(245,158,11,.13); }
.rule-item.rule-orange { border-color: rgba(249,115,22,.5); box-shadow: 0 0 22px rgba(249,115,22,.13); }
.rule-item.rule-purple { border-color: rgba(168,85,247,.5); box-shadow: 0 0 22px rgba(168,85,247,.13); }
.rule-item.rule-pink   { border-color: rgba(236,72,153,.5); box-shadow: 0 0 22px rgba(236,72,153,.13); }
.rule-item.rule-cyan   { border-color: rgba(6,182,212,.5);  box-shadow: 0 0 22px rgba(6,182,212,.13); }

/* Rule color — état ouvert (titre + chevron) */
.rule-item.rule-red.open    .rule-title { color: #e63946; }
.rule-item.rule-green.open  .rule-title { color: #34c759; }
.rule-item.rule-blue.open   .rule-title { color: #3b82f6; }
.rule-item.rule-yellow.open .rule-title { color: #f59e0b; }
.rule-item.rule-orange.open .rule-title { color: #f97316; }
.rule-item.rule-purple.open .rule-title { color: #a855f7; }
.rule-item.rule-pink.open   .rule-title { color: #ec4899; }
.rule-item.rule-cyan.open   .rule-title { color: #06b6d4; }

.rule-item.rule-red.open    .rule-chevron { background: rgba(230,57,70,.1);  border-color: rgba(230,57,70,.3); }
.rule-item.rule-green.open  .rule-chevron { background: rgba(52,199,89,.1);  border-color: rgba(52,199,89,.3); }
.rule-item.rule-blue.open   .rule-chevron { background: rgba(59,130,246,.1); border-color: rgba(59,130,246,.3); }
.rule-item.rule-yellow.open .rule-chevron { background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.3); }
.rule-item.rule-orange.open .rule-chevron { background: rgba(249,115,22,.1); border-color: rgba(249,115,22,.3); }
.rule-item.rule-purple.open .rule-chevron { background: rgba(168,85,247,.1); border-color: rgba(168,85,247,.3); }
.rule-item.rule-pink.open   .rule-chevron { background: rgba(236,72,153,.1); border-color: rgba(236,72,153,.3); }
.rule-item.rule-cyan.open   .rule-chevron { background: rgba(6,182,212,.1);  border-color: rgba(6,182,212,.3); }

.rule-item.rule-red.open    .rule-chevron svg { stroke: #e63946; }
.rule-item.rule-green.open  .rule-chevron svg { stroke: #34c759; }
.rule-item.rule-blue.open   .rule-chevron svg { stroke: #3b82f6; }
.rule-item.rule-yellow.open .rule-chevron svg { stroke: #f59e0b; }
.rule-item.rule-orange.open .rule-chevron svg { stroke: #f97316; }
.rule-item.rule-purple.open .rule-chevron svg { stroke: #a855f7; }
.rule-item.rule-pink.open   .rule-chevron svg { stroke: #ec4899; }
.rule-item.rule-cyan.open   .rule-chevron svg { stroke: #06b6d4; }

.rule-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .9rem 1.1rem;
    user-select: none;
}
.rule-number {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    background: rgba(230,57,70,.1);
    border: 1px solid rgba(230,57,70,.25);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    font-weight: 800;
    color: var(--red);
}
.rule-title {
    flex: 1;
    font-weight: 600;
    font-size: .925rem;
    transition: color .2s;
}
.rule-item.open .rule-title { color: var(--red); }
.rule-chevron {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, transform .25s;
}
.rule-item.open .rule-chevron { background: rgba(230,57,70,.1); border-color: rgba(230,57,70,.3); transform: rotate(180deg); }
.rule-chevron svg { width: 13px; height: 13px; stroke: var(--text-muted); }
.rule-item.open .rule-chevron svg { stroke: var(--red); }

/* Règle-lien */
a.rule-item { display: block; text-decoration: none; color: inherit; }
a.rule-item:hover { border-color: rgba(230,57,70,.2); }
a.rule-item .rule-chevron { transition: background .2s, transform .25s, border-color .2s; }
a.rule-item:hover .rule-chevron { background: rgba(230,57,70,.1); border-color: rgba(230,57,70,.3); }
a.rule-item:hover .rule-chevron svg { stroke: var(--red); }
a.rule-item:hover .rule-title { color: var(--red); }
/* Hover couleur sur règle-lien */
a.rule-item.rule-red:hover    .rule-chevron { background: rgba(230,57,70,.1);  border-color: rgba(230,57,70,.3); }
a.rule-item.rule-green:hover  .rule-chevron { background: rgba(52,199,89,.1);  border-color: rgba(52,199,89,.3); }
a.rule-item.rule-blue:hover   .rule-chevron { background: rgba(59,130,246,.1); border-color: rgba(59,130,246,.3); }
a.rule-item.rule-yellow:hover .rule-chevron { background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.3); }
a.rule-item.rule-orange:hover .rule-chevron { background: rgba(249,115,22,.1); border-color: rgba(249,115,22,.3); }
a.rule-item.rule-purple:hover .rule-chevron { background: rgba(168,85,247,.1); border-color: rgba(168,85,247,.3); }
a.rule-item.rule-pink:hover   .rule-chevron { background: rgba(236,72,153,.1); border-color: rgba(236,72,153,.3); }
a.rule-item.rule-cyan:hover   .rule-chevron { background: rgba(6,182,212,.1);  border-color: rgba(6,182,212,.3); }
a.rule-item.rule-red:hover    .rule-chevron svg { stroke: #e63946; }
a.rule-item.rule-green:hover  .rule-chevron svg { stroke: #34c759; }
a.rule-item.rule-blue:hover   .rule-chevron svg { stroke: #3b82f6; }
a.rule-item.rule-yellow:hover .rule-chevron svg { stroke: #f59e0b; }
a.rule-item.rule-orange:hover .rule-chevron svg { stroke: #f97316; }
a.rule-item.rule-purple:hover .rule-chevron svg { stroke: #a855f7; }
a.rule-item.rule-pink:hover   .rule-chevron svg { stroke: #ec4899; }
a.rule-item.rule-cyan:hover   .rule-chevron svg { stroke: #06b6d4; }
a.rule-item.rule-red:hover    .rule-title { color: #e63946; }
a.rule-item.rule-green:hover  .rule-title { color: #34c759; }
a.rule-item.rule-blue:hover   .rule-title { color: #3b82f6; }
a.rule-item.rule-yellow:hover .rule-title { color: #f59e0b; }
a.rule-item.rule-orange:hover .rule-title { color: #f97316; }
a.rule-item.rule-purple:hover .rule-title { color: #a855f7; }
a.rule-item.rule-pink:hover   .rule-title { color: #ec4899; }
a.rule-item.rule-cyan:hover   .rule-title { color: #06b6d4; }
.rule-body {
    display: none;
    padding: .7rem 1.1rem .9rem;
    color: var(--text-muted);
    font-size: .88rem;
    line-height: 1.75;
    border-top: 1px solid var(--border);
}
.rule-item.open .rule-body { display: block; }


/* ── SOUS-CATÉGORIE CARTES ───────────────────────────── */
.subcat-cards {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-top: .5rem;
}

.subcat-card {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: 1rem 1.2rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    transition: border-color .15s, background .15s;
}
.subcat-card:hover {
    border-color: rgba(230,57,70,.35);
    background: var(--card-hover);
}
.subcat-card-icon { font-size: 1.3rem; flex-shrink: 0; }
.subcat-card-name { flex: 1; font-weight: 600; font-size: .95rem; }
.subcat-card-count {
    font-size: .78rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: 2px 10px;
    flex-shrink: 0;
}
.subcat-card-arrow {
    width: 16px;
    height: 16px;
    stroke: var(--text-muted);
    flex-shrink: 0;
    transition: stroke .15s, transform .15s;
}
.subcat-card:hover .subcat-card-arrow {
    stroke: var(--red);
    transform: translateX(2px);
}

/* ── EMPTY STATE ─────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 5rem 2rem;
    color: var(--text-muted);
}
.empty-state .icon { font-size: 4rem; margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: .5rem; color: var(--text); }

/* ── FAQ PAGE ────────────────────────────────────────── */
.faq-page { max-width: 740px; margin: 0 auto; padding: 3rem 1.5rem 5rem; }
.faq-header { text-align: center; margin-bottom: 3rem; }
.faq-title { font-size: 3rem; font-weight: 800; letter-spacing: -.04em; color: var(--text); margin-bottom: .6rem; }
.faq-underline { width: 48px; height: 4px; background: var(--red); border-radius: 2px; margin: 0 auto .75rem; }
.faq-subtitle { color: var(--text-muted); font-size: .95rem; }
.faq-list { display: flex; flex-direction: column; gap: .75rem; }
.faq-item { background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: border-color .2s; }
.faq-item.open { border-color: rgba(230,57,70,.3); }
.faq-question { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.4rem; cursor: pointer; user-select: none; }
.faq-question-text { font-weight: 700; font-size: .97rem; color: var(--text); transition: color .2s; }
.faq-item.open .faq-question-text { color: var(--red); }
.faq-chevron { flex-shrink: 0; width: 30px; height: 30px; background: var(--bg2); border: 1px solid var(--border); border-radius: 6px; display: flex; align-items: center; justify-content: center; transition: background .2s, transform .25s; }
.faq-item.open .faq-chevron { background: rgba(230,57,70,.1); border-color: rgba(230,57,70,.3); transform: rotate(180deg); }
.faq-chevron svg { width: 14px; height: 14px; stroke: var(--text-muted); }
.faq-item.open .faq-chevron svg { stroke: var(--red); }
.faq-answer { display: none; padding: .9rem 1.4rem 1.2rem; color: var(--text-muted); font-size: .92rem; line-height: 1.7; border-top: 1px solid var(--border); }
.faq-item.open .faq-answer { display: block; }
.faq-empty { text-align: center; color: var(--text-muted); padding: 3rem; font-size: .95rem; }

/* ── LOGIN PAGE ──────────────────────────────────────── */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: radial-gradient(ellipse at center, #1a0505 0%, #0d0d0d 70%);
}
.login-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
}
.login-logo { text-align: center; margin-bottom: 2rem; }
.login-logo h1 { font-size: 1.8rem; font-weight: 800; }
.login-logo h1 span { color: var(--red); }
.login-logo p { color: var(--text-muted); font-size: .9rem; margin-top: .3rem; }

.form-group { margin-bottom: 1.2rem; }
.form-label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    margin-bottom: .4rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
}
.form-input {
    width: 100%;
    background: var(--bg2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 11px 14px;
    border-radius: 8px;
    font-size: .95rem;
    outline: none;
    transition: border-color .15s;
    font-family: inherit;
}
.form-input:focus { border-color: var(--red); }
.form-input.error { border-color: #e63946; }
textarea.form-input { resize: vertical; }

.alert { padding: .8rem 1rem; border-radius: 8px; font-size: .875rem; margin-bottom: 1rem; }
.alert-error { background: rgba(230,57,70,.15); color: #fca5a5; border: 1px solid rgba(230,57,70,.3); }
.alert-success { background: rgba(34,197,94,.15); color: #86efac; border: 1px solid rgba(34,197,94,.3); }

/* ── ADMIN ───────────────────────────────────────────── */
.admin-layout { display: flex; min-height: 100vh; }

.sidebar {
    width: 240px;
    background: var(--bg2);
    border-right: 1px solid var(--border);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.sidebar-logo {
    padding: 1.5rem 1.25rem 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: .2rem;
}
.sidebar-logo a { text-decoration: none; color: inherit; font-size: 1.25rem; font-weight: 900; letter-spacing: -.5px; }
.sidebar-logo a span { color: var(--red); }
.sidebar-sub-label { font-size: .7rem; color: var(--text-muted); letter-spacing: 1px; text-transform: uppercase; }
.sidebar-nav {
    padding: 1rem .75rem;
    display: flex;
    flex-direction: column;
    gap: .15rem;
    flex: 1;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .6rem .85rem;
    border-radius: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: .835rem;
    font-weight: 500;
    transition: all .15s;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    width: 100%;
    text-align: left;
}
.sidebar-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.sidebar-link:hover { background: rgba(255,255,255,.04); color: var(--text); }
.sidebar-link.active { background: rgba(230,57,70,.1); color: var(--red); }
.sidebar-sep { border: none; border-top: 1px solid var(--border); margin: .5rem 0; }
.sidebar-logout { color: var(--red); }
.sidebar-logout:hover { background: rgba(230,57,70,.08); color: var(--red); }

.admin-main { flex: 1; padding: 2rem; min-width: 0; }

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.page-title { font-size: 1.5rem; font-weight: 800; }
.page-title small { display: block; font-size: .85rem; font-weight: 400; color: var(--text-muted); margin-top: 2px; }

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
}
.stat-card .label { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: .4rem; }
.stat-card .value { font-size: 2rem; font-weight: 800; }
.stat-card .value.red { color: var(--red); }

.table-wrap {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}
table { width: 100%; border-collapse: collapse; }
thead th {
    text-align: left;
    padding: .9rem 1.2rem;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    background: var(--bg2);
}
tbody tr { border-bottom: 1px solid var(--border); transition: background .12s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,.025); }
tbody td { padding: .85rem 1.2rem; font-size: .875rem; }
.actions { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }

/* ── FORM CARD ───────────────────────────────────────── */
.form-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 2rem;
    max-width: 720px;
}
.form-hint { font-size: .78rem; color: var(--text-muted); margin-top: .3rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media(max-width:600px) { .form-row { grid-template-columns: 1fr; } }

/* ── ADMIN FAQ ───────────────────────────────────────── */
.faq-list-admin { list-style: none; max-width: 760px; display: flex; flex-direction: column; gap: .6rem; }
.faq-item-admin { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.1rem; transition: border-color .15s; }
.faq-item-admin.drag-over { border-color: var(--red); background: rgba(230,57,70,.05); }
.faq-item-header { display: flex; align-items: flex-start; gap: .75rem; }
.drag-handle { cursor: grab; color: var(--text-muted); font-size: 1.1rem; user-select: none; flex-shrink: 0; padding-top: 2px; }
.drag-handle:active { cursor: grabbing; }
.faq-content { flex: 1; min-width: 0; }
.faq-q { font-weight: 700; font-size: .95rem; margin-bottom: .3rem; word-break: break-word; }
.faq-a { font-size: .83rem; color: var(--text-muted); white-space: pre-line; word-break: break-word; }
.faq-actions { display: flex; gap: .4rem; flex-shrink: 0; }
.edit-form { display: none; margin-top: .9rem; border-top: 1px solid var(--border); padding-top: .9rem; }
.edit-form.open { display: block; }
.edit-form textarea { width: 100%; background: var(--bg2); border: 1px solid var(--border); color: var(--text); padding: .55rem .75rem; border-radius: 6px; font-size: .88rem; resize: vertical; outline: none; font-family: inherit; }
.edit-form textarea:focus { border-color: var(--red); }
.edit-form-row { display: flex; gap: .5rem; justify-content: flex-end; margin-top: .5rem; }

/* ── SETTINGS ────────────────────────────────────────── */
.setting-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 1.5rem; max-width: 680px; margin-bottom: 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.setting-info { flex: 1; }
.setting-title { font-weight: 700; font-size: .97rem; margin-bottom: .3rem; }
.setting-desc { font-size: .82rem; color: var(--text-muted); line-height: 1.5; }
.toggle-pill { position: relative; display: inline-block; width: 52px; height: 28px; flex-shrink: 0; }
.toggle-pill input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-pill .slider { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: #333; border-radius: 28px; cursor: pointer; transition: background .25s; }
.toggle-pill input:checked + .slider { background: var(--red); }
.toggle-pill .slider::before { content: ''; position: absolute; width: 20px; height: 20px; left: 4px; top: 4px; background: #fff; border-radius: 50%; transition: transform .25s; }
.toggle-pill input:checked + .slider::before { transform: translateX(24px); }
.status-badge { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: .73rem; font-weight: 700; margin-left: .5rem; }
.status-on  { background: rgba(52,199,89,.15); color: #34c759; border: 1px solid rgba(52,199,89,.3); }
.status-off { background: rgba(230,57,70,.12); color: var(--red); border: 1px solid rgba(230,57,70,.3); }

/* ── CUSTOM TABLE PAGE (public) ─────────────────────── */
.custom-page-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 2rem 4rem;
}
.custom-table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border);
}
.custom-table {
    border-collapse: collapse;
    width: 100%;
    font-size: .9rem;
}
.custom-table thead tr {
    background: var(--bg2);
    border-bottom: 2px solid var(--border);
}
.custom-table th {
    padding: .75rem 1.1rem;
    text-align: left;
    font-size: .73rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-muted);
    white-space: nowrap;
}
.custom-table td {
    padding: .7rem 1.1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    color: var(--text);
    line-height: 1.45;
}
.custom-table tbody tr:last-child td { border-bottom: none; }
.custom-table tbody tr { transition: background .12s; }
.custom-table tbody tr:hover { background: rgba(255,255,255,.025); }

/* Category header rows */
.custom-table tbody tr.table-cat-header td {
    background: rgba(255,255,255,.04);
    border-top: 2px solid var(--border);
    border-bottom: 2px solid var(--border);
    padding: .6rem 1.1rem;
    font-size: .73rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--red);
}
.custom-table tbody tr.table-cat-header:first-child td { border-top: none; }

/* Row color variants */
.custom-table tbody tr.row-green td  { background: rgba(52,199,89,.06); }
.custom-table tbody tr.row-green:hover td  { background: rgba(52,199,89,.11); }
.custom-table tbody tr.row-green td:first-child  { border-left: 3px solid #34c759; }
.custom-table tbody tr.row-yellow td { background: rgba(245,158,11,.06); }
.custom-table tbody tr.row-yellow:hover td { background: rgba(245,158,11,.11); }
.custom-table tbody tr.row-yellow td:first-child { border-left: 3px solid #f59e0b; }
.custom-table tbody tr.row-orange td { background: rgba(249,115,22,.06); }
.custom-table tbody tr.row-orange:hover td { background: rgba(249,115,22,.11); }
.custom-table tbody tr.row-orange td:first-child { border-left: 3px solid #f97316; }
.custom-table tbody tr.row-red td   { background: rgba(230,57,70,.06); }
.custom-table tbody tr.row-red:hover td   { background: rgba(230,57,70,.11); }
.custom-table tbody tr.row-red td:first-child   { border-left: 3px solid #e63946; }
.custom-table tbody tr.row-blue td  { background: rgba(59,130,246,.06); }
.custom-table tbody tr.row-blue:hover td  { background: rgba(59,130,246,.11); }
.custom-table tbody tr.row-blue td:first-child  { border-left: 3px solid #3b82f6; }
.custom-table tbody tr.row-purple td  { background: rgba(168,85,247,.06); }
.custom-table tbody tr.row-purple:hover td  { background: rgba(168,85,247,.11); }
.custom-table tbody tr.row-purple td:first-child  { border-left: 3px solid #a855f7; }
.custom-table tbody tr.row-pink td  { background: rgba(236,72,153,.06); }
.custom-table tbody tr.row-pink:hover td  { background: rgba(236,72,153,.11); }
.custom-table tbody tr.row-pink td:first-child  { border-left: 3px solid #ec4899; }
.custom-table tbody tr.row-cyan td  { background: rgba(6,182,212,.06); }
.custom-table tbody tr.row-cyan:hover td  { background: rgba(6,182,212,.11); }
.custom-table tbody tr.row-cyan td:first-child  { border-left: 3px solid #06b6d4; }

/* ── SEARCH BAR (public) ─────────────────────────────── */
.hero-search {
    margin: 1.5rem auto 0;
    width: 100%;
    max-width: 520px;
    padding: 0 1rem;
}
.search-box {
    position: relative;
    display: flex;
    align-items: center;
}
.search-box-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    stroke: rgba(255,255,255,.3);
    pointer-events: none;
    z-index: 1;
    flex-shrink: 0;
}
.search-box input {
    width: 100%;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.09);
    color: var(--text);
    padding: 13px 44px 13px 46px;
    border-radius: 14px;
    font-size: .93rem;
    outline: none;
    transition: border-color .2s, background .2s, box-shadow .2s;
    font-family: inherit;
    box-shadow: 0 2px 20px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.04);
}
.search-box input:focus {
    border-color: rgba(230,57,70,.5);
    background: rgba(255,255,255,.07);
    box-shadow: 0 0 0 3px rgba(230,57,70,.13), 0 2px 20px rgba(0,0,0,.35);
}
.search-box input::placeholder { color: rgba(255,255,255,.25); }
.search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,.1);
    border: none;
    color: rgba(255,255,255,.5);
    cursor: pointer;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    line-height: 1;
    transition: background .15s, color .15s;
}
.search-clear:hover { background: rgba(255,255,255,.18); color: var(--text); }
.search-results-header {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 1.25rem;
    padding-bottom: .6rem;
    border-bottom: 1px solid var(--border);
}

/* ── SCROLLBAR ───────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--red); }

/* ── RESPONSIVE ──────────────────────────────────────── */
@media(max-width: 768px) {
    .sidebar { display: none; }
    .hero h1 { font-size: 1.7rem; }
    .navbar { padding: 0 1rem; }
    .container-rules { padding: 1.5rem 1rem 3rem; }
    .cattabs-bar { padding: 0 .75rem; }
    .subcats-bar { padding: .5rem .75rem; }
    .cattab { padding: .75rem .75rem; font-size: .82rem; }
}
