/* ============================================================
   ZSB Autószervíz — Admin Panel  |  style.css  v2
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Barlow+Condensed:wght@600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #0c0d10;
  --surface:    #13151a;
  --surface2:   #1a1d24;
  --surface3:   #21252e;
  --border:     #272b36;
  --border2:    #313748;
  --gold:       #f5a800;
  --gold-h:     #ffc13a;
  --gold-dim:   rgba(245,168,0,.1);
  --gold-glow:  rgba(245,168,0,.2);
  --text:       #e8eaf0;
  --text2:      #b8bcc8;
  --muted:      #6b7080;
  --danger:     #e84040;
  --danger-dim: rgba(232,64,64,.1);
  --warn:       #e8a020;
  --warn-dim:   rgba(232,160,32,.1);
  --ok:         #2eb87a;
  --ok-dim:     rgba(46,184,122,.1);
  --blue:       #4d9ef5;
  --blue-dim:   rgba(77,158,245,.1);
  --radius:     12px;
  --radius-sm:  7px;
  --radius-xs:  5px;
  --shadow:     0 8px 32px rgba(0,0,0,.5);
  --shadow-sm:  0 2px 8px rgba(0,0,0,.3);
  --font:       'Inter', system-ui, sans-serif;
  --font-head:  'Barlow Condensed', 'Inter', system-ui, sans-serif;
  --header-h:   58px;
  --sidebar-w:  230px;
  --ease:       cubic-bezier(.4,0,.2,1);
  --t:          .18s;
}

html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14.5px; line-height: 1.55; min-height: 100vh; }

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ============================================================
   APP SHELL — SIDEBAR LAYOUT
   ============================================================ */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 200;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
  will-change: transform;
}

.sidebar-logo {
  display: flex; align-items: center; gap: .7rem;
  padding: 1.15rem 1.2rem;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface2) 100%);
}
.logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-h) 100%);
  border-radius: 9px; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-size: .95rem; font-weight: 800;
  color: #0c0d10; flex-shrink: 0; letter-spacing: .5px;
  box-shadow: 0 2px 10px rgba(245,168,0,.3);
}
.logo-text { font-family: var(--font-head); font-size: 1.15rem; font-weight: 700; color: var(--text); letter-spacing: .5px; line-height: 1.2; }
.logo-sub  { font-size: .67rem; color: var(--muted); display: block; line-height: 1; margin-top: 1px; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: .6rem .65rem; }
.nav-section {
  font-size: .66rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 1px;
  padding: 1rem .65rem .3rem;
}
.nav-link {
  display: flex; align-items: center; gap: .65rem;
  padding: .55rem .8rem; border-radius: var(--radius-sm);
  color: var(--text2); text-decoration: none;
  font-size: .845rem; font-weight: 500;
  transition: color var(--t) var(--ease), background var(--t) var(--ease), transform var(--t) var(--ease);
  margin-bottom: 1px; position: relative;
}
.nav-link svg { flex-shrink: 0; opacity: .6; transition: opacity var(--t); }
.nav-link:hover { color: var(--text); background: var(--surface2); transform: translateX(2px); }
.nav-link:hover svg { opacity: 1; }
.nav-link.active {
  color: var(--gold); background: var(--gold-dim);
  font-weight: 600;
}
.nav-link.active::before {
  content: ''; position: absolute; left: 0; top: 20%; bottom: 20%;
  width: 3px; background: var(--gold); border-radius: 0 3px 3px 0;
}
.nav-link.active svg { opacity: 1; }
.nav-link.nav-logout { color: var(--danger); }
.nav-link.nav-logout:hover { background: var(--danger-dim); color: var(--danger); transform: none; }

