/* Managed Hub – calm business look (light like a POS back office, dark as an option), Vonloo blue */
:root {
  --bg: #111418; --bg2: #171a1f; --card: #1c2026; --card2: #242931; --line: #2f353e; --line2: #3c434e;
  --text: #eef0f3; --muted: #9aa1ad; --accent: #4c8dff; --accent-soft: rgba(76,141,255,.15); --accent-row: rgba(76,141,255,.20);
  --tabbar: #0c0e11; --zebra: rgba(255,255,255,.025); --shadow: none;
  --primary: #3b82f6; --on-primary: #ffffff; --tip: #eef0f3; --on-tip: #111418;
  --ok: #34c759; --warn: #ffb020; --bad: #ff5a52;
  --info-text: #b9cdff; --err-text: #ff8a84; --ok-text: #6fdc8c;
  color-scheme: dark;
}
:root[data-theme=light] {
  --bg: #eef0f3; --bg2: #ffffff; --card: #ffffff; --card2: #f4f6f9; --line: #e1e4e9; --line2: #c9ced6;
  --text: #22262c; --muted: #646b76; --accent: #1f6feb; --accent-soft: #eaf1fe; --accent-row: #d6e5fd;
  --tabbar: #e2e5e9; --zebra: #f6f7f9; --shadow: 0 1px 3px rgba(20,30,50,.06);
  --primary: #1f6feb; --on-primary: #ffffff; --tip: #22262c; --on-tip: #ffffff;
  --ok: #3a9a4f; --bad: #d9363e;
  --info-text: #1a55b8; --err-text: #b42318; --ok-text: #2c7a3f;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 15px/1.5 "Segoe UI", system-ui, -apple-system, sans-serif; color: var(--text); background: var(--bg); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
.ic { width: 18px; height: 18px; flex: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

/* hover hints */
[data-tip] { position: relative; }
[data-tip]:hover::before { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
  background: var(--tip); color: var(--on-tip); font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 8px;
  white-space: nowrap; z-index: 100; pointer-events: none; }

/* ---- layout ---------------------------------------------------------------------------- */
.app { display: grid; grid-template-columns: 270px minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .2s; }
.side { background: var(--bg2); border-right: 1px solid var(--line); padding: 14px 0 12px; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; overflow-x: hidden;
  z-index: 30; /* sticky makes its own layer – keep it (and its hover names) above the content and the workbench */ }
.brand { display: flex; align-items: center; gap: 12px; padding: 6px 22px 16px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.brand img { width: 36px; height: 36px; border-radius: 9px; flex: none; }
.brand span { display: block; font-weight: 800; font-size: 19px; letter-spacing: -.2px; line-height: 1.15; }
.brand small.brand-sub { color: var(--accent); font-weight: 700; font-size: 12.5px; letter-spacing: .2px; }
.brand small { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }

/* main entries: big icon + name; groups open to show their entries (like a POS back office) */
.nav { display: flex; flex-direction: column; }
.nav > a, .group-head { display: flex; align-items: center; gap: 16px; padding: 0 22px; height: 54px; color: var(--text); text-decoration: none;
  font-size: 17px; font-weight: 500; border: 0; background: none; width: 100%; text-align: left; border-left: 4px solid transparent; }
.nav > a .ic, .group-head .ic { width: 24px; height: 24px; color: var(--muted); }
.nav > a:hover, .group-head:hover { background: var(--card2); }
.nav > a.active { border-left-color: var(--accent); background: var(--accent-soft); }
.nav > a.active .ic, .group.current .group-head .ic { color: var(--accent); }
.group-head::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform .15s; margin-top: -4px; }
.group.open .group-head::after { transform: rotate(-135deg); margin-top: 4px; }
.group.current { border-left: 4px solid var(--accent); background: var(--accent-soft); }
.group.current .group-head { border-left: 0; padding-left: 18px; }
.sub-nav { display: none; flex-direction: column; padding: 0 0 8px; }
.group.open .sub-nav { display: flex; }
.sub-nav a { display: flex; align-items: center; gap: 8px; padding: 7px 22px 7px 62px; color: var(--text); text-decoration: none; font-size: 15px; font-weight: 500; }
.group.current .sub-nav a { padding-left: 58px; }
.sub-nav a:hover { color: var(--accent); }
.sub-nav a.active { color: var(--accent); font-weight: 700; }
.nav .lock { margin-left: auto; width: 14px; height: 14px; color: var(--muted); }
.nav .soon { margin-left: auto; font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; }

.collapse-btn { margin: auto auto 6px; width: 44px; height: 36px; border-radius: 10px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; }
.collapse-btn:hover { background: var(--card2); color: var(--text); }
.collapse-btn .ic { width: 24px; height: 24px; transition: transform .2s; }
.user-box { border-top: 1px solid var(--line); padding: 12px 18px 0; display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.user-box .who { flex: 1; min-width: 0; line-height: 1.3; }
.user-box .who b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; color: var(--muted); flex: none; }
.icon-btn:hover { color: var(--text); border-color: var(--line2); }
.icon-btn.copied { color: var(--ok); border-color: var(--ok); }

/* collapsed sidebar: icons only, names as hover hints */
.app.collapsed { grid-template-columns: 76px minmax(0, 1fr); }
.app.collapsed .side { overflow: visible; }
.app.collapsed .brand { padding: 6px 0 16px; justify-content: center; }
.app.collapsed .brand > div, .app.collapsed .nav .label, .app.collapsed .sub-nav, .app.collapsed .group-head::after,
.app.collapsed .user-box .who { display: none; }
.app-version { padding: 8px 18px 0; font-size: 12px; color: var(--muted); cursor: default; }
.app-version .short, .app.collapsed .app-version .long { display: none; }
.app.collapsed .app-version { padding: 8px 0 0; text-align: center; }
.app.collapsed .app-version .short { display: inline; }
.app.collapsed .nav > a, .app.collapsed .group-head { justify-content: center; padding: 0; }
.app.collapsed .group.current { background: none; border-left-color: transparent; }
.app.collapsed .group.current .group-head { border-left: 4px solid var(--accent); background: var(--accent-soft); padding: 0; }
.app.collapsed .collapse-btn .ic { transform: rotate(180deg); }
.app.collapsed .user-box { flex-direction: column; padding: 12px 0 0; }
.app.collapsed [data-tip]:hover::before { left: calc(100% + 10px); bottom: auto; top: 50%; transform: translateY(-50%); }
/* collapsed: a group's entries appear in a small menu next to its icon (hover or tap) */
.app.collapsed .group { position: relative; }
.app.collapsed .group:hover .sub-nav, .app.collapsed .group.flyout .sub-nav {
  display: flex; position: absolute; left: 100%; top: 0; z-index: 60; min-width: 220px; padding: 8px 0;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(10,20,40,.18); }
.app.collapsed .group:hover .sub-nav::after, .app.collapsed .group.flyout .sub-nav::after {
  content: ""; position: absolute; right: 100%; top: 0; width: 12px; height: 100%; }  /* bridge, so the menu stays open on the way */
.app.collapsed .sub-nav::before { content: attr(data-title); display: block; padding: 4px 16px 8px; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.app.collapsed .sub-nav a, .app.collapsed .group.current .sub-nav a { padding: 9px 16px; font-size: 15px; }
.app.collapsed .sub-nav .label, .app.collapsed .sub-nav .soon, .app.collapsed .sub-nav .lock { display: inline; }
.app.collapsed .sub-nav .soon, .app.collapsed .sub-nav .lock { margin-left: auto; }

/* ---- tabs + content ------------------------------------------------------------------- */
main { height: 100vh; display: flex; flex-direction: column; min-width: 0; }
.tabbar { display: flex; align-items: flex-end; gap: 4px; padding: 10px 14px 0; background: var(--tabbar); overflow-x: auto; flex: none; scrollbar-width: none; }
.tab { display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 12px 0 22px; border-radius: 10px 10px 0 0; cursor: pointer;
  color: var(--muted); font-size: 17px; white-space: nowrap; flex: none; user-select: none; }
.tab:hover { color: var(--text); background: color-mix(in srgb, var(--bg2) 50%, transparent); }
.tab.active { background: var(--bg2); color: var(--text); }
.tab:not(:has(.tab-x)) { padding-right: 22px; }
.tab-x { width: 28px; height: 28px; border-radius: 7px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; padding: 0; }
.tab-x svg { width: 18px; height: 18px; }
.tab-x:hover { background: var(--card2); color: var(--text); }
.views { flex: 1; min-height: 0; overflow: auto; position: relative; }
.page-view { padding: 0 0 60px; }
.page-view > :not(.page-head) { margin-left: 24px; margin-right: 24px; max-width: 1240px; }
.app-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--bg); }

/* title bar under the tabs, white like a toolbar */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--bg2); border-bottom: 1px solid var(--line); padding: 16px 24px; margin-bottom: 24px; }
h1 { font-size: 22px; margin: 0; font-weight: 700; }
h2 { font-size: 17px; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; font-weight: 700; }
h2 .ic { color: var(--accent); width: 20px; height: 20px; }
.sub { color: var(--muted); margin: 2px 0 0; }

