:root {
    color-scheme: light;
    font-family: system-ui, -apple-system, sans-serif;
    --bg: #f4f6f8;
    --card: #fff;
    --text: #1a1a1a;
    --muted: #5f6b7a;
    --border: #d8dee6;
    --primary: #1f4f8a;
    --primary-hover: #163a66;
    --danger: #b42318;
    --success: #1b7f4a;
    --warning: #9a6700;
}

* { box-sizing: border-box; }

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
}

a { color: var(--primary); }

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 1.5rem;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.auth-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
}

.auth-card {
    width: 100%;
    max-width: 380px;
}

h1, h2 {
    margin: 0 0 0.75rem;
}

p { margin: 0.5rem 0; line-height: 1.5; color: var(--muted); }

label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

input, textarea, select, button {
    font: inherit;
}

input, textarea, select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

textarea { min-height: 100px; resize: vertical; }

button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.55rem 0.9rem;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.95rem;
}

.btn-primary, button[type="submit"] {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover, button[type="submit"]:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: #fff;
    border-color: var(--border);
    color: var(--text);
}

.btn-danger {
    background: #fff5f5;
    border-color: #f5c2c0;
    color: var(--danger);
}

.stack { display: flex; flex-direction: column; gap: 0.9rem; }

.alert {
    padding: 0.75rem 0.9rem;
    border-radius: 8px;
    font-size: 0.92rem;
}