.sidebar-footer {
  padding: .9rem 1.1rem; border-top: 1px solid var(--border);
  font-size: .8rem; color: var(--muted);
  background: var(--surface2);
}
.sidebar-footer strong { color: var(--text); display: block; font-size: .85rem; margin-bottom: .1rem; }
.sidebar-footer .role-badge {
  display: inline-block; background: var(--gold-dim); color: var(--gold);
  border-radius: 4px; padding: .1rem .45rem; font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .4px; margin-top: .2rem;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content { margin-left: var(--sidebar-w); flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.75rem;
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(12px);
}
.topbar-left { display: flex; align-items: center; gap: .85rem; }
.topbar-title { font-family: var(--font-head); font-size: 1.15rem; font-weight: 700; letter-spacing: .4px; }
.topbar-right { display: flex; align-items: center; gap: .6rem; }

.menu-toggle {
  display: none; background: none; border: none; cursor: pointer;
  color: var(--muted); padding: .4rem; border-radius: var(--radius-xs);
  transition: background var(--t), color var(--t);
}
.menu-toggle:hover { background: var(--surface2); color: var(--text); }

.overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.6); z-index: 199;
  backdrop-filter: blur(2px);
  transition: opacity var(--t);
}
.overlay.open { display: block; }

.page-body { padding: 1.75rem; max-width: 1180px; animation: pageIn .22s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ============================================================
   LOGIN
   ============================================================ */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--bg); padding: 1.5rem; position: relative; overflow: hidden;
}
.login-bg {
  position: fixed; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 20% 60%, rgba(245,168,0,.06) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 15%, rgba(245,168,0,.04) 0%, transparent 45%);
}
.login-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2.5rem 2.25rem;
  width: 100%; max-width: 400px;
  box-shadow: var(--shadow), 0 0 0 1px rgba(245,168,0,.05);
  position: relative; z-index: 1;
  animation: loginIn .35s var(--ease) both;
}
@keyframes loginIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }

.login-logo { display: flex; align-items: center; gap: .8rem; margin-bottom: 2rem; }
.login-logo .logo-icon { width: 48px; height: 48px; font-size: 1.1rem; border-radius: 11px; }
.login-logo .logo-text { font-size: 1.45rem; }
.login-divider { height: 1px; background: var(--border); margin: 1.5rem 0; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  margin-bottom: 1.25rem;
  transition: box-shadow var(--t);
}
.card:hover { box-shadow: var(--shadow-sm); }

.card-title {
  font-family: var(--font-head); font-size: 1.02rem; font-weight: 700;
  letter-spacing: .35px; margin-bottom: 1.2rem;
  display: flex; align-items: center; gap: .55rem; color: var(--text);
}
.card-title .icon { color: var(--gold); }

/* ============================================================
   STATS
   ============================================================ */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.2rem 1.35rem; position: relative; overflow: hidden;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t);
  cursor: default;
}
.stat:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(0,0,0,.4); border-color: var(--border2); }
.stat::before { content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%; background: var(--gold); transition: width var(--t); }
.stat:hover::before { width: 4px; }
.stat-label { font-size: .71rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .55px; }
.stat-value { font-family: var(--font-head); font-size: 2.1rem; font-weight: 700; color: var(--gold); line-height: 1.1; margin-top: .2rem; }
.stat-sub   { font-size: .75rem; color: var(--muted); margin-top: .2rem; }

/* ============================================================
   FORMS
   ============================================================ */
.form-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem 1.25rem; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .85rem 1.25rem; }
.form-full   { grid-column: 1 / -1; }
.field { margin-bottom: .9rem; }
.field:last-child { margin-bottom: 0; }

label, .lbl {
  display: block; font-size: .72rem; font-weight: 700; color: var(--muted);
  margin-bottom: .38rem; text-transform: uppercase; letter-spacing: .45px;
}