/* cards & grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 22px; box-shadow: var(--shadow); }
.card.span2 { grid-column: span 2; }
.card.flush { padding: 8px 18px; }
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; } .side { position: static; height: auto; } .card.span2 { grid-column: auto; }
  main { height: auto; min-height: 100vh; } .views { min-height: 70vh; }
  .page-head { padding: 14px 16px; } .page-view > :not(.page-head) { margin-left: 16px; margin-right: 16px; }
}
.stat { font-size: 30px; font-weight: 800; }

/* dashboard: fixed tiles, arranged like apps on a phone */
.dash { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 1100px) { .dash { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .dash { grid-template-columns: 1fr; } }
.widget { min-height: 210px; position: relative; display: flex; flex-direction: column; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.w-body { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.w-body .sub { margin: 0; }
.w-body .link-box { align-self: stretch; }
.w-hide { display: none; position: absolute; top: -10px; left: -10px; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--bg);
  background: var(--muted); color: var(--bg2); place-items: center; padding: 0; z-index: 2; }
.w-hide .ic { width: 16px; height: 16px; stroke-width: 3; }
.w-hide:hover { background: var(--bad); color: #fff; }
.dash.editing .w-hide { display: grid; }
.dash.editing .widget { cursor: grab; touch-action: none; animation: wiggle .28s ease-in-out infinite alternate; }
.dash.editing .widget:nth-child(2n) { animation-delay: -.14s; }
.dash.editing .w-body { pointer-events: none; }
.widget.dragging { position: fixed; z-index: 50; animation: none !important; pointer-events: none; cursor: grabbing; scale: 1.04;
  box-shadow: 0 20px 50px rgba(10,20,40,.28); }
.slot { border: 2px dashed var(--line2); border-radius: 12px; min-height: 210px; }
.dash:not(.editing) .slot:not(.target) { display: none; }
.slot.target { border-color: var(--accent); background: var(--accent-soft); }
@keyframes wiggle { from { rotate: -.5deg; } to { rotate: .5deg; } }
@media (prefers-reduced-motion: reduce) { .dash.editing .widget { animation: none; } }
.dash-tray { margin-top: 24px; }
.tray-items { display: flex; flex-wrap: wrap; gap: 10px; }
.tray-item { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px 0 12px; border-radius: 999px;
  border: 1px dashed var(--line2); background: var(--card2); font-weight: 600; }
.tray-item .ic { color: var(--accent); }
.tray-item:hover { border-color: var(--accent); color: var(--accent); }
.faces { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.faces .sub { margin-left: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; background: var(--card2); border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.chip .ic { width: 15px; height: 15px; color: var(--accent); }
.chip.ok { color: var(--ok); } .chip.ok .ic { color: var(--ok); }

/* buttons: main action as a round blue pill */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; height: 40px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--line2); font-weight: 600; text-decoration: none; color: var(--text); }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn .ic { color: var(--accent); }
.btn.primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); border-radius: 999px; padding: 0 22px; }
.btn.primary:hover { filter: brightness(1.08); color: var(--on-primary); }
.btn.primary .ic { color: var(--on-primary); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { border-color: var(--bad); }
.btn:disabled { opacity: .4; cursor: default; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* forms */
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form .full { grid-column: 1 / -1; }
@media (max-width: 760px) { .form { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 14px; color: var(--muted); font-weight: 600; }
.field input, .field select { height: 44px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line2); background: var(--bg2); }
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field input:disabled, .field select:disabled { background: var(--card2); }
.field input[type=color] { padding: 4px; width: 80px; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.switch { width: 46px; height: 26px; border-radius: 13px; background: var(--line2); position: relative; flex: none; border: 0; }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .15s; }
.switch.on { background: var(--accent); }
.switch.on::after { left: 23px; }
.seg { display: inline-grid; grid-auto-flow: column; gap: 4px; padding: 4px; border-radius: 12px; background: var(--card2); border: 1px solid var(--line); }
.seg button { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 9px; border: 0; background: none; color: var(--muted); font-weight: 600; }
.seg button.active { background: var(--bg2); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg button .ic { color: var(--accent); }
.msg { padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.msg.err { background: rgba(255,90,82,.12); color: var(--err-text); }
.msg.ok { background: rgba(52,199,89,.12); color: var(--ok-text); }
.msg.info { background: var(--accent-soft); color: var(--info-text); }

/* modules */
.mod { display: flex; flex-direction: column; gap: 12px; }
.mod.booked { border-color: var(--accent); }
.mod-head { display: flex; align-items: center; gap: 12px; }
.mod-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft); display: grid; place-items: center; }
.mod-icon .ic { width: 24px; height: 24px; color: var(--accent); }
.mod-name { font-weight: 700; font-size: 17px; }
.price { font-size: 22px; font-weight: 800; }
.price small { font-size: 13px; color: var(--muted); font-weight: 600; }
.feat { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; color: var(--muted); }
.feat li { display: flex; gap: 8px; align-items: center; }
.feat .ic { width: 15px; height: 15px; color: var(--ok); }
.mod .btn, .mod > .chip:last-child { margin-top: auto; align-self: flex-start; }
.mod.dev { border-style: dashed; }
.mod.dev .mod-icon { background: var(--card2); }
.mod.dev .mod-icon .ic { color: var(--muted); }
.mod-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--accent); background: var(--accent-soft);
  border-radius: 999px; padding: 1px 8px; vertical-align: middle; margin-left: 4px; }
.feat .soon-feat .ic { color: var(--muted); }
.feat .soon { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; }
.req { margin: 0; font-size: 13px; color: var(--muted); }
.soon-chip { color: var(--muted); }
/* Apps page: cards with the first features, the rest folds open */
.app-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 12px; margin-bottom: 18px; }
.app-stats .card { padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.app-stats b { font-size: 22px; font-weight: 800; }
.mod-group .grid { align-items: start; }
.app-card .mod-head { align-items: flex-start; }
.app-card .mod-head .app-status { margin-left: auto; }
.app-card .feat .app-extra { display: none; }
.app-card.open .feat .app-extra { display: flex; }
.app-toggle { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none;
  color: var(--accent); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.app-toggle [data-icon] { display: grid; transition: transform .15s; }
.app-toggle .ic { width: 18px; height: 18px; }
.app-card.open .app-toggle [data-icon] { transform: rotate(180deg); }
.app-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); display: grid; place-items: center; flex: none; }
.app-icon .ic { width: 22px; height: 22px; color: var(--accent); }
.app-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.app-text b { font-size: 16px; }
.app-text .sub { margin: 0; font-size: 13.5px; }
.app-status { font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap;
  background: var(--card2); color: var(--muted); border: 1px solid var(--line); }
