:root {
  color-scheme:light;
  --bg:#f5f5f7;
  --surface:#fff;
  --text:#1d1d1f;
  --muted:#65656d;
  --line:#dedee3;
  --accent:#0066cc;
  --accent-soft:#e5effc;
  --danger:#b42332;
  --nav:#eeeef1;
  --radius:12px;
  --shadow:0 24px 80px #0002;
  --space:24px;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:16px;
  color:var(--text);
  background:var(--bg);
}
* {
  box-sizing:border-box;
}
body {
  margin:0;
}
button,input,select {
  font:inherit;
}
button,a,input {
  -webkit-tap-highlight-color:transparent;
}
button {
  cursor:pointer;
}
button:disabled {
  opacity:.45;
  cursor:wait;
}
button,a {
  touch-action:manipulation;
}
a {
  color:var(--accent);
  text-decoration:none;
}
button {
  border:0;
  color:inherit;
  background:none;
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible {
  outline:3px solid var(--accent);
  outline-offset:4px;
}
button:hover:not(:disabled) {
  filter:brightness(.96);
}
[hidden] {
  display:none!important;
}
.sr-only,.skip:not(:focus) {
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
}
.skip:focus {
  position:fixed;
  z-index:10;
  background:var(--surface);
  padding:16px;
}
.primary,.secondary {
  min-height:44px;
  padding:12px 19px;
  border-radius:var(--radius);
  font-size:14px;
  font-weight:600;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  white-space:nowrap;
}
.primary {
  background:var(--accent);
  color:#fff;
}
.secondary {
  background:var(--surface);
  box-shadow:inset 0 0 0 1px var(--line);
}
.wide {
  width:100%;
}
.text-button {
  text-align:left;
  padding:10px 0;
  min-height:44px;
  color:var(--muted);
  font-size:14px;
}
.icon-button {
  min-width:44px;
  min-height:44px;
  font-size:26px;
  border-radius:10px;
}
.eyebrow {
  font-size:11px;
  letter-spacing:.14em;
  font-weight:650;
  color:var(--muted);
  margin:0 0 12px;
}
.muted {
  color:var(--muted);
  font-size:14px;
  line-height:1.6;
}
.fine {
  font-size:12px;
  color:var(--muted);
  line-height:1.6;
}
.required {
  color:var(--accent);
}
h1,h2,h3,p {
  overflow-wrap:anywhere;
}
h1 {
  font-size:36px;
  line-height:1.15;
  letter-spacing:-.035em;
  font-weight:650;
  margin:0 0 12px;
}
h2 {
  font-size:20px;
  font-weight:650;
  letter-spacing:-.025em;
  margin:0;
}
h3 {
  font-size:16px;
  margin:0;
  font-weight:600;
}
.heading-dot {
  color:var(--accent);
}
input {
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--surface);
  color:var(--text);
  min-height:46px;
  padding:12px;
  width:100%;
  min-width:0;
}
input::placeholder {
  color:var(--muted);
  opacity:.8;
}
label {
  display:block;
  font-size:13px;
  font-weight:600;
  margin-bottom:8px;
}
.optional {
  font-weight:400;
  color:var(--muted);
  float:right;
}
.field-hint {
  font-size:12px;
  color:var(--muted);
  margin:8px 0 22px;
}
.form-message {
  font-size:13px;
  color:var(--danger);
  min-height:20px;
  line-height:1.5;
}
.app {
  display:grid;
  grid-template-columns:236px minmax(0,1fr);
  min-height:100dvh;
}
.sidebar {
  position:sticky;
  top:0;
  height:100dvh;
  padding:36px 20px 24px;
  border-right:1px solid var(--line);
  display:flex;
  flex-direction:column;
  background:var(--nav);
}
.brand {
  color:var(--text);
  display:flex;
  align-items:center;
  gap:10px;
  font-size:26px;
  font-weight:650;
  letter-spacing:-.055em;
  margin:0 12px 52px;
}
.brand-sub {
  display:block;
  font-size:11px;
  font-weight:400;
  letter-spacing:.02em;
  color:var(--muted);
  margin-top:2px;
}
.sidebar nav {
  display:grid;
  gap:6px;
}
.sidebar nav a {
  display:flex;
  align-items:center;
  gap:12px;
  color:var(--muted);
  padding:12px 14px;
  border-radius:10px;
  font-size:14px;
  min-height:46px;
}
.sidebar nav a>span:first-child {
  font-size:20px;
}
.sidebar nav a[aria-current] {
  color:var(--accent);
  background:var(--surface);
  font-weight:600;
}
.badge {
  margin-left:auto;
  font-size:11px;
  font-variant-numeric:tabular-nums;
  opacity:.8;
}
.sidebar-bottom {
  margin-top:auto;
  padding:24px 14px 0;
  display:flex;
  flex-direction:column;
  gap:2px;
}
.sidebar-bottom>a {
  font-size:14px;
  display:flex;
  justify-content:space-between;
  min-height:44px;
  align-items:center;
}
.sidebar-bottom>.fine {
  margin-top:24px;
  font-size:10px;
}
main {
  padding:52px clamp(24px,4vw,72px);
  max-width:1600px;
  width:100%;
  margin:0 auto;
  min-width:0;
}
.page-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:24px;
  margin-bottom:36px;
}
.page-header>div {
  min-width:0;
}
.page-header .muted {
  margin:0;
}
.library-toolbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:24px;
}
.search {
  display:flex;
  align-items:center;
  gap:10px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:12px;
  padding:0 14px;
  margin:0;
  width:min(480px,100%);
}
.search>span:not(.sr-only) {
  font-size:28px;
  font-weight:400;
}
.search input {
  border:0;
  background:none;
  padding-left:0;
  box-shadow:none;
  font-size:14px;
}
.article-list {
  border-top:1px solid var(--line);
}
.article-row {
  display:grid;
  grid-template-columns:72px minmax(0,1fr) auto 24px;
  align-items:center;
  gap:24px;
  padding:20px 4px;
  border-bottom:1px solid var(--line);
  color:var(--text);
}
.article-row:hover {
  background:var(--surface);
}
.article-thumb {
  width:72px;
  height:80px;
  background:var(--surface);
  border-radius:10px;
  display:grid;
  place-items:center;
  color:var(--muted);
  overflow:hidden;
}
.article-thumb img {
  width:100%;
  height:100%;
  object-fit:contain;
}
.article-row strong {
  font-size:16px;
  font-weight:600;
  display:block;
  margin-bottom:6px;
}
.article-row .sku-line {
  font-size:12px;
  color:var(--muted);
  letter-spacing:.02em;
}
.article-meta {
  text-align:right;
  font-size:12px;
  color:var(--muted);
  line-height:1.8;
}
.arrow {
  color:var(--muted);
  font-size:20px;
}
.empty {
  padding:80px 24px;
  text-align:center;
  width:100%;
  grid-column:1/-1;
}
.empty .empty-icon {
  font-size:40px;
  color:var(--accent);
  margin-bottom:20px;
}
.empty h2 {
  margin-bottom:8px;
}
.empty p {
  max-width:360px;
  margin:0 auto 24px;
}
.back-link {
  display:inline-flex;
  align-items:center;
  min-height:44px;
  margin:-12px 0 24px;
  font-size:13px;
  color:var(--muted);
}
.shop-link {
  font-size:13px;
  display:inline-block;
  margin-top:4px;
  min-height:28px;
}
.gallery-toolbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin-bottom:24px;
}
.gallery-toolbar p {
  margin:6px 0 0;
  font-size:13px;
}
.count {
  color:var(--muted);
  font-size:14px;
  font-weight:400;
  margin-left:6px;
}
.gallery {
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(220px,1fr));
  gap:24px;
  margin-bottom:24px;
}
.image-card {
  background:var(--surface);
  border-radius:16px;
  border:1px solid var(--line);
  overflow:hidden;
  position:relative;
  min-width:0;
}
.image-view {
  display:block;
  width:100%;
  padding:24px;
  aspect-ratio:1;
  background:#fff;
  position:relative;
}
.image-view img {
  height:100%;
  width:100%;
  object-fit:contain;
  display:block;
}
.image-view::after {
  content:'Ansehen ↗';
  position:absolute;
  bottom:12px;
  right:12px;
  background:#fff;
  color:#333;
  padding:6px 8px;
  border-radius:6px;
  font-size:11px;
  opacity:0;
}
.image-view:hover::after,.image-view:focus-visible::after {
  opacity:1;
}
.image-info {
  padding:12px 14px 4px;
  display:flex;
  align-items:center;
  gap:8px;
}
.image-info strong {
  font-size:12px;
  font-weight:600;
  overflow-wrap:anywhere;
  flex:1;
}
.image-info .number {
  font-variant-numeric:tabular-nums;
  color:var(--muted);
  font-size:12px;
}
.drag-handle {
  font-size:22px;
  color:var(--muted);
  cursor:grab;
  min-width:44px;
  min-height:44px;
  touch-action:none;
}
.image-card.is-dragging {
  box-shadow:var(--shadow);
  z-index:5;
  opacity:.92;
  will-change:transform;
}
.image-card.drop-target {
  outline:3px solid var(--accent);
  outline-offset:3px;
}
.image-spec {
  font-size:11px;
  color:var(--muted);
  padding:0 14px 12px;
  margin:0;
}
.image-actions {
  display:flex;
  align-items:center;
  gap:0;
  border-top:1px solid var(--line);
  padding:4px 6px;
  flex-wrap:wrap;
}
.image-actions button {
  min-height:44px;
  min-width:44px;
  padding:8px;
  font-size:12px;
  border-radius:8px;
}
.image-actions button:hover {
  background:var(--bg);
}
.image-actions .delete {
  color:var(--danger);
  margin-left:auto;
}
.order-actions {
  display:flex;
  border-top:1px solid var(--line);
  padding:0 6px;
  justify-content:space-between;
}
.order-actions button {
  font-size:11px;
  min-height:44px;
  padding:8px;
}
.drop-zone {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:20px;
  padding:32px 24px;
  border:1.5px dashed var(--line);
  border-radius:16px;
  min-height:146px;
  background:var(--surface);
}
.drop-zone.over {
  border-color:var(--accent);
  background:var(--accent-soft);
}
.drop-zone p {
  font-size:12px;
  margin:6px 0 0;
}
.upload-icon {
  width:44px;
  height:44px;
  display:grid;
  place-items:center;
  font-size:28px;
  background:var(--bg);
  border-radius:12px;
  color:var(--accent);
}
.drop-zone .secondary {
  margin-left:auto;
}
.gallery-note {
  text-align:center;
  margin-top:16px;
}
.upload-status {
  padding:16px 0;
  font-size:13px;
}
progress {
  width:100%;
  height:6px;
  accent-color:var(--accent);
}
dialog {
  border:1px solid var(--line);
  border-radius:20px;
  padding:28px;
  background:var(--surface);
  color:var(--text);
  width:min(480px,calc(100% - 32px));
  box-shadow:var(--shadow);
  max-height:90dvh;
  overflow:auto;
}
dialog::backdrop {
  background:#10101865;
  backdrop-filter:blur(5px);
}
.dialog-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  margin-bottom:28px;
}
.dialog-heading .eyebrow {
  font-size:10px;
}
.dialog-actions {
  display:flex;
  justify-content:flex-end;
  gap:12px;
  margin-top:24px;
}
#article-form input:not(#sku) {
  margin-bottom:22px;
}
#article-form .form-message {
  margin:0;
}
.preview-dialog {
  width:min(900px,calc(100% - 32px));
}
.preview-dialog>img {
  display:block;
  width:100%;
  height:min(60dvh,620px);
  object-fit:contain;
  background:#fff;
  border-radius:12px;
}
.preview-dialog .dialog-heading {
  margin-bottom:20px;
}
.preview-dialog h2 {
  font-size:16px;
}
dl {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
  font-size:14px;
}
dt {
  color:var(--muted);
}
dd {
  margin:0;
  overflow-wrap:anywhere;
}
.toast {
  position:fixed;
  bottom:24px;
  left:50%;
  transform:translateX(-50%);
  background:var(--text);
  color:var(--surface);
  border-radius:12px;
  padding:16px 24px;
  font-size:14px;
  box-shadow:var(--shadow);
  z-index:20;
  max-width:calc(100% - 32px);
  width:max-content;
  line-height:1.5;
}
.toast.error {
  background:var(--danger);
  color:#fff;
}
.login-wrap {
  min-height:100dvh;
  display:grid;
  place-items:center;
  padding:32px;
  background:var(--bg);
}
.login-card {
  width:min(380px,100%);
}
.login-card .app-icon {
  margin-bottom:32px;
}
.login-card h1 {
  font-size:38px;
  margin-bottom:20px;
}
.login-card>.muted {
  margin-bottom:32px;
}
.login-card input {
  margin-bottom:16px;
}
.login-card>.fine {
  text-align:center;
  margin-top:32px;
}
.login-card .primary {
  justify-content:space-between;
}
.restore {
  margin:0 14px 16px;
  min-height:44px;
}
.busy #gallery {
  pointer-events:none;
  opacity:.65;
}
.busy #drop-zone {
  opacity:.6;
  pointer-events:none;
}
@media(min-width:1500px) {
  .gallery {
    grid-template-columns:repeat(4,minmax(0,1fr));
  }
}
@media(max-width:1100px) {
  .app {
    grid-template-columns:200px minmax(0,1fr);
  }
  .sidebar {
    padding-inline:12px;
  }
  main {
    padding:40px 28px;
  }
  .page-header {
    align-items:flex-start;
  }
  .page-header h1 {
    font-size:32px;
  }
  .article-row {
    gap:16px;
  }
  .drop-zone {
    flex-wrap:wrap;
    justify-content:flex-start;
  }
  .drop-zone .secondary {
    margin-left:0;
  }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    scroll-behavior:auto!important;
    transition:none!important;
    animation:none!important;
  }
}
.filter-toolbar {
  display:flex;
  gap:20px;
  align-items:center;
  flex-wrap:wrap;
  margin:0 0 24px;
}
.filter-toolbar label {
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--muted);
  font-weight:400;
  margin:0;
  font-size:12px;
}
.filter-toolbar select {
  max-width:100%;
  min-height:44px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--surface);
  color:var(--text);
  padding:8px 30px 8px 12px;
  font-size:12px;
}
.filter-toolbar .fine {
  margin:0 0 0 auto;
}
.search .icon-button {
  flex-shrink:0;
  font-size:22px;
}
.library-toolbar {
  margin-bottom:16px;
}
