/* ============================================================
   CoolDay – dizájnrendszer (mobil-first, nagy tapintható elemek)
   ============================================================ */
:root {
    --bg: #eef2f7;
    --card: #ffffff;
    --surface-alt: #f4f7fb;
    --track: #e2e8f0;
    --input-bg: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --faint: #94a3b8;
    --accent: #0284c7;
    --accent-2: #0ea5e9;
    --accent-deep: #2563eb;
    --gradient: linear-gradient(135deg, #0ea5e9, #2563eb);
    --border: #e3e8f0;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 2px 6px rgba(15, 23, 42, .05);
    --shadow-md: 0 6px 18px rgba(15, 23, 42, .08);
    --danger: #dc2626;
    --danger-bg: #fef2f2;
    --danger-border: #fecaca;
    --notes-bg: #fffbeb;
    --notes-border: #fde68a;
    --notes-text: #92400e;
    --ok-bg: #f0fdf4;
    --ok-border: #bbf7d0;
    --ok-text: #166534;
    --radius: 16px;
    --radius-sm: 12px;
}

[data-theme="dark"] {
    --bg: #0b1220;
    --card: #16202e;
    --surface-alt: #1c2838;
    --track: #334155;
    --input-bg: #101a28;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --faint: #64748b;
    --border: #2a3a4f;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, .4);
    --danger-bg: #2a1618;
    --danger-border: #7f1d1d;
    --notes-bg: #2a2410;
    --notes-border: #6b5a13;
    --notes-text: #fcd34d;
    --ok-bg: #10241a;
    --ok-border: #1f5133;
    --ok-text: #86efac;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    transition: background .2s ease, color .2s ease;
}

h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow-sm);
}

/* --- Márka / logó --- */
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.brand-icon { display: flex; color: var(--accent-2); }
.brand-icon svg { width: 27px; height: 27px; }
.brand-icon-lg svg { width: 36px; height: 36px; }
.brand-text {
    font-family: "Poppins", "Inter", sans-serif;
    font-size: 22px; font-weight: 700; letter-spacing: -0.01em;
}
.brand-cool { color: var(--text); }
.brand-day { color: #5389ac; }
.brand-text-lg { font-size: 32px; }

/* --- Felső sáv --- */
.topbar {
    background: var(--card); border-bottom: 1px solid var(--border);
    padding: 14px 28px; display: flex; align-items: center; box-shadow: var(--shadow-sm);
    position: sticky; top: 0; z-index: 40;
}
.nav { display: flex; gap: 26px; margin-left: 42px; flex: 1; }
.nav a {
    color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500;
    padding: 6px 0; border-bottom: 2px solid transparent; transition: color .15s ease;
}
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--accent); border-bottom-color: var(--accent); }
.logout { margin-left: auto; color: var(--muted); text-decoration: none; font-size: 14px; display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border-radius: 10px; transition: color .15s ease, background .15s ease; }
.logout svg { width: 20px; height: 20px; }
.logout:hover { color: var(--accent); background: var(--surface-alt); }

/* --- Alsó menüsáv (mobil) --- */
.bottomnav { display: none; }
.bn-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 500; padding: 6px 0; }
.bn-item svg { width: 24px; height: 24px; }
.bn-item.active { color: var(--accent); }

/* --- Konténer --- */
.container { max-width: 1000px; margin: 0 auto; padding: 32px 28px; }
.muted { color: var(--muted); }
.page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; gap: 16px; flex-wrap: wrap; }
.quick-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* --- Gombok (nagy, tapintható) --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 22px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 600;
    text-decoration: none; cursor: pointer; border: 1px solid transparent; font-family: inherit;
    min-height: 46px; line-height: 1.2;
    transition: transform .12s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--gradient); color: #fff; box-shadow: 0 2px 8px rgba(37, 99, 235, .28); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(37, 99, 235, .34); }
.btn-secondary { background: var(--card); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--accent-2); color: var(--accent); }
.btn-danger { background: var(--card); color: var(--danger); border-color: var(--danger-border); }
.btn-danger:hover { background: var(--danger-bg); }
.btn-sm { padding: 8px 15px; font-size: 14px; min-height: 40px; }
.btn-lg { padding: 15px 26px; font-size: 16px; min-height: 54px; }
.btn-block { width: 100%; }