.app-status.ok { color: var(--ok); border-color: var(--ok); background: transparent; }
.app-status.wait { color: var(--warn); border-color: var(--warn); background: transparent; }
.app-bundle { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 14px; border-radius: 14px;
  border: 1px dashed var(--accent); background: var(--accent-soft); }
.app-bundle-act { display: flex; align-items: center; gap: 10px; }
@media (max-width: 760px) { .app-bundle { flex-wrap: wrap; } }
.mod-group { margin-bottom: 30px; }
.mod-group:first-child { margin-top: 0; }
.group-title { font-size: 19px; margin-bottom: 14px; }
#mods > .msg { margin-bottom: 20px; }

/* tables: calm rows with zebra stripes, selected row tinted */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0 12px; height: 48px; }
th { font-size: 15px; font-weight: 600; color: var(--text); border-bottom: 1px solid var(--line2); }
tbody tr:nth-child(even) { background: var(--zebra); }
tbody tr:hover { background: var(--accent-soft); }
tbody tr.selected { background: var(--accent-row); }
td .btn { height: 34px; padding: 0 12px; font-size: 14px; }
.role { font-size: 13px; padding: 2px 10px; border-radius: 999px; background: var(--card2); border: 1px solid var(--line); }
.role.owner { color: var(--accent); border-color: var(--accent); }
.state { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--ok); color: var(--ok); background: color-mix(in srgb, var(--ok) 15%, transparent); }
.state .ic { width: 14px; height: 14px; }
.state.off { border-color: var(--bad); color: var(--bad); background: color-mix(in srgb, var(--bad) 15%, transparent); }
.table-foot { display: flex; justify-content: space-between; padding: 12px 12px 6px; border-top: 1px solid var(--line2); color: var(--muted); font-size: 14px; }

