:root {
    --blue: #0033A0;
    --blue-dark: #001d5c;
    --gold: #f3c64f;
    --ink: #172033;
    --muted: #667085;
    --line: #d9e1ef;
    --bg: #f4f7fb;
    --card: #ffffff;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: var(--bg);
}
a { color: inherit; text-decoration: none; }
.topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px clamp(16px, 4vw, 44px);
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    color: var(--blue);
}
.brand img { width: 54px; height: 54px; object-fit: contain; }
nav { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
nav a {
    padding: 9px 11px;
    border-radius: 6px;
    color: var(--blue-dark);
    font-weight: 700;
}
nav a:hover { background: #eef3ff; }
.container {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 60px;
}
.hero {
    min-height: 230px;
    display: flex;
    align-items: flex-end;
    padding: clamp(24px, 5vw, 48px);
    color: #fff;
    background: linear-gradient(135deg, rgba(0,51,160,.96), rgba(0,29,92,.92)), url("../../images/HoechsterSchlossgarde_Rund_RGB.png") right 30px center / 210px no-repeat;
    border-radius: 8px;
    margin-bottom: 22px;
}
.hero h1 { max-width: 720px; margin: 0 0 8px; font-size: clamp(30px, 5vw, 52px); line-height: 1.05; }
.hero p { margin: 0; max-width: 560px; font-size: 18px; color: #e8eefc; }
.auth-card, .panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: clamp(20px, 4vw, 34px);
    box-shadow: 0 14px 40px rgba(16, 35, 75, .08);
}
.auth-card { max-width: 520px; margin: 60px auto; }
.form { display: grid; gap: 16px; }
.grid-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wide { grid-column: 1 / -1; }
label { display: grid; gap: 7px; font-weight: 700; }
input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 11px 12px;
    font: inherit;
    background: #fff;
}
textarea { min-height: 110px; resize: vertical; }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: auto; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--blue-dark);
    font-weight: 800;
    cursor: pointer;
}
.btn.primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn.ghost { min-height: 34px; padding: 7px 10px; background: #f8faff; }
.notice, .error {
    padding: 13px 15px;
    border-radius: 6px;
    margin-bottom: 18px;
    border: 1px solid var(--line);
    background: #eef6ff;
}
.error { background: #fff1f1; border-color: #f3b4b4; }
.category-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 12px;
}
.lead {
    color: var(--muted);
    max-width: 760px;
    margin-top: -6px;
}
.category-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 14px;
    margin: 0 0 18px;
}
.category-card {
    display: grid;
    gap: 8px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    min-height: 210px;
}
.category-card.active {
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(0, 51, 160, .16);
}
.category-card-image, .category-thumb {
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #eef3ff;
    color: var(--blue);
    font-weight: 900;
    text-align: center;
}
.category-card-image {
    aspect-ratio: 16 / 10;
    border-radius: 6px;
}
.category-card-image img, .category-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.category-card small {
    color: var(--muted);
    line-height: 1.35;
}
.category-bar a, .pill {
    white-space: nowrap;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 12px;
    background: #fff;
    color: var(--blue-dark);
    font-weight: 800;
}
.category-bar a.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.filter-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr)) auto;
    gap: 14px;
    align-items: end;
    margin: 18px 0 26px;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 8px 26px rgba(16, 35, 75, .05);
}
.filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
}
.product-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 26px rgba(16, 35, 75, .06);
    min-height: 100%;
}
.product-card a {
    display: grid;
    grid-template-rows: auto auto auto auto;
    gap: 10px;
    height: 100%;
    padding: 16px;
    min-width: 0;
}
.product-image {
    position: relative;
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    padding: 16px;
    background: #eef3ff;
    color: var(--blue);
    font-weight: 900;
    text-align: center;
}
.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--blue);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 6px 16px rgba(0, 51, 160, .24);
}
.inline-badge {
    background: var(--blue);
    color: #fff;
}
.inline-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    vertical-align: middle;
}
.product-image img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}
.product-card h2 {
    margin: 4px 0 0;
    font-size: 22px;
    line-height: 1.15;
}
.product-card p { margin: 0; color: var(--muted); }
.product-card strong {
    align-self: end;
    margin-top: 2px;
}
.detail {
    display: grid;
    grid-template-columns: minmax(260px, 470px) 1fr;
    gap: 34px;
    align-items: start;
}
.product-slider {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #eef3ff;
    padding: 18px;
    border-radius: 8px;
    overflow: hidden;
    touch-action: pan-y;
}
.slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform .28s ease;
    will-change: transform;
}
.slider-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    margin: 0;
}
.slider-slide img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}
.slider-slide {
    display: grid;
    place-items: center;
}
.placeholder-slide {
    display: grid;
    place-items: center;
    color: var(--blue);
    font-weight: 900;
}
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 999px;
    background: rgba(0, 29, 92, .74);
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}
.slider-btn.prev { left: 12px; }
.slider-btn.next { right: 12px; }
.slider-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 12px;
    display: flex;
    justify-content: center;
    gap: 8px;
}
.slider-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 29, 92, .35);
    cursor: pointer;
}
.slider-dots button.active { background: var(--blue); }
.image-sort-list {
    display: grid;
    gap: 10px;
}
.image-sort-item {
    display: grid;
    grid-template-columns: 82px 1fr auto auto auto;
    gap: 10px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    background: #f8faff;
}
.image-delete {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #9b1c1c;
    font-weight: 800;
}
.image-delete input {
    width: auto;
}
.image-sort-item img {
    width: 82px;
    height: 82px;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #eef3ff;
}
.inline-form { display: flex; flex-wrap: wrap; align-items: end; }
.inline-form label { min-width: 140px; }
.table-wrap {
    overflow-x: auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--blue-dark); background: #f8faff; }
