/* Terrassendachmarkt – Markendesign (Nachtblau + Silber, passend zum TDM-Logo F) */
:root {
  --gruen: #35507e;        /* Primär: Stahlblau (Namen historisch "gruen") */
  --gruen-d: #22375c;      /* Nachtblau */
  --gruen-dd: #16263f;     /* Mitternachtsblau */
  --gruen-hell: #e9eef6;   /* Silber-Hell */
  --tinte: #232b38;
  --grau: #7e8794;
  --rand: #d6dce6;
  --bg: #eff2f7;
  --orange: #ef6c00;
  --rot: #c62828;
  --blau: #1565c0;
  --lila: #6a1b9a;
}
* { box-sizing: border-box; }
body { margin:0; font-family:'Segoe UI', Arial, Helvetica, sans-serif; background:var(--bg); color:var(--tinte); font-size:15px; }
a { color:var(--gruen-d); text-decoration:none; }
a:hover { text-decoration:underline; }

/* Topbar */
.topbar { display:flex; align-items:center; gap:18px; background:#fff; border-bottom:1px solid var(--rand);
  padding:0 22px; height:60px; position:sticky; top:0; z-index:50; }
.brand { font-size:20px; color:var(--tinte); white-space:nowrap; display:flex; align-items:center; gap:10px; }
.brand strong { color:var(--gruen-d); }
.brand-logo { height:36px; width:auto; display:block; }
.brand-mark { color:var(--gruen); }
.brand:hover { text-decoration:none; }
.topnav { display:flex; align-items:center; gap:16px; margin-left:auto; flex-wrap:wrap; }
.topnav a { color:var(--tinte); font-weight:500; }
.topnav a:hover { color:var(--gruen-d); text-decoration:none; }
.navuser { color:var(--grau); font-size:13px; max-width:180px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.nav-badge { background:var(--gruen); color:#fff; border-radius:10px; padding:1px 7px; font-size:11px; margin-left:4px; }
.burger { display:none; background:none; border:none; font-size:22px; margin-left:auto; cursor:pointer; }

.wrap { max-width:1100px; margin:0 auto; padding:26px 22px 60px; min-height:calc(100vh - 170px); }
.pagehead { display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; margin-bottom:18px; }
.pagehead h1 { margin:0; font-size:26px; }

/* Cards & Grids */
.card { background:#fff; border:1px solid var(--rand); border-radius:14px; padding:22px; }
.grid { display:grid; gap:18px; }
.grid-2 { grid-template-columns:1fr 1fr; }
.grid-3 { grid-template-columns:repeat(3, 1fr); }
.grid-4 { grid-template-columns:repeat(4, 1fr); }

/* Artikel-Kacheln */
.artikel-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(240px, 1fr)); gap:18px; }
.akachel { background:#fff; border:1px solid var(--rand); border-radius:14px; overflow:hidden;
  display:flex; flex-direction:column; transition:box-shadow .15s, transform .15s; position:relative; }
.akachel:hover { box-shadow:0 6px 18px rgba(34,55,92,.16); transform:translateY(-2px); text-decoration:none; }
.akachel .abild { height:180px; background:var(--gruen-hell); display:flex; align-items:center; justify-content:center;
  color:var(--gruen); font-size:44px; overflow:hidden; }
.akachel .abild img { width:100%; height:100%; object-fit:cover; }
.akachel .ainfo { padding:14px 16px 16px; display:flex; flex-direction:column; gap:6px; flex:1; }
.akachel .atitel { font-weight:600; color:var(--tinte); line-height:1.35; }
.akachel .apreis { font-size:19px; font-weight:700; color:var(--gruen-dd); margin-top:auto; }
.akachel .ameta { color:var(--grau); font-size:12.5px; }
.akachel.verkauft::after { content:'VERKAUFT'; position:absolute; top:14px; right:-32px; transform:rotate(38deg);
  background:var(--rot); color:#fff; padding:4px 40px; font-size:12px; font-weight:700; letter-spacing:1px; }

/* Badges */
.badge { display:inline-block; padding:3px 10px; border-radius:20px; font-size:12px; font-weight:600; }
.badge-gruen { background:#e3f2e1; color:#1b5e20; }
.badge-orange { background:#fff3e0; color:var(--orange); }
.badge-blau { background:#e3f0fd; color:var(--blau); }
.badge-lila { background:#f3e5f5; color:var(--lila); }
.badge-grau { background:#eceff1; color:#546e7a; }
.badge-rot { background:#ffebee; color:var(--rot); }

/* Buttons */
.btn { display:inline-block; background:#fff; color:var(--tinte); border:1px solid var(--rand);
  padding:10px 18px; border-radius:9px; font-size:14.5px; font-weight:600; cursor:pointer; }
.btn:hover { background:var(--gruen-hell); text-decoration:none; }
.btn-primary { background:var(--gruen-d); border-color:var(--gruen-d); color:#fff; }
.btn-primary:hover { background:var(--gruen-dd); }
.btn-gruen { background:#43a047; border-color:#43a047; color:#fff; }
.btn-gruen:hover { background:#2e7d32; }
.btn-rot { background:var(--rot); border-color:var(--rot); color:#fff; }
.btn-sm { padding:6px 12px; font-size:13px; }
.btn-xl { padding:14px 28px; font-size:17px; }

/* Formulare */
.form { background:#fff; border:1px solid var(--rand); border-radius:14px; padding:26px; max-width:480px; }
.form.wide { max-width:760px; }
.field { margin-bottom:16px; }
.field label { display:block; font-weight:600; font-size:13.5px; margin-bottom:6px; }
.field input, .field select, .field textarea { width:100%; padding:10px 12px; border:1px solid var(--rand);
  border-radius:9px; font-size:15px; font-family:inherit; background:#fff; }
.field input:focus, .field select:focus, .field textarea:focus { outline:2px solid var(--gruen); border-color:var(--gruen); }
.row { display:flex; gap:14px; }
.row .field { flex:1; }
.hint { color:var(--grau); font-size:13px; }

/* Flash */
.flash { padding:12px 18px; border-radius:10px; margin-bottom:16px; font-weight:500; }
.flash-ok { background:#e3f2e1; color:#1b5e20; border:1px solid #bfdcbb; }
.flash-err { background:#ffebee; color:var(--rot); border:1px solid #f3c2c6; }
.flash-info { background:#e3f0fd; color:var(--blau); border:1px solid #bcd6f2; }

/* Tabellen */
.tabelle { width:100%; border-collapse:collapse; background:#fff; border:1px solid var(--rand); border-radius:14px; overflow:hidden; }
.tabelle th { text-align:left; padding:11px 14px; background:var(--gruen-hell); font-size:13px; color:var(--gruen-dd); }
.tabelle td { padding:11px 14px; border-top:1px solid var(--rand); font-size:14px; vertical-align:top; }
.tabelle tr:hover td { background:#fafcf9; }

/* Definition-Listen */
.dl div { display:flex; padding:7px 0; border-bottom:1px dashed var(--rand); }
.dl dt { flex:0 0 170px; color:var(--grau); font-size:13.5px; }
.dl dd { margin:0; font-weight:500; }

/* Detailseite */
.detail { display:grid; grid-template-columns:1.2fr 1fr; gap:22px; align-items:start; }
.galerie-haupt { width:100%; height:420px; object-fit:contain; background:#fff; border:1px solid var(--rand); border-radius:14px; }
.galerie-haupt.leer { display:flex; align-items:center; justify-content:center; font-size:70px; color:var(--gruen); background:var(--gruen-hell); }
.galerie-thumbs { display:flex; gap:10px; margin-top:10px; flex-wrap:wrap; }
.galerie-thumbs img { width:76px; height:76px; object-fit:cover; border-radius:9px; border:2px solid var(--rand); cursor:pointer; }
.galerie-thumbs img.aktiv { border-color:var(--gruen); }
.preisbox { font-size:30px; font-weight:800; color:var(--gruen-dd); }
.preisbox small { font-size:14px; color:var(--grau); font-weight:400; }

/* KPI-Kacheln (Admin) */
.kpi { background:#fff; border:1px solid var(--rand); border-radius:14px; padding:18px 22px; }
.kpi .kwert { font-size:26px; font-weight:800; color:var(--gruen-dd); }
.kpi .klabel { color:var(--grau); font-size:13px; margin-top:2px; }

/* Hero */
.hero { background:linear-gradient(135deg, var(--gruen-d), var(--gruen)); color:#fff; border-radius:18px;
  padding:38px 34px; margin-bottom:26px; }
.hero h1 { margin:0 0 10px; font-size:30px; }
.hero p { margin:0 0 18px; font-size:16px; opacity:.95; max-width:640px; }
.hero .btn { border:none; }

/* Filterleiste */
.filter { display:flex; gap:12px; flex-wrap:wrap; margin-bottom:20px; align-items:center; }
.filter input, .filter select { padding:9px 12px; border:1px solid var(--rand); border-radius:9px; font-size:14px; background:#fff; }
.filter input[type=text] { min-width:220px; }

/* Footer */
.foot { background:#fff; border-top:1px solid var(--rand); padding:18px 22px; display:flex; gap:14px;
  justify-content:space-between; flex-wrap:wrap; color:var(--grau); font-size:13px; }

/* Mobile */
@media (max-width: 760px) {
  .burger { display:block; }
  .topnav { display:none; position:absolute; top:60px; left:0; right:0; background:#fff; flex-direction:column;
    align-items:flex-start; padding:14px 22px; border-bottom:1px solid var(--rand); gap:12px; }
  .topnav.open { display:flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns:1fr; }
  .detail { grid-template-columns:1fr; }
  .galerie-haupt { height:280px; }
  .row { flex-direction:column; gap:0; }
  .tabelle { display:block; overflow-x:auto; }
}
