/* ============================================================
   BCSD Database - 2000-es / Windows XP retro skin
   Az app.css UTAN toltodik be, ezert felulirja a temat (+ !important).
   Cel: dombornyomott szurke panelek, Tahoma, szogletes sarkok,
   vastag tablazat-racs, zold "cimsorok" + arany kiemeles.
   ============================================================ */

/* ---- Tema-valtozok felulirasa: minden var()-alapu szin a vilagos retro paletta ----
   Ezzel a sotet tema vilagos szovegszinei is eltunnek -> sehol nem marad feher szoveg.
   Ugyanaz a szelektor (html[data-theme="dark"]) + !important + kesobbi betoltes = nyer. */
:root,
html,
html[data-theme="light"],
html[data-theme="dark"] {
    --bg:       #ECE9D8 !important;
    --bg-2:     #ffffff !important;
    --panel:    #ECE9D8 !important;
    --panel-2:  #e0ddce !important;
    --border:   #b8b4a4 !important;
    --border-2: #808080 !important;
    --accent:   #1c5a36 !important;
    --accent-2: #14492b !important;
    --text:     #1a1a1a !important;
    --muted:    #4a4a3e !important;
    --danger:   #9a1010 !important;
}
/* zold hatteren a zold ikon lathatatlan lenne -> arany/feher */
.sb-brand i { color: #c9a24b !important; }
.sb-nav a.active i { color: #ffffff !important; }

body, .layout, .main, .content {
    background: #ECE9D8 !important;
    color: #1a1a1a !important;
    font-family: Tahoma, Verdana, "MS Sans Serif", Geneva, sans-serif !important;
}
* { border-radius: 0 !important; box-shadow: none !important; }
/* szeles tablak (pl. Felhasznalok) a tartalmon belul gorogjenek, ne tolja el a sidebart */
.content { overflow-x: auto !important; }
.data-table { overflow: visible !important; }

a { color: #0000cc !important; }
a:hover { color: #0000ff !important; }

/* a lebego FAB-ot rejtjuk; a temavalto a zold cimsorban ul (.tb-theme) */
.theme-fab { display: none !important; }
.tb-theme {
    display: inline-flex !important; align-items: center; justify-content: center;
    width: 34px; height: 30px; margin-right: 6px; flex: 0 0 auto;
    background: #1c5a36 !important; color: #fff !important; cursor: pointer;
    border: 2px solid !important; border-color: #4a8a64 #0e3a22 #0e3a22 #4a8a64 !important;
    font-size: 14px; font-family: Tahoma, Verdana, sans-serif !important;
}
.tb-theme:hover { background: #226b40 !important; }
.tb-theme:active { border-color: #0e3a22 #4a8a64 #4a8a64 #0e3a22 !important; }

/* ---- Sidebar: klasszikus beerelt panel ---- */
.sidebar { background: #ECE9D8 !important; border-right: 2px solid #808080 !important; color: #1a1a1a !important; }
.sb-brand { background: #1c5a36 !important; color: #fff !important; border-bottom: 2px solid #0e3a22 !important; }
.sb-brand-title, .sb-brand-sub { color: #fff !important; }
.sb-section { color: #5a5a4a !important; }
.sb-nav a { color: #1a1a1a !important; border: 1px solid transparent !important; }
.sb-nav a:hover { background: #d8d4c4 !important; }
.sb-nav a.active { background: #1c5a36 !important; color: #fff !important; border: 1px solid #0e3a22 !important; }
.sb-count { background: #c9a24b !important; color: #3a2e0a !important; border: 1px solid #8a7022 !important; }
.sb-count.warn { background: #c01010 !important; color: #fff !important; border-color: #7a0a0a !important; }
.sb-foot { border-top: 2px solid #808080 !important; background: #ECE9D8 !important; }
.sb-avatar { border: 2px solid #ffffff !important; border-right-color: #808080 !important; border-bottom-color: #808080 !important; background: #1c5a36 !important; color: #fff !important; }
.sb-user-info strong { color: #1a1a1a !important; }
.sb-user-info small { color: #5a5a4a !important; }
.sb-logout { color: #1a1a1a !important; }

/* ---- Topbar: cimsor (title bar) ---- */
.topbar { background: #1c5a36 !important; color: #fff !important; border-bottom: 2px solid #c9a24b !important; }
.tb-title { color: #fff !important; }
.tb-sub { color: #c9d8cc !important; }
.duty-pill { border: 2px solid !important; border-color: #ffffff #808080 #808080 #ffffff !important; }
.duty-pill.on { background: #cfe6d6 !important; color: #0e3a22 !important; }
.duty-pill.off { background: #e0ddce !important; color: #3a3a2a !important; }

/* ---- Panelek / kartyak: kiemelt 3D keret ---- */
.card, .creator-card, .auth-card, .recruit-toc, .chapter-block, .person-item, .stat, .module {
    background: #ECE9D8 !important;
    border: 2px solid !important;
    border-color: #ffffff #808080 #808080 #ffffff !important;
    color: #1a1a1a !important;
}
.card-title { color: #0e3a22 !important; border-bottom: 1px solid #b8b4a4 !important; }
.section-title { color: #0e3a22 !important; border-bottom: 2px solid #1c5a36 !important; }
.page-head { border-bottom: 2px solid #b8b4a4 !important; }
.page-head h1 { color: #1a1a1a !important; }
.page-sub, .muted, .person-meta, .list-creator { color: #5a5a4a !important; }

/* ---- Gombok: klasszikus dombornyomott ---- */
.btn-primary, .btn-small, .btn-ghost, button {
    border: 2px solid !important;
    border-color: #ffffff #808080 #808080 #ffffff !important;
    background: #ECE9D8 !important;
    color: #1a1a1a !important;
    font-family: Tahoma, Verdana, sans-serif !important;
    font-weight: normal !important;
}
.btn-primary { background: #1c5a36 !important; color: #fff !important; border-color: #4a8a64 #0e3a22 #0e3a22 #4a8a64 !important; font-weight: bold !important; }
.btn-primary:active, .btn-small:active, .btn-ghost:active, button:active { border-color: #808080 #ffffff #ffffff #808080 !important; }
.btn-danger, .btn-ghost.btn-danger { color: #9a1010 !important; }
.btn-ghost.active-filter { background: #c9a24b !important; color: #3a2e0a !important; }

/* ---- Urlapmezok: sullyesztett ---- */
input[type=text], input[type=email], input[type=password], input[type=date], input[type=color],
select, textarea, .inline-input, .inline-select, .search-bar {
    background: #ffffff !important;
    border: 2px solid !important;
    border-color: #808080 #ffffff #ffffff #808080 !important;
    color: #1a1a1a !important;
    font-family: Tahoma, Verdana, sans-serif !important;
}
.search-bar { background: #ffffff !important; }
.search-bar input { border: none !important; background: none !important; }
.search-bar .fa-magnifying-glass { color: #5a5a4a !important; }

/* ---- Tablazatok: vastag racs, klasszikus fejlec ---- */
.data-table, .kv-table {
    border: 2px solid !important; border-color: #808080 #ffffff #ffffff #808080 !important;
    background: #ffffff !important; border-spacing: 0 !important;
}
.data-table thead th { background: #1c5a36 !important; color: #fff !important; border: 1px solid #0e3a22 !important; font-weight: bold !important; }
.data-table td { border: 1px solid #c0bdb0 !important; background: #ffffff !important; color: #1a1a1a !important; }
.data-table tbody tr:hover td { background: #eef3e9 !important; }
.kv-table th { border: 1px solid #c0bdb0 !important; background: #e0ddce !important; color: #1a1a1a !important; }
.kv-table td { border: 1px solid #c0bdb0 !important; background: #ffffff !important; color: #1a1a1a !important; }

/* ---- Badge: szogletes, lapos retro szinek ---- */
.badge { border: 1px solid #808080 !important; font-weight: normal !important; }
.badge.active { background: #cfe6d6 !important; color: #0e3a22 !important; border-color: #4a8a64 !important; }
.badge.suspended { background: #e6d2d0 !important; color: #7a1a1a !important; border-color: #a85a5a !important; }
.badge.warn { background: #f2e2b8 !important; color: #5a4a10 !important; border-color: #b89a3a !important; }
.badge.wanted { background: #c01010 !important; color: #fff !important; border-color: #7a0a0a !important; }
.badge.role { background: #d8d4c4 !important; color: #1a1a1a !important; border-color: #808080 !important; }

/* ---- Alertek: szogletes beerelt dobozok ---- */
.alert { border: 2px solid !important; display: block !important; }
.alert i { margin-right: 5px !important; }
.alert.ok   { background: #dff0d8 !important; color: #2a5a1a !important; border-color: #7aa86a !important; }
.alert.warn { background: #fcf4d0 !important; color: #6a5510 !important; border-color: #c9a24b !important; }
.alert.err  { background: #f5d6d6 !important; color: #8a1a1a !important; border-color: #c06060 !important; }

/* ---- Stat / modul ---- */
.stat-num { color: #0e3a22 !important; }
.stat .stat-num, .stat.c-blue .stat-num, .stat.c-red .stat-num, .stat.c-amber .stat-num, .stat.c-green .stat-num { color: #0e3a22 !important; }
.stat .stat-label, .stat.c-blue .stat-label, .stat.c-red .stat-label, .stat.c-green .stat-label, .stat.c-amber .stat-label { color: #4a4a3e !important; opacity: 1 !important; }
.module-icon { color: #1c5a36 !important; }

/* ---- Auth oldalak: dialogus-ablak a "desktop"-on ---- */
.auth-wrap { background: #5a7a6a !important; }
.auth-card { background: #ECE9D8 !important; }
.auth-title { color: #0e3a22 !important; }
.auth-logo { color: #c9a24b !important; }
.auth-sub { color: #5a5a4a !important; }
.auth-step { color: #1c5a36 !important; }
.auth-foot { color: #5a5a4a !important; }

/* ---- Egyeb ---- */
.viewonly-banner { background: #fcf4d0 !important; color: #6a5510 !important; border: 2px solid #c9a24b !important; }
.exam-opt { border: 2px solid !important; border-color: #808080 #ffffff #ffffff #808080 !important; background: #ffffff !important; }
.exam-opt:has(input:checked) { background: #eef3e9 !important; }
#chapterEditor { background: #ffffff !important; color: #1a1a1a !important; }
.rich-content { color: #1a1a1a !important; }

/* ============================================================
   SOTET RETRO TEMA  (html[data-theme="dark"])
   Ugyanaz a dombornyomott XP jelleg, de sotet paletta. A zold
   markaszin (cimsor/fejlec/aktiv/btn-primary) es az arany megmarad.
   A html[data-theme="dark"] prefix magasabb specificitas -> a fenti
   vilagos !important szabalyokat felulirja.
   ============================================================ */
html[data-theme="dark"] {
    --bg:       #1e1e1e !important;
    --bg-2:     #1a1a1a !important;
    --panel:    #383838 !important;
    --panel-2:  #2e2e2e !important;
    --border:   #4a4a4a !important;
    --border-2: #5a5a5a !important;
    --accent:   #2f9d5e !important;
    --accent-2: #2a8a52 !important;
    --text:     #e8e8e8 !important;
    --muted:    #a4a4a4 !important;
    --danger:   #e57373 !important;
}

/* desktop / fo felulet */
html[data-theme="dark"] body,
html[data-theme="dark"] .layout,
html[data-theme="dark"] .main,
html[data-theme="dark"] .content { background: #1e1e1e !important; color: #e8e8e8 !important; }

html[data-theme="dark"] a { color: #8ab4ff !important; }
html[data-theme="dark"] a:hover { color: #a9c8ff !important; }

/* Sidebar */
html[data-theme="dark"] .sidebar { background: #242424 !important; border-right-color: #0d0d0d !important; color: #e8e8e8 !important; }
html[data-theme="dark"] .sb-section { color: #8a8a8a !important; }
html[data-theme="dark"] .sb-nav a { color: #e0e0e0 !important; }
html[data-theme="dark"] .sb-nav a:hover { background: #303030 !important; }
html[data-theme="dark"] .sb-foot { border-top-color: #0d0d0d !important; background: #242424 !important; }
html[data-theme="dark"] .sb-user-info strong { color: #e8e8e8 !important; }
html[data-theme="dark"] .sb-user-info small { color: #a4a4a4 !important; }
html[data-theme="dark"] .sb-logout { color: #cfcfcf !important; }

/* Topbar (a zold cimsor megmarad) */
html[data-theme="dark"] .duty-pill.off { background: #2c2c2c !important; color: #cfcfcf !important; border-color: #5a5a5a #111 #111 #5a5a5a !important; }

/* Panelek / kartyak: sotet dombornyomas */
html[data-theme="dark"] .card,
html[data-theme="dark"] .creator-card,
html[data-theme="dark"] .auth-card,
html[data-theme="dark"] .recruit-toc,
html[data-theme="dark"] .chapter-block,
html[data-theme="dark"] .person-item,
html[data-theme="dark"] .stat,
html[data-theme="dark"] .module,
html[data-theme="dark"] .card-form,
html[data-theme="dark"] .detail-card,
html[data-theme="dark"] .intra-post,
html[data-theme="dark"] .dept-card,
html[data-theme="dark"] .mail-msg {
    background: #383838 !important;
    border-color: #5a5a5a #111 #111 #5a5a5a !important;
    color: #e8e8e8 !important;
}
html[data-theme="dark"] .card-title { color: #7fc99c !important; border-bottom-color: #4a4a4a !important; }
html[data-theme="dark"] .section-title { color: #7fc99c !important; border-bottom-color: #1c5a36 !important; }
html[data-theme="dark"] .page-head { border-bottom-color: #4a4a4a !important; }
html[data-theme="dark"] .page-head h1 { color: #e8e8e8 !important; }
html[data-theme="dark"] .page-sub,
html[data-theme="dark"] .muted,
html[data-theme="dark"] .person-meta,
html[data-theme="dark"] .list-creator,
html[data-theme="dark"] .creator-sub,
html[data-theme="dark"] .creator-time,
html[data-theme="dark"] .intra-post-body,
html[data-theme="dark"] .dept-body p,
html[data-theme="dark"] .mail-field,
html[data-theme="dark"] .mail-ref { color: #a4a4a4 !important; }
html[data-theme="dark"] .intra-post-head h3 a,
html[data-theme="dark"] .intra-full-body,
html[data-theme="dark"] .mail-msg-body { color: #e8e8e8 !important; }
html[data-theme="dark"] .dept-icon { background: #2a2a2a !important; color: #7fc99c !important; }

/* Gombok */
html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] .btn-small,
html[data-theme="dark"] .btn-ghost,
html[data-theme="dark"] button {
    background: #383838 !important; color: #e8e8e8 !important;
    border-color: #5a5a5a #111 #111 #5a5a5a !important;
}
html[data-theme="dark"] .btn-primary { background: #1c5a36 !important; color: #fff !important; border-color: #4a8a64 #0e3a22 #0e3a22 #4a8a64 !important; }
html[data-theme="dark"] .btn-primary:active,
html[data-theme="dark"] .btn-small:active,
html[data-theme="dark"] .btn-ghost:active,
html[data-theme="dark"] button:active { border-color: #111 #5a5a5a #5a5a5a #111 !important; }
html[data-theme="dark"] .tb-theme { background: #1c5a36 !important; }

/* Urlapmezok: sotet sullyesztett */
html[data-theme="dark"] input[type=text],
html[data-theme="dark"] input[type=email],
html[data-theme="dark"] input[type=password],
html[data-theme="dark"] input[type=date],
html[data-theme="dark"] input[type=number],
html[data-theme="dark"] input[type=color],
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .inline-input,
html[data-theme="dark"] .inline-select,
html[data-theme="dark"] .search-bar {
    background: #1c1c1c !important; color: #e8e8e8 !important;
    border-color: #111 #5a5a5a #5a5a5a #111 !important;
}
html[data-theme="dark"] .search-bar .fa-magnifying-glass { color: #a4a4a4 !important; }

/* Tablazatok */
html[data-theme="dark"] .data-table,
html[data-theme="dark"] .kv-table { background: #1c1c1c !important; border-color: #111 #5a5a5a #5a5a5a #111 !important; }
html[data-theme="dark"] .data-table td { background: #232323 !important; color: #e8e8e8 !important; border-color: #3a3a3a !important; }
html[data-theme="dark"] .data-table tbody tr:hover td { background: #2c352e !important; }
html[data-theme="dark"] .kv-table th { background: #2a2a2a !important; color: #e8e8e8 !important; border-color: #3a3a3a !important; }
html[data-theme="dark"] .kv-table td { background: #232323 !important; color: #e8e8e8 !important; border-color: #3a3a3a !important; }

/* Badge-ek */
html[data-theme="dark"] .badge { border-color: #5a5a5a !important; }
html[data-theme="dark"] .badge.active { background: #16331f !important; color: #8fd6a8 !important; border-color: #2f6b48 !important; }
html[data-theme="dark"] .badge.suspended { background: #3a1f1f !important; color: #e6a3a3 !important; border-color: #6b3a3a !important; }
html[data-theme="dark"] .badge.warn { background: #3a3010 !important; color: #e8c074 !important; border-color: #6b5518 !important; }
html[data-theme="dark"] .badge.role { background: #2e2e2e !important; color: #d0d0d0 !important; border-color: #5a5a5a !important; }
html[data-theme="dark"] tr.mail-unread { background: rgba(47,157,94,.10) !important; }

/* Alertek */
html[data-theme="dark"] .alert.ok   { background: #13271d !important; color: #8fd6a8 !important; border-color: #2f6b48 !important; }
html[data-theme="dark"] .alert.warn { background: #2b2410 !important; color: #e8c074 !important; border-color: #6b5518 !important; }
html[data-theme="dark"] .alert.err  { background: #2d1719 !important; color: #f2a4a7 !important; border-color: #6b3a3a !important; }
html[data-theme="dark"] .viewonly-banner { background: #2b2510 !important; color: #e7c46b !important; border-color: #6b5518 !important; }

/* Stat / modul */
html[data-theme="dark"] .stat-num,
html[data-theme="dark"] .stat .stat-num { color: #7fc99c !important; }
html[data-theme="dark"] .stat .stat-label { color: #a4a4a4 !important; }
html[data-theme="dark"] .module-icon { color: #7fc99c !important; }

/* Auth oldalak */
html[data-theme="dark"] .auth-wrap { background: #161616 !important; }
html[data-theme="dark"] .auth-title { color: #7fc99c !important; }
html[data-theme="dark"] .auth-sub,
html[data-theme="dark"] .auth-foot { color: #a4a4a4 !important; }
html[data-theme="dark"] .auth-step { color: #7fc99c !important; }

/* Egyeb */
html[data-theme="dark"] .exam-opt { background: #1c1c1c !important; border-color: #111 #5a5a5a #5a5a5a #111 !important; }
html[data-theme="dark"] .exam-opt:has(input:checked) { background: #2c352e !important; }
html[data-theme="dark"] #chapterEditor { background: #1c1c1c !important; color: #e8e8e8 !important; }
html[data-theme="dark"] .rich-content { color: #e8e8e8 !important; }
