:root {
    --bg: #f4f6f9;
    --surface: #ffffff;
    --border: #e2e8f0;
    --text: #1e293b;
    --muted: #64748b;
    --primary: #d9232e; /* Swiss21 Akzentrot */
    --primary-hover: #b81b25;
    --primary-soft: #fef2f2;
    --success: #0f766e;
    --success-soft: #f0fdfa;
    --warning-bg: #fffbeb;
    --warning-border: #fde68a;
    --radius: 10px;
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.45;
}

.hidden {
    display: none !important;
}

.muted {
    color: var(--muted);
}

.small {
    font-size: 0.85rem;
}

/* Topbar */
.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.topbar-left, .topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.brand-dot {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    background: var(--primary);
    display: inline-block;
}

.brand h1 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.brand-sub {
    font-size: 0.8rem;
    color: var(--muted);
}

.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
}

.badge-demo {
    background: #fef3c7;
    color: #92400e;
}

.badge-live {
    background: #dcfce7;
    color: #166534;
}

.employee-select-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: var(--muted);
}

.employee-select-wrap select {
    width: auto;
    min-width: 160px;
    padding: 0.35rem 0.6rem;
}

/* Board Grid */
.board {
    max-width: 1440px;
    margin: 1.25rem auto;
    padding: 0 1.25rem 2rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    align-items: start;
}

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

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.panel-header.space-between {
    justify-content: space-between;
}

.panel-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.panel-header h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Forms */
.field-group {
    margin-bottom: 0.9rem;
}

.field-group label {
    display: block;
    font-size: 0.84rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: #334155;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

input[type="text"],
input[type="search"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 7px;
    font-size: 0.92rem;
    font-family: inherit;
    color: var(--text);
    background: #fff;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(217, 35, 46, 0.12);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 0.95rem;
    border-radius: 7px;
    border: 1px solid transparent;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
}

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

.btn-secondary:hover:not(:disabled) {
    background: #cbd5e1;
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover:not(:disabled) {
    background: #0d625b;
}

.btn-ghost {
    background: transparent;
    border-color: var(--border);
    color: var(--text);
}

.btn-ghost:hover:not(:disabled) {
    background: #f8fafc;
}

.btn-sm {
    padding: 0.35rem 0.7rem;
    font-size: 0.82rem;
}

.btn-xs {
    padding: 0.2rem 0.5rem;
    font-size: 0.78rem;
}

.btn-block {
    width: 100%;
}

/* Customer List */
.customer-list {
    margin-top: 0.45rem;
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 7px;
}

.customer-item {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.customer-item:last-child {
    border-bottom: none;
}

.customer-item:hover {
    background: #f8fafc;
}

.customer-item.active {
    background: var(--primary-soft);
    border-left: 3px solid var(--primary);
}

.selected-box {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 0.7rem 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.selected-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

/* Orders */
.section-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.65rem;
    gap: 0.5rem;
}

.section-row label {
    font-size: 0.86rem;
    font-weight: 600;
}

.mode-tabs {
    display: inline-flex;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 7px;
}

.mode-tab {
    border: none;
    background: transparent;
    padding: 0.3rem 0.65rem;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--muted);
}

.mode-tab.active {
    background: #fff;
    color: var(--text);
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 260px;
    overflow-y: auto;
}

.order-card {
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 0.65rem 0.8rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.order-card:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.order-card.active {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.order-card-top {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.2rem;
}

.order-card-title {
    font-weight: 600;
    font-size: 0.92rem;
}

.new-order-box {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 7px;
    padding: 0.85rem;
}

.info-box {
    background: var(--warning-bg);
    border: 1px solid var(--warning-border);
    border-radius: 7px;
    padding: 0.65rem 0.8rem;
    font-size: 0.85rem;
    margin-bottom: 0.7rem;
}

/* Timer */
.timer-card {
    background: #0f172a;
    color: #fff;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    margin-bottom: 1rem;
}

.timer-display {
    font-size: 2rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
    margin-bottom: 0.65rem;
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.quick-durations {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 0.9rem;
}

.pill {
    border: 1px solid var(--border);
    background: #f8fafc;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
}

.pill:hover {
    background: #e2e8f0;
}

.duration-badge {
    margin-left: auto;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--success);
    background: var(--success-soft);
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
}

.booking-summary {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.85rem;
}

/* Activities List */
.today-total {
    font-size: 0.88rem;
    color: var(--muted);
}

.today-total strong {
    color: var(--text);
}

.activities-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-height: 540px;
    overflow-y: auto;
}

.activity-card {
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 0.7rem 0.85rem;
    background: #fff;
}

.activity-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.activity-customer {
    font-weight: 600;
    font-size: 0.92rem;
}

.activity-duration {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--success);
}

.activity-order {
    font-size: 0.82rem;
    color: #334155;
    margin-bottom: 0.25rem;
}

.activity-desc {
    font-size: 0.84rem;
    color: var(--muted);
    margin-bottom: 0.35rem;
}

.activity-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.76rem;
    color: var(--muted);
}

/* Overlay / Modal / Toast */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 1rem;
}

.modal-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.5rem;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.15);
}

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

.form-error {
    color: var(--primary);
    font-size: 0.85rem;
    margin: 0.5rem 0;
}

.toast {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    background: #0f172a;
    color: #fff;
    padding: 0.75rem 1.1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.2);
    z-index: 60;
    max-width: 380px;
}

.toast.error {
    background: var(--primary);
}

.toast.success {
    background: var(--success);
}

/* Navigation Tabs */
.nav-tabs {
    display: inline-flex;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 8px;
    gap: 2px;
}

.nav-tab {
    border: none;
    background: transparent;
    padding: 0.38rem 0.85rem;
    border-radius: 6px;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--muted);
    transition: background 0.15s, color 0.15s;
}

.nav-tab:hover {
    color: var(--text);
}

.nav-tab.active {
    background: #fff;
    color: var(--text);
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

/* Configuration View */
.config-container {
    max-width: 980px;
    margin: 1.5rem auto;
    padding: 0 1.25rem 2.5rem;
}

.config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
}

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

.config-section h3 {
    margin: 0 0 0.5rem;
    font-size: 0.98rem;
}

.input-with-action {
    display: flex;
    gap: 0.45rem;
}

.input-with-action input {
    flex: 1;
}

.checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.4rem;
    cursor: pointer;
}

.toggle-row {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
    cursor: pointer;
    margin-top: 0.5rem;
}

.toggle-row input {
    margin-top: 0.2rem;
}

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

.config-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}
