/* MFP Dashboard – Shopify-inspired design */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --sidebar-width: 220px;
    --sidebar-bg: #1a1a2e;
    --sidebar-text: #c8cce4;
    --sidebar-active: #ffffff;
    --sidebar-hover: #2d2d4e;
    --accent: #008060;
    --accent-hover: #006e52;
    --danger: #d82c0d;
    --warning: #ffa500;
    --blue: #2c6ecb;
    --gray-100: #f6f6f7;
    --gray-200: #e4e5e7;
    --gray-400: #8c9196;
    --gray-700: #3d4044;
    --text: #202223;
    --text-muted: #6d7175;
    --border: #e1e3e5;
    --radius: 8px;
    --radius-sm: 4px;
    --shadow: 0 1px 3px rgba(0,0,0,.12);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--gray-100);
    line-height: 1.5;
}

/* ── Layout ── */
.layout {
    display: flex;
    min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 16px 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-logo {
    width: 36px; height: 36px;
    background: var(--accent);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 18px; color: #fff;
    flex-shrink: 0;
}

.sidebar-brand { font-weight: 600; font-size: 14px; color: #fff; display: block; }
.sidebar-sub   { font-size: 11px; color: var(--sidebar-text); opacity: .7; display: block; }

.sidebar-nav { flex: 1; padding: 12px 8px; }

.nav-item {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 10px;
    border-radius: var(--radius-sm);
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 14px;
    transition: background .15s, color .15s;
}
.nav-item:hover  { background: var(--sidebar-hover); color: #fff; }
.nav-item.active { background: rgba(255,255,255,.12); color: #fff; font-weight: 600; }
.nav-icon { font-size: 16px; opacity: .7; }

.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid rgba(255,255,255,.08);
}
.user-name   { display: block; font-weight: 600; color: #fff; font-size: 13px; }
.logout-link { font-size: 12px; color: var(--sidebar-text); text-decoration: none; opacity: .7; }
.logout-link:hover { opacity: 1; }

/* ── Main content ── */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 24px 28px;
    max-width: calc(100vw - var(--sidebar-width));
}

/* ── Page header ── */
.page-header {
    display: flex; align-items: center; gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.page-title { font-size: 22px; font-weight: 700; flex: 1; }
.page-header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.breadcrumb-back { color: var(--text-muted); text-decoration: none; font-size: 14px; }
.breadcrumb-back:hover { color: var(--text); }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-size: 14px; font-weight: 500;
    cursor: pointer; text-decoration: none;
    transition: background .15s, border-color .15s;
    white-space: nowrap;
}
.btn-primary   { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: #fff; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--gray-100); }
.btn-ghost  { background: transparent; color: var(--text-muted); border-color: transparent; }
.btn-ghost:hover { background: var(--gray-100); }
.btn-sm     { padding: 5px 10px; font-size: 13px; }
.btn-full   { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Cards ── */
.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.card-sm { padding: 0; margin-bottom: 16px; }
.card-title {
    font-weight: 600; font-size: 13px;
    padding: 12px 16px 10px;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .4px;
}

/* ── Filter bar ── */
.filter-bar {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.filter-form {
    display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end;
    margin-bottom: 12px;
}
.filter-group { display: flex; flex-direction: column; gap: 4px; }
.filter-group label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .3px; }
.filter-search { flex: 1; min-width: 240px; }
.search-wrap { display: flex; gap: 6px; }

select, input[type="text"], input[type="password"] {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 7px 10px;
    font-size: 14px;
    color: var(--text);
    background: #fff;
    outline: none;
    transition: border-color .15s;
}
select:focus, input:focus { border-color: var(--accent); }
input[type="text"] { min-width: 200px; }

.select-sm { padding: 5px 8px; font-size: 13px; }

/* ── Status pills ── */
.status-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.status-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    text-decoration: none;
    border: 1px solid transparent;
    transition: opacity .15s;
}
.status-pill:hover { opacity: .8; }
.status-pill.active { font-weight: 600; border-color: currentColor; }

.status-pill-combined { background: #e8f5e9; color: #1b5e20; font-weight: 600; border: 1px solid #a5d6a7; cursor: default; }
.status-pill-1 { background: #fff3e0; color: #b45309; }
.status-pill-2 { background: #fef2f2; color: var(--danger); }
.status-pill-3 { background: #e6f4ea; color: #166534; }
.status-pill-4 { background: #eff6ff; color: var(--blue); }
.status-pill-5 { background: var(--gray-100); color: var(--gray-400); }
.status-pill-6 { background: var(--gray-100); color: var(--gray-400); }

.pill-count { font-weight: 700; }

/* ── Order table ── */
.order-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.order-table th {
    text-align: left; padding: 10px 12px;
    border-bottom: 2px solid var(--border);
    font-weight: 600; font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .3px;
    background: var(--gray-100);
    white-space: nowrap;
}
.order-table td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.order-row { cursor: pointer; transition: background .1s; }
.order-row:hover { background: #f9fafb; }
.order-row:last-child td { border-bottom: none; }
.order-row.row-error { background: #fff8f8; }
.order-row.row-cancelled { opacity: .6; }
.order-row.row-selected { background: #eff6ff !important; }

.col-check  { width: 36px; }
.col-num    { text-align: center; width: 60px; }
.col-order-num { white-space: nowrap; }
.col-date   { white-space: nowrap; }

.order-number { font-weight: 600; color: var(--text); }
.error-hint   { font-size: 11px; color: var(--danger); margin-top: 2px; }

/* ── Badges ── */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}
.badge-lg { padding: 4px 12px; font-size: 14px; }
.badge-orange { background: #fff3e0; color: #b45309; }
.badge-red    { background: #fef2f2; color: var(--danger); }
.badge-green  { background: #e6f4ea; color: #166534; }
.badge-blue   { background: #eff6ff; color: var(--blue); }
.badge-gray   { background: var(--gray-100); color: var(--gray-400); }
.badge-blue-sm   { background: #eff6ff; color: var(--blue); font-size: 11px; padding: 1px 6px; border-radius: 10px; }
.badge-gray-sm   { background: var(--gray-100); color: var(--gray-400); font-size: 11px; padding: 1px 6px; border-radius: 10px; }
.badge-orange-sm { background: #fff3e0; color: #b45309; font-size: 11px; padding: 1px 6px; border-radius: 10px; }
.strikethrough { text-decoration: line-through; }

.tag-badge {
    display: inline-block; padding: 1px 6px;
    border-radius: 3px; font-size: 10px; font-weight: 700;
    vertical-align: middle; margin-left: 4px;
}
.tag-willkommen { background: #fef3c7; color: #92400e; }

/* ── Bulk actions ── */
.bulk-actions  { display: flex; align-items: center; gap: 6px; }
.selection-info { font-size: 13px; color: var(--text-muted); padding: 0 4px; }

/* ── Table footer + pagination ── */
.table-footer {
    margin-top: 10px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 4px 0;
    flex-wrap: wrap; gap: 8px;
}
.pagination { display: flex; gap: 4px; flex-wrap: wrap; }

/* ── Empty state ── */
.empty-state {
    text-align: center; padding: 48px 24px;
    color: var(--text-muted);
}
.empty-state p { margin-bottom: 12px; font-size: 15px; }

/* ── Detail layout (single column) ── */
.detail-top-row {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 16px;
    align-items: start;
    margin-bottom: 0;
}
.detail-top-card { margin-bottom: 0; }
@media (max-width: 700px) { .detail-top-row { grid-template-columns: 1fr; } }

/* ── Info table ── */
.info-table { width: 100%; border-collapse: collapse; padding: 12px 16px; display: block; }
.info-table td { padding: 6px 16px; vertical-align: top; }
.info-table tr:last-child td { padding-bottom: 14px; }
.info-label { color: var(--text-muted); white-space: nowrap; padding-right: 12px; font-size: 13px; width: 120px; }

/* ── Address ── */
.address-block { padding: 12px 16px 14px; line-height: 1.7; }
.address-name  { font-weight: 600; }

/* ── Items ── */
.item-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
}
.item-row:last-child { border-bottom: none; }
.item-willkommen { background: #fffbeb; }
.item-fulfilled  { opacity: .5; }
.item-main  { display: flex; align-items: center; gap: 10px; flex: 1; }
.item-qty   { font-weight: 600; color: var(--text-muted); min-width: 24px; text-align: right; }
.item-info  { display: flex; flex-direction: column; gap: 1px; }
.item-title { font-weight: 500; }
.item-sku   { font-size: 12px; }
.item-meta  { display: flex; align-items: center; gap: 8px; }

.lagerort-badge {
    background: var(--gray-100); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 2px 8px;
    font-size: 12px; font-weight: 600; white-space: nowrap;
}
.lagerort-missing { background: #fef2f2; border-color: #fecaca; color: var(--danger); }

/* ── Address type switcher ── */
.addr-type-switcher {
    display: flex; gap: 16px; flex-wrap: wrap;
    margin-bottom: 14px; padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.addr-type-option {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 500; cursor: pointer;
    color: var(--text);
}
.addr-type-option input[type="radio"] { cursor: pointer; accent-color: var(--accent); }

/* ── Address edit form ── */
.address-edit-form { padding: 12px 16px 14px; }
.addr-row { display: flex; flex-direction: column; gap: 3px; margin-bottom: 10px; }
.addr-row label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .3px; }
.addr-row input { width: 100%; }
.addr-row-split { flex-direction: row !important; gap: 10px; align-items: flex-end; }
.addr-row-split > div { display: flex; flex-direction: column; gap: 3px; }
.addr-buttons { display: flex; gap: 8px; margin-top: 12px; }
.addr-test-result {
    padding: 8px 10px; border-radius: var(--radius-sm);
    font-size: 13px; margin-top: 8px;
}
.addr-ok    { background: #e6f4ea; color: #166534; border: 1px solid #a7d7a9; }
.addr-error { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }

/* ── Status change ── */
.status-change-form {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 16px 14px;
}

/* ── Activity log ── */
.activity-log { padding: 4px 0; }
.log-entry {
    display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
    padding: 8px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}
.log-entry:last-child { border-bottom: none; }
.log-time   { flex-shrink: 0; width: 120px; }
.log-action { font-weight: 500; }
.log-user   { margin-left: auto; }
.log-details { width: 100%; padding-left: 128px; word-break: break-all; }

/* ── Alerts ── */
.alert {
    border-radius: var(--radius-sm);
    padding: 12px 16px; margin-bottom: 16px;
    font-size: 14px;
}
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: var(--danger); word-break: break-word; overflow-wrap: break-word; }

/* ── Modal ── */
.modal-backdrop {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(0,0,0,.45);
    display: flex; align-items: center; justify-content: center;
}
.modal {
    background: #fff; border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0,0,0,.2);
    width: 100%; max-width: 520px;
    display: flex; flex-direction: column;
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--border);
}
.modal-title { font-weight: 600; font-size: 15px; }
.modal-close {
    background: none; border: none; cursor: pointer;
    font-size: 16px; color: var(--text-muted); line-height: 1;
    padding: 2px 6px; border-radius: var(--radius-sm);
}
.modal-close:hover { background: var(--bg-subtle); }
.modal-body { padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; }
.modal-body textarea { width: 100%; box-sizing: border-box; }
.modal-footer {
    padding: 12px 20px 16px;
    border-top: 1px solid var(--border);
    display: flex; justify-content: flex-end; gap: 8px;
}

/* ── Flash messages ── */
.flash {
    border-radius: var(--radius-sm);
    padding: 10px 16px; margin-bottom: 12px;
    font-size: 14px;
}
.flash-error   { background: #fef2f2; border: 1px solid #fecaca; color: var(--danger); }
.flash-success { background: #e6f4ea; border: 1px solid #a7d7a9; color: #166534; }

/* ── Tracking link ── */
.tracking-link { color: var(--blue); text-decoration: none; }
.tracking-link:hover { text-decoration: underline; }

/* ── Typography helpers ── */
.text-muted  { color: var(--text-muted); }
.text-sm     { font-size: 12px; }
.text-green  { color: #166534; }
.text-orange { color: #b45309; }

/* ── Login page ── */
body.login-page {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; background: var(--gray-100);
}
.login-container { width: 100%; max-width: 400px; padding: 16px; }
.login-card {
    background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: 0 4px 16px rgba(0,0,0,.1);
    padding: 32px;
}
.login-header { text-align: center; margin-bottom: 24px; }
.login-logo {
    width: 56px; height: 56px;
    background: var(--accent); border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 26px; color: #fff;
    margin-bottom: 12px;
}
.login-title    { font-size: 22px; font-weight: 700; }
.login-subtitle { color: var(--text-muted); font-size: 14px; margin-top: 2px; }
.login-error    { background: #fef2f2; border: 1px solid #fecaca; color: var(--danger); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 16px; font-size: 14px; }
.login-form .form-group { margin-bottom: 16px; }
.login-form label { display: block; font-weight: 500; margin-bottom: 6px; font-size: 14px; }
.login-form input { width: 100%; }

/* ── Versand-Tab ── */
.versand-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 40px;
}
.versand-card {
    background: #fff;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.versand-card--prio { border-color: #bfdbfe; }
.versand-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.versand-card-label {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}
.versand-badge {
    font-size: 22px;
    font-weight: 700;
    min-width: 44px;
    height: 44px;
    border-radius: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
}
.versand-badge--normal { background: #dcfce7; color: #166534; }
.versand-badge--prio   { background: #dbeafe; color: #1e40af; }
.versand-card-desc { font-size: 14px; color: var(--text-muted); margin: 0; }
.btn-versand {
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background .15s;
    width: 100%;
}
.btn-versand:disabled { opacity: .45; cursor: not-allowed; }
.btn-versand--normal { background: #16a34a; color: #fff; }
.btn-versand--normal:hover:not(:disabled) { background: #15803d; }
.btn-versand--prio   { background: #2563eb; color: #fff; }
.btn-versand--prio:hover:not(:disabled)   { background: #1d4ed8; }
.versand-empty { font-size: 13px; color: var(--text-muted); margin: 0; text-align: center; }

/* ── Progress ── */
.progress-section {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 32px;
}
.progress-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.progress-step {
    font-weight: 600;
    font-size: 15px;
}
.progress-bar-wrap {
    background: var(--gray-100);
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
}
.progress-bar-fill {
    background: #2563eb;
    height: 100%;
    border-radius: 999px;
    transition: width .4s ease;
}
.progress-count {
    font-size: 13px;
    color: var(--text-muted);
}
.progress-errors {
    margin-top: 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
}
.progress-errors h3 { font-size: 14px; font-weight: 600; color: var(--danger); margin: 0 0 8px; }
.progress-errors ul { margin: 0; padding-left: 20px; font-size: 13px; }
.progress-done {
    margin-top: 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.done-summary { font-size: 15px; }
.done-downloads { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-sm {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    display: inline-block;
}

/* ── Mitarbeiterinnen Modal ── */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.45);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
}
.modal {
    background: #fff;
    border-radius: var(--radius);
    padding: 32px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0,0,0,.2);
}
.modal-title { font-size: 22px; font-weight: 700; margin: 0 0 6px; }
.modal-desc  { color: var(--text-muted); font-size: 14px; margin: 0 0 20px; }
.modal-names {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}
.modal-name-btn {
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    background: var(--gray-100);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all .15s;
}
.modal-name-btn:hover {
    background: #dbeafe;
    border-color: #2563eb;
    color: #1e40af;
}
.modal-cancel { width: 100%; }

/* ── Recent batches ── */
.recent-batches { margin-top: 16px; }
.link-small { font-size: 12px; color: var(--accent); text-decoration: none; margin-right: 4px; }
.link-small:hover { text-decoration: underline; }

/* ── Alert ── */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
}
.alert-warning {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
}
.alert-link { color: inherit; font-weight: 600; }

/* ── Batch Detail ── */
.batch-meta {
    display: flex;
    gap: 32px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.batch-meta-item { display: flex; flex-direction: column; gap: 4px; }
.meta-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.meta-value { font-size: 16px; font-weight: 600; }
.batch-downloads { display: flex; gap: 10px; margin-bottom: 8px; }
.tracking-code { font-family: monospace; font-size: 12px; background: var(--gray-100); padding: 2px 6px; border-radius: 4px; }
.reset-section {
    margin-top: 32px;
    padding: 24px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.reset-warning {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font-size: 14px;
    color: #92400e;
    margin-bottom: 16px;
    line-height: 1.5;
}
.btn-danger {
    background: var(--danger);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.btn-danger:hover { background: #b91c1c; }
.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 14px;
}
.text-red { color: var(--danger); }
.back-link { font-size: 13px; color: var(--text-muted); text-decoration: none; display: block; margin-bottom: 4px; }
.back-link:hover { color: var(--accent); }

/* ── Batch table improvements ── */
.batch-table { border-spacing: 0; }
.batch-table th {
    padding: 10px 16px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
    white-space: nowrap;
}
.batch-table td { padding: 14px 16px; vertical-align: middle; }
.batch-table tbody tr:hover { background: var(--gray-50, #f9fafb); }
.num-col { text-align: center; font-weight: 600; }

.batch-detail-btn {
    display: inline-block;
    padding: 6px 12px;
    background: var(--gray-100);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    transition: all .15s;
    white-space: nowrap;
}
.batch-detail-btn:hover {
    background: #dbeafe;
    border-color: #2563eb;
    color: #1d4ed8;
}

.doc-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.doc-btn {
    display: inline-block;
    padding: 5px 10px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
    transition: all .15s;
}
.doc-btn:hover {
    background: var(--gray-100);
    border-color: #9ca3af;
}

/* ── Admin sub-nav ── */
.admin-subnav {
    display: flex;
    gap: 4px;
    padding: 0 0 20px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.subnav-item {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: all .15s;
}
.subnav-item:hover { background: var(--gray-200); color: var(--text); }
.subnav-item.active { background: var(--accent); color: #fff; }

/* ── Admin cards ── */
.admin-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 20px;
    overflow: hidden;
}
.admin-card-header {
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--border);
}
.admin-card-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.admin-card-desc { font-size: 13px; color: var(--text-muted); }
.admin-card-body { padding: 20px; }

.versandregeln-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 700px) { .versandregeln-grid { grid-template-columns: 1fr; } }

/* ── Admin hints ── */
.admin-hint {
    font-size: 13px;
    color: var(--text-muted);
    background: var(--gray-100);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin-bottom: 20px;
}
.admin-hint code {
    background: var(--gray-200);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 12px;
}

/* ── Form helpers ── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 13px; font-weight: 500; color: var(--text); }
.form-input {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text);
    background: #fff;
    width: 100%;
    transition: border-color .15s;
}
.form-input:focus { outline: none; border-color: var(--accent); }
.form-select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: #fff;
    width: 100%;
}
.form-textarea {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: monospace;
    resize: vertical;
    width: 100%;
}
.form-hint { font-size: 12px; color: var(--text-muted); }
.form-error { font-size: 13px; color: var(--danger); padding: 6px 0; }

/* ── Lagerort input in SKU table ── */
.lagerort-input {
    width: 70px;
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    text-align: center;
}
.lagerort-input:focus { outline: none; border-color: var(--accent); }
.lagerort-missing { border-color: var(--danger); background: #fff5f5; }

/* ── Toggle switch ── */
.toggle-switch { position: relative; display: inline-block; width: 36px; height: 20px; cursor: pointer; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: var(--gray-200);
    border-radius: 20px;
    transition: .2s;
}
.toggle-slider::before {
    content: ''; position: absolute;
    height: 14px; width: 14px;
    left: 3px; bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: .2s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(16px); }

/* ── Role badges ── */
.role-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}
.role-admin { background: #fef3c7; color: #92400e; }
.role-kundensupport { background: #dbeafe; color: #1e40af; }
.role-lager { background: #d1fae5; color: #065f46; }

/* ── Row inactive ── */
.row-inactive td { opacity: 0.45; }

/* ── Stats cards ── */
.stats-cards { display: flex; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.stats-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 28px;
    min-width: 180px;
}
.stats-card-value { font-size: 36px; font-weight: 700; color: var(--accent); line-height: 1; }
.stats-card-label { font-size: 13px; color: var(--text-muted); margin-top: 6px; }
.search-result-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; font-size: 14px; line-height: 1.6; }

/* ── Section title ── */
.section-title { font-size: 16px; font-weight: 600; margin: 28px 0 12px; }

/* ── SKU code ── */
.sku-code { font-size: 12px; background: var(--gray-100); padding: 2px 6px; border-radius: 3px; }

/* ── Sync result ── */
.sync-result {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-top: 12px;
}
.sync-result--ok { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.sync-result--error { background: #fff5f5; border: 1px solid #fecaca; color: var(--danger); }

/* ── Toast notification ── */
.toast {
    position: fixed; bottom: 24px; right: 24px;
    padding: 10px 18px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    z-index: 9999;
    animation: fadeIn .2s;
    box-shadow: var(--shadow);
}
.toast-success { background: #065f46; color: #fff; }
.toast-error { background: var(--danger); color: #fff; }
@keyframes fadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }

/* ── Filter bar ── */
.filter-bar { margin-bottom: 16px; }
.filter-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.input-search { padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; min-width: 240px; }
.checkbox-label { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; white-space: nowrap; }

/* ── Lagerwert ── */
.lagerwert-value { font-weight: 600; font-variant-numeric: tabular-nums; }
.lagerwert-value--secondary { color: var(--text-muted); font-weight: 400; }
.empty-state-box {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    color: var(--text-muted);
}

/* ── Lagerwert Live KPIs ── */
.lw-live-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}
@media (max-width: 700px) { .lw-live-grid { grid-template-columns: 1fr; } }

.lw-kpi {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
}
.lw-kpi-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.lw-kpi-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}
.lw-kpi-value--main { color: var(--accent); font-size: 32px; }
.lw-kpi-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ── Icon button ── */
.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 6px;
    border-radius: var(--radius-sm);
    opacity: 0.5;
    transition: opacity .15s, background .15s;
}
.btn-icon:hover { opacity: 1; }
.btn-icon--danger:hover { background: #fee2e2; }

/* ── Toggle row ── */
.toggle-row { display: flex; align-items: center; gap: 10px; }
.toggle-label { font-size: 14px; font-weight: 500; color: var(--text); }
.text-muted { color: var(--text-muted); font-weight: 400; }
