/* Admin-Panel */
#app { height: 100%; }
.admin { display: grid; grid-template-columns: 232px 1fr; height: 100%; }
.admin-nav { background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 14px 10px; gap: 2px; }
.admin-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; font-weight: 600; }
.logo {
  width: 30px; height: 30px; border-radius: 8px; flex: none; display: grid; place-items: center;
  background: var(--accent); color: #fff; font: 700 16px/1 "Archivo Black", var(--font);
}
.admin-brand small { display: block; color: var(--muted); font-weight: 400; font-size: 11px; }
.nav-link {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--text); text-decoration: none; font-weight: 500;
}
.nav-link .ico { color: var(--muted); }
.nav-link:hover { background: var(--sunken); }
.nav-link[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); }
.nav-link[aria-current="page"] .ico { color: var(--accent-text); }
.nav-group { margin-top: 14px; padding: 0 10px 4px; color: var(--muted); font-size: 11px; font-weight: 500; }
.nav-foot { margin-top: auto; display: flex; flex-direction: column; gap: 4px; }
.nav-warn { margin: 8px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--ok-soft); color: var(--ok); font-size: 12px; }

.admin-main { overflow-y: auto; min-width: 0; }
.page-head {
  position: sticky; top: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 32px; background: rgba(242,243,245,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.page-head h1 { font-size: 20px; }
.page-head .crumb { color: var(--muted); font-size: 12px; text-decoration: none; display: block; margin-bottom: 2px; }
.page-head .actions { display: flex; align-items: center; gap: 8px; }
.dirty-dot { color: var(--ok); font-size: 12px; }
.page-body { padding: 24px 32px 64px; max-width: 1120px; display: flex; flex-direction: column; gap: 20px; }

.section { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px 0; }
.section-head h2 { font-size: 15px; }
.section-head p { margin: 2px 0 0; }
.section-body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 14px; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding: 0 32px; background: var(--bg); position: sticky; top: 69px; z-index: 3; }
.tabs a { padding: 10px 14px; color: var(--muted); text-decoration: none; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }

.product-table td:first-child { width: 64px; }
.product-thumb { width: 48px; height: 60px; border-radius: 6px; background: var(--sunken) center/cover no-repeat; border: 1px solid var(--line); }
.product-table tr { cursor: pointer; }
.product-table tbody tr:hover td { background: var(--sunken); }
.product-name strong { display: block; }
.product-name span { color: var(--muted); font-size: 12px; }
.color-dots { display: flex; gap: 3px; }
.color-dots .swatch { width: 14px; height: 14px; }

.rows td { padding: 6px 6px; }
.rows th { padding: 6px; }
.rows td.ctrl { width: 36px; }
.rows input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }
.rows .input { height: 32px; }
.add-row { align-self: flex-start; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; }

.color-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; grid-template-columns: 220px 1fr auto; gap: 18px; align-items: start; }
.color-meta { display: flex; flex-direction: column; gap: 8px; }
.photo-slots { display: flex; gap: 14px; flex-wrap: wrap; }
.photo-slot { width: 168px; display: flex; flex-direction: column; gap: 6px; }
.photo-slot .ph { width: 168px; min-height: 120px; border-radius: 8px; border: 1px solid var(--line); background: var(--sunken); position: relative; display: grid; place-items: center; color: var(--muted); font-size: 12px; text-align: center; overflow: hidden; }
.photo-slot .ph-img { position: relative; width: 100%; }
.photo-slot .ph-img img { width: 100%; display: block; }
.photo-slot .btns .btn { flex: 1; padding: 0 6px; }
.photo-slot .ph-canvas { width: 100%; display: block; }
.photo-slot strong { font-size: 12px; }
.photo-slot .btns { display: flex; gap: 4px; }

.method-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.method-head { display: flex; gap: 12px; align-items: end; }
.method-head .field { flex: 1; }

.login { min-height: 100%; display: grid; place-items: center; }
.login form { width: 340px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }

.errors { margin: 0; padding: 10px 12px 10px 28px; border-radius: var(--radius-sm); background: var(--low-soft); color: var(--low); }
.preview-note { background: var(--sunken); border-radius: var(--radius-sm); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 6px 16px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* Präzisions-Editor Druckfläche */
.modal.is-full { width: min(1320px, calc(100vw - 32px)); max-height: calc(100vh - 32px); }
.placement { display: grid; grid-template-columns: 1fr 320px; grid-template-rows: 1fr auto; gap: 14px; height: calc(100vh - 140px); min-height: 520px; }
.pl-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; min-height: 0; }
.placement .seg button.is-active { background: var(--accent); }
.pl-toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pl-help { margin: 0; flex: 1; min-width: 220px; }
.pl-stage { flex: 1; min-height: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; outline: none; position: relative; }
.pl-stage:focus-visible { outline: 2px solid var(--accent); }
.pl-canvas { display: block; touch-action: none; }
.pl-panel { overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding-right: 4px; }
.pl-panel section { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.pl-panel h4 { margin: 0 0 2px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.pl-field { display: grid; grid-template-columns: 110px 1fr auto; align-items: center; gap: 8px; font-size: 13px; }
.pl-field em { font-style: normal; color: var(--muted); font-size: 12px; min-width: 22px; }
.pl-field .input { height: 32px; }
.pl-meta { margin: 0; font-size: 13px; color: var(--muted); }
.pl-meta strong { color: var(--text); }
.pl-panel .btns { display: flex; gap: 6px; flex-wrap: wrap; }
.pl-panel details summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.pl-actions { grid-column: 1 / -1; }
@media (max-width: 900px) { .placement { grid-template-columns: 1fr; height: auto; } .pl-stage { height: 60vh; } }

/* Bewerbung */
.apply { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; background: var(--bg); }
.apply-card { width: min(640px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.apply-card h1 { margin: 6px 0 0; font-size: 24px; }
.apply-card p { margin: 0; }
.app-list { display: flex; flex-direction: column; gap: 14px; }
.app-card { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.app-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.app-card p { margin: 0; }
.link-list { display: flex; flex-direction: column; gap: 2px; }
.detail-slots { grid-column: 2 / 3; display: flex; flex-direction: column; gap: 6px; }
.photo-slot.sm { width: 128px; }
.photo-slot.sm .ph { width: 128px; min-height: 96px; }
.photo-slots .slot-label { width: 100%; }
.scale-table { display: flex; gap: 8px; flex-wrap: wrap; }
.scale-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; min-width: 64px; font-size: 12px; color: var(--muted); }
.scale-cell strong { color: var(--text); font-size: 13px; }
.scale-cell.is-scaled { border-color: var(--accent); color: var(--accent); }
.still-cell { display: flex; align-items: center; gap: 10px; }
.still-thumb { width: 72px; height: 96px; object-fit: cover; border-radius: 8px; background: #c8c4be; display: block; }