.link-box { display: flex; gap: 8px; align-items: center; background: var(--card2); border: 1px solid var(--line); border-radius: 10px; padding: 6px 6px 6px 12px; }
.link-box code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 13px; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .ic { width: 44px; height: 44px; color: var(--line2); margin-bottom: 8px; }

/* login */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.auth-card { width: min(440px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 30px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 10px 40px rgba(20,30,50,.08); }
.auth-card .brand { padding: 0 0 14px; margin: 0; }
.auth-card .brand > div { font-weight: 800; font-size: 19px; }
.auth-card .brand small { font-weight: 500; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--card2); border-radius: 10px; padding: 4px; border: 1px solid var(--line); }
.tabs button { height: 36px; border: 0; background: none; border-radius: 8px; font-weight: 600; color: var(--muted); }
.tabs button.active { background: var(--bg2); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* ---- Retail → Artikel ------------------------------------------------------------------- */
.ar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.ar-card { display: flex; flex-direction: column; text-align: left; padding: 0; border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); overflow: hidden; box-shadow: var(--shadow); color: var(--text); }
.ar-card:hover { border-color: var(--accent); }
.ar-img { aspect-ratio: 1; background: var(--card2); display: grid; place-items: center; }
.ar-img img { width: 100%; height: 100%; object-fit: contain; }
.ar-img .ic { width: 40px; height: 40px; color: var(--line2); }
.ar-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.ar-body .sub { margin: 0; font-size: 13px; }
.ar-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }

.ar-modal { position: fixed; inset: 0; z-index: 80; background: rgba(10,15,25,.45); display: grid; place-items: center; padding: 20px; }
.ar-modal > .card { width: min(900px, 100%); max-height: 90vh; overflow: auto; }
.ar-modal-head { display: flex; justify-content: space-between; align-items: center; }
.ar-templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.ar-tpl { display: flex; flex-direction: column; gap: 3px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--card2);
  text-align: left; color: var(--text); }
.ar-tpl:hover { border-color: var(--accent); background: var(--accent-soft); }
.ar-tpl img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--bg2); border-radius: 8px; margin-bottom: 6px; }
.ar-tpl span { font-size: 12px; color: var(--muted); }
.ar-tpl.blank > div { aspect-ratio: 1; display: grid; place-items: center; border: 2px dashed var(--line2); border-radius: 8px; margin-bottom: 6px; }
.ar-tpl.blank .ic { width: 36px; height: 36px; color: var(--accent); }

.ar-head .row { flex-wrap: nowrap; }
.ar-pub { display: flex; align-items: center; gap: 10px; font-weight: 600; margin-right: 6px; }
.btn.pulse { box-shadow: 0 0 0 4px var(--accent-soft); }
.ar-edit { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1100px) { .ar-edit { grid-template-columns: 1fr; } }
.ar-side { display: flex; flex-direction: column; gap: 18px; }
.ar-stage-card { position: sticky; top: 12px; }
.ar-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.ar-swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.ar-swatches button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line2); padding: 0; }
.ar-swatches button.active { box-shadow: 0 0 0 3px var(--accent); border-color: var(--bg2); }
.ar-stage { background: var(--card2); border-radius: 10px; padding: 14px; user-select: none; touch-action: none; }
.ar-stage[data-tool=rect], .ar-stage[data-tool=ellipse] { cursor: crosshair; }
.ar-photo { position: relative; margin: 0 auto; max-width: 620px; }
.ar-photo img { display: block; width: 100%; pointer-events: none; }
.ar-nophoto { aspect-ratio: 1; display: grid; place-content: center; justify-items: center; gap: 8px; color: var(--muted); border: 2px dashed var(--line2); border-radius: 10px; }
.ar-nophoto .ic { width: 40px; height: 40px; }
.ar-zone { position: absolute; border: 2px dashed var(--accent); background: rgba(31,111,235,.12); cursor: move; display: grid; place-items: center; }
.ar-zone.ellipse { border-radius: 50%; }
.ar-zone.sel { border-style: solid; background: rgba(31,111,235,.2); }
.ar-zone span { font-size: 12px; font-weight: 700; color: #fff; background: rgba(31,111,235,.9); padding: 2px 8px; border-radius: 999px; text-align: center;
  line-height: 1.3; pointer-events: none; white-space: nowrap; }