input[type=text], input[type=password], input[type=email],
input[type=number], input[type=date], input[type=datetime-local],
input[type=tel], select, textarea {
  width: 100%; background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  padding: .62rem .95rem; font-size: .88rem; font-family: var(--font);
  outline: none;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), background var(--t);
  appearance: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--gold); background: var(--surface3);
  box-shadow: 0 0 0 3px rgba(245,168,0,.08);
}
input::placeholder { color: var(--muted); }
textarea { resize: vertical; min-height: 88px; line-height: 1.5; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%236b7080' d='M5 7L0 2h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .85rem center; padding-right: 2.2rem; cursor: pointer;
}
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-inner-spin-button { display: none; }

.input-group { display: flex; align-items: stretch; }
.input-group input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); border-right: none; flex: 1; }
.input-addon {
  background: var(--surface3); border: 1px solid var(--border);
  padding: .62rem .85rem; font-size: .85rem; color: var(--muted);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; white-space: nowrap;
  display: flex; align-items: center;
}

.checkbox-row { display: flex; align-items: center; gap: .65rem; margin: .75rem 0; cursor: pointer; }
.checkbox-row input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--gold); flex-shrink: 0; cursor: pointer; }
.checkbox-row label { margin: 0; text-transform: none; letter-spacing: 0; font-size: .88rem; color: var(--text); font-weight: 400; cursor: pointer; }

