/* Kundenportal und Portal-Verwaltung im Design von Secmiro (helles Blau, Kopfzeile mit Logo, Menü links, dunkelblaue Startfläche, feste Fußzeile).
   Farben aus dem Secmiro-Logo: helles Blau #00AEEF / #2B7FD4, Marine #001F3F. Keine Inline-Stile (CSP style-src 'self'). */
:root {
  --primary-light-blue: #00aeef; --primary-blue: #2b7fd4; --primary-dark-blue: #001f3f; --logo-text-blue: #1a3562;
  --bg: #ffffff; --card: #ffffff; --surface: #f8f9fa; --border: #e3e8ee; --text: #001f3f; --text-dim: #5a6a80; --accent: #2b7fd4;
  --bad: #b3261e; --warn: #8a5a00; --ok: #1f7a4a; --subtle-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: "Segoe UI", -apple-system, Tahoma, Geneva, Verdana, sans-serif; line-height: 1.6; }
body { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
#app { display: flex; flex-direction: column; flex: 1; min-height: 0; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
.container { width: 90%; max-width: 1100px; margin: 0 auto; padding: 0 15px; }

/* Kopfzeile */
header.kopf { flex-shrink: 0; z-index: 30; display: flex; align-items: center; gap: .8rem; background: #fff; padding: .4rem 1.2rem; border-bottom: 1px solid var(--border); box-shadow: 0 2px 5px rgba(0, 0, 0, .03); }
header.kopf .brand { display: flex; align-items: center; } header.kopf .brand img { height: 52px; width: auto; }
.header-titel { color: var(--text-dim); font-weight: 600; font-size: .95rem; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 1.2rem; }
.header-btn { background: var(--primary-light-blue); color: #fff; font-weight: 700; font-size: .85rem; padding: .45rem 1rem; border-radius: 6px; border: 0; cursor: pointer; font-family: inherit; margin: 0; }
.header-btn:hover { background: #0096e1; text-decoration: none; }
.header-btn.hell { background: #fff; color: var(--text); border: 1px solid var(--border); } .header-btn.hell:hover { border-color: var(--accent); }
.sidebar-toggle { display: none; background: transparent; border: 1px solid var(--border); border-radius: 6px; width: 2.4rem; height: 2.4rem; font-size: 1.2rem; line-height: 1; color: var(--primary-dark-blue); cursor: pointer; margin: 0; padding: 0; }

/* Shell: Menü + Inhalt */
.shell { flex: 1; display: flex; min-height: 0; position: relative; }
.sidebar { width: 240px; flex-shrink: 0; overflow-y: auto; background: #fff; border-right: 1px solid var(--border); padding: 1rem .8rem; display: flex; flex-direction: column; gap: 1rem; }
.sidebar nav { display: flex; flex-direction: column; gap: 1rem; } .sidebar-group { display: flex; flex-direction: column; gap: .15rem; }
.sidebar-divider { border: 0; border-top: 1px solid var(--border); margin: .2rem .7rem .4rem; }
.sidebar a { display: block; padding: .55rem .7rem; border-radius: 8px; color: var(--text-dim); font-size: .9rem; font-weight: 600; }
.sidebar a:hover { background: var(--surface); color: var(--primary-dark-blue); text-decoration: none; }
.sidebar a[aria-current="page"] { background: rgba(43, 127, 212, .1); color: var(--accent); }
.sidebar-account { margin-top: auto; border-top: 1px solid var(--border); padding-top: .9rem; font-size: .8rem; color: var(--text-dim); display: flex; flex-direction: column; gap: .5rem; }
.sidebar-account .who { padding: 0 .7rem; word-break: break-all; }
.sidebar-account button { width: 100%; padding: .5rem; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text); font-weight: 600; cursor: pointer; font-family: inherit; margin: 0; }
.sidebar-account button:hover { border-color: var(--accent); background: #fff; }
.shell > main { flex: 1; min-width: 0; overflow-y: auto; scroll-behavior: smooth; display: flex; flex-direction: column; }
.shell > main > * { flex-shrink: 0; }
.inhalt { width: 100%; max-width: 860px; margin: 0 auto; padding: 1.4rem 1.2rem 3rem; }
.inhalt.breit { max-width: 1100px; }

/* Startfläche und Raster (wie auf secmiro.de) */
.badge { display: inline-block; padding: .3rem .9rem; border: 1px solid var(--primary-light-blue); border-radius: 999px; color: var(--primary-light-blue); font-size: .85rem; font-weight: 700; letter-spacing: .03em; margin-bottom: 1.3rem; }
.hero { background: var(--primary-dark-blue); color: #fff; padding: 70px 0; text-align: center; }
.hero h1 { font-size: 2.3em; line-height: 1.2; margin: 0 0 18px; color: #fff; } .hero p.lead { font-size: 1.1em; max-width: 780px; margin: 0 auto 30px; color: #d3dcea; }
.hero .hero-logo { width: 150px; height: 150px; margin: 0 auto 22px; display: block; border-radius: 24px; background: #fff; box-shadow: 0 12px 30px rgba(0, 0, 0, .35); }
.btn, a.btn { display: inline-block; padding: 13px 28px; background: var(--primary-light-blue); color: #fff; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; border-radius: 5px; border: 0; cursor: pointer; font-family: inherit; font-size: .9rem; margin: 0 .4rem .4rem; box-shadow: 0 4px 10px rgba(0, 0, 0, .1); transition: background-color .3s ease, transform .2s ease; }
.btn:hover, a.btn:hover { background: #0096e1; transform: translateY(-2px); text-decoration: none; }
.btn.zweit, a.btn.zweit { background: transparent; color: #fff; border: 1px solid #d3dcea; box-shadow: none; } .btn.zweit:hover, a.btn.zweit:hover { background: rgba(255, 255, 255, .12); }
.features { padding: 60px 0; background: var(--surface); } .features h2 { text-align: center; margin: 0 0 36px; color: var(--primary-dark-blue); }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 26px; }
.feature-item { background: #fff; border: 1px solid rgba(0, 0, 0, .04); padding: 30px 26px; border-radius: 8px; text-align: center; box-shadow: var(--subtle-shadow); transition: transform .3s ease, box-shadow .3s ease; }
.feature-item:hover { transform: translateY(-4px); box-shadow: 0 8px 15px rgba(0, 0, 0, .08); }
.feature-icon { font-size: 2.3em; margin-bottom: 10px; } .feature-item h3 { color: var(--primary-dark-blue); margin: 0 0 10px; } .feature-item p { color: var(--text-dim); margin: 0; }
.ablauf { padding: 50px 0 60px; } .ablauf h2 { text-align: center; margin: 0 0 24px; color: var(--primary-dark-blue); }
.ablauf ol { max-width: 680px; margin: 0 auto; color: var(--text-dim); padding-left: 1.4rem; } .ablauf li { margin-bottom: .6rem; }

/* Überschriften, Karten, Formulare */
h1 { font-size: 1.6rem; margin: .4rem 0 .6rem; color: var(--primary-dark-blue); } h2 { font-size: 1.2rem; margin: 1.4rem 0 .5rem; color: var(--primary-dark-blue); } h3 { font-size: 1rem; margin: .8rem 0 .3rem; color: var(--primary-dark-blue); }
.karte { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 1.4rem; margin: 14px 0; box-shadow: var(--subtle-shadow); }
.hinweis { padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); }
.hinweis.warn { border-color: var(--warn); color: var(--warn); } .hinweis.fehler { border-color: var(--bad); color: var(--bad); } .hinweis.ok { border-color: var(--ok); color: var(--ok); }
label { display: block; margin: .8rem 0 .25rem; font-weight: 600; font-size: .92rem; color: var(--primary-dark-blue); }
input[type=text], input[type=email], input[type=password], input[type=number], textarea, select { width: 100%; padding: .6rem .75rem; font: inherit; color: var(--text); background: #fff; border: 1px solid var(--border); border-radius: 8px; }
input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
textarea { min-height: 5rem; resize: vertical; }
label.wahl { font-weight: 400; display: flex; gap: .5rem; align-items: flex-start; margin: .45rem 0; color: var(--text); } label.wahl input { margin-top: .35rem; }
button { display: inline-block; padding: .6rem 1.2rem; font: inherit; font-weight: 700; border-radius: 6px; border: 1px solid var(--primary-light-blue); background: var(--primary-light-blue); color: #fff; cursor: pointer; margin: .7rem .5rem 0 0; }
button:hover { background: #0096e1; } button.zweit { background: #fff; color: var(--text); border-color: var(--border); } button.zweit:hover { border-color: var(--accent); background: #fff; }
button.klein { padding: .25rem .6rem; font-size: .85rem; margin: 0 .3rem 0 0; } button.gefahr { background: #fff; color: var(--bad); border-color: var(--bad); } button.gefahr:hover { background: #fdf0ef; }
button.link { background: none; border: 0; color: var(--text-dim); font-weight: 600; padding: 0; margin: 0; } button.link:hover { background: none; color: var(--text); text-decoration: underline; }
button[disabled] { opacity: .5; cursor: not-allowed; }
a.knopf { display: inline-block; padding: .6rem 1.2rem; font-weight: 700; border-radius: 6px; background: var(--primary-light-blue); color: #fff; margin: .7rem .5rem 0 0; } a.knopf:hover { background: #0096e1; text-decoration: none; } a.knopf.zweit { background: #fff; color: var(--text); border: 1px solid var(--border); }
.zeile { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; } .zeile > * { flex: 1 1 12rem; }
.muted { color: var(--text-dim); font-size: .92rem; }
.tag { display: inline-block; padding: .05rem .55rem; border-radius: 999px; font-size: .8rem; border: 1px solid var(--border); background: #fff; }
.tag.ok { color: var(--ok); border-color: var(--ok); } .tag.bad { color: var(--bad); border-color: var(--bad); } .tag.warn { color: var(--warn); border-color: var(--warn); }
.tabellenrahmen { overflow-x: auto; } table { width: 100%; border-collapse: collapse; font-size: .92rem; } th, td { text-align: left; padding: .5rem; border-bottom: 1px solid var(--border); vertical-align: top; } th { color: var(--text-dim); font-weight: 600; }
.schalter { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--border); } .schalter:last-child { border-bottom: 0; }
.hp-feld { display: none !important; }

/* Portal-Verwaltung: Reiter */
.tabs { flex-shrink: 0; display: flex; gap: .4rem; flex-wrap: wrap; padding: .6rem 1.2rem; background: var(--surface); border-bottom: 1px solid var(--border); }
.tabs button { margin: 0; background: #fff; color: var(--text); border-color: var(--border); font-weight: 600; } .tabs button[aria-selected=true] { background: var(--accent); color: #fff; border-color: var(--accent); }
body.adminseite .adminhaupt { flex: 1; min-height: 0; overflow-y: auto; }

/* Wartungsseite */
body.wartung { display: block; overflow: auto; height: auto; min-height: 100vh; background: var(--primary-dark-blue); color: #fff; text-align: center; }
body.wartung main { max-width: 34rem; margin: 0 auto; padding: 12vh 1.2rem 2rem; } body.wartung img { width: 150px; height: 150px; border-radius: 24px; background: #fff; box-shadow: 0 12px 30px rgba(0, 0, 0, .35); margin-bottom: 1.6rem; }
body.wartung h1 { color: #fff; font-size: 2rem; } body.wartung p { color: #d3dcea; font-size: 1.1rem; }

/* Fußzeile */
footer { flex-shrink: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; background: var(--primary-dark-blue); color: #d3dcea; padding: .5rem 1.2rem; font-size: .85rem; }
.footer-links { display: flex; gap: 1.2rem; } footer a { color: #fff; font-weight: 600; } footer a:hover { color: var(--primary-light-blue); text-decoration: none; } .copyright { color: #aab6c8; margin: 0; }

@media (max-width: 760px) {
  header.kopf { padding: .3rem .8rem; } header.kopf .brand img { height: 42px; } .header-titel { display: none; }
  .sidebar-toggle { display: block; width: 2.75rem; height: 2.75rem; }
  .sidebar { position: absolute; z-index: 20; top: 0; bottom: 0; left: 0; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 4px 0 20px rgba(0, 31, 63, .15); }
  .shell.nav-open .sidebar { transform: translateX(0); } .shell.nav-open::after { content: ""; position: absolute; inset: 0; z-index: 10; background: rgba(0, 31, 63, .35); } .shell.nav-open .sidebar { z-index: 20; }
  .hero { padding: 48px 0; } .hero h1 { font-size: 1.5em; }
  main input, main select, main button { min-height: 44px; } main input, main select, main textarea { font-size: 16px; }
  footer a { display: inline-block; padding: .7rem .3rem; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: .4rem .8rem; }
  .tabs button { flex: 0 0 auto; white-space: nowrap; min-height: 40px; padding: .4rem .9rem; font-size: .95rem; }
}

/* Rechtsseiten (Impressum, Datenschutzhinweis, AV-Vertrag) */
.textinhalt { max-width: 860px; } .textinhalt h1 { margin-top: 1rem; } .textinhalt h2 { margin-top: 1.8rem; border-top: 1px solid var(--border); padding-top: 1rem; } .textinhalt h3 { margin-top: 1.2rem; }
.textinhalt p, .textinhalt li { color: var(--text); } .textinhalt ul { padding-left: 1.3rem; } .textinhalt table { margin: .8rem 0; font-size: .88rem; } .textinhalt th { background: var(--surface); }
body.textseite .shell > main { overflow-y: auto; } .wartung-links a { color: #fff; font-weight: 600; text-decoration: underline; }
@media print { header.kopf, footer { display: none; } body { height: auto; overflow: visible; display: block; } .shell > main { overflow: visible; } }

/* Demo-Hinweis auf der Startseite */
.demo-hinweis { padding: 2rem 0; background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); } .demo-hinweis .container { max-width: 860px; }

details.karte > summary { cursor: pointer; }
details.karte ol { padding-left: 1.3rem; } details.karte li { margin: .55rem 0; line-height: 1.5; } details.karte code { word-break: break-word; }

/* Bestellung im Kundenkonto: Details als Liste */
.bestellung .hinweis { margin: .8rem 0; }
dl.details { display: grid; grid-template-columns: minmax(9rem, 14rem) 1fr; gap: .35rem 1rem; margin: 1rem 0 0; padding-top: .8rem; border-top: 1px solid var(--border); font-size: .95rem; }
dl.details dt { color: var(--text-dim); } dl.details dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 760px) { dl.details { grid-template-columns: 1fr; gap: 0; } dl.details dt { margin-top: .6rem; font-size: .85rem; } }

/* Admin: Bestellliste */
.filter { gap: .4rem; margin: 0 0 .8rem; } .filter button { flex: 0 0 auto; padding: .3rem .8rem; }
.karte dl.details { margin-top: .6rem; }

/* Admin: Änderungsprotokoll */
details.wlog { border-top: 1px solid var(--border); padding: .5rem 0; } details.wlog > summary { cursor: pointer; font-weight: 600; } details.wlog ul { margin: .5rem 0 .2rem; padding-left: 1.2rem; } details.wlog li { margin: .25rem 0; }

/* Rechnungen */
.rechnung .aktionen { margin-top: .8rem; } .rechnung .aktionen .btn { flex: 0 1 auto; }
.karte textarea { width: 100%; min-height: 4.2rem; font: inherit; padding: .5rem; border: 1px solid var(--border); border-radius: 8px; }