.ar-zone small { display: block; font-weight: 500; font-size: 11px; }
.ar-zone i { position: absolute; width: 14px; height: 14px; background: #fff; border: 2px solid var(--accent); border-radius: 3px; }
.ar-zone i[data-h=nw] { left: -8px; top: -8px; cursor: nwse-resize; } .ar-zone i[data-h=se] { right: -8px; bottom: -8px; cursor: nwse-resize; }
.ar-zone i[data-h=ne] { right: -8px; top: -8px; cursor: nesw-resize; } .ar-zone i[data-h=sw] { left: -8px; bottom: -8px; cursor: nesw-resize; }
.ar-rows { display: flex; flex-direction: column; gap: 8px; }
.ar-rowline { display: flex; gap: 8px; align-items: center; }
.ar-rowline input[type=color] { width: 44px; height: 40px; border: 1px solid var(--line2); border-radius: 8px; padding: 3px; background: var(--bg2); flex: none; }
.ar-input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line2); background: var(--bg2); }
.ar-input:focus { outline: none; border-color: var(--accent); }
.chip button { border: 0; background: none; padding: 0; margin-left: 2px; color: var(--muted); display: inline-grid; place-items: center; }
.chip button .ic { width: 12px; height: 12px; color: inherit; }
.icon-btn:disabled { opacity: .35; cursor: default; }

/* ---- Production Hub → Aufträge --------------------------------------------------------------- */
.od-search { width: 320px; }
.od-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.od-tab { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line2);
  background: var(--card); color: var(--text); font-weight: 600; }
.od-tab span { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--card2); font-size: 12px; display: grid; place-items: center; }
.od-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.od-tab.active span { background: rgba(255,255,255,.25); }
.od-bulk { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 14px; border-radius: 12px;
  background: var(--accent-soft); border: 1px solid var(--accent); }
.od-table tbody tr { cursor: pointer; }
.od-table td { height: 60px; }
.od-check { width: 40px; } .od-check input { width: 18px; height: 18px; }
.od-thumb { width: 60px; } .od-thumb img { width: 48px; height: 48px; object-fit: contain; border-radius: 8px; background: var(--card2); display: block; }
.od-empty { text-align: center; color: var(--muted); height: 120px !important; }
.st { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--card2); }
.st-neu { background: #1f6feb; color: #fff; }
.st-in_arbeit { background: #f5a524; color: #1c1300; }
.st-fertig { background: #2f9e44; color: #fff; }
.st-abgeholt { background: var(--card2); color: var(--muted); }
.st-storniert { background: transparent; color: var(--bad); border: 1px solid var(--bad); }
h1 .st { vertical-align: middle; font-size: 14px; margin-left: 8px; }
.od-flow { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.od-step { height: 46px; padding: 0 20px; border-radius: 12px; border: 1px solid var(--line2); background: var(--card); color: var(--text); font-weight: 700; font-size: 15px; }
.od-step.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.od-step.cancel { margin-left: auto; color: var(--bad); display: inline-flex; align-items: center; gap: 8px; }
.od-step.cancel .ic { width: 18px; height: 18px; }
.od-step.cancel.active { background: var(--bad); border-color: var(--bad); color: #fff; cursor: default; }
.od-detail { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1100px) { .od-detail { grid-template-columns: 1fr; } }
.od-parts, .od-side { display: flex; flex-direction: column; gap: 18px; }
.od-part h2 .muted { font-weight: 500; font-size: 14px; }
.od-pics { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 12px; }
.od-pics a { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--muted); font-size: 13px; font-weight: 600; }
.od-pics img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 10px; background: var(--card2); border: 1px solid var(--line); }
.od-pics .file img { background: repeating-conic-gradient(#e7e9ee 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.od-files, .od-hand { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.od-files .btn { height: 36px; font-size: 14px; }
.od-dl { display: grid; grid-template-columns: 90px 1fr; gap: 6px 12px; margin: 0; }
.od-dl dt { color: var(--muted); } .od-dl dd { margin: 0; }
.od-note { width: 100%; min-height: 90px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line2); background: var(--bg2); color: var(--text); font: inherit; resize: vertical; }
.od-history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.od-history li { display: flex; flex-direction: column; border-left: 3px solid var(--accent-soft); padding-left: 10px; }
.od-history span { color: var(--muted); font-size: 13px; }
.od-badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.app.collapsed .od-badge { position: absolute; top: 6px; right: 12px; min-width: 18px; height: 18px; font-size: 11px; }
.hub-toast { position: fixed; right: 24px; bottom: 24px; z-index: 90; display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 16px;
  border-radius: 14px; background: var(--card); border: 1px solid var(--accent); box-shadow: 0 12px 40px rgba(10,20,40,.25);
  transform: translateY(140%); transition: transform .25s; font-weight: 600; }
.hub-toast.show { transform: none; }
.hub-toast .ic { color: var(--accent); }

/* ---- Production Hub → Tools ------------------------------------------------------------- */
.tl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.tl-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; text-align: left; color: var(--text); cursor: pointer; }
.tl-tile:hover { border-color: var(--accent); }
.tl-tile b { font-size: 17px; }
.tl-tile .sub { margin: 0; }
.tl-work { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1000px) { .tl-work { grid-template-columns: 1fr; } }
.tl-opts { display: flex; flex-direction: column; gap: 16px; }
.tl-opts > .btn.primary { align-self: flex-start; }
.tl-out { position: sticky; top: 16px; }
.tl-h3 { font-size: 15px; margin: 4px 0 -6px; }
.tl-tiny { margin: -8px 0 0; font-size: 13px; }
.tl-wait { text-align: center; padding: 40px 0; }
.tl-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 16px; border: 2px dashed var(--line2); border-radius: 12px;
  background: var(--card2); cursor: pointer; text-align: center; }
.tl-drop:hover, .tl-drop.over { border-color: var(--accent); background: var(--accent-soft); }
.tl-drop .ic { width: 28px; height: 28px; color: var(--accent); }
.tl-drop .sub { margin: 0; font-size: 13px; }
.tl-files { display: flex; flex-direction: column; gap: 6px; margin-top: -8px; }
.tl-files:empty { display: none; }
.tl-file { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); }
.tl-file > .ic { color: var(--accent); }
.tl-file .icon-btn { width: 30px; height: 30px; }
.tl-file .icon-btn:disabled { opacity: .3; }
.tl-fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.tl-seg { display: flex; flex-wrap: wrap; align-self: flex-start; }
.tl-seg button { height: 34px; padding: 0 11px; }
.tl-row3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.tl-form { gap: 12px; }
.tl-opts .field textarea { padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line2); background: var(--bg2); resize: vertical; }
.tl-unit { display: flex; align-items: center; border: 1px solid var(--line2); border-radius: 8px; background: var(--bg2); overflow: hidden; }
.tl-unit:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field .tl-unit input { flex: 1; min-width: 0; border: 0; box-shadow: none; background: none; }
.tl-unit span { padding: 0 10px; color: var(--muted); font-size: 13px; }
.field input[type=range] { padding: 0; border: 0; background: none; }
.tl-check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.tl-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.tl-preview { display: grid; place-items: center; padding: 14px; border-radius: 10px; border: 1px solid var(--line); margin-bottom: 14px;
  background: repeating-conic-gradient(var(--card2) 0 25%, var(--bg2) 0 50%) 0 0 / 18px 18px; }