.alert-error { background: #fff5f5; color: var(--danger); border: 1px solid #f5c2c0; }
.alert-success { background: #edfdf3; color: var(--success); border: 1px solid #b7ebc6; }
.alert-info { background: #f0f6ff; color: var(--primary); border: 1px solid #c7d9f5; }

.dashboard-test-phase-banner {
    margin: 0 0 1.35rem;
    padding: 1.1rem 1.35rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 2px solid #ea580c;
    box-shadow: 0 4px 14px rgba(234, 88, 12, 0.18);
    color: #7c2d12;
    font-size: 1.02rem;
    line-height: 1.6;
}

.dashboard-test-phase-banner strong {
    display: block;
    margin-bottom: 0.55rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: #c2410c;
    letter-spacing: 0.01em;
}

.dashboard-test-phase-banner p {
    margin: 0 0 0.7rem;
}

.dashboard-test-phase-banner p:last-child {
    margin-bottom: 0;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.topbar nav {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-pending { background: #fff7e6; color: var(--warning); }
.badge-approved { background: #edfdf3; color: var(--success); }
.badge-rejected { background: #fff5f5; color: var(--danger); }
.badge-admin { background: #eef2ff; color: #3f51b5; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

th, td {
    text-align: left;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

th { color: var(--muted); font-weight: 600; }

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.muted { color: var(--muted); font-size: 0.9rem; }

.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tab {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text);
}

.tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.empty {
    padding: 1.25rem;
    text-align: center;
    color: var(--muted);
}

.section-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.section-header-row h2 {
    margin: 0;
}

.section-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.sync-status {
    margin: 0 0 0.75rem;
    font-size: 0.88rem;
}

.sync-status-error {
    color: var(--danger);
}

.task-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.dashboard-frame-reorder-hint {
    margin: 0 0 0.75rem;
    font-size: 0.84rem;
}

#tasksWrap.is-customize-mode .dashboard-frame-list {
    gap: 0.5rem;
}

.dashboard-frame-row {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0;
    border: none;
    background: transparent;
}

.dashboard-frame-handle-cell,
.dashboard-frame-visibility-cell {
    flex: 0 0 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f8fafc;
}

.dashboard-frame-visibility-btn {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    min-height: 2rem;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.dashboard-frame-visibility-btn:hover {
    color: var(--text);
    background: rgba(15, 23, 42, 0.05);
    border-color: rgba(15, 23, 42, 0.08);
}

.dashboard-frame-visibility-btn.is-hidden {
    color: #b45309;
}

.dashboard-frame-visibility-btn.is-hidden:hover {
    color: #92400e;
    background: rgba(180, 83, 9, 0.08);
    border-color: rgba(180, 83, 9, 0.18);
}

.dashboard-frame-visibility-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.dashboard-frame-row.is-frame-hidden .dashboard-frame-content-cell {
    opacity: 0.45;
}

.dashboard-frame-content-cell {
    flex: 1;
    min-width: 0;
}

.dashboard-frame-content-cell > .task-item,
.dashboard-frame-content-cell > .dashboard-frame-preview {
    height: 100%;
}

#tasksWrap.is-customize-mode .dashboard-frame-preview .task-item-body,
#tasksWrap.is-customize-mode .dashboard-frame-preview a.task-item-body {
    pointer-events: none;
}

#tasksWrap.is-customize-mode .bricqer-dashboard-section-toggle:disabled {
    cursor: default;
    opacity: 1;
}

.dashboard-frame-drag-handle {
    flex-shrink: 0;
    display: inline-grid;
    place-items: center;
    width: 2rem;
    min-height: 2rem;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-drag: element;
}

.dashboard-frame-drag-handle:hover {
    color: var(--text);
    background: rgba(15, 23, 42, 0.05);
    border-color: rgba(15, 23, 42, 0.08);
}

.dashboard-frame-drag-handle:active {
    cursor: grabbing;
}

.dashboard-frame-drag-handle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.dashboard-frame-item.is-dragging {
    opacity: 0.55;
}

.dashboard-frame-item.is-drag-over {
    box-shadow: inset 0 3px 0 0 var(--primary);
}

.bricqer-orders-frame-header {
    display: block;
}

.bricqer-orders-frame-header .bricqer-dashboard-section-toggle {
    width: 100%;
}

.task-item.dashboard-frame-item:not(.task-item--nested) {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.task-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fafbfc;
}

.task-item-body {
    min-width: 0;
}

.task-item-title {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--text);
}

.task-item-desc {
    margin: 0.2rem 0 0;
    font-size: 0.88rem;
    color: var(--muted);
}

.task-item--nested {
    flex-direction: column;
    align-items: stretch;
}

.task-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.bricqer-orders-frame-toggle {
    align-items: center;
}

.bricqer-orders-frame-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.bricqer-orders-frame .task-subframe {
    margin-top: 0;
}

.bricqer-invoice-dashboard-segment.bricqer-dashboard-section {
    margin-top: 0;
}

.bricqer-invoice-dashboard-segment.bricqer-dashboard-section + .bricqer-invoice-dashboard-segment.bricqer-dashboard-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.bricqer-order-action--lexware-credit-note img {
    filter: hue-rotate(300deg) saturate(1.2);
}

.bricqer-order-item-body--todo {
    display: grid;
    gap: 0.2rem;
}

.bricqer-order-item-note-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
}

.bricqer-order-item-note-title--untitled {
    font-weight: 500;
    font-style: italic;
    color: var(--muted);
}

.bricqer-order-item-actions .bricqer-order-note-btn {
    margin-left: auto;
    width: 2.75rem;
    height: 2.75rem;
    min-width: 2.75rem;
}

.bricqer-order-note-btn .btn-icon-inner {
    width: 1.35rem;
    height: 1.35rem;
}

.bricqer-order-item-actions .bricqer-order-note-btn--todo-off.btn-icon {
    background: #d1fae5;
    border-color: #a7f3d0;
    color: #065f46;
}

.bricqer-order-item-actions .bricqer-order-note-btn--todo-on.btn-icon {
    background: #fee2e2;
    border-color: #fecaca;
    color: #991b1b;
}

.bricqer-order-note-modal-body {
    display: grid;
    gap: 1rem;
}

.bricqer-order-note-field {
    display: grid;
    gap: 0.35rem;
}

.bricqer-order-note-field-label {
    font-size: 0.875rem;
    font-weight: 600;
}

.bricqer-order-note-field input,
.bricqer-order-note-field textarea {
    width: 100%;
}

.bricqer-order-note-todo-switch {
    margin-top: 0.25rem;
}

.bricqer-order-note-modal-footer {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
}

.bricqer-order-note-error {
    margin: 0;
}

.bricqer-order-item--cancelled {
    border-left: 3px solid #f87171;
}

.task-subframe {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border);
}

.task-subframe-empty {
    margin: 0;
}

.task-count {
    flex-shrink: 0;
    min-width: 1.6rem;
    height: 1.6rem;
    padding: 0 0.45rem;
    border-radius: 999px;
    background: #fff7e6;
    color: var(--warning);
    font-size: 0.82rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.bricqer-order-group + .bricqer-order-group {
    margin-top: 1.25rem;
}

.bricqer-dashboard-section + .bricqer-dashboard-section {
    margin-top: 1rem;
}

.bricqer-dashboard-section-header {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
}

.bricqer-dashboard-section-header .bricqer-dashboard-section-toggle {
    flex: 1 1 auto;
    min-width: 0;
}

.bricqer-dashboard-section-tools {
    position: relative;
    flex: 0 0 auto;
    padding-top: 0.05rem;
}

.bricqer-dashboard-section-color-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--muted);
    cursor: pointer;
}

.bricqer-dashboard-section-color-btn:hover,
.bricqer-dashboard-section-color-btn[aria-expanded="true"] {
    color: var(--text);
    border-color: #cbd5e1;
    background: #f8fafc;
}

.bricqer-dashboard-section-color-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.bricqer-dashboard-section-color-popover {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    z-index: 30;
    width: min(17rem, calc(100vw - 2rem));
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

.bricqer-dashboard-section-color-popover[hidden] {
    display: none;
}

.bricqer-dashboard-section-color-popover-title {
    margin: 0 0 0.75rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
}

.bricqer-dashboard-section-color-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.55rem;
}

.bricqer-dashboard-section-color-field label {
    font-size: 0.84rem;
    color: var(--muted);
}

.bricqer-dashboard-section-color-field input[type="color"] {
    width: 2.75rem;
    height: 2rem;
    padding: 0.1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}

.bricqer-dashboard-section-color-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0.65rem 0 0.75rem;
}

.bricqer-dashboard-section-color-preset {
    width: 1.55rem;
    height: 1.55rem;
    padding: 0;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 999px;
    cursor: pointer;
}

.bricqer-dashboard-section-color-preset:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.bricqer-dashboard-section-color-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.bricqer-dashboard-section.has-section-colors .bricqer-order-item,
.bricqer-dashboard-section-orders.has-section-colors .bricqer-order-item {
    background: var(--dashboard-section-bg);
    color: var(--dashboard-section-text);
    border-color: var(--dashboard-section-border);
}

.bricqer-dashboard-section.has-section-colors .bricqer-order-item-meta,
.bricqer-dashboard-section-orders.has-section-colors .bricqer-order-item-meta {
    color: inherit;
    opacity: 0.85;
}

.bricqer-orders-frame .bricqer-dashboard-section-header {
    padding-right: 0.15rem;
}

.bricqer-dashboard-section-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.bricqer-dashboard-section-toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 6px;
}

.bricqer-dashboard-section-heading {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    min-width: 0;
}

.bricqer-dashboard-section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

.bricqer-dashboard-section-count {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--muted);
}

.bricqer-dashboard-section-chevron {
    flex-shrink: 0;
    width: 0.55rem;
    height: 0.55rem;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg);
    transition: transform 0.15s ease;
    margin-top: -0.15rem;
}