/* --- Táblázatok (görgethető mobilon) --- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }
.table {
    width: 100%; border-collapse: collapse; background: var(--card);
    border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
}
.table th, .table td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--border); font-size: 15px; white-space: nowrap; }
.table th { background: var(--surface-alt); color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr[onclick] { cursor: pointer; }
.table tbody tr { transition: background .1s ease; }
.table tbody tr:hover { background: var(--surface-alt); }
.row-actions { white-space: nowrap; }
.row-actions a { color: var(--accent); text-decoration: none; margin-right: 14px; font-size: 14px; }
.row-actions a:hover { text-decoration: underline; }
.linklike-danger { background: none; border: none; color: var(--danger); cursor: pointer; font-family: inherit; font-size: 14px; padding: 0; }
.linklike-danger:hover { text-decoration: underline; }

/* --- Badge-ek --- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; margin-left: 6px; }
.badge-warn { background: #fef3c7; color: #92400e; }
.badge-plan { background: #e0f2fe; color: #075985; }
.badge-wait { background: #fef3c7; color: #92400e; }
.badge-done { background: #dcfce7; color: #166534; }
.badge-mail { background: #e0f2fe; color: #075985; font-size: 11px; margin-left: 0; }

/* --- Üres állapot --- */
.empty { text-align: center; padding: 54px 20px; color: var(--muted); background: var(--card); border: 1px dashed var(--border); border-radius: var(--radius); }
.empty p { margin-bottom: 16px; }
.no-result { color: var(--muted); font-size: 15px; padding: 16px 2px; display: none; }

/* --- Szekció fejléc --- */
.section-head { display: flex; justify-content: space-between; align-items: center; margin: 30px 0 14px; }
.section-title { font-size: 18px; font-weight: 600; }
.soon { color: var(--muted); font-size: 15px; font-style: italic; }

/* --- Kereső --- */
.search-box { position: relative; margin-bottom: 20px; }
.search-box input {
    width: 100%; padding: 15px 18px 15px 48px; border: 1px solid var(--border); border-radius: 14px;
    font-size: 16px; font-family: inherit; background: var(--card); color: var(--text); box-shadow: var(--shadow-sm);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.search-box input::placeholder { color: var(--faint); }
.search-box input:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(14, 165, 233, .15); }
.search-box .search-ico { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; display: flex; }

/* --- Csoportosított választó --- */
.picker { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--card); box-shadow: var(--shadow-sm); transition: border-color .15s ease, box-shadow .15s ease; }
.picker:focus-within { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(14, 165, 233, .15); }
.picker-search { display: flex; align-items: center; gap: 9px; padding: 0 14px; border-bottom: 1px solid var(--border); background: var(--surface-alt); }
.picker-search svg { color: var(--faint); flex-shrink: 0; }
.picker-search input { flex: 1; border: none; background: transparent; padding: 13px 0; font-size: 16px; font-family: inherit; color: var(--text); }
.picker-search input:focus { outline: none; }
.picker select { width: 100%; border: none; background: transparent; padding: 6px; font-size: 16px; font-family: inherit; color: var(--text); }
.picker select:focus { outline: none; }
.picker select option { padding: 10px; }
.picker select option:checked { background: var(--accent); color: #fff; }

/* --- Szegmentált kapcsoló --- */
.segmented { display: inline-flex; background: var(--surface-alt); border: 1px solid var(--border); border-radius: 13px; padding: 4px; gap: 4px; }
.seg-option { padding: 10px 20px; border-radius: 9px; font-size: 15px; font-weight: 600; color: var(--muted); cursor: pointer; background: transparent; border: none; font-family: inherit; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; transition: background .15s ease, color .15s ease, box-shadow .15s ease; }
.seg-option:hover { color: var(--text); }
.seg-option.active { background: var(--card); color: var(--text); box-shadow: var(--shadow-sm); }
.seg-option svg { width: 17px; height: 17px; }
.seg-option input { display: none; }

/* --- Űrlap --- */
.form-card { max-width: 640px; }
.form-context { color: var(--muted); margin-bottom: 16px; font-size: 15px; }
.form-context strong { color: var(--text); }
.form-group { margin-bottom: 18px; }
.form-group > label { display: block; font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 7px; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 13px 15px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 16px; font-family: inherit; color: var(--text); background: var(--input-bg);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--faint); }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(14, 165, 233, .15); }
.form-group textarea { min-height: 96px; resize: vertical; }
.field-hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.field-hint code { background: var(--surface-alt); padding: 1px 6px; border-radius: 6px; font-size: 12px; }
.form-actions { display: flex; gap: 12px; margin-top: 8px; align-items: center; flex-wrap: wrap; }
.required { color: var(--danger); }
.checkbox-row { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 500; color: var(--text); cursor: pointer; }
.checkbox-row input { width: auto; }

