/* INTERBYTES Branding – weisser Hintergrund, Logo-Blau, orange Akzente.
   Exakte Hex-Werte bei Bedarf aus dem Logo nachjustieren. */
:root {
  --blue: #1B8DCC;
  --blue-dark: #0C6A9E;
  --blue-soft: #EAF6FC;
  --orange: #F39200;
  --orange-soft: #FFF4E5;
  --white: #ffffff;
  --text: #1F2933;
  --muted: #6B7686;
  --line: #E7EBF0;
  --line-soft: #F1F4F8;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16,40,64,.04), 0 4px 16px rgba(16,40,64,.06);
  --shadow-lg: 0 8px 30px rgba(16,40,64,.10);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--text); background: var(--white); line-height: 1.55; font-size: 15px; -webkit-font-smoothing: antialiased; }

.topbar { height: 5px; background: linear-gradient(90deg, var(--orange) 0%, var(--orange) 40%, var(--blue) 100%); }

header.site {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 40px; border-bottom: 1px solid var(--line); background: var(--white);
  position: sticky; top: 0; z-index: 50;
}
header.site img { height: 44px; display: block; }
header.site .tag { color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .02em; }

/* Breite Layout-Container */
.wrap { max-width: 1360px; margin: 0 auto; padding: 0 40px; }
.hero { padding: 40px 0 8px; }
.hero h1 { font-size: 32px; line-height: 1.15; margin: 0 0 8px; color: var(--text); font-weight: 800; letter-spacing: -.01em; }
.hero h1 .accent { color: var(--blue); }
.hero .lead { color: var(--muted); font-size: 17px; margin: 0; max-width: 640px; }

/* Zwei-Spalten-Grid: Katalog + sticky Sidebar */
.layout { display: grid; grid-template-columns: 1fr 380px; gap: 28px; align-items: start; padding: 28px 0 80px; }
@media (max-width: 1080px) { .layout { grid-template-columns: 1fr; } }

.cards { display: grid; gap: 20px; }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px 24px; transition: box-shadow .18s, border-color .18s;
}
.card:hover { box-shadow: var(--shadow-lg); }

.cat-head { display: flex; align-items: center; gap: 12px; margin: 0 0 6px; }
.cat-head .dot { width: 6px; height: 26px; border-radius: 4px; background: var(--orange); flex-shrink: 0; }
.cat-head h2 { color: var(--blue-dark); font-size: 16px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; margin: 0; }

.item {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 15px 0; border-bottom: 1px solid var(--line-soft);
}
.item:last-child { border-bottom: none; padding-bottom: 4px; }
.item .info { flex: 1; min-width: 0; }
.item .info .name { font-weight: 600; font-size: 15px; }
.item .info .meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.item .info .meta .price { color: var(--blue-dark); font-weight: 600; }
.item .ctrl { flex-shrink: 0; }