.tl-preview img { max-width: 100%; max-height: 360px; box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.tl-preview.small { margin: 0; padding: 8px; width: 170px; flex: none; }
.tl-preview.small img { max-height: 170px; }
.tl-notes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.msg.warn { background: rgba(255,176,32,.14); color: var(--text); }
.tl-dl { display: flex; flex-wrap: wrap; gap: 8px; }
.tl-dl .btn small { opacity: .7; font-weight: 400; }
.tl-check-top { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 14px; flex-wrap: wrap; }
.tl-table { border-collapse: collapse; flex: 1; min-width: 240px; }
.tl-table td { padding: 5px 10px 5px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.tl-formats { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; margin-top: 12px; }
.tl-fmt { display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border-radius: 10px; border: 1px solid var(--line); }
.tl-fmt b { font-size: 16px; }
.tl-fmt span { font-size: 13px; font-weight: 600; }
.tl-fmt small { color: var(--muted); font-size: 12px; }
.tl-fmt.ok { background: rgba(52,199,89,.12); } .tl-fmt.ok span { color: var(--ok-text); }
.tl-fmt.warn { background: rgba(255,176,32,.14); } .tl-fmt.warn span { color: var(--warn); }
.tl-fmt.bad { background: rgba(255,90,82,.10); } .tl-fmt.bad span { color: var(--err-text); }
.tl-conv { display: flex; flex-direction: column; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.tl-conv h2 { margin: 0; }
.tl-swatch { height: 26px; border-radius: 8px; border: 1px solid var(--line); }
.tl-calc { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 12px; background: var(--card2); }
.tl-big { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.tl-big b { font-size: 36px; line-height: 1; color: var(--accent); }
.tl-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.tl-sum:empty { display: none; }
.tl-sum div { display: flex; flex-direction: column; }
.tl-sum b { font-size: 18px; }
.tl-sheet { width: 100%; max-height: 520px; display: block; margin-bottom: 14px; }
.tl-paper { fill: var(--bg2); stroke: var(--line2); stroke-width: 1; }
.tl-margin { fill: none; stroke: var(--line2); stroke-width: .6; stroke-dasharray: 3 3; }
.tl-item { fill: var(--accent-soft); stroke: var(--accent); stroke-width: .8; }
.ic.spin { animation: tl-spin 1s linear infinite; }
@keyframes tl-spin { to { transform: rotate(360deg); } }

/* ---- Production Hub → Aufgaben ---------------------------------------------------------- */
.tk-add { padding: 14px 18px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 12px; }
.tk-add-row { display: flex; align-items: center; gap: 12px; }
.tk-plus .ic { color: var(--accent); width: 22px; height: 22px; }
#tkNew { flex: 1; min-width: 0; height: 46px; border: 0; background: none; font-size: 17px; outline: none; }
.tk-add-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.tk-add-opts .btn.primary { margin-left: auto; }
.tk-due button { height: 32px; padding: 0 12px; }
.tk-select { height: 38px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line2); background: var(--bg2); }
.tk-lbl { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; }
.tk-flag { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line2);
  background: var(--bg2); color: var(--muted); font-weight: 600; }
.tk-flag.on { border-color: var(--warn); color: var(--text); background: rgba(255,176,32,.14); }
.tk-flag.on .ic, .tk-star.on .ic { color: var(--warn); fill: var(--warn); }
.tk-list { display: flex; flex-direction: column; gap: 8px; }
.tk-item { background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.tk-item.important { border-left: 4px solid var(--warn); }
.tk-item.open { border-color: var(--accent); }
.tk-item.fresh { animation: tk-fresh 1.2s ease; }
@keyframes tk-fresh { from { background: var(--accent-soft); } }
.tk-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
.tk-box { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line2); background: none; display: grid; place-items: center; flex: none; padding: 0; }
.tk-box .ic { width: 15px; height: 15px; color: transparent; }
.tk-box:hover { border-color: var(--ok); } .tk-box:hover .ic { color: var(--ok); }
.tk-item.done .tk-box { background: var(--ok); border-color: var(--ok); } .tk-item.done .tk-box .ic { color: #fff; }
.tk-item.done .tk-title { text-decoration: line-through; color: var(--muted); }
.tk-main { flex: 1; min-width: 0; cursor: pointer; }
.tk-title { font-weight: 600; overflow-wrap: anywhere; }
.tk-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); margin-top: 2px; }
.tk-meta > * { display: inline-flex; align-items: center; gap: 5px; }
.tk-meta .ic { width: 14px; height: 14px; }
.tk-due-chip.today { color: var(--accent); font-weight: 600; }
.tk-due-chip.late { color: var(--err-text); font-weight: 600; }
.tk-order { text-decoration: none; font-weight: 600; }
.tk-star { width: 34px; height: 34px; border: 0; background: none; display: grid; place-items: center; color: var(--line2); flex: none; }
.tk-star:hover { color: var(--warn); }
.od-tab span.tk-hot { background: var(--bad); color: #fff; }
.tk-edit { padding: 4px 18px 16px 52px; display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--line); padding-top: 14px; }
.tk-edit textarea { padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line2); background: var(--bg2); resize: vertical; }
.tk-check-head { display: flex; gap: 10px; align-items: baseline; }
.tk-checklist { display: flex; flex-direction: column; gap: 4px; }
.tk-ci { display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 2px; border-radius: 8px; }
.tk-ci input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--ok); }
.tk-ci span { flex: 1; }
.tk-ci.done span { text-decoration: line-through; color: var(--muted); }
.tk-ci .icon-btn { width: 28px; height: 28px; opacity: 0; }
.tk-ci:hover .icon-btn { opacity: 1; }
.tk-ci.add .ic { color: var(--accent); }
.tk-ci.add input { flex: 1; height: 36px; border: 0; border-bottom: 1px dashed var(--line2); background: none; outline: none; }
.tk-edit-foot { display: flex; align-items: center; gap: 10px; }
.tk-edit-foot .muted { margin-right: auto; font-size: 13px; }
.tk-empty { text-align: center; }
.tk-mini { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.tk-mini .tk-item { box-shadow: none; }
.tk-mini .tk-row { padding: 6px 10px; }
.tk-mini .tk-main { cursor: default; }
@media (max-width: 700px) { .tk-add-opts .btn.primary { margin-left: 0; } .tk-edit { padding-left: 18px; } }

/* ---- Club Hub ---------------------------------------------------------------------------- */
.cl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.cl-card { padding: 0; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; }
.cl-card:hover { border-color: var(--accent); }
.cl-card-top { position: relative; height: 170px; background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--c1) 70%, #fff) 0%, var(--c1) 55%, color-mix(in srgb, var(--c1) 60%, #000) 100%);
  display: grid; place-items: center; overflow: hidden; }
