.dsb-board {
    --dsb-bg: #f4f7fb;
    --dsb-panel: #ffffff;
    --dsb-border: #dbe3ec;
    --dsb-text: #000000;
    --dsb-hl-yellow: #fff4b8;
    --dsb-hl-purple: #eadcff;
    --dsb-hl-blue: #dbefff;
    --dsb-hl-red: #ffd6d6;
    --dsb-hl-green: #d9f8e6;
    color: var(--dsb-text);
}

.dsb-board * {
    box-sizing: border-box;
}

.dsb-wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px;
    background: var(--dsb-bg);
}

.dsb-board-kiosk .dsb-wrap {
    max-width: 100%;
    padding: 10px;
}

.dsb-board-kiosk .dsb-title {
    font-size: clamp(22px, 3vw, 34px);
}

.dsb-board-kiosk .dsb-meta,
.dsb-board-kiosk .dsb-pill {
    font-size: 12px;
}

.dsb-board-kiosk .dsb-table tbody td {
    font-size: clamp(13px, 1.3vw, 19px);
    padding: 8px 7px;
    border-bottom: 1px solid #e7ddba;
}

.dsb-topbar,
.dsb-admin-drawer,
.dsb-panel,
.dsb-card {
    background: var(--dsb-panel);
    border: 1px solid var(--dsb-border);
    border-radius: 14px;
}

.dsb-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
}

.dsb-title {
    margin: 0;
    font-size: clamp(22px, 3vw, 34px);
    line-height: 1.1;
}

.dsb-meta,
.dsb-small-note,
.dsb-hint {
    color: #1f2937;
    opacity: 0.78;
}

.dsb-topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.dsb-pill {
    border: 1px solid var(--dsb-border);
    background: #f7fafc;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 14px;
    white-space: nowrap;
}

.dsb-btn,
.dsb-field,
.dsb-select {
    border-radius: 12px;
    border: 1px solid var(--dsb-border);
    background: #ffffff;
    color: var(--dsb-text);
}

.dsb-btn {
    cursor: pointer;
    font-weight: 800;
    padding: 9px 12px;
}

.dsb-btn:hover {
    background: #f3f6fa;
}

.dsb-btn-primary {
    background: #f0fff6;
    border-color: #bfe9d0;
}

.dsb-btn-primary:hover {
    background: #e5ffef;
}

.dsb-btn-danger {
    background: #fff1f1;
}

.dsb-btn-danger:hover {
    background: #ffe6e6;
}

.dsb-admin-drawer {
    display: none;
    margin-top: 12px;
    padding: 14px;
}

.dsb-admin-drawer.is-visible {
    display: block;
}

.dsb-form-grid {
    display: grid;
    grid-template-columns: 180px 1fr 1.2fr 180px auto auto;
    gap: 10px;
    align-items: center;
}

.dsb-field,
.dsb-select {
    width: 100%;
    padding: 10px 12px;
    font-size: 16px;
    outline: none;
}

.dsb-field::placeholder {
    color: #000;
    opacity: 0.45;
}

.dsb-small-note {
    margin-top: 10px;
    font-size: 12px;
}

.dsb-notice {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #eef6ff;
    border: 1px solid #c7dcfb;
}

.dsb-panel {
    margin-top: 8px;
    overflow: hidden;
}

.dsb-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.dsb-table thead th {
    background: #f1f5f9;
    font-weight: 950;
    border-bottom: 1px solid var(--dsb-border);
    padding: 7px 5px;
    text-transform: uppercase;
    font-size: 9px;
    letter-spacing: 0;
    line-height: 1.1;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
}

.dsb-table tbody td {
    border-bottom: 1px solid var(--dsb-border);
    padding: 8px 6px;
    font-size: clamp(12px, 1.15vw, 18px);
    line-height: 1.12;
    vertical-align: middle;
    overflow-wrap: anywhere;
    word-break: normal;
}

.dsb-table tbody tr:nth-child(odd) {
    background: #fff8dd;
}

.dsb-table tbody tr:nth-child(even) {
    background: #ffffff;
}

.dsb-board-kiosk .dsb-table tbody tr:nth-child(odd) {
    background: #fff1b8 !important;
}

.dsb-board-kiosk .dsb-table tbody tr:nth-child(even) {
    background: #ffffff !important;
}

.dsb-board-kiosk .dsb-table tbody tr:not(.is-completed):not(.hl-yellow):not(.hl-purple):not(.hl-blue):not(.hl-red):not(.hl-green) td {
    border-bottom: 1px solid #ddcf9b;
}

.dsb-invoice {
    font-weight: 1000;
    letter-spacing: 0.6px;
    font-variant-numeric: tabular-nums;
}

.dsb-method {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    padding: 4px 5px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #475569;
    font-size: 0.62em;
    font-weight: 950;
    white-space: nowrap;
}