.qty { max-width: 90px; }
.cart-product {
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 700;
}
.cart-product:hover {
    color: var(--blue);
}
.cart-product-image {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 6px;
    background: #eef3ff;
    border: 1px solid var(--line);
}
.cart-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.cart-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 16px;
}
.admin-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 22px;
}
.stat strong { display: block; color: var(--blue); font-size: 34px; }
.sizes { display: flex; flex-wrap: wrap; gap: 12px; }
.sizes label { display: flex; align-items: center; gap: 6px; }
.sizes input { width: auto; }
.size-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.size-group {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: #f8faff;
}
.size-group strong {
    display: block;
    margin-bottom: 10px;
    color: var(--blue-dark);
}
.size-price-grid {
    display: grid;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8faff;
}
.size-price-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
}
.size-price-grid input {
    padding: 9px 10px;
}
.is-hidden {
    display: none !important;
}
.row-actions form { display: flex; flex-wrap: wrap; gap: 8px; }
.collapsible-panel summary {
    list-style: none;
    cursor: pointer;
    font-size: 24px;
    font-weight: 800;
    color: var(--blue-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.collapsible-panel summary::-webkit-details-marker {
    display: none;
}
.collapsible-panel summary::after {
    content: "Einklappen";
    font-size: 14px;
    font-weight: 700;
    color: var(--muted);
}
.collapsible-panel:not([open]) summary::after {
    content: "Ausklappen";
}
.collapsible-panel[open] summary {
    margin-bottom: 16px;
}
.order-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin: 16px 0;
}
.producer-view {
    max-width: 980px;
}
.producer-thumb {
    width: 72px;
    height: 72px;
    object-fit: contain;
    background: #eef3ff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: block;
}
.readonly-muted,
input[readonly].readonly-muted {
    background: #eef2f7;
    color: #64748b;
    cursor: not-allowed;
}
.phone-row {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}
.country-picker {
    position: relative;
}
.country-picker-toggle,
.country-picker-menu button {
    display: flex;
    align-items: center;
    gap: 8px;
}
.country-picker-toggle {
    width: 100%;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.country-picker-menu {
    position: absolute;
    z-index: 20;
    top: calc(100% + 6px);
    left: 0;
    min-width: 118px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}
.country-picker-menu button {
    width: 100%;
    padding: 9px 8px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.country-picker-menu button:hover {
    background: #eef3ff;
}
.flag {
    position: relative;
    display: inline-block;
    width: 24px;
    height: 16px;
    flex: 0 0 24px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, .18);
    border-radius: 2px;
    background: #fff;
}
.flag-de { background: linear-gradient(to bottom, #000 0 33.33%, #dd0000 33.33% 66.66%, #ffce00 66.66%); }
.flag-at { background: linear-gradient(to bottom, #ed2939 0 33.33%, #fff 33.33% 66.66%, #ed2939 66.66%); }
.flag-nl { background: linear-gradient(to bottom, #ae1c28 0 33.33%, #fff 33.33% 66.66%, #21468b 66.66%); }
.flag-fr { background: linear-gradient(to right, #0055a4 0 33.33%, #fff 33.33% 66.66%, #ef4135 66.66%); }
.flag-ch {
    background: #d52b1e;
}
.flag-ch::before,
.flag-ch::after {
    content: "";
    position: absolute;
    background: #fff;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}
.flag-ch::before {
    width: 12px;
    height: 4px;
}
.flag-ch::after {
    width: 4px;
    height: 12px;
}
.drag-handle {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f8faff;
    color: var(--blue-dark);
    font-weight: 800;
    cursor: grab;
}
tr.is-dragging {
    opacity: .55;
    outline: 2px solid var(--blue);
}
.sort-save-status {
    min-height: 22px;
    margin-top: 10px;
    color: var(--muted);
    font-weight: 700;
}
.history { line-height: 1.9; }
.category-admin-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}
.category-admin-card {
    display: grid;
    grid-template-columns: 150px 1fr auto;
    gap: 16px;
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
}
.category-thumb {
    width: 150px;
    aspect-ratio: 4 / 3;
    border-radius: 6px;
}
.category-admin-card h2 {
    margin: 0 0 6px;
}
.category-admin-card p {
    margin: 0 0 10px;
    color: var(--muted);
}
.footer {
    padding: 26px;
    text-align: center;
    color: var(--muted);
    border-top: 1px solid var(--line);
}
@media (max-width: 760px) {
    .topbar { align-items: flex-start; flex-direction: column; }
    nav { justify-content: flex-start; }
    .grid-form, .detail, .admin-grid, .category-admin-card, .size-groups, .filter-panel { grid-template-columns: 1fr; }
    .filter-actions { flex-wrap: wrap; }
    .image-sort-item { grid-template-columns: 70px 1fr; }
    .category-thumb { width: 100%; }
    .hero { background-size: 120px; background-position: right 16px top 18px; }
}