.bricqer-dashboard-section.is-collapsed .bricqer-dashboard-section-chevron {
    transform: rotate(-45deg);
    margin-top: 0.15rem;
}

.bricqer-dashboard-section-body {
    margin-top: 0.65rem;
}

.bricqer-dashboard-section.is-collapsed .bricqer-dashboard-section-body {
    display: none;
}

.bricqer-dashboard-section-empty {
    margin: 0;
    font-size: 0.88rem;
}

.bricqer-order-group-title {
    margin: 0 0 0.55rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

.bricqer-order-group-count {
    color: var(--muted);
    font-weight: 500;
}

.bricqer-order-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bricqer-order-country {
    flex-shrink: 0;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 2rem;
    gap: 0.12rem;
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1;
    user-select: none;
}

.bricqer-order-country-flag {
    font-size: 1.15rem;
    line-height: 1;
}

.bricqer-order-country-code {
    font-size: 0.62rem;
}

.bricqer-order-item--with-actions {
    cursor: default;
    overflow: visible;
}

.bricqer-order-item-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    flex-shrink: 0;
    margin-left: auto;
    overflow: visible;
}

.bricqer-order-item-actions .btn-icon {
    background: rgba(255, 255, 255, 0.72);
}

.bricqer-order-tracking-btn.btn-icon {
    padding: 0;
    overflow: hidden;
    background: transparent;
    border: 1px solid rgba(15, 23, 42, 0.12);
}

.bricqer-order-tracking-btn .btn-icon-inner {
    width: 100%;
    height: 100%;
}

.bricqer-order-tracking-btn img,
.bricqer-order-tracking-btn svg {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
}

.bricqer-order-remove-btn.btn-icon,
.failed-sendungsnummer-remove-btn.btn-icon {
    padding: 0;
    overflow: hidden;
    background: transparent;
    border: 1px solid rgba(220, 38, 38, 0.28);
    color: #dc2626;
}

.bricqer-order-remove-btn .btn-icon-inner,
.failed-sendungsnummer-remove-btn .btn-icon-inner {
    width: 100%;
    height: 100%;
}

.bricqer-order-remove-btn img,
.bricqer-order-remove-btn svg,
.failed-sendungsnummer-remove-btn img,
.failed-sendungsnummer-remove-btn svg {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
}

.bricqer-order-remove-btn:hover,
.bricqer-order-remove-btn:focus-visible,
.failed-sendungsnummer-remove-btn:hover,
.failed-sendungsnummer-remove-btn:focus-visible {
    background: #fef2f2;
    border-color: rgba(220, 38, 38, 0.45);
    color: #b91c1c;
}

.bricqer-order-item--paid .bricqer-order-item-actions .btn-icon,
.bricqer-order-item--ready .bricqer-order-item-actions .btn-icon,
.bricqer-order-item--open .bricqer-order-item-actions .btn-icon {
    background: rgba(255, 255, 255, 0.82);
}

.bricqer-order-item-main {
    flex: 1;
    min-width: 0;
    display: block;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.bricqer-order-item-main:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 6px;
}

.bricqer-order-complete-btn {
    flex-shrink: 0;
    align-self: center;
    white-space: nowrap;
}

.bricqer-split-btn {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
    flex-shrink: 0;
    max-width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 55%, #1d4ed8 100%);
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.14),
        0 0 0 1px rgba(29, 78, 216, 0.65);
}

.bricqer-split-btn.is-open {
    z-index: 50;
    box-shadow:
        0 8px 22px rgba(29, 78, 216, 0.28),
        0 0 0 1px rgba(29, 78, 216, 0.7);
}