.dsb-method-weekdays {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.dsb-method-weekend {
    background: #ffedd5;
    border-color: #fdba74;
    color: #c2410c;
}

.dsb-customer-type {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    padding: 4px 5px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #475569;
    font-size: 0.62em;
    font-weight: 950;
    white-space: nowrap;
}

.dsb-customer-type.is-customer {
    background: #e0f2fe;
    border-color: #7dd3fc;
    color: #0369a1;
}

.dsb-customer-type.is-wholesale {
    background: #ede9fe;
    border-color: #c4b5fd;
    color: #6d28d9;
}

.dsb-redeliver {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    padding: 4px 5px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #475569;
    font-size: 0.62em;
    font-weight: 950;
    white-space: nowrap;
}

.dsb-redeliver.is-needed {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #b91c1c;
}

.dsb-redeliver.is-not-needed {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.dsb-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.dsb-mini {
    font-size: 14px;
    padding: 8px 10px;
    border-radius: 10px;
}

.dsb-row.hl-yellow {
    background: var(--dsb-hl-yellow) !important;
}

.dsb-row.hl-purple {
    background: var(--dsb-hl-purple) !important;
}

.dsb-row.hl-blue {
    background: var(--dsb-hl-blue) !important;
}

.dsb-row.hl-red {
    background: var(--dsb-hl-red) !important;
}

.dsb-row.hl-green {
    background: var(--dsb-hl-green) !important;
}

.dsb-row.is-completed {
    outline: none !important;
}

.dsb-row.is-completed td {
    background: inherit !important;
    font-weight: 900;
}

.dsb-hint {
    margin: 10px 4px 0;
    padding: 0 14px 14px;
    font-size: 13px;
}

.dsb-login-required {
    margin-top: 16px;
    padding: 18px;
    border: 1px dashed var(--dsb-border);
    border-radius: 14px;
    background: #ffffff;
}

.dsb-login-required h2 {
    margin-top: 0;
}

.dsb-login-actions {
    margin: 12px 0 16px;
}

.dsb-login-tabs {
    display: flex;
    gap: 8px;
    margin: 12px 0 16px;
    flex-wrap: wrap;
}

.dsb-login-tab {
    padding: 10px 14px;
    border: 1px solid var(--dsb-border);
    border-radius: 999px;
    background: #f3f6fa;
    cursor: pointer;
    font-weight: 800;
}

.dsb-login-tab.is-active {
    background: #f0fff6;
    border-color: #bfe9d0;
}

.dsb-login-panel {
    display: none;
}

.dsb-login-panel.is-active {
    display: block;
}

.dsb-login-form-wrap form {
    display: grid;
    gap: 12px;
    max-width: 420px;
}

.dsb-login-form-wrap label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
}

.dsb-login-form-wrap input[type="text"],
.dsb-login-form-wrap input[type="email"],
.dsb-login-form-wrap input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--dsb-border);
    border-radius: 12px;
}

.dsb-login-form-wrap input[type="submit"] {
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid #bfe9d0;
    background: #f0fff6;
    cursor: pointer;
    font-weight: 800;
}

.dsb-pin-login-row {
    display: flex;
    gap: 10px;
    max-width: 420px;
}

.dsb-pin-login-row .dsb-field {
    flex: 1;
}

.dsb-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.35);
    z-index: 9999;
}

.dsb-modal.is-visible {
    display: flex;
}

.dsb-card {
    width: min(520px, 100%);
    padding: 16px;
}

.dsb-detail-card {
    width: min(980px, 100%);
    max-height: min(88vh, 900px);
    overflow: auto;
}

.dsb-card h2 {
    margin: 0 0 8px;
}

.dsb-card p {
    margin: 0 0 14px;
    opacity: 0.75;
}

.dsb-pin-row,
.dsb-modal-actions {
    display: flex;
    gap: 10px;
}

.dsb-pin-row .dsb-field {
    flex: 1;
}

.dsb-modal-form {
    display: grid;
    gap: 12px;
}

.dsb-label {
    display: grid;
    gap: 6px;
    font-weight: 700;
}

.dsb-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.dsb-detail-body {
    display: grid;
    gap: 18px;
}

.dsb-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.dsb-detail-item {
    border: 1px solid var(--dsb-border);
    border-radius: 12px;
    padding: 10px 12px;
    background: #f8fbff;
    display: grid;
    gap: 6px;
}

.dsb-detail-item span {
    font-size: 12px;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.dsb-detail-item strong {
    font-size: 15px;
    line-height: 1.3;
}

.dsb-detail-section {
    display: grid;
    gap: 10px;
}

.dsb-detail-section h3 {
    margin: 0;
    font-size: 18px;
}

.dsb-detail-table {
    width: 100%;
    border-collapse: collapse;
}

.dsb-detail-table th,
.dsb-detail-table td {
    padding: 10px;
    border-bottom: 1px solid var(--dsb-border);
    text-align: left;
    vertical-align: top;
}

.dsb-detail-table th {
    background: #f1f5f9;
    font-size: 13px;
    text-transform: uppercase;
}

.dsb-detail-list {
    display: grid;
    gap: 10px;
}

.dsb-detail-list-item {
    border: 1px solid var(--dsb-border);
    border-radius: 12px;
    padding: 10px 12px;
    background: #ffffff;
}

.dsb-detail-list-item strong,
.dsb-detail-list-item span {
    display: block;
}

.dsb-detail-list-item span {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 3px;
}

.dsb-detail-list-item p {
    margin: 8px 0 0;
    opacity: 1;
}

.dsb-empty-detail {
    border: 1px dashed var(--dsb-border);
    border-radius: 12px;
    padding: 14px;
    background: #fafcff;
    opacity: 0.75;
}

.dsb-loading-row,
.dsb-empty-row {
    opacity: 0.75;
}

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

    .dsb-topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .dsb-topbar-actions {
        justify-content: flex-start;
    }
}