.cl-card-top::after { content: ""; position: absolute; inset: auto 0 0 0; height: 6px; background: linear-gradient(90deg, var(--c2) 0 50%, var(--c3) 50%); }
.cl-card-shirt { height: 150px; filter: drop-shadow(0 10px 14px rgba(0,0,0,.35)); transform: translateY(14px); }
.cl-crest { position: absolute; left: 14px; top: 14px; width: 54px; height: 54px; border-radius: 50%; background: #fff; display: grid; place-items: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.3); overflow: hidden; color: #111; font-weight: 800; }
.cl-crest img { width: 86%; height: 86%; object-fit: contain; }
.cl-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.cl-card-body .sub { margin: 0; }
.cl-empty { text-align: center; }
.cl-colors { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cl-colors button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line2); padding: 0; }
.cl-colors input[type=color] { width: 44px; height: 32px; padding: 2px; border-radius: 8px; border: 1px solid var(--line2); }
.cl-design { display: grid; grid-template-columns: minmax(340px, 460px) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1100px) { .cl-design { grid-template-columns: 1fr; } }
.cl-side { display: flex; flex-direction: column; gap: 18px; }
.cl-logo { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cl-logo-img { width: 72px; height: 72px; border-radius: 14px; border: 1px dashed var(--line2); display: grid; place-items: center; background: var(--card2); overflow: hidden; }
.cl-logo-img img { width: 100%; height: 100%; object-fit: contain; }
.cl-color-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cl-color { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); text-align: center; cursor: pointer; }
.cl-color input { width: 100%; height: 54px; border: 1px solid var(--line2); border-radius: 12px; padding: 3px; background: var(--bg2); cursor: pointer; }
.cl-color.sm input { height: 34px; }
.cl-color.sm { font-size: 11.5px; }
.cl-flex { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.cl-flex-row { display: flex; gap: 8px; align-items: center; }
.cl-flex-row input[type=color] { width: 44px; height: 36px; padding: 2px; border: 1px solid var(--line2); border-radius: 8px; }
.cl-flex-row input:not([type]) { flex: 1; height: 36px; border-radius: 8px; border: 1px solid var(--line2); background: var(--bg2); padding: 0 10px; }
.cl-area { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line2); background: var(--bg2); resize: vertical; }
.cl-preview { position: sticky; top: 12px; padding: 14px; }
.cl-preview-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.cl-preview-head h2 { margin: 0; }
.cl-frame { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); height: min(78vh, 820px); background: #0b0f17; }
.cl-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.cl-items { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .cl-items { grid-template-columns: 1fr; } }
.cl-plist { display: flex; flex-direction: column; gap: 8px; }
.cl-pitem { display: flex; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); text-align: left; color: var(--text); }
.cl-pitem.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cl-pitem img { width: 54px; height: 54px; object-fit: contain; background: var(--card2); border-radius: 8px; }
.cl-pitem small { display: block; color: var(--muted); }
.cl-padd { display: flex; gap: 6px; }
.cl-padd .btn { flex: 1; padding: 0 10px; }
.cl-padd-btn { width: 100%; justify-content: center; }
.cl-pick h3 { font-size: 15px; margin: 18px 0 10px; }
.cl-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.cl-pick-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 10px 12px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--card); color: var(--text); text-align: center; cursor: pointer; }
.cl-pick-tile:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cl-pick-tile img { width: 100%; max-width: 110px; aspect-ratio: 1; object-fit: contain; background: var(--card2); border-radius: 10px; }
.cl-pick-tile .sub { margin: 0; font-size: 12.5px; }
.cl-pick-retail { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.cl-pick-noimg { width: 54px; height: 54px; border-radius: 8px; background: var(--card2); flex: none; }
.cl-ebar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 18px; flex-wrap: wrap; }
.cl-pname { flex: 1; min-width: 180px; font-size: 20px; font-weight: 700; border: 0; background: none; outline: none; }
.cl-edit { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(320px, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1200px) { .cl-edit { grid-template-columns: 1fr; } }
.cl-stage-card { position: sticky; top: 12px; }
.cl-add .btn { height: 36px; padding: 0 12px; }
.cl-stage { background: radial-gradient(circle at 50% 30%, #f6f7f9, #dfe3ea); }
:root:not([data-theme=light]) .cl-stage { background: radial-gradient(circle at 50% 30%, #2a303a, #171b22); }
.cl-photo { max-width: 560px; }
.cl-zone { border-color: rgba(31,111,235,.75); background: rgba(31,111,235,.06); }
.cl-zone.sel { background: rgba(31,111,235,.12); }
.cl-zone.logo img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.cl-zone .cl-sample { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.cl-zone em { position: absolute; left: 0; top: -22px; font-style: normal; font-size: 11px; font-weight: 700; color: #fff; background: rgba(31,111,235,.92);
  padding: 2px 8px; border-radius: 999px; white-space: nowrap; opacity: 0; transition: opacity .15s; pointer-events: none; }
.cl-zone:hover em, .cl-zone.sel em { opacity: 1; }
.cl-zone span { pointer-events: none; }
.cl-zsample { height: 110px; border-radius: 10px; margin-bottom: 14px; display: grid; place-items: center;
  background: repeating-linear-gradient(45deg, #1d2430 0 10px, #222b38 10px 20px); }
.cl-zsample svg { width: 100%; height: 100%; }
.cl-zlist { display: flex; flex-direction: column; gap: 6px; }
.cl-zlist button { display: flex; flex-direction: column; text-align: left; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card2); color: var(--text); }
.cl-zlist button:hover { border-color: var(--accent); }
.cl-zlist span { font-size: 12.5px; color: var(--muted); }
.cl-var { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; }
.cl-var.active { border-color: var(--accent); }
.cl-var .row { flex-wrap: nowrap; }
.cl-var-cols { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cl-var-photos { flex-wrap: wrap !important; }
.cl-var-photos .btn { height: 34px; padding: 0 10px; font-size: 13px; }
.cl-sizes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.cl-sgroup { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cl-sgroup > span { width: 86px; font-size: 13px; font-weight: 600; }
.cl-size { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 11px; border-radius: 999px; background: var(--card2); border: 1px solid var(--line); font-weight: 600; font-size: 13px; }
.cl-size button { border: 0; background: none; color: var(--muted); font-size: 16px; line-height: 1; padding: 0 4px; }
.cl-qr { display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center; }
.cl-qr img { width: 220px; height: 220px; background: #fff; border-radius: 12px; padding: 8px; }
.cl-fonts { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-bottom: 14px; }
.cl-font { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card2); color: var(--text); }
.cl-font img { width: 110px; height: 40px; object-fit: contain; background: #fff; border-radius: 8px; padding: 4px; }
.cl-font span { flex: 1; min-width: 0; }
.cl-font small { display: block; color: var(--muted); }
.cl-order { display: flex; flex-direction: column; gap: 18px; }
.cl-otable { overflow-x: auto; }
.cl-otable table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cl-otable th, .cl-otable td { padding: 8px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.cl-otable tfoot td { border-bottom: 0; }
.cl-mocks { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.cl-mocks img { width: 120px; height: 120px; object-fit: contain; background: var(--card2); border-radius: 10px; border: 1px solid var(--line); }
.cl-plot-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.cl-plot-head h2 { margin: 0; }
.cl-plot { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.cl-plot:first-child { border-top: 0; }
.cl-plot-img { background: var(--card2); border-radius: 10px; padding: 8px; max-height: 260px; overflow: auto; }
.cl-plot-img img { width: 100%; display: block; border-radius: 4px; }
.cl-plot-info { display: flex; flex-direction: column; gap: 8px; }
.cl-plot-info b { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.cl-plot-info b i { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line2); }
.cl-plot-info .sub { margin: 0; }

/* Vonloo admin link (platform admins only) */
.nav a.admin-link { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 12px; color: var(--accent); }
.text-link { border: 0; background: none; color: var(--accent); font-weight: 600; padding: 4px 0; cursor: pointer; align-self: center; }
.text-link:hover { text-decoration: underline; }
