/* A.K.S.D. Mobil Hulladékudvar – arculati stíluslap */

:root {
  --blue: #1b5faa;
  --blue-dark: #124a87;
  --red: #e8442e;
  --green: #2e9e44;
  --green-dark: #1f7a33;
  --ink: #1d2733;
  --muted: #5b6774;
  --bg: #ffffff;
  --bg-alt: #f2f6fa;
  --border: #d9e2ec;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(18, 74, 135, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); border: 0;
}

/* ---------- Fejléc ---------- */

.site-header {
  background: #fff;
  border-bottom: 3px solid var(--blue);
  position: sticky; top: 0; z-index: 50;
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }

.logo { display: inline-flex; align-items: center; gap: 4px; }

.logo-box {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 42px;
  font-weight: 800; font-size: 20px; font-style: italic;
  border: 2px solid var(--blue);
}
.lb-a { background: #fff; color: var(--blue); }
.lb-k { background: var(--red); color: #fff; border-color: var(--red); }
.lb-s { background: #fff; color: var(--blue); }
.lb-d { background: var(--green); color: #fff; border-color: var(--green); }
.logo-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--blue); }

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 15px; }
.brand-text small { color: var(--green-dark); font-weight: 600; }

.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a {
  text-decoration: none; color: var(--blue-dark); font-weight: 600;
  padding: 8px 12px; border-radius: 8px; font-size: 15px;
}
.site-nav a:hover { background: var(--bg-alt); }

/* ---------- Hero ---------- */

.hero {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 60%, #0d3a6b 100%);
  color: #fff;
  padding: 48px 0 40px;
}
.hero h1 { margin: 0 0 8px; font-size: clamp(28px, 5vw, 44px); }
.hero-lead { max-width: 640px; font-size: 18px; margin: 0 0 28px; opacity: 0.95; }

.hero-badges { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.badge-card {
  display: flex; gap: 12px; align-items: flex-start;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius);
  padding: 14px 16px; font-size: 15px;
}
.badge-icon { font-size: 26px; line-height: 1; }
#today-badge { background: rgba(46, 158, 68, 0.35); border-color: rgba(255, 255, 255, 0.4); }
#today-locations b { font-size: 16px; }

/* ---------- Szakaszok ---------- */

.section { padding: 48px 0; }
.section-alt { background: var(--bg-alt); }
.section h2 {
  font-size: clamp(24px, 4vw, 32px); margin: 0 0 8px;
  color: var(--blue-dark);
}
.section h2::after {
  content: ""; display: block; width: 64px; height: 4px; margin-top: 8px;
  background: linear-gradient(90deg, var(--blue) 33%, var(--red) 33% 66%, var(--green) 66%);
  border-radius: 2px;
}
.section-lead { color: var(--muted); max-width: 760px; }

/* ---------- Ütemterv ---------- */

.schedule-controls {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  margin: 20px 0 16px;
}
#settlement-filter {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 15px; background: #fff; min-width: 220px;
}
.view-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.view-btn {
  border: 0; background: #fff; padding: 10px 16px; font-size: 15px;
  cursor: pointer; font-weight: 600; color: var(--muted);
}
.view-btn.active { background: var(--blue); color: #fff; }

.loading { color: var(--muted); }

.week-block { margin-bottom: 22px; }
.week-title {
  font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); font-weight: 700; margin: 0 0 8px;
}

.table-scroll { overflow-x: auto; }