.bricqer-split-btn-row {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.bricqer-split-btn-part {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin: 0;
    padding: 0.52rem 0.82rem;
    border: 0;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.15s ease;
}

.bricqer-split-btn-main {
    flex: 1 1 auto;
    justify-content: flex-start;
    padding-right: 0.75rem;
}

.bricqer-split-btn:has(.bricqer-split-btn-toggle) .bricqer-split-btn-main,
.bricqer-split-btn:has(.bricqer-split-btn-settings) .bricqer-split-btn-main {
    border-right: 1px solid rgba(255, 255, 255, 0.16);
}

.bricqer-split-btn-toggle,
.bricqer-split-btn-settings {
    flex: 0 0 auto;
    padding-left: 0.62rem;
    padding-right: 0.62rem;
    min-width: 2.15rem;
}

.bricqer-order-complete-settings-btn.has-custom-complete-order-settings {
    background: linear-gradient(180deg, #dc2626 0%, var(--danger) 55%, #912018 100%);
}

.bricqer-order-complete-settings-btn.has-custom-complete-order-settings:hover {
    background: linear-gradient(180deg, #ef4444 0%, #c93428 55%, #a12820 100%);
}

.bricqer-order-complete-settings-btn.has-custom-complete-order-settings:active {
    background: linear-gradient(180deg, #991b1b 0%, #912018 55%, #7f1d1d 100%);
}

.bricqer-split-btn-part:hover {
    background: rgba(255, 255, 255, 0.1);
}

.bricqer-split-btn-part:active {
    background: rgba(0, 0, 0, 0.08);
}

.bricqer-split-btn-part:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.95);
    outline-offset: -2px;
    z-index: 1;
}

.bricqer-split-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.96;
}

.bricqer-split-btn-label {
    white-space: nowrap;
}

.bricqer-split-chevron {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    transition: transform 0.15s ease;
    opacity: 0.9;
}

.bricqer-split-btn.is-open .bricqer-split-chevron {
    transform: rotate(180deg);
}

.bricqer-split-menu {
    position: static;
    width: 100%;
    margin: 0;
    padding: 0.2rem;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.bricqer-split-menu-item {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0.55rem 0.72rem;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.25;
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease;
}

.bricqer-split-menu-item:hover {
    background: rgba(255, 255, 255, 0.14);
}

.bricqer-split-menu-item:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: -2px;
}

.bricqer-order-item-actions .bricqer-split-btn {
    margin-left: 0.25rem;
}

.bricqer-order-invoice-btn {
    flex-shrink: 0;
    align-self: center;
    white-space: nowrap;
}

.bricqer-order-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fafbfc;
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.bricqer-order-item--clickable:hover,
.bricqer-order-item--with-actions:hover {
    filter: brightness(0.96);
}

.bricqer-order-item.bricqer-order-item--tutorial-meldung {
    background: #d1fae5;
    border-color: #a7f3d0;
}

.bricqer-order-item.bricqer-order-item--tutorial-meldung .bricqer-order-item-main {
    background: transparent;
}

.bricqer-order-item.bricqer-order-item--tutorial-meldung .tutorial-meldung-open-btn {
    width: 100%;
}

.bricqer-order-item.bricqer-order-item--tutorial-meldung:hover,
.bricqer-order-item.bricqer-order-item--tutorial-meldung:focus-within {
    background: #bbf7d0;
    filter: none;
}

.bricqer-dashboard-section.has-section-colors .bricqer-order-item.bricqer-order-item--tutorial-meldung,
.bricqer-dashboard-section-orders.has-section-colors .bricqer-order-item.bricqer-order-item--tutorial-meldung {
    background: #d1fae5;
    border-color: #a7f3d0;
    color: inherit;
}

.bricqer-order-item-actions .tutorial-meldung-dismiss-btn {
    color: #b91c1c;
}

.bricqer-order-item.bricqer-order-item--plugin-todo {
    background: #dbeafe;
    border-color: #93c5fd;
}

.bricqer-order-item.bricqer-order-item--plugin-todo .bricqer-order-item-main {
    background: transparent;
}

.bricqer-order-item.bricqer-order-item--plugin-todo .plugin-todo-open-btn {
    width: 100%;
}

.bricqer-order-item.bricqer-order-item--plugin-todo:hover,
.bricqer-order-item.bricqer-order-item--plugin-todo:focus-within {
    background: #bfdbfe;
    filter: none;
}

.bricqer-dashboard-section.has-section-colors .bricqer-order-item.bricqer-order-item--plugin-todo,
.bricqer-dashboard-section-orders.has-section-colors .bricqer-order-item.bricqer-order-item--plugin-todo {
    background: #dbeafe;
    border-color: #93c5fd;
    color: inherit;
}

.bricqer-order-item-actions .plugin-todo-dismiss-btn {
    color: #b91c1c;
}

.bricqer-order-item.bricqer-order-item--application-todo {
    background: #fff7e6;
    border-color: #fcd34d;
}

.bricqer-order-item.bricqer-order-item--application-todo .bricqer-order-item-main {
    background: transparent;
}

.bricqer-order-item.bricqer-order-item--application-todo:hover,
.bricqer-order-item.bricqer-order-item--application-todo:focus-within {
    background: #ffedd5;
    filter: none;
}

.bricqer-dashboard-section.has-section-colors .bricqer-order-item.bricqer-order-item--application-todo,
.bricqer-dashboard-section-orders.has-section-colors .bricqer-order-item.bricqer-order-item--application-todo {
    background: #fff7e6;
    border-color: #fcd34d;
    color: inherit;
}

.application-todo-item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    justify-content: flex-end;
}

.bricqer-order-item--clickable:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.bricqer-order-item-body {
    min-width: 0;
}

.bricqer-order-item-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem 0.6rem;
}

.bricqer-order-item-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: inherit;
}

.bricqer-order-status-bubble {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
    border: 1px solid transparent;
    letter-spacing: 0.01em;
}

.bricqer-order-status-bubble--missing-invoice {
    background: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}

.bricqer-order-status-bubble--with-invoice {
    background: #dbeafe;
    color: #1e40af;
    border-color: #93c5fd;
}

.bricqer-order-status-bubble--paid {
    background: #d1fae5;
    color: #065f46;
    border-color: #6ee7b7;
}

.bricqer-order-status-bubble--ready {
    background: #ffedd5;
    color: #9a3412;
    border-color: #fdba74;
}

.bricqer-order-status-bubble--open {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}

.bricqer-order-status-bubble--shipped {
    background: #e0e7ff;
    color: #3730a3;
    border-color: #a5b4fc;
}

.bricqer-order-status-bubble--cancelled {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.bricqer-order-status-bubble--default {
    background: rgba(15, 23, 42, 0.08);
    color: #334155;
    border-color: rgba(15, 23, 42, 0.12);
}

.bricqer-order-item--failed-sendungsnummer {
    border-color: #fcd34d;
    background: #fffbeb;
}

.bricqer-order-item--failed-sendungsnummer .bricqer-order-item-link,
.bricqer-order-item--failed-sendungsnummer .bricqer-order-item-main.bricqer-order-item-link {
    text-decoration: none;
    color: inherit;
}

.bricqer-order-item--failed-sendungsnummer:hover,
.bricqer-order-item--failed-sendungsnummer:focus-within {
    background: #fef3c7;
}

.failed-sendungsnummer-lookup-link {
    display: inline;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--primary);
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.12em;
    cursor: pointer;
}

.failed-sendungsnummer-lookup-link:hover,
.failed-sendungsnummer-lookup-link:focus-visible {
    color: #1d4ed8;
}