/* Stepper / Number */
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--white); }
.stepper button { width: 38px; height: 40px; border: none; background: var(--white); color: var(--blue-dark); font-size: 20px; cursor: pointer; line-height: 1; transition: background .12s; }
.stepper button:hover { background: var(--blue-soft); }
.stepper input { width: 56px; height: 40px; text-align: center; border: none; border-left: 1px solid var(--line); border-right: 1px solid var(--line); font-size: 15px; font-family: var(--font); -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Toggle (Checkbox) */
.switch { position: relative; display: inline-block; width: 50px; height: 28px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: #cbd5e1; border-radius: 999px; transition: .2s; cursor: pointer; }
.switch .slider:before { content: ""; position: absolute; height: 22px; width: 22px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + .slider { background: var(--blue); }
.switch input:checked + .slider:before { transform: translateX(22px); }

select.sel { font-family: var(--font); font-size: 15px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); color: var(--text); min-width: 240px; }
select.sel:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(27,141,204,.15); }

/* Sidebar */
.sidebar { position: sticky; top: 92px; display: grid; gap: 18px; }
@media (max-width: 1080px) { .sidebar { position: static; } }

.summary-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.summary-card .head { background: var(--blue); color: #fff; padding: 16px 20px; font-weight: 700; font-size: 15px; }
.summary-card .body { padding: 20px; }
.totals-grid { display: grid; gap: 14px; margin-bottom: 18px; }
.total-row { display: flex; align-items: baseline; justify-content: space-between; }
.total-row .lbl { color: var(--muted); font-size: 14px; }
.total-row .val { font-size: 22px; font-weight: 800; color: var(--blue-dark); }
.total-row.month .val { color: var(--orange); }
.btn-cta { width: 100%; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; background: var(--blue); color: #fff; border: none; border-radius: var(--radius-sm); padding: 13px 22px; font-size: 15px; font-weight: 700; font-family: var(--font); transition: background .15s, transform .05s; }
.btn:hover { background: var(--blue-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.orange { background: var(--orange); }
.btn.orange:hover { filter: brightness(.95); }
.btn.ghost { background: var(--white); color: var(--blue-dark); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--blue-soft); }
.btn.sm { padding: 8px 14px; font-size: 13px; border-radius: 8px; }
.btn.danger { background: #fff; color: #b91c1c; border: 1px solid #f0c2c2; }
.btn.danger:hover { background: #fdeaea; }

/* Felder */
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.field .req { color: var(--orange); }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], textarea, select.full {
  font-family: var(--font); font-size: 15px; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); color: var(--text); width: 100%;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(27,141,204,.15); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }

/* Hinweise */
.notice { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; margin: 12px 0; }
.notice.warn { background: var(--orange-soft); border: 1px solid #F4D58A; color: #8a6100; }
.notice.err { background: #FDECEC; border: 1px solid #F3B4B4; color: #9b1c1c; }
.notice.ok { background: #ECF8F1; border: 1px solid #A7D8BC; color: #176c40; }

/* Ergebnis */
.result-wrap { max-width: 560px; margin: 40px auto; text-align: center; }
.code-box { font-size: 28px; font-weight: 800; letter-spacing: .1em; color: var(--blue-dark); background: var(--blue-soft); border: 2px dashed var(--orange); border-radius: var(--radius); padding: 22px; margin: 20px 0; }

/* Tabellen (Admin) */
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 12px 14px; border-bottom: 2px solid var(--line); }
table.list td { padding: 13px 14px; border-bottom: 1px solid var(--line-soft); }
table.list tr:hover td { background: var(--blue-soft); cursor: pointer; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--blue-soft); color: var(--blue-dark); }

table.qt { width: 100%; border-collapse: collapse; font-size: 14px; }
table.qt th { text-align: left; background: var(--blue); color: #fff; padding: 10px 12px; font-size: 13px; }
table.qt th.num, table.qt td.num { text-align: right; }
table.qt td { padding: 8px 12px; border-bottom: 1px solid var(--line-soft); }
table.qt input[type=number] { width: 90px; }

/* Admin Tabs */
.tabs { display: flex; gap: 6px; border-bottom: 2px solid var(--line); margin-bottom: 24px; }
.tab { padding: 12px 18px; cursor: pointer; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tab.active { color: var(--blue-dark); border-bottom-color: var(--orange); }

/* Admin Katalog */
.cat-block { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 18px; overflow: hidden; }
.cat-block .cat-bar { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 14px 18px; background: var(--blue-soft); }
.cat-block .cat-bar .title { font-weight: 800; color: var(--blue-dark); }
.cat-block .items { padding: 8px 18px 16px; }
.kitem { display: grid; grid-template-columns: 1fr auto auto auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.kitem:last-child { border-bottom: none; }
.kitem .k-label { font-weight: 600; }
.kitem .k-sub { color: var(--muted); font-size: 12px; }
.pill { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--line-soft); color: var(--muted); font-weight: 700; }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(15,30,45,.45); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; max-height: 90vh; overflow: auto; }
.modal .m-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal .m-head h3 { margin: 0; color: var(--blue-dark); }
.modal .m-body { padding: 22px; }
.modal .m-foot { padding: 16px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.x-btn { border: none; background: none; font-size: 22px; cursor: pointer; color: var(--muted); line-height: 1; }

.muted { color: var(--muted); }
.center { text-align: center; }
.hidden { display: none !important; }
.spacer { height: 16px; }
.flex { display: flex; gap: 10px; align-items: center; }
.flex.between { justify-content: space-between; }
.flex.wrap { flex-wrap: wrap; }
.opt-row { display: grid; grid-template-columns: 1fr 1fr 120px auto; gap: 8px; margin-bottom: 8px; align-items: center; }