/* --- Részletek --- */
.detail-grid { display: grid; grid-template-columns: 130px 1fr; gap: 12px 20px; font-size: 15px; }
.detail-grid dt { color: var(--muted); }
.detail-grid dd { color: var(--text); }
.notes-box { margin-top: 20px; background: var(--notes-bg); border: 1px solid var(--notes-border); border-radius: 12px; padding: 14px 16px; }
.notes-box .notes-label { font-size: 13px; font-weight: 600; color: var(--notes-text); margin-bottom: 4px; }
.back-link { color: var(--accent); text-decoration: none; font-size: 15px; }
.back-link:hover { text-decoration: underline; }
.tel-link { color: var(--accent); text-decoration: none; font-weight: 600; white-space: nowrap; }
.tel-link:hover { text-decoration: underline; }
.map-link { color: var(--accent); text-decoration: none; white-space: nowrap; }
.map-link:hover { text-decoration: underline; }

/* ============================================================
   KEZDŐLAP
   ============================================================ */
.home-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.home-hello { font-size: 28px; font-weight: 700; }
.home-date { color: var(--muted); font-size: 15px; margin-top: 2px; text-transform: capitalize; }

/* AAM keretsáv */
.aam-card { margin-bottom: 18px; }
.aam-figures { display: flex; align-items: baseline; gap: 8px; margin: 8px 0 12px; flex-wrap: wrap; }
.aam-figures .aam-now { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.aam-figures .aam-lim { color: var(--muted); font-size: 16px; }
.progress { height: 16px; background: var(--track); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--gradient); border-radius: 999px; transition: width .4s ease; }
.progress-fill.over { background: linear-gradient(135deg, #f97316, #dc2626); }
.aam-note { margin-top: 12px; font-size: 14px; color: var(--muted); }
.aam-note.over { color: var(--danger); font-weight: 600; }
.panel-title { font-size: 16px; font-weight: 600; }

/* Pénz-csempék */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat-num { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.stat-label { color: var(--muted); font-size: 14px; }
.stat-hint { color: var(--faint); font-size: 12px; margin-top: 2px; }

/* Kétoszlopos alsó rész */
.dash-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.muted-inline { color: var(--muted); font-weight: 400; font-size: 14px; }

/* Nagy mai-munka csempék */
.job-tile { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 10px; box-shadow: var(--shadow-sm); transition: transform .12s ease, box-shadow .15s ease; }
.job-tile:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.jt-time { font-size: 17px; font-weight: 700; color: var(--accent); min-width: 52px; }
.jt-body { flex: 1; display: flex; flex-direction: column; }
.jt-title { font-size: 16px; font-weight: 600; }
.jt-cust { font-size: 14px; color: var(--muted); }

/* Mini listák (karbantartás, fogyóban) */
.mini-list { display: flex; flex-direction: column; }
.mini-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; }
.mini-item:last-child { border-bottom: none; }
.mini-main { flex: 1; display: flex; flex-direction: column; }
.mini-main .mm-title { font-size: 15px; font-weight: 500; }
.mini-main .mm-sub { font-size: 13px; color: var(--muted); }
.mini-contact { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.empty-mini { color: var(--muted); font-size: 15px; padding: 10px 0; }
.mini-qty { font-size: 15px; font-weight: 700; color: var(--danger); white-space: nowrap; }

/* ============================================================
   NAPTÁR
   ============================================================ */
.cal-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.cal-nav .week-label { font-weight: 600; font-size: 15px; margin-left: 6px; }
.cal-nav .back-link { margin-left: auto; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.cal-day { background: var(--card); border: 1px solid var(--border); border-radius: 12px; min-height: 150px; padding: 10px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow-sm); }
.cal-day-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--muted); font-weight: 600; }
.cal-day-head .dnum { font-size: 15px; color: var(--text); }
.cal-today { border-color: var(--accent-2); box-shadow: 0 0 0 2px rgba(14, 165, 233, .18); }
.cal-today .cal-day-head { color: var(--accent); }
.job-card { display: flex; flex-direction: column; gap: 1px; text-decoration: none; background: var(--surface-alt); border: 1px solid var(--border); border-left: 3px solid var(--accent-2); border-radius: 8px; padding: 8px 10px; }
.job-card:hover { filter: brightness(0.98); }
.job-card .jc-time { font-size: 12px; color: var(--muted); font-weight: 600; }
.job-card .jc-title { font-size: 13px; color: var(--text); font-weight: 500; }
.job-card .jc-cust { font-size: 12px; color: var(--muted); }
.job-card.status-done { border-left-color: #22c55e; }
.job-card.status-wait { border-left-color: #f59e0b; }
.job-card.status-plan { border-left-color: #0ea5e9; }
.job-card.status-install { border-left-color: #14b8a6; }
.jc-tag { font-size: 11px; font-weight: 600; color: #0d9488; text-transform: uppercase; letter-spacing: .03em; }

/* Szűrő chipek */
.filter-chips { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.chip { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; transition: border-color .15s ease, color .15s ease, background .15s ease; }
.chip:hover { border-color: var(--accent-2); color: var(--accent); }
.chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ============================================================
   MUNKA RÉSZLETEK
   ============================================================ */
.detail-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.money-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.money-row:last-child { border-bottom: none; }
.money-row.total { font-weight: 700; font-size: 18px; border-top: 2px solid var(--border); margin-top: 4px; }
.profit-pos { color: var(--ok-text); }
.complete-box { background: var(--ok-bg); border: 1px solid var(--ok-border); border-radius: 12px; padding: 18px; }
.quick-status { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qs-label { font-size: 14px; color: var(--muted); margin-right: 4px; }

/* Fogyás-lista */
.consume-block { margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--ok-border); }
.consume-label { display: block; font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.consume-add { display: flex; gap: 8px; flex-wrap: wrap; }
.consume-add input { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 15px; font-family: inherit; background: var(--input-bg); color: var(--text); }
.consume-add #consume-search { flex: 1; min-width: 150px; }
.consume-qty-input { width: 100px; }
.consume-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.consume-item { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--ok-border); border-radius: 8px; padding: 9px 12px; }
.consume-item .ci-name { flex: 1; font-size: 15px; font-weight: 500; }
.consume-item .ci-qty { font-size: 15px; font-weight: 600; color: var(--ok-text); }
.consume-item .ci-remove { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 16px; padding: 0 4px; }
.consume-item .ci-remove:hover { color: var(--danger); }

/* ============================================================
   RAKTÁR
   ============================================================ */
.inv-summary { font-size: 14px; color: var(--muted); font-weight: 500; }
.add-title { font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 12px; }
.add-item-card { margin-bottom: 20px; }
.add-item-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.add-item-form input { flex: 1; min-width: 130px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 15px; font-family: inherit; background: var(--input-bg); color: var(--text); }
.add-item-form input::placeholder { color: var(--faint); }
.add-item-form input:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(14, 165, 233, .15); }
.add-item-form input[name="name"] { flex: 2.2; }

.inv-controls { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.inv-search { margin-bottom: 0; flex: 1; min-width: 220px; }
#low-toggle.toggle-on { background: #fef3c7; color: #92400e; border-color: #fcd34d; }

.inv-group { margin-bottom: 24px; }
.inv-group-head { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 0 4px 8px; border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.inv-group-count { color: var(--faint); font-weight: 500; }

.inv-row { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px; box-shadow: var(--shadow-sm); margin-bottom: 10px; }
.inv-row.low { border-color: #fbbf24; box-shadow: 0 0 0 1px rgba(251, 191, 36, .3); }
.inv-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.inv-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inv-name { font-size: 16px; font-weight: 600; color: var(--text); text-decoration: none; }
.inv-name:hover { color: var(--accent); }
.inv-sub { font-size: 13px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cat-tag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-alt); color: var(--muted); border: 1px solid var(--border); }
.reorder-link { color: var(--accent); text-decoration: none; font-weight: 600; }
.reorder-link:hover { text-decoration: underline; }

.inv-stepper { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.step-btn { width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-alt); color: var(--text); font-size: 24px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; line-height: 1; font-family: inherit; transition: background .12s ease, border-color .12s ease, color .12s ease, transform .1s ease; }
.step-btn:hover { border-color: var(--accent-2); color: var(--accent); }
.step-btn:active { transform: scale(0.92); }
.inv-qty { min-width: 78px; text-align: center; font-size: 19px; font-weight: 700; }
.inv-unit { font-size: 13px; font-weight: 500; color: var(--muted); }

/* ============================================================
   BEÁLLÍTÁSOK
   ============================================================ */
.setting-tile { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.setting-tile .st-text .st-title { font-size: 16px; font-weight: 600; }
.setting-tile .st-text .st-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.save-note { background: var(--ok-bg); color: var(--ok-text); border: 1px solid var(--ok-border); padding: 13px 16px; border-radius: 12px; font-size: 15px; margin-bottom: 20px; font-weight: 500; }

/* ============================================================
   LOGIN
   ============================================================ */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { width: 100%; max-width: 380px; }
.login-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 6px; }
.subtitle { color: var(--muted); margin-bottom: 22px; text-align: center; }
.login-card label { display: block; font-size: 15px; font-weight: 600; color: var(--text); margin-top: 16px; }
.login-card input { width: 100%; margin-top: 7px; padding: 14px 15px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 16px; font-family: inherit; background: var(--input-bg); color: var(--text); transition: border-color .15s ease, box-shadow .15s ease; }
.login-card input:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(14, 165, 233, .15); }
.login-card button { width: 100%; margin-top: 26px; padding: 15px; background: var(--gradient); color: #fff; border: none; border-radius: var(--radius-sm); font-size: 16px; font-weight: 600; font-family: inherit; cursor: pointer; box-shadow: 0 2px 8px rgba(37, 99, 235, .28); transition: transform .12s ease, box-shadow .15s ease; }
.login-card button:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(37, 99, 235, .34); }
.error { background: var(--danger-bg); color: var(--danger); padding: 11px 13px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 4px; }

/* ============================================================
   MOBIL (<= 820px)
   ============================================================ */
@media (max-width: 820px) {
    body { padding-bottom: 78px; }
    .topbar { padding: 12px 18px; }
    .topbar .nav { display: none; }
    .logout-text { display: none; }
    .logout { padding: 8px; }
    .container { padding: 22px 16px 32px; }
    h1 { font-size: 24px; }
    .home-hello { font-size: 26px; }

    .bottomnav {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
        background: var(--card); border-top: 1px solid var(--border);
        padding: 6px 2px calc(6px + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 -2px 12px rgba(15, 23, 42, .08);
    }

    .two-col, .dash-cols, .detail-two { grid-template-columns: 1fr; }
    .cal-grid { grid-template-columns: 1fr; }
    .cal-day { min-height: auto; }
    .page-head { margin-bottom: 18px; }

    /* Raktár mobilon */
    .add-item-form input { flex: 1 1 100%; }
    .inv-search { min-width: 100%; }
    #low-toggle { width: 100%; }

    /* Nagy tapintható lépegetők */
    .step-btn { width: 52px; height: 52px; }
}

@media (max-width: 420px) {
    .home-head .btn { width: 100%; }
    .quick-actions { width: 100%; }
    .quick-actions .btn { flex: 1; }
}

/* Kattintható mennyiség szerkesztés a raktárban */
.inv-qty { cursor: pointer; }
.inv-qty:hover { color: var(--accent); }
.qty-edit {
    width: 70px; padding: 6px 8px; border: 1px solid var(--accent-2); border-radius: 8px;
    font-size: 17px; font-weight: 700; text-align: center; font-family: inherit;
    background: var(--input-bg); color: var(--text);
}
.qty-edit:focus { outline: none; box-shadow: 0 0 0 3px rgba(14, 165, 233, .15); }

/* ============================================================
   VEZÉRLŐPULT – terep-asszisztens
   ============================================================ */

/* Gyorsgombok */
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 22px; }
.quick-tile { min-height: 56px; font-size: 15px; }

/* Ezekre figyelj oda! */
.alert-bar { background: #fffbeb; border: 1px solid #fde68a; border-left: 4px solid #f59e0b; border-radius: var(--radius); padding: 16px 18px; margin-bottom: 24px; }
[data-theme="dark"] .alert-bar { background: #241d07; border-color: #6b5a13; }
.alert-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; color: #92400e; margin-bottom: 12px; }
[data-theme="dark"] .alert-title { color: #fcd34d; }
.alert-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid #fde68a; }
[data-theme="dark"] .alert-item { border-color: #4a3f12; }
.alert-item .ai-text { font-size: 15px; color: var(--text); }
.ai-date { color: var(--muted); font-size: 13px; }
.ai-call, .ai-link { text-decoration: none; font-weight: 600; font-size: 14px; white-space: nowrap; padding: 8px 14px; border-radius: 10px; }
.ai-call { background: var(--accent); color: #fff; }
.ai-call:hover { filter: brightness(1.05); }
.ai-link { color: var(--accent); }
.ai-link:hover { text-decoration: underline; }
.ai-badge { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: #e0f2fe; color: #075985; white-space: nowrap; }
.ai-done { background: none; border: 1px solid #d4b106; color: #92400e; border-radius: 10px; padding: 8px 14px; font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer; white-space: nowrap; }
.ai-done:hover { background: #fde68a; }
[data-theme="dark"] .ai-done { color: #fcd34d; border-color: #6b5a13; }
[data-theme="dark"] .ai-done:hover { background: #3a3210; }

/* Mai menetrend – nagy kártyák */
.sched-card { background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--accent-2); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.sched-card.status-befejezve { border-left-color: #22c55e; }
.sched-card.status-alkatreszre_var { border-left-color: #f59e0b; }
.sched-card.status-tervezett { border-left-color: #0ea5e9; }
.sched-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sched-time { font-size: 20px; font-weight: 700; color: var(--accent); }
.sched-body { display: block; text-decoration: none; color: inherit; }
.sched-cust { display: block; font-size: 18px; font-weight: 700; }
.sched-addr { display: block; font-size: 14px; color: var(--muted); margin-top: 1px; }
.sched-title { display: block; font-size: 15px; color: var(--text); margin-top: 4px; }
.sched-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.card-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; text-decoration: none; background: var(--surface-alt); border: 1px solid var(--border); color: var(--text); border-radius: 11px; padding: 11px 16px; font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer; min-height: 46px; flex: 1; transition: border-color .12s ease, color .12s ease, background .12s ease; }
.card-btn:hover { border-color: var(--accent-2); color: var(--accent); }

/* Pénzügyi rész */
.finance { margin-top: 24px; }
.finance-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.eye-btn { background: none; border: none; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 10px; display: flex; transition: color .15s ease, background .15s ease; }
.eye-btn:hover { color: var(--accent); background: var(--surface-alt); }
.finance-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; }
.finance-label { font-size: 15px; color: var(--muted); }
.secret { font-size: 18px; font-weight: 700; letter-spacing: 0.02em; }
.finance-progress { margin-top: 8px; transition: filter .2s ease; }
.finance-progress.blurred { filter: blur(7px); opacity: .7; }

/* Modal */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, .55); z-index: 100; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.show { display: flex; }
.modal { background: var(--card); border-radius: var(--radius); padding: 24px; width: 100%; max-width: 420px; box-shadow: var(--shadow-md); }
.modal-title { font-size: 19px; font-weight: 700; margin-bottom: 18px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }

@media (max-width: 820px) {
    .quick-grid { grid-template-columns: 1fr; }
    .quick-tile { min-height: 52px; }
    .card-btn { flex: 1 1 100%; }
    .modal-overlay { align-items: flex-end; padding: 0; }
    .modal { max-width: 100%; border-radius: var(--radius) var(--radius) 0 0; }
}

/* ============================================================
   Karbantartás / archiválás / súgó
   ============================================================ */
.linklike { background: none; border: none; color: var(--accent); cursor: pointer; font-family: inherit; font-size: 13px; padding: 0; margin-right: 14px; font-weight: 500; }
.linklike:hover { text-decoration: underline; }
.badge-archived { background: var(--surface-alt); color: var(--muted); border: 1px solid var(--border); font-size: 12px; }

.ai-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* Veszélyzóna (archiválás / törlés) */
.danger-zone { margin-top: 32px; padding: 18px; border: 1px dashed var(--border); border-radius: var(--radius); display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.danger-zone .dz-text { font-size: 14px; color: var(--muted); }
.danger-zone form { margin: 0; }

/* Súgó */
.help-intro { color: var(--muted); font-size: 16px; margin-bottom: 22px; }
.help-card { margin-bottom: 16px; }
.help-h { font-size: 18px; margin-bottom: 10px; }
.help-list { margin: 8px 0 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.help-list li { font-size: 15px; line-height: 1.5; }
.help-foot { color: var(--muted); font-size: 15px; margin-top: 24px; text-align: center; }

@media (max-width: 820px) {
    .danger-zone { align-items: stretch; }
    .danger-zone .btn { width: 100%; }
}

/* ============================================================
   v17 – kompakt nézetek, vissza gomb
   ============================================================ */

/* Vissza gomb (al-oldalak bal fent) */
.back-btn { background: var(--card); border: 1px solid var(--border); color: var(--muted); font-family: inherit; font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 10px; cursor: pointer; margin-bottom: 14px; display: inline-flex; align-items: center; gap: 4px; }
.back-btn:hover { border-color: var(--accent-2); color: var(--accent); }

/* Kompakt mai menetrend */
.sched-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.sched-card { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--accent-2); border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow-sm); margin-bottom: 0; }
.sched-card.status-befejezve { border-left-color: #22c55e; }
.sched-card.status-alkatreszre_var { border-left-color: #f59e0b; }
.sched-card.status-tervezett { border-left-color: #0ea5e9; }
.sc-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.sc-time { font-size: 16px; font-weight: 700; color: var(--accent); min-width: 46px; }
.sc-info { min-width: 0; display: flex; flex-direction: column; }
.sc-cust { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-meta { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-actions { display: flex; gap: 6px; flex-shrink: 0; }
.sc-btn { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; text-decoration: none; background: var(--surface-alt); border: 1px solid var(--border); border-radius: 10px; font-size: 18px; }
.sc-btn:hover { border-color: var(--accent-2); }

/* Ügyfél kártyák (mobilbarát, táblázat helyett) */
.cust-list { display: flex; flex-direction: column; gap: 8px; }
.cust-card { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow-sm); }
.cust-main { flex: 1; min-width: 0; display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.cust-name { font-size: 16px; font-weight: 600; }
.cust-addr { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cust-call { width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; text-decoration: none; background: var(--surface-alt); border: 1px solid var(--border); border-radius: 10px; font-size: 18px; flex-shrink: 0; }
.cust-call:hover { border-color: var(--accent-2); }

/* Értesítő sáv fejléc + emlékeztető gomb */
.alert-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 10px; }
.alert-head .alert-title { margin-bottom: 0; }
.alert-add { background: none; border: 1px solid #d4b106; color: #92400e; border-radius: 10px; padding: 8px 12px; font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer; white-space: nowrap; }
.alert-add:hover { background: #fde68a; }
[data-theme="dark"] .alert-add { color: #fcd34d; border-color: #6b5a13; }

/* 3-gombos munkatípus */
.seg-wrap { flex-wrap: wrap; }
@media (max-width: 560px) {
    .seg-wrap { flex-direction: column; align-items: stretch; width: 100%; }
    .seg-wrap .seg-option { justify-content: center; }
}