.sendungsnummer-usage-list {
    margin: 0.35rem 0 0;
    padding-left: 1.1rem;
}

.sendungsnummer-usage-list li + li {
    margin-top: 0.2rem;
}

.sendungsnummer-usage-divider {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 0.85rem 0;
}

.bricqer-order-item-meta {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.9;
}


.bricqer-order-item--paid {
    background: #d1fae5;
    color: #065f46;
    border-color: #a7f3d0;
}

.bricqer-order-item--ship-ready {
    background: #dbeafe;
    color: #1e40af;
    border-color: #bfdbfe;
}

.bricqer-order-item--missing-invoice {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.bricqer-order-item--ready {
    background: #ffedd5;
    color: #9a3412;
    border-color: #fed7aa;
}

.bricqer-order-item--open {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.settings-frame + .settings-frame {
    margin-top: 1rem;
}

.settings-frame h2 {
    margin: 0 0 0.75rem;
    font-size: 1.05rem;
}

.bestellabschluss-settings-form {
    margin-top: 0.75rem;
}

.bestellabschluss-transfer-title {
    margin: 0 0 0.85rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

.bestellabschluss-settings-checkbox {
    align-items: flex-start;
}

.bestellabschluss-settings-checkbox-label {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.bestellabschluss-settings-checkbox.is-disabled {
    opacity: 0.72;
    cursor: not-allowed;
}

.bestellabschluss-settings-checkbox.is-disabled input[type="checkbox"] {
    cursor: not-allowed;
}

.settings-switch.is-disabled {
    opacity: 0.72;
    cursor: not-allowed;
}

.settings-switch.is-disabled input[type="checkbox"] {
    cursor: not-allowed;
}

.bestellabschluss-settings-soon {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.84rem;
    font-weight: 400;
}

.settings-switch {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.settings-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.settings-switch-slider {
    position: relative;
    flex: 0 0 auto;
    width: 2.75rem;
    height: 1.5rem;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background 0.15s ease;
}

.settings-switch-slider::after {
    content: "";
    position: absolute;
    top: 0.15rem;
    left: 0.15rem;
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.18);
    transition: transform 0.15s ease;
}

.settings-switch input:checked + .settings-switch-slider {
    background: var(--primary);
}

.settings-switch input:checked + .settings-switch-slider::after {
    transform: translateX(1.25rem);
}

.settings-switch input:focus-visible + .settings-switch-slider {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.settings-switch-label {
    font-weight: 500;
    color: var(--text);
}

.settings-segmented {
    display: inline-flex;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: #f8fafc;
}

.settings-segmented label {
    display: inline-flex;
    align-items: center;
    margin: 0;
    cursor: pointer;
}

.settings-segmented input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.settings-segmented span {
    display: inline-block;
    padding: 0.45rem 0.85rem;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--muted);
}

.settings-segmented input:checked + span {
    background: #fff;
    color: var(--text);
    box-shadow: inset 0 0 0 1px var(--border);
}

.settings-segmented input:focus-visible + span {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
}

.bestellabschluss-invoice-hours {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.55rem;
    font-size: 0.92rem;
    color: var(--text);
}

.bestellabschluss-invoice-hours input[type="number"] {
    width: 4.5rem;
    padding: 0.45rem 0.55rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font: inherit;
}

.bestellabschluss-settings-subsection {
    display: grid;
    gap: 0.85rem;
    margin-top: 0.25rem;
}

.bestellabschluss-email-smtp-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.bestellabschluss-email-test-upload {
    margin-top: 0.35rem;
    margin-bottom: 0;
}

.bestellabschluss-smtp-password-hint {
    margin: -0.35rem 0 0;
}

.bestellabschluss-smtp-credentials-hint {
    margin: 0 0 0.75rem;
    line-height: 1.45;
}

.bestellabschluss-email-body {
    min-height: 7rem;
    resize: vertical;
}

.bestellabschluss-email-placeholders {
    margin-top: 0.55rem;
}

.bestellabschluss-email-placeholders-title {
    margin: 0 0 0.15rem;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text);
}

.bestellabschluss-email-placeholders-hint {
    margin: 0 0 0.45rem;
    font-size: 0.82rem;
    line-height: 1.35;
}

.bestellabschluss-email-attach-hint {
    margin: -0.15rem 0 0;
    max-width: 42rem;
    font-size: 0.88rem;
    line-height: 1.45;
}

.bestellabschluss-email-placeholder-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.35rem;
}

.bestellabschluss-email-placeholder-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.bestellabschluss-email-placeholder-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.45rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #f8fafc;
    color: var(--text);
    cursor: pointer;
    font: inherit;
}

.bestellabschluss-email-placeholder-tag:hover,
.bestellabschluss-email-placeholder-tag:focus-visible {
    border-color: #9ec5eb;
    background: #f0f6ff;
    outline: none;
}

.bestellabschluss-email-placeholder-tag code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8rem;
    color: var(--primary);
}

.bestellabschluss-email-placeholder-list .muted {
    font-size: 0.82rem;
    line-height: 1.35;
}

.readonly-value {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--text);
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 100;
}

.modal-backdrop[hidden] {
    display: none !important;
}

.modal-backdrop--stack {
    z-index: 110;
}