.schedule-table { width: 100%; border-collapse: collapse; background: #fff; box-shadow: var(--shadow); border-radius: var(--radius); overflow: hidden; }
.schedule-table th, .schedule-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: 15px; }
.schedule-table th { background: var(--blue); color: #fff; font-weight: 600; white-space: nowrap; }
.schedule-table tr:last-child td { border-bottom: 0; }
.schedule-table td.closed { color: var(--muted); font-style: italic; }
.schedule-table tr.today-row { background: #e7f6ea; box-shadow: inset 4px 0 0 var(--green); }
.schedule-table tr.today-row td:first-child { font-weight: 700; }
.schedule-table tr.holiday-row td { color: var(--red); }
.schedule-table td .loc { font-weight: 600; color: var(--blue-dark); }
.badge-today {
  display: inline-block; background: var(--green); color: #fff;
  font-size: 12px; font-weight: 700; border-radius: 20px;
  padding: 1px 10px; margin-left: 8px; vertical-align: middle;
}

.schedule-note { color: var(--muted); font-size: 14px; margin-top: 16px; }

.no-results { color: var(--muted); font-style: italic; padding: 16px 0; }

/* ---------- Hulladékok ---------- */

.waste-group-title { margin: 28px 0 12px; color: var(--ink); font-size: 20px; }

.waste-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}
.waste-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; display: flex; flex-direction: column; gap: 6px;
  box-shadow: var(--shadow);
}
.waste-card .w-icon { font-size: 28px; }
.waste-card .w-name { font-weight: 700; font-size: 15px; }
.waste-card .w-limit {
  align-self: flex-start; font-size: 13px; font-weight: 700;
  border-radius: 20px; padding: 2px 10px;
}
.w-limit.limited { background: #fdeae7; color: var(--red); }
.w-limit.unlimited { background: #e7f6ea; color: var(--green-dark); }
.waste-card .w-hazard { font-size: 12px; color: var(--red); font-weight: 600; }
.hazard-star { color: var(--red); font-weight: 800; }

.waste-note { font-size: 14px; color: var(--muted); margin-top: 16px; }

.waste-details { margin-top: 20px; }
.waste-details summary {
  cursor: pointer; font-weight: 700; color: var(--blue-dark);
  padding: 10px 0;
}
.waste-table { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; }
.waste-table th, .waste-table td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
.waste-table th { background: var(--blue); color: #fff; }
.waste-table td:first-child { white-space: nowrap; font-family: ui-monospace, monospace; }

/* ---------- Tudnivalók ---------- */

.info-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 20px; }
.info-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.info-card .info-icon { font-size: 30px; }
.info-card h3 { margin: 10px 0 6px; font-size: 17px; color: var(--blue-dark); }
.info-card p { margin: 0; font-size: 14.5px; color: var(--ink); }

/* ---------- Lábléc ---------- */

.site-footer { background: var(--ink); color: #cfd8e0; padding: 28px 0; margin-top: 20px; font-size: 14.5px; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: #9fd3ab; }
.footer-meta { text-align: right; }
.admin-link { color: #7a8794 !important; font-size: 13px; text-decoration: none; }
.admin-link:hover { text-decoration: underline; }

/* ---------- Admin ---------- */

.admin-main { max-width: 860px; margin: 0 auto; padding: 24px 20px 60px; }
.admin-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; margin-bottom: 18px;
}
.admin-card h2 { margin: 0 0 4px; font-size: 20px; color: var(--blue-dark); }
.admin-card .hint { color: var(--muted); font-size: 14px; margin: 4px 0 14px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.field input[type="text"], .field input[type="password"] {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 15px;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checkbox-field { display: flex; align-items: center; gap: 8px; font-size: 14px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; border-radius: 8px; padding: 11px 20px;
  font-size: 15px; font-weight: 700; cursor: pointer;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: var(--green-dark); }
.btn-ghost { background: transparent; color: var(--blue-dark); border: 1px solid var(--border); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.drop-zone {
  border: 2px dashed var(--blue); border-radius: var(--radius);
  padding: 34px 20px; text-align: center; color: var(--blue-dark);
  background: var(--bg-alt); cursor: pointer; transition: background 0.15s;
}
.drop-zone.dragover { background: #dcebf7; }
.drop-zone .dz-icon { font-size: 34px; display: block; margin-bottom: 6px; }

.status { border-radius: 8px; padding: 12px 14px; font-size: 14.5px; margin-top: 14px; display: none; }
.status.show { display: block; }
.status.ok { background: #e7f6ea; color: var(--green-dark); border: 1px solid #bfe5c8; }
.status.err { background: #fdeae7; color: #b3271a; border: 1px solid #f5c4bc; }
.status.info { background: #e8f1fa; color: var(--blue-dark); border: 1px solid #c6dcf1; }

.preview-summary { display: flex; gap: 18px; flex-wrap: wrap; margin: 10px 0 14px; }
.preview-stat { background: var(--bg-alt); border-radius: 8px; padding: 10px 16px; font-size: 14px; }
.preview-stat b { display: block; font-size: 20px; color: var(--blue-dark); }

.warn-list { color: #9a6700; background: #fff8e5; border: 1px solid #f0dd9e; border-radius: 8px; padding: 10px 14px 10px 30px; font-size: 14px; }

.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* ---------- Admin fülek ---------- */

.admin-tabs {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px;
  border-bottom: 2px solid var(--border); padding-bottom: 0;
}
.admin-tab {
  border: 0; background: transparent; cursor: pointer;
  font-size: 15px; font-weight: 700; color: var(--muted);
  padding: 10px 16px; border-radius: 8px 8px 0 0;
  border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.admin-tab:hover { background: var(--bg-alt); color: var(--blue-dark); }
.admin-tab.active { color: var(--blue-dark); border-bottom-color: var(--blue); background: var(--bg-alt); }

/* ---------- Admin szerkesztők (közlemények, hulladékok) ---------- */

.editor-item {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; margin-bottom: 14px; background: #fbfdff;
  position: relative;
}
.editor-item.lejart { opacity: 0.72; background: #f6f6f6; }
.lejart-cimke {
  display: inline-block; background: #6b7683; color: #fff;
  font-size: 12px; font-weight: 700; border-radius: 20px;
  padding: 2px 10px; margin-bottom: 10px;
}
.editor-item textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 15px; font-family: inherit; resize: vertical;
}
.editor-item select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 15px; background: #fff;
}
.editor-item-lab {
  display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-top: 10px;
}
.editor-item-lab .btn { margin-left: auto; }

.btn-danger { background: #fdeae7; color: #b3271a; border: 1px solid #f5c4bc; }
.btn-danger:hover { background: #fbd9d3; }
.btn-kicsi { padding: 7px 12px; font-size: 13px; }

.ures-hint { color: var(--muted); font-style: italic; padding: 8px 0; }

.gyik-fej { display: flex; align-items: center; justify-content: space-between; }
.gyik-sorszam { font-weight: 800; color: var(--blue-dark); font-size: 17px; }
.gyik-mozgat { display: flex; gap: 6px; }

/* ---------- Jelszavas kapu ---------- */

.lock-screen {
  min-height: calc(100vh - 70px);
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-alt); padding: 24px;
}
.lock-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 36px 32px; max-width: 420px; width: 100%;
  text-align: center;
}
.lock-card .lock-icon { font-size: 44px; display: block; margin-bottom: 8px; }
.lock-card h1 { font-size: 22px; color: var(--blue-dark); margin: 0 0 6px; }
.lock-card p { color: var(--muted); font-size: 14.5px; margin: 0 0 18px; }
.lock-card .field { margin-bottom: 12px; }
.lock-card input { text-align: center; }
.lock-card .btn { width: 100%; justify-content: center; }

/* ---------- Település-szerkesztő táblázat ---------- */

.editor-table { width: 100%; border-collapse: collapse; }
.editor-table th, .editor-table td { border: 1px solid var(--border); padding: 6px 8px; text-align: left; }
.editor-table th { background: var(--blue); color: #fff; font-size: 14px; }
.editor-table input {
  width: 100%; border: 1px solid transparent; background: transparent;
  padding: 8px; font-size: 14.5px; border-radius: 6px;
}
.editor-table input:focus { border-color: var(--blue); background: #fff; outline: none; }
.editor-table td:last-child { width: 52px; text-align: center; }
.mezo-hibas { background: #fdeae7 !important; border-color: #e8442e !important; }

@media (max-width: 600px) {
  .field-row { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
  .footer-meta { text-align: left; }
  .editor-item-lab .btn { margin-left: 0; }
}