.collapsible { display: none; margin-top: .75rem; }
.collapsible.open { display: block; animation: slideDown .2s var(--ease); }
@keyframes slideDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  background: var(--gold); color: #0c0d10; border: none; border-radius: var(--radius-sm);
  padding: .62rem 1.35rem; font-size: .86rem; font-weight: 700; font-family: var(--font);
  cursor: pointer; transition: background var(--t), transform var(--t), box-shadow var(--t);
  text-decoration: none; white-space: nowrap; letter-spacing: .1px;
}
.btn:hover { background: var(--gold-h); box-shadow: 0 4px 16px var(--gold-glow); transform: translateY(-1px); }
.btn:active { transform: scale(.97) translateY(0); box-shadow: none; }
.btn-full { width: 100%; }
.btn-ghost { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface3); border-color: var(--border2); box-shadow: var(--shadow-sm); }
.btn-danger-solid { background: var(--danger); color: #fff; }
.btn-danger-solid:hover { background: #c83030; box-shadow: 0 4px 16px rgba(232,64,64,.3); }

/* Small action buttons — clearly separated, never run together */
.btn-sm {
  padding: .3rem .75rem; font-size: .78rem; border-radius: var(--radius-xs);
  border: 1px solid transparent; cursor: pointer; font-weight: 600; font-family: var(--font);
  display: inline-flex; align-items: center; gap: .3rem;
  transition: background var(--t), border-color var(--t), transform var(--t);
  white-space: nowrap; line-height: 1.4;
}
.btn-sm:hover { transform: translateY(-1px); }
.btn-sm:active { transform: scale(.97); }

.btn-danger { background: var(--danger-dim); color: var(--danger); border-color: rgba(232,64,64,.2); }
.btn-danger:hover { background: rgba(232,64,64,.18); border-color: rgba(232,64,64,.35); }
.btn-warn   { background: var(--warn-dim);   color: var(--warn);   border-color: rgba(232,160,32,.2); }
.btn-warn:hover   { background: rgba(232,160,32,.18); border-color: rgba(232,160,32,.35); }
.btn-muted  { background: rgba(107,112,128,.08); color: var(--muted); border-color: rgba(107,112,128,.15); }
.btn-muted:hover  { background: rgba(107,112,128,.15); color: var(--text2); }
.btn-ok     { background: var(--ok-dim);   color: var(--ok);   border-color: rgba(46,184,122,.2); }
.btn-ok:hover   { background: rgba(46,184,122,.18); border-color: rgba(46,184,122,.35); }
.btn-blue   { background: var(--blue-dim); color: var(--blue); border-color: rgba(77,158,245,.2); }
.btn-blue:hover { background: rgba(77,158,245,.18); border-color: rgba(77,158,245,.35); }

/* Button groups — action cells in tables */
.actions { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.btn-row  { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-top: 1.1rem; }

/* ============================================================
   FLASH MESSAGES
   ============================================================ */
.flash {
  padding: .78rem 1.1rem; border-radius: var(--radius-sm);
  font-size: .875rem; margin-bottom: 1.25rem; border-left: 3px solid;
  display: flex; align-items: center; gap: .6rem;
  animation: flashIn .25s var(--ease) both;
}
@keyframes flashIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
.flash-ok   { background: var(--ok-dim);     border-color: var(--ok);     color: var(--ok);     }
.flash-err  { background: var(--danger-dim); border-color: var(--danger); color: var(--danger); }
.flash-info { background: var(--blue-dim);   border-color: var(--blue);   color: var(--blue);   }

/* ============================================================
   TABLE
   ============================================================ */
.table-wrap { overflow-x: auto; border-radius: var(--radius-xs); }
table { width: 100%; border-collapse: collapse; font-size: .86rem; }
th {
  text-align: left; color: var(--muted); font-size: .71rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .55px;
  padding: .65rem .9rem; border-bottom: 1px solid var(--border); white-space: nowrap;
  background: var(--surface2);
}
th:first-child { border-radius: var(--radius-xs) 0 0 0; }
th:last-child  { border-radius: 0 var(--radius-xs) 0 0; }
td { padding: .72rem .9rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background var(--t); }
tbody tr:hover td { background: rgba(255,255,255,.022); }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex; align-items: center;
  padding: .18rem .65rem; border-radius: 20px;
  font-size: .71rem; font-weight: 700; letter-spacing: .35px; text-transform: uppercase;
  white-space: nowrap;
}
.badge-admin    { background: var(--gold-dim);         color: var(--gold);    border: 1px solid rgba(245,168,0,.2); }
.badge-mod      { background: var(--blue-dim);         color: var(--blue);    border: 1px solid rgba(77,158,245,.2); }
.badge-szerelo   { background: rgba(107,112,128,.08);   color: var(--muted);   border: 1px solid rgba(107,112,128,.15); }
.badge-temp     { background: var(--warn-dim);         color: var(--warn);    border: 1px solid rgba(232,160,32,.2); }
.badge-active   { background: var(--ok-dim);           color: var(--ok);      border: 1px solid rgba(46,184,122,.2); }
.badge-inactive { background: rgba(107,112,128,.06);   color: var(--muted);   border: 1px solid rgba(107,112,128,.12); }
.badge-locked   { background: var(--danger-dim);       color: var(--danger);  border: 1px solid rgba(232,64,64,.2); }

.status-badge {
  display: inline-flex; align-items: center;
  padding: .22rem .75rem; border-radius: 20px;
  font-size: .78rem; font-weight: 600; border: 1px solid;
  white-space: nowrap; gap: .35rem;
}
.status-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; gap: .75rem; margin-bottom: 1.5rem;
}
.page-header h1 { font-family: var(--font-head); font-size: 1.7rem; font-weight: 700; letter-spacing: .4px; line-height: 1.1; }
.page-header p  { color: var(--muted); font-size: .875rem; margin-top: .2rem; }

/* ============================================================
   WELCOME BANNER
   ============================================================ */
.welcome-banner {
  background: linear-gradient(135deg, var(--surface2) 0%, var(--surface) 100%);
  border: 1px solid var(--border); border-left: 3px solid var(--gold);
  border-radius: var(--radius); padding: 1.2rem 1.5rem;
  margin-bottom: 1.25rem; display: flex; align-items: center; gap: 1rem;
}
.welcome-banner .icon { font-size: 1.8rem; }
.welcome-banner h2 { font-size: 1rem; font-weight: 600; }
.welcome-banner p  { font-size: .825rem; color: var(--muted); margin-top: .15rem; }

/* ============================================================
   STATUS OVERVIEW GRID (dashboard)
   ============================================================ */
.status-overview {
  display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: .5rem;
}
.status-tile {
  flex: 1; min-width: 110px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .85rem 1rem;
  text-decoration: none; text-align: center;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
  position: relative; overflow: hidden;
}
.status-tile::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--tile-color, var(--gold));
}
.status-tile:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.3); border-color: var(--border2); }
.status-tile .tile-count { font-family: var(--font-head); font-size: 1.8rem; font-weight: 700; color: var(--tile-color, var(--gold)); line-height: 1; margin-top: .15rem; }
.status-tile .tile-label { font-size: .72rem; color: var(--muted); font-weight: 500; margin-top: .25rem; }