.modal-card {
    width: 100%;
    max-width: 440px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

.modal-card h2 {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
}

.modal-card--compact {
    padding: 0.95rem 1.05rem;
}

.modal-card--compact h2 {
    margin: 0 0 0.15rem;
    font-size: 1.05rem;
}

.modal-card--compact > .muted {
    margin: 0 0 0.45rem;
    font-size: 0.86rem;
    line-height: 1.35;
}

.modal-card--compact .stack {
    gap: 0.45rem;
}

.modal-card--compact input,
.modal-card--compact select {
    padding: 0.45rem 0.6rem;
}

.modal-card--compact .form-actions {
    margin-top: 0.25rem;
}

.modal-card--compact .bestellabschluss-smtp-password-hint {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.35;
}

.modal-card--wide {
    max-width: 760px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.modal-card--confirm {
    max-width: 28rem;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-card-header--solo {
    padding: 1rem 1.25rem;
}

.complete-order-settings-modal {
    max-width: 32rem;
}

.complete-order-settings-modal-intro {
    margin: 0.35rem 0 0;
    font-size: 0.86rem;
    line-height: 1.4;
}

.complete-order-settings-section + .complete-order-settings-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.complete-order-settings-section h3 {
    margin: 0 0 0.65rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
}

.complete-order-settings-switch-list {
    display: grid;
    gap: 0.65rem;
}

.complete-order-settings-switch-list .complete-order-settings-switch[hidden] {
    display: none;
}

.complete-order-settings-switch-list .settings-switch {
    cursor: pointer;
}

.complete-order-settings-modal-footer {
    justify-content: flex-end;
}

.complete-order-progress-modal {
    width: min(28rem, calc(100vw - 2rem));
}

.complete-order-progress-order-label {
    margin: 0 0 1rem;
}

.complete-order-progress-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.complete-order-progress-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: #fff;
    color: var(--muted);
}

.complete-order-progress-step.is-running {
    color: var(--text);
    border-color: #93c5fd;
    background: #eff6ff;
}

.complete-order-progress-step.is-done {
    color: #166534;
    border-color: #86efac;
    background: #f0fdf4;
}

.complete-order-progress-step.is-error {
    color: #991b1b;
    border-color: #fca5a5;
    background: #fef2f2;
}

.complete-order-progress-step-icon {
    flex: 0 0 1.25rem;
    width: 1.25rem;
    height: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.complete-order-progress-step.is-pending .complete-order-progress-step-icon::before {
    content: '';
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    background: #cbd5e1;
}

.complete-order-progress-step.is-running .complete-order-progress-step-icon::before {
    content: '';
    width: 1rem;
    height: 1rem;
    border: 2px solid #93c5fd;
    border-top-color: #2563eb;
    border-radius: 999px;
    animation: complete-order-progress-spin 0.8s linear infinite;
}

.complete-order-progress-step.is-done .complete-order-progress-step-icon::before {
    content: '✓';
    color: #16a34a;
    font-weight: 700;
}

.complete-order-progress-step.is-error .complete-order-progress-step-icon::before {
    content: '✕';
    color: #dc2626;
    font-weight: 700;
}

.complete-order-progress-step-label {
    line-height: 1.4;
}

.complete-order-progress-success-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 0.75rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dcfce7;
    color: #16a34a;
    font-size: 1.5rem;
    font-weight: 700;
}

.complete-order-progress-success-warning {
    margin-top: 1rem;
    text-align: left;
}

.complete-order-progress-success-warning .alert {
    margin: 0;
}

.complete-order-progress-success-summary {
    margin-top: 1rem;
    text-align: left;
}

.complete-order-progress-error-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 0.75rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fee2e2;
    color: #dc2626;
    font-size: 1.5rem;
    font-weight: 700;
}

.complete-order-progress-result-list {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
}

.complete-order-progress-result-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    line-height: 1.4;
}

.complete-order-progress-result-item.is-done {
    color: #166534;
    border-color: #86efac;
    background: #f0fdf4;
}

.complete-order-progress-result-item.is-error {
    color: #991b1b;
    border-color: #fca5a5;
    background: #fef2f2;
}

.complete-order-progress-result-icon {
    flex: 0 0 1rem;
    width: 1rem;
    text-align: center;
    font-weight: 700;
}

.complete-order-progress-result-item.is-done .complete-order-progress-result-icon::before {
    content: '✓';
    color: #16a34a;
}

.complete-order-progress-result-item.is-error .complete-order-progress-result-icon::before {
    content: '✕';
    color: #dc2626;
}

.complete-order-progress-result-text {
    flex: 1 1 auto;
    min-width: 0;
}

.complete-order-progress-error-footnote {
    margin: 1rem 0 0;
    text-align: left;
}

.complete-order-progress-error-hint {
    margin: 0.75rem 0 0;
    padding: 0.65rem 0.75rem;
    border-radius: 0.5rem;
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #9a3412;
    text-align: left;
    font-size: 0.92rem;
    line-height: 1.45;
}

.complete-order-progress-footer {
    justify-content: flex-end;
}

@keyframes complete-order-progress-spin {
    to {
        transform: rotate(360deg);
    }
}

.modal-card-body--confirm {
    padding: 1rem 1.25rem 1.15rem;
}

.modal-card-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.25rem 1.15rem;
    border-top: 1px solid var(--border);
    background: #f8fafc;
}

.local-unpaid-confirm-text {
    margin: 0;
    line-height: 1.55;
    color: var(--text);
}

.local-unpaid-confirm-checkbox {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 1rem 0 0;
    font-size: 0.9rem;
    line-height: 1.4;
    cursor: pointer;
    color: var(--text);
}

.local-unpaid-confirm-checkbox input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    min-width: 1rem;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
}

.modal-card--ship-ready {
    max-width: 24rem;
}

.modal-card-header--ship-ready {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid var(--border);
}

.modal-card-header--ship-ready h2 {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.25;
}

.ship-ready-modal-subtitle {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.3;
    text-align: right;
    flex: 1 1 auto;
    min-width: 0;
}

.modal-card-body--ship-ready {
    padding: 0.7rem 0.9rem 0.75rem;
}

