/* ── UP'N ATOM Kasse ─────────────────────────────────────────── */
:root {
  --bg: #0a0a0c;
  --bg-2: #101014;
  --panel: #15151b;
  --panel-2: #1c1c24;
  --panel-3: #23232d;
  --line: #2b2b36;
  --line-soft: #22222b;
  --text: #f3f3f6;
  --muted: #8b8b9b;
  --dim: #63636f;
  --accent: #ffb020;
  --accent-2: #ff8a00;
  --accent-soft: rgba(255, 176, 32, .12);
  --red: #ff4d4d;
  --red-soft: rgba(255, 77, 77, .12);
  --green: #3ddc97;
  --green-soft: rgba(61, 220, 151, .12);
  --blue: #5aa9ff;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 18px 45px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background:
    radial-gradient(1100px 600px at 12% -12%, rgba(255, 176, 32, .075), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(255, 77, 77, .05), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.02em; }

.mono, .num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

.wrap { width: 100%; max-width: 1320px; margin: 0 auto; padding: 22px 22px 60px; }

/* ── Topbar ─────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(10, 10, 12, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar-inner {
  max-width: 1320px; margin: 0 auto; padding: 0 22px;
  height: 64px; display: flex; align-items: center; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); flex: 0 0 auto; }
.brand:hover { color: var(--text); }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; flex: 0 0 auto;
  background: linear-gradient(145deg, var(--accent), var(--accent-2) 70%, #e2451d);
  display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(255, 138, 0, .28);
  font-size: 19px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-weight: 800; letter-spacing: .11em; font-size: 15px; text-transform: uppercase; }
.brand-sub { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }

.nav { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1 1 auto; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  padding: 8px 13px; border-radius: 999px; color: var(--muted);
  font-size: 13.5px; font-weight: 600; white-space: nowrap;
  border: 1px solid transparent; transition: .15s;
}
.nav a:hover { color: var(--text); background: var(--panel-2); }
.nav a.active { color: #1a1206; background: var(--accent); border-color: var(--accent); }
.nav a.nav-admin { color: var(--dim); }
.nav a.nav-admin:hover { color: var(--text); }

.uchip {
  display: flex; align-items: center; gap: 9px; flex: 0 0 auto;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 6px 5px 12px;
}
.uchip .uname { font-size: 13px; font-weight: 650; }
.role-badge {
  font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px;
  background: var(--panel-3); color: var(--muted);
}
.role-badge.admin { background: var(--accent-soft); color: var(--accent); }
.icon-btn {
  width: 30px; height: 30px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--muted); cursor: pointer;
  display: grid; place-items: center; font-size: 14px; padding: 0;
}
.icon-btn:hover { color: var(--text); border-color: var(--line); background: var(--panel-3); }

/* ── Generic ───────────────────────────────────────────────── */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 6px 0 18px; }
.page-head h1 { font-size: 26px; }
.page-head .sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
}
.card-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 14px; }

.statcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.statcard {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 16px;
}
.statcard .label { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.statcard .value { font-size: 25px; font-weight: 800; margin-top: 6px; letter-spacing: -.03em; }
.statcard .value.accent { color: var(--accent); }
.statcard .value.green { color: var(--green); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  padding: 9px 15px; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 650;
  cursor: pointer; transition: .15s; font-family: inherit; text-decoration: none;
}
.btn:hover { background: var(--panel-3); color: var(--text); border-color: #383844; }
.btn-primary { background: linear-gradient(160deg, var(--accent), var(--accent-2)); border-color: transparent; color: #1a1206; font-weight: 800; }
.btn-primary:hover { filter: brightness(1.06); color: #1a1206; }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.btn-danger { background: var(--red-soft); border-color: rgba(255, 77, 77, .3); color: #ff8f8f; }
.btn-danger:hover { background: rgba(255, 77, 77, .2); color: #ffb3b3; }
.btn-ghost { background: transparent; }
.btn-sm { padding: 6px 10px; font-size: 12px; border-radius: 8px; }
.btn-block { width: 100%; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
input[type=text], input[type=password], input[type=number], input[type=search], select, textarea {
  background: var(--bg-2); border: 1px solid var(--line); color: var(--text);
  border-radius: var(--radius-sm); padding: 10px 12px; font-size: 14px; font-family: inherit;
  width: 100%; transition: .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: rgba(255, 176, 32, .55); box-shadow: 0 0 0 3px rgba(255, 176, 32, .1);
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 18px, calc(100% - 12px) 18px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }

.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1 1 160px; }
.spacer { flex: 1 1 auto; }

.flash-stack { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.flash {
  padding: 11px 14px; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 600;
  border: 1px solid var(--line); background: var(--panel-2);
}
.flash.ok { background: var(--green-soft); border-color: rgba(61, 220, 151, .3); color: #9ff0cd; }
.flash.error { background: var(--red-soft); border-color: rgba(255, 77, 77, .3); color: #ffaaaa; }

.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th {
  text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--muted); font-weight: 800; padding: 9px 10px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: rgba(255, 255, 255, .018); }
.tbl .r { text-align: right; }
.tbl .muted { color: var(--muted); }
.tbl-wrap { overflow-x: auto; margin: 0 -6px; padding: 0 6px; }

.badge {
  display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; padding: 3px 8px; border-radius: 999px;
  background: var(--panel-3); color: var(--muted);
}
.badge.open { background: var(--accent-soft); color: var(--accent); }
.badge.paid { background: var(--green-soft); color: var(--green); }
.badge.off { background: var(--red-soft); color: #ff9d9d; }

.empty { text-align: center; color: var(--dim); padding: 34px 14px; font-size: 13.5px; }

.pager { display: flex; align-items: center; gap: 10px; justify-content: flex-end; margin-top: 14px; font-size: 13px; color: var(--muted); }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.filters .field { min-width: 130px; }

/* ── Login ─────────────────────────────────────────────────── */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.auth-hero {
  position: relative; overflow: hidden; padding: 54px 56px;
  display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(700px 500px at 18% 8%, rgba(255, 176, 32, .16), transparent 62%),
    radial-gradient(600px 460px at 92% 92%, rgba(255, 77, 77, .12), transparent 60%),
    #0d0d10;
  border-right: 1px solid var(--line-soft);
}
.auth-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 30% 30%, #000 25%, transparent 78%);
}
.auth-hero > * { position: relative; z-index: 1; }
.auth-logo { display: flex; align-items: center; gap: 14px; }
.auth-logo .mark {
  width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; font-size: 26px;
  background: linear-gradient(145deg, var(--accent), var(--accent-2) 65%, #e2451d);
  box-shadow: 0 12px 34px rgba(255, 138, 0, .3);
}
.auth-logo .name { font-size: 19px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.auth-logo .tag { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.auth-hero h2 { font-size: 40px; line-height: 1.1; letter-spacing: -.035em; max-width: 12ch; }
.auth-hero h2 span { color: var(--accent); }
.auth-hero p { color: var(--muted); max-width: 40ch; font-size: 14.5px; margin: 14px 0 0; }
.auth-feats { display: flex; flex-direction: column; gap: 10px; margin-top: 26px; }
.auth-feat { display: flex; gap: 10px; align-items: center; font-size: 13.5px; color: #c9c9d4; }
.auth-feat i { color: var(--accent); font-style: normal; }
.auth-foot { font-size: 11.5px; color: var(--dim); letter-spacing: .04em; }

.auth-panel { display: grid; place-items: center; padding: 40px 26px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h1 { font-size: 25px; }
.auth-card .lead { color: var(--muted); font-size: 13.5px; margin: 7px 0 24px; }
.auth-card form { display: flex; flex-direction: column; gap: 14px; }
.auth-card .btn { margin-top: 6px; padding: 12px; font-size: 14.5px; }
.auth-note { margin-top: 20px; font-size: 12px; color: var(--dim); text-align: center; }

/* ── Kasse / POS ───────────────────────────────────────────── */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 18px; align-items: start; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip {
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel); color: var(--muted); font-size: 13px; font-weight: 650;
  cursor: pointer; transition: .15s; font-family: inherit;
}
.chip:hover { color: var(--text); background: var(--panel-2); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #1a1206; font-weight: 800; }

.art-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 11px; }
.art-tile {
  text-align: left; padding: 14px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
  cursor: pointer; transition: .13s; font-family: inherit; display: flex;
  flex-direction: column; gap: 8px; min-height: 96px; position: relative; overflow: hidden;
}
.art-tile:hover { border-color: rgba(255, 176, 32, .45); transform: translateY(-2px); background: var(--panel-2); }
.art-tile:active { transform: scale(.985); }
.art-tile .cat { font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); font-weight: 800; }
.art-tile .nm { font-size: 14px; font-weight: 700; line-height: 1.25; flex: 1 1 auto; }
.art-tile .pr { font-size: 17px; font-weight: 800; color: var(--accent); letter-spacing: -.02em; }

.cart { position: sticky; top: 84px; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.cart-head { padding: 15px 17px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.cart-head h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .1em; }
.cart-body { padding: 10px 12px; max-height: 46vh; overflow-y: auto; }
.cart-line { display: flex; align-items: center; gap: 10px; padding: 9px 5px; border-bottom: 1px solid var(--line-soft); }
.cart-line:last-child { border-bottom: none; }
.cart-line .info { flex: 1 1 auto; min-width: 0; }
.cart-line .nm { font-size: 13.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-line .sub { font-size: 11.5px; color: var(--muted); }
.stepper { display: flex; align-items: center; gap: 2px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; }
.stepper button {
  width: 26px; height: 26px; border: none; background: transparent; color: var(--muted);
  font-size: 15px; cursor: pointer; border-radius: 7px; font-family: inherit; line-height: 1;
}
.stepper button:hover { background: var(--panel-3); color: var(--text); }
.stepper .q { min-width: 22px; text-align: center; font-size: 13px; font-weight: 700; }
.cart-line .lt { min-width: 66px; text-align: right; font-size: 13px; font-weight: 700; }
.cart-foot { padding: 14px 17px 16px; border-top: 1px solid var(--line); background: var(--bg-2); }
.cart-total { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.cart-total .lbl { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.cart-total .val { font-size: 30px; font-weight: 800; letter-spacing: -.035em; }
.cart-prov { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 13px; }
.cart-prov b { color: var(--green); font-weight: 700; }
.cart-foot .btn { padding: 13px; font-size: 15px; }

.search-box { position: relative; }
.search-box input { padding-left: 36px; }
.search-box::before {
  content: "⌕"; position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--dim); font-size: 16px;
}

/* ── Modal ─────────────────────────────────────────────────── */
.modal-back {
  position: fixed; inset: 0; z-index: 90; display: none; place-items: center;
  background: rgba(0, 0, 0, .66); backdrop-filter: blur(4px); padding: 20px;
}
.modal-back.show { display: grid; }
.modal {
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  padding: 26px; width: 100%; max-width: 400px; box-shadow: var(--shadow);
  animation: pop .16s ease-out;
}
@keyframes pop { from { transform: translateY(8px) scale(.985); opacity: 0; } }
.modal .ok-ring {
  width: 54px; height: 54px; border-radius: 999px; display: grid; place-items: center;
  background: var(--green-soft); color: var(--green); font-size: 26px; margin-bottom: 16px;
  border: 1px solid rgba(61, 220, 151, .3);
}
.modal h3 { font-size: 20px; }
.modal .m-sub { color: var(--muted); font-size: 13px; margin: 5px 0 16px; }
.receipt { border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); padding: 12px 0; margin-bottom: 16px; }
.receipt div { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; }
.receipt .sum { font-weight: 800; font-size: 16px; padding-top: 9px; }

/* ── Provisionen ──────────────────────────────────────────── */
.prov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 13px; }
.prov-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 17px; display: flex; flex-direction: column; gap: 12px; }
.prov-card.me { border-color: rgba(255, 176, 32, .35); box-shadow: 0 0 0 1px rgba(255, 176, 32, .08) inset; }
.prov-head { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--panel-3); color: var(--text); font-weight: 800; font-size: 14px; flex: 0 0 auto;
}
.prov-head .who { font-size: 14.5px; font-weight: 700; line-height: 1.2; }
.prov-head .who small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: .04em; }
.prov-open { display: flex; align-items: baseline; gap: 8px; }
.prov-open .amt { font-size: 27px; font-weight: 800; letter-spacing: -.035em; color: var(--accent); }
.prov-open .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 800; }
.prov-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line-soft); padding-top: 11px; gap: 8px; }
.prov-meta b { color: var(--text); font-weight: 700; }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 12px; }
.section-head h2 { font-size: 17px; }

/* ── Misc ──────────────────────────────────────────────────── */
.hint { font-size: 12px; color: var(--dim); margin-top: 8px; }
.inline-form { display: inline; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.nowrap { white-space: nowrap; }
details.row-details summary { cursor: pointer; color: var(--muted); font-size: 12.5px; }
details.row-details[open] summary { color: var(--text); }
details.row-details .det { padding: 10px 0 4px; display: flex; flex-direction: column; gap: 8px; max-width: 260px; }

@media (max-width: 960px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .auth-panel { min-height: 100vh; }
  .pos { grid-template-columns: 1fr; }
  .cart { position: static; }
  .cart-body { max-height: none; }
  .wrap { padding: 16px 14px 90px; }
  .topbar-inner { padding: 0 14px; gap: 12px; height: 58px; }
  .brand-sub { display: none; }
  .page-head h1 { font-size: 22px; }
  .tbl { font-size: 12.5px; }
}
@media (max-width: 620px) {
  .nav a { padding: 7px 11px; font-size: 12.5px; }
  .uchip .uname { display: none; }
  .statcard .value { font-size: 21px; }
  .art-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