/* ============================================================
   WORKSHEET EDITOR — LINE ROWS
   ============================================================ */
.line-section {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .6rem .75rem;
  margin-bottom: .5rem;
  transition: border-color var(--t), box-shadow var(--t);
}
.line-section:hover { border-color: var(--border2); }

.line-grid {
  display: grid; gap: .4rem .5rem; align-items: end;
}
.line-grid.labor { grid-template-columns: minmax(160px,2fr) 90px 110px 80px 36px; }
.line-grid.parts { grid-template-columns: minmax(160px,2fr) 70px  110px 80px 36px; }

.line-lbl {
  font-size: .68rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .4px; margin-bottom: .22rem;
}
.line-grid input { padding: .45rem .6rem; font-size: .84rem; }

.del-btn {
  background: none; border: none; cursor: pointer; color: var(--muted);
  width: 32px; height: 32px; border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center;
  transition: color var(--t), background var(--t);
  align-self: end; flex-shrink: 0;
}
.del-btn:hover { color: var(--danger); background: var(--danger-dim); }
.del-btn svg { pointer-events: none; }

.add-line-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  background: none; border: 1px dashed var(--border2); border-radius: var(--radius-xs);
  color: var(--muted); padding: .45rem .85rem; font-size: .82rem;
  cursor: pointer; font-family: var(--font); font-weight: 500;
  transition: color var(--t), border-color var(--t), background var(--t);
  margin-top: .35rem;
}
.add-line-btn:hover { color: var(--gold); border-color: var(--gold); background: var(--gold-dim); }

/* ============================================================
   TOTAL BOX
   ============================================================ */
.total-box {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 1.1rem 1.35rem;
  font-size: .875rem; min-width: 270px;
}
.total-row { display: flex; justify-content: space-between; align-items: center; padding: .3rem 0; }
.total-row + .total-row { border-top: 1px solid var(--border); }
.total-label { color: var(--muted); }
.total-row.grand {
  font-size: 1.05rem; font-weight: 700; color: var(--gold);
  border-top: 1px solid var(--border2) !important; margin-top: .35rem; padding-top: .55rem;
}

/* ============================================================
   SCHEMA PILLS (for loading templates)
   ============================================================ */
.schema-pills { display: flex; flex-wrap: wrap; gap: .45rem; }
.schema-pill {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 20px; padding: .32rem .9rem;
  font-size: .8rem; cursor: pointer; color: var(--muted); font-family: var(--font);
  transition: color var(--t), border-color var(--t), background var(--t), transform var(--t);
  white-space: nowrap;
}
.schema-pill:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-dim); transform: translateY(-1px); }

/* ============================================================
   SCHEMA TREE (schemas.php)
   ============================================================ */