.modal-card-footer--compact {
    padding: 0.55rem 0.9rem 0.65rem;
    gap: 0.4rem;
}

.modal-card--ship-ready .form-field {
    display: block;
    margin: 0 0 0.65rem;
}

.modal-card--ship-ready .form-field:last-child {
    margin-bottom: 0;
}

.modal-card--ship-ready .form-field > span {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.82rem;
    color: var(--text);
}

.modal-card--ship-ready textarea {
    min-height: 4.75rem;
    padding: 0.45rem 0.6rem;
    resize: vertical;
    line-height: 1.4;
    font-size: 0.9rem;
}

.modal-card--ship-ready select {
    width: 100%;
    padding: 0.45rem 0.6rem;
    font-size: 0.9rem;
}

.local-unpaid-confirm-footer .btn {
    white-space: nowrap;
}

.dashboard-settings-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.4;
    cursor: pointer;
    color: var(--text);
}

.dashboard-settings-checkbox input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    min-width: 1rem;
    padding: 0;
    margin: 0.15rem 0 0;
    flex-shrink: 0;
}

.dashboard-settings-age-wrap {
    margin-top: 0.75rem;
}

.dashboard-settings-age {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0;
    font-size: 0.95rem;
    color: var(--text);
    cursor: default;
}

.dashboard-settings-age input[type="number"] {
    width: 4.5rem;
    padding: 0.45rem 0.55rem;
    text-align: center;
}

.dashboard-settings-age-hint {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
}

.modal-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.25rem 0.85rem;
    border-bottom: 1px solid var(--border);
}

.modal-card-header h2 {
    margin: 0;
}

.modal-card-header .muted {
    margin: 0.2rem 0 0;
}

.modal-card-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.btn-icon {
    box-sizing: border-box;
    width: 2.5rem;
    height: 2.5rem;
    min-width: 2.5rem;
    padding: 0;
    gap: 0;
    flex-shrink: 0;
    display: inline-grid;
    place-items: center;
}

.btn-icon-inner {
    width: 1.2rem;
    height: 1.2rem;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.btn-icon-inner > * {
    grid-area: 1 / 1;
}

.btn-icon-inner img,
.btn-icon-inner svg {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
}

.btn-icon-inner img[src*="bricqer-open"] {
    transform: translateY(-2px);
}

.btn-icon-inner > [hidden] {
    display: none !important;
}

.btn-marketplace-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.2rem;
    height: 1.2rem;
    min-width: 1.2rem;
    padding: 0;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
}

.btn-marketplace-label--bricklink {
    background: #ef4444;
    color: #fff;
}

.btn-marketplace-label--brickowl {
    background: #f59e0b;
    color: #fff;
}

.btn-marketplace-label--ebay {
    background: #2563eb;
    color: #fff;
}

.modal-card--tutorial-meldung {
    max-width: 36rem;
}

.tutorial-meldung-modal-body p {
    margin: 0 0 0.85rem;
    line-height: 1.55;
}

.tutorial-meldung-modal-body p:last-child {
    margin-bottom: 0;
}

.tutorial-meldung-modal-body a {
    color: var(--primary);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

.tutorial-meldung-signatur {
    margin-top: 1.25rem;
    font-style: italic;
}

.modal-card-body {
    padding: 1rem 1.25rem 1.25rem;
    overflow: auto;
}

.order-detail-section + .order-detail-section {
    margin-top: 1.25rem;
}

.order-detail-section-title {
    margin: 0 0 0.65rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

.order-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    table-layout: fixed;
}

.order-detail-table th,
.order-detail-table td {
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--border);
    vertical-align: top;
    text-align: left;
    word-break: break-word;
}

.order-detail-table th {
    width: 18%;
    background: #f8fafc;
    font-weight: 600;
    color: var(--text);
}

.order-detail-table td {
    width: 32%;
}

.invoice-preview-totals {
    margin: 0.85rem 0 0;
    text-align: right;
    font-size: 0.95rem;
}

.order-detail-table--positions th,
.order-detail-table--positions td {
    width: auto;
}