.schema-group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 1rem; overflow: hidden; }
.schema-group-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem 1.25rem; background: var(--surface2);
  border-bottom: 1px solid var(--border);
  cursor: pointer; user-select: none;
  transition: background var(--t);
}
.schema-group-header:hover { background: var(--surface3); }
.schema-group-header h3 { font-size: .94rem; font-weight: 600; }
.schema-items { padding: .5rem 1.1rem .9rem; }
.schema-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .45rem 0; border-bottom: 1px solid var(--border);
  font-size: .875rem; transition: background var(--t);
}
.schema-item:last-child { border-bottom: none; }
.schema-item.sub { padding-left: 1.5rem; color: var(--muted); font-size: .83rem; }
.schema-item .item-name { flex: 1; }
.schema-item .item-hours { color: var(--gold); font-weight: 700; white-space: nowrap; font-family: var(--font-head); font-size: .95rem; }
.schema-item .main-tag {
  font-size: .66rem; background: var(--gold-dim); color: var(--gold);
  border-radius: 4px; padding: .1rem .45rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .4px; border: 1px solid rgba(245,168,0,.2);
}

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1.15rem; align-items: center; }
.filter-bar input, .filter-bar select { max-width: 240px; }

/* ============================================================
   VEHICLE PLATE
   ============================================================ */
.plate {
  font-family: var(--font-head); font-size: 1.05rem; font-weight: 800;
  letter-spacing: 1.5px; color: var(--gold);
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  :root {
    --bg: #fff; --surface: #fff; --surface2: #f5f5f5; --surface3: #efefef;
    --text: #000; --text2: #333; --muted: #666; --border: #ddd; --border2: #ccc;
    --gold: #8a6000; --gold-dim: #fffbe8;
  }
  .sidebar, .topbar, .menu-toggle, .overlay,
  .btn, .btn-sm, .btn-row, .actions,
  .no-print, .filter-bar, .schema-pills { display: none !important; }
  .main-content { margin-left: 0 !important; }
  .page-body { padding: 0; max-width: 100%; animation: none; }
  body { font-size: 12.5px; }
  .card { border: 1px solid #ddd; box-shadow: none; background: #fff; break-inside: avoid; }
  table { font-size: .82rem; }
  .print-header { display: flex !important; }
  .sign-row { display: flex !important; }
  @page { margin: 1.5cm; size: A4; }
}
.print-header, .sign-row { display: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .sidebar { transform: translateX(calc(-1 * var(--sidebar-w))); }
  .sidebar.open { transform: translateX(0); box-shadow: 8px 0 40px rgba(0,0,0,.6); }
  .main-content { margin-left: 0; }
  .menu-toggle { display: flex; }
  .page-body { padding: 1.25rem 1rem; }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .total-box { min-width: unset; width: 100%; }
  .filter-bar input, .filter-bar select { max-width: none; }
}
@media (max-width: 600px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .btn-row { flex-direction: column; align-items: stretch; }
  .btn-row .btn { justify-content: center; }
  .login-card { padding: 1.8rem 1.1rem; }
  .topbar { padding: 0 1rem; }
  .status-overview { gap: .5rem; }
  .line-grid.labor, .line-grid.parts { grid-template-columns: 1fr 1fr; }
  .line-grid.labor > *:first-child, .line-grid.parts > *:first-child { grid-column: 1 / -1; }
}
@media (max-width: 400px) {
  .stats { grid-template-columns: 1fr; }
}

/* ============================================================
   SCHEMAS LAYOUT — RESPONSIVE FIX
   ============================================================ */
.schemas-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 900px) {
  .schemas-layout { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .schemas-layout { grid-template-columns: 1fr; }
  /* Típus oszlop elrejtése mobilon */
  .schemas-layout table th:nth-child(2),
  .schemas-layout table td:nth-child(2) { display: none; }
  /* Normaóra szűkebb */
  .schemas-layout table th:nth-child(3),
  .schemas-layout table td:nth-child(3) { width: 72px; }
  /* Topbar szűkítés */
  .topbar-right .btn { display: none; }
  /* Státusz tile-ok kisebbre */
  .status-tile { min-width: 80px; padding: .65rem .6rem; }
  .status-tile .tile-count { font-size: 1.4rem; }
  .status-tile .tile-label { font-size: .66rem; }
  /* Page header */
  .page-header h1 { font-size: 1.35rem; }
  /* Filter bar */
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar input, .filter-bar select { max-width: none; }
}