.dhl-status-legend-table--codes th:first-child,
.dhl-status-legend-table--codes td:first-child {
    width: 5.5rem;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.dhl-legend-subheading {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.dhl-legend-subheading + .muted,
.dhl-legend-subheading + table {
    margin-top: 0;
}

.dhl-legend-subheading:not(:first-child) {
    margin-top: 1.5rem;
}

.dhl-legend-notes {
    margin: 0.75rem 0 0;
    padding-left: 1.25rem;
}

.dhl-legend-notes li + li {
    margin-top: 0.35rem;
}

.dhl-test-result {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.dhl-test-shipment + .dhl-test-shipment {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.dhl-test-shipment-heading,
.dhl-test-events-heading {
    margin: 0 0 0.65rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.dhl-test-events-heading {
    margin-top: 1rem;
}

.dhl-test-events-table th:first-child {
    width: 9rem;
    white-space: nowrap;
}

.invoice-debug-block + .invoice-debug-block {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.invoice-debug-label {
    margin: 0 0 0.25rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.invoice-debug-meta {
    margin: 0 0 0.5rem;
    font-size: 0.85rem;
    word-break: break-all;
}

.order-detail-collapsible {
    margin-top: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fafbfc;
    overflow: hidden;
}

.order-detail-collapsible summary {
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    list-style: none;
}

.order-detail-collapsible summary::-webkit-details-marker {
    display: none;
}

.order-detail-collapsible summary::before {
    content: '▸';
    display: inline-block;
    margin-right: 0.45rem;
    transition: transform 0.15s ease;
}

.order-detail-collapsible[open] summary::before {
    transform: rotate(90deg);
}

.order-detail-collapsible .order-detail-pre {
    margin: 0;
    border: 0;
    border-top: 1px solid var(--border);
    border-radius: 0;
}

.order-detail-pre {
    margin: 0;
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.82rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
    overflow: auto;
}

.order-detail-pre--full {
    max-height: 42vh;
}

.permission-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin: 1rem 0;
}

.permission-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fafbfc;
    cursor: pointer;
}

.permission-option input {
    width: auto;
    margin: 0;
}

.permission-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.permission-tag {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #eef2ff;
    color: #3f51b5;
    font-size: 0.8rem;
    font-weight: 600;
}

.upload-area {
    border: 2px dashed var(--border);
    border-radius: 10px;
    padding: 2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
    margin-bottom: 1rem;
}

.upload-area > * {
    pointer-events: none;
}

.upload-area:hover,
.upload-area.is-dragover {
    border-color: var(--primary);
    background: #f0f7ff;
}

.upload-area-title {
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.upload-info-text {
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    background: #f0f6ff;
    color: var(--primary);
    border: 1px solid #c7d9f5;
    font-size: 0.92rem;
    line-height: 1.5;
}

.upload-info-text p {
    margin: 0;
}

.upload-info-text p + p {
    margin-top: 0.55rem;
}

.selected-files {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.selected-file-item,
.file-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fafbfc;
}

.file-list-item + .file-list-item {
    margin-top: 0.5rem;
}

.weight-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.weight-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #f8fafc;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.weight-stat:hover {
    background: #eef2ff;
    border-color: #c7d9f5;
}

.weight-stat.is-active {
    background: #eef2ff;
    border-color: var(--primary);
    color: var(--primary);
}

.weight-stat-total.is-active {
    background: #edfdf3;
    border-color: var(--success);
    color: var(--success);
}

.weight-stat-total {
    background: #f6fffa;
}

.weight-badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #eef2ff;
    color: #3f51b5;
    font-size: 0.8rem;
    font-weight: 600;
}

.sendungsnummer-actions-cell {
    width: 3rem;
    text-align: right;
    white-space: nowrap;
}

/* Bewerbungs-Assistent */
.apply-card {
    width: 100%;
    max-width: 640px;
}

.apply-steps {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.apply-step {
    flex: 1;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #f8fafc;
    font-size: 0.82rem;
    color: var(--muted);
}

.apply-step strong {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.15rem;
}

.apply-step.is-active {
    border-color: #9ec5eb;
    background: #f0f6ff;
    color: var(--primary);
}

.apply-step.is-done {
    border-color: #b7ebc6;
    background: #edfdf3;
    color: var(--success);
}

.archive-filters {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
    gap: 0.75rem;
    align-items: end;
    margin: 0.75rem 0 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.archive-filter {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

.archive-filter-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
}

.archive-filter input,
.archive-filter select {
    width: 100%;
    min-width: 0;
}

.archive-filter-search {
    grid-column: 1 / -1;
}

.archive-filter-actions {
    display: flex;
    align-items: flex-end;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.form-grid .span-2 { grid-column: span 2; }

.form-section-title {
    margin: 0.25rem 0 0;
    font-size: 0.95rem;
    color: var(--text);
}

.required-note {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    color: var(--muted);
}

label .required-mark {
    color: var(--danger);
    margin-left: 0.15rem;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.modal-card .form-field {
    display: block;
    margin: 1rem 0;
}

.modal-card .form-field > span {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
}

.modal-card.modal-card--compact .form-field {
    margin: 0;
}

.modal-card.modal-card--compact .form-field > span {
    margin-bottom: 0.15rem;
    font-size: 0.84rem;
}

.btn-small {
    padding: 0.3rem 0.55rem;
    font-size: 0.82rem;
}

.created-at-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
}

.summary-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.summary-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.92rem;
}

.summary-list li span:first-child {
    color: var(--muted);
}

.field-error {
    color: var(--danger);
    font-size: 0.82rem;
    margin-top: 0.25rem;
}

.optional-note {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.label-with-info {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.info-hover {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #f8fafc;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    cursor: help;
    vertical-align: middle;
}

.info-hover:focus {
    outline: 2px solid #9ec5eb;
    outline-offset: 1px;
}

.info-hover-text {
    position: absolute;
    left: calc(100% + 0.45rem);
    top: 50%;
    transform: translateY(-50%);
    width: 280px;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.45;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    z-index: 20;
}

.api-provider-group {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.api-provider-group:first-of-type {
    margin-top: 0.75rem;
    padding-top: 0;
    border-top: none;
}

.api-provider-title {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

.info-hover-text a {
    color: var(--primary);
    word-break: break-all;
}

.info-hover:hover .info-hover-text,
.info-hover:focus .info-hover-text,
.info-hover:focus-within .info-hover-text {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

@media (max-width: 720px) {
    .info-hover-text {
        left: auto;
        right: 0;
        top: calc(100% + 0.4rem);
        transform: none;
        width: min(240px, 70vw);
    }
}

@media (max-width: 720px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-grid .span-2 {
        grid-column: span 1;
    }

    .apply-steps {
        flex-direction: column;
    }
}

@media (max-width: 720px) {
    table, thead, tbody, th, td, tr { display: block; }
    thead { display: none; }
    tr {
        border: 1px solid var(--border);
        border-radius: 10px;
        margin-bottom: 0.75rem;
        padding: 0.5rem;
        background: #fff;
    }
    td {
        border: 0;
        padding: 0.35rem 0.5rem;
    }
    td::before {
        content: attr(data-label);
        display: block;
        font-size: 0.75rem;
        color: var(--muted);
        margin-bottom: 0.15rem;
        font-weight: 600;
    }
}
