:root {
    --bg: #0f172a;
    --bg-gradient: radial-gradient(circle at 50% 0%, #312e81 0%, #0f172a 75%);
    --surface: rgba(30, 41, 59, 0.7);
    --surface-hover: rgba(51, 65, 85, 0.85);
    --surface-2: rgba(51, 65, 85, 0.55);
    --border: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 255, 255, 0.2);
    --text: #f3f4f6;
    --text-dim: #9ca3af;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-glow: rgba(99, 102, 241, 0.18);
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.15);
    --danger: #f43f5e;
    --danger-glow: rgba(244, 63, 94, 0.15);
    --warn: #fbbf24;
    --mick: #c084fc;
    --lars: #22d3ee;
    --bank: #fbbf24;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6), 0 1px 3px rgba(255, 255, 255, 0.05) inset;
    --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { 
    box-sizing: border-box; 
    margin: 0;
    padding: 0;
}

html, body { 
    min-height: 100vh;
}

body {
    font-family: var(--font);
    background: var(--bg);
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ========= Auth Page ========= */
.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    min-height: 100vh;
}
.auth-card {
    background: var(--surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px 32px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.auth-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}
.auth-card h1 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #ffffff 0%, var(--text-dim) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.auth-card .subtitle {
    margin-bottom: 28px;
    color: var(--text-dim);
    font-size: 14px;
}
.auth-card form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.auth-card label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dim);
}
.auth-card input[type="password"] {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    transition: var(--transition);
}
.auth-card input[type="password"]:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(25, 33, 56, 0.85);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

/* ========= Top Bar ========= */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: rgba(13, 17, 30, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar h1 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ========= Layout ========= */
.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 24px;
}

/* ========= Buttons ========= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font: inherit;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
    background: var(--surface-2);
    transition: var(--transition);
}
.btn:hover {
    background: var(--surface-hover);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}
.btn:active {
    transform: translateY(1px);
}
.btn.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.4);
}
.btn.primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    box-shadow: 0 6px 20px 0 rgba(99, 102, 241, 0.5);
}
.btn.ghost {
    background: transparent;
    border-color: var(--border);
    color: var(--text-dim);
}
.btn.ghost:hover {
    color: var(--text);
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.03);
}
.btn.danger {
    background: transparent;
    color: var(--danger);
    border-color: transparent;
}
.btn.danger:hover {
    background: rgba(244, 63, 94, 0.1);
    color: var(--danger);
}
.btn.small {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 8px;
}
button.btn[type="submit"] {
    width: 100%;
    padding: 14px;
    margin-top: 10px;
}

/* ========= Alerts ========= */
.alert {
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    border: 1px solid transparent;
}
.alert.error {
    background: rgba(244, 63, 94, 0.1);
    color: #fda4af;
    border-color: rgba(244, 63, 94, 0.2);
}
.alert.notice {
    background: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.2);
}

/* ========= Navigation Tabs ========= */
.tabs-nav {
    display: flex;
    gap: 6px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}
.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}
.tab-btn:hover {
    color: var(--text);
    background-color: rgba(255, 255, 255, 0.03);
}
.tab-btn.active {
    color: #fff;
    background-color: var(--accent);
    box-shadow: 0 4px 12px 0 rgba(99, 102, 241, 0.35);
}

/* Tab panes */
.tab-pane {
    display: none;
    animation: fadeIn 0.4s ease;
}
.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========= Totals ========= */
.totals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.total-card {
    background: var(--surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-left: 4px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.total-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 25px 40px -20px rgba(0,0,0,0.7);
}
.total-card .label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.total-card .value {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
}
.total-card.highlight { border-left-color: var(--success); }
.total-card.highlight .value { color: var(--success); text-shadow: 0 0 15px rgba(16, 185, 129, 0.2); }
.total-card.mick { border-left-color: var(--mick); }
.total-card.lars { border-left-color: var(--lars); }
.total-card.bank { border-left-color: var(--bank); }
.total-card.mick-profit { border-left-color: var(--mick); opacity: 0.9; }
.total-card.lars-profit { border-left-color: var(--lars); opacity: 0.9; }

/* ========= Dashboard Overview ========= */
.dashboard-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 32px;
}
.detail-column {
    background: var(--surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.detail-column:hover {
    border-color: var(--border-hover);
}
.detail-column h3 {
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}
.stats-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.stats-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    padding-bottom: 4px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.03);
}
.stats-list li:last-child {
    border-bottom: none;
}
.stats-list li span {
    color: var(--text-dim);
    font-weight: 500;
}
.stats-list li strong {
    font-weight: 700;
    color: var(--text);
}
.stats-list li.winst strong {
    color: var(--success);
}

/* ========= Table Section ========= */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 16px;
}
.section-header h2 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.table-wrap {
    background: var(--surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow-x: auto;
    box-shadow: var(--shadow);
}

.tracker {
    width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}
.tracker thead th {
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 14px 12px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.tracker tbody tr {
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}
.tracker tbody tr:last-child { 
    border-bottom: none; 
}
.tracker tbody tr:hover { 
    background: rgba(255, 255, 255, 0.015); 
}
.tracker td {
    padding: 10px 12px;
    vertical-align: middle;
    white-space: nowrap;
}
.tracker td.calc {
    font-weight: 600;
    color: var(--text);
}
.tracker td.calc.neg { 
    color: var(--danger); 
}

/* Beautiful column grid lines */
.tracker thead th,
.tracker td {
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}
.tracker thead th:last-child,
.tracker td:last-child {
    border-right: none;
}

/* Layout alignment containers for row elements */
.product-cell-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: stretch;
    justify-content: center;
    min-height: 52px;
}
.payout-cell-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
    justify-content: center;
    min-height: 52px;
}

/* Dynamic payout badges inside single cell */
.payout-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}
.payout-badge.mick {
    background: rgba(99, 102, 241, 0.1);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.2);
}
.payout-badge.lars {
    background: rgba(139, 92, 246, 0.1);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.2);
}
.payout-badge.bank {
    background: rgba(14, 165, 233, 0.1);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.2);
}
.payout-none {
    color: var(--text-dim);
    font-size: 14px;
}

/* Secondary input (Date) under Primary input (Product) */
.date-under {
    margin-top: 2px !important;
    font-size: 11px !important;
    color: var(--text-dim) !important;
    padding: 4px 12px !important; /* aligns perfectly to the left of the product input! */
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid transparent !important;
    width: auto !important;
    display: inline-block !important;
    align-self: flex-start !important;
}
.date-under:hover {
    border-color: var(--border) !important;
}
.date-under:focus {
    background: rgba(30, 41, 59, 0.9) !important;
    border-color: var(--accent) !important;
}

/* Combined status & actions wrapper */
.status-actions-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}
.col-status-actions {
    text-align: center;
    width: 1%;
    white-space: nowrap;
}

/* ========= Inline Fields ========= */
.field {
    width: 100%;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    transition: var(--transition);
}

/* Column-specific min-widths for comfortable desktop editing */
.tracker td[data-label="Product"] .field,
.tracker td[data-label="Product / Event"] .field {
    min-width: 130px;
}
.tracker td[data-label="Datum"] .field {
    min-width: 110px;
}
.tracker td[data-label="Inkoop"] .field,
.tracker td[data-label="Verkoop"] .field,
.tracker td[data-label="Aantal"] .field {
    min-width: 70px;
}
.field:hover { 
    border-color: var(--border); 
    background: rgba(255, 255, 255, 0.02); 
}
.field:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(30, 41, 59, 0.9);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.field.num { 
    text-align: right; 
}
.field.saving { 
    border-color: var(--warn) !important; 
    background: rgba(251, 191, 36, 0.03);
}
.field.saved {
    border-color: var(--success) !important;
    background: rgba(16, 185, 129, 0.03);
}
select.field {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--text-dim) 50%),
                      linear-gradient(135deg, var(--text-dim) 50%, transparent 50%);
    background-position: calc(100% - 16px) 50%, calc(100% - 12px) 50%;
    background-size: 4px 4px;
    background-repeat: no-repeat;
    padding-right: 26px;
    cursor: pointer;
}
select.field option { 
    background: #1e293b; 
    color: var(--text); 
}

/* custom checkboxes */
.check {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}
.check input { 
    position: absolute; 
    opacity: 0; 
    pointer-events: none; 
}
.check span {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    display: inline-block;
    position: relative;
    transition: var(--transition);
}
.check:hover span {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.03);
}
.check input:checked + span {
    background: var(--success);
    border-color: var(--success);
    box-shadow: 0 0 8px 0 rgba(16, 185, 129, 0.4);
}
.check input:checked + span::after {
    content: "";
    position: absolute;
    left: 8px;
    top: 4px;
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}
.check input:focus + span {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.col-actions, .col-paid { 
    width: 1%; 
    white-space: nowrap; 
    text-align: center; 
}

/* ========= Ticket Sales List ========= */
.sales-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}
.sales-items-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}
.sale-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    padding: 3px 6px;
    border-radius: var(--radius-sm);
    width: 100%;
    min-width: 130px;
    max-width: 180px;
    transition: var(--transition);
}
.sale-item:hover {
    border-color: var(--border-hover);
}
.sale-item .field.mini {
    padding: 4px 6px;
    font-size: 13px;
    font-weight: 500;
    width: 55px;
    text-align: right;
    border-color: transparent;
    background: transparent;
}
.sale-item .field.mini:hover, .sale-item .field.mini:focus {
    border-color: var(--border);
    background: var(--surface);
}
.sale-item .times {
    color: var(--text-dim);
    font-size: 11px;
    font-weight: 600;
}
.btn-remove-sale {
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 12px;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: var(--transition);
}
.btn-remove-sale:hover {
    color: var(--danger);
    background: rgba(244, 63, 94, 0.1);
}
.btn-add-sale {
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    background-color: var(--surface-2);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    cursor: pointer;
    transition: var(--transition);
}
.btn-add-sale:hover {
    border-color: var(--accent);
    color: var(--text);
    background-color: rgba(255, 255, 255, 0.02);
}

/* ========= Legend / Explanations ========= */
.legend {
    margin-top: 32px;
    color: var(--text-dim);
    font-size: 14px;
}
.legend details {
    background: var(--surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow);
}
.legend summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text);
    outline: none;
}
.legend ul { 
    margin: 12px 0 0; 
    padding-left: 20px; 
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.legend li { 
    line-height: 1.5; 
}

/* ========= Toast Messages ========= */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(13, 17, 30, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
    z-index: 100;
}
.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
.toast.error { border-color: var(--danger); color: #fda4af; }
.toast.success { border-color: var(--success); color: #6ee7b7; }

/* ========= Accessibility Outline ========= */
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ================= Mobile Overhaul (Phones) ================= */
@media (max-width: 768px) {
    .container { 
        padding: 16px; 
    }
    
    .topbar {
        padding: 14px 16px;
    }
    
    .topbar h1 {
        font-size: 18px;
    }
    
    /* Tabs Navigation Compact */
    .tabs-nav {
        gap: 2px;
        padding-bottom: 8px;
        margin-bottom: 16px;
    }
    .tab-btn {
        padding: 8px 12px;
        font-size: 13px;
        flex: 1;
        text-align: center;
    }

    /* Totals layout Grid on phone */
    .totals-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 10px; 
        margin-bottom: 24px;
    }
    .total-card { 
        padding: 12px; 
        gap: 4px;
        border-radius: var(--radius-sm);
    }
    .total-card .label { 
        font-size: 10px; 
    }
    .total-card .value { 
        font-size: 16px; 
    }

    /* Dashboard columns stack */
    .dashboard-details {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 16px;
    }
    .detail-column {
        padding: 18px;
    }

    /* Header controls */
    .section-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 16px;
    }
    .section-header h2 {
        font-size: 16px;
    }
    .section-header .btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    /* Mobile Table Card Overhaul */
    .table-wrap {
        background: transparent;
        border: none;
        box-shadow: none;
        overflow: visible;
    }
    
    .tracker thead { 
        display: none; 
    }
    
    .tracker, .tracker tbody, .tracker tr, .tracker td { 
        display: block; 
        width: 100%; 
    }
    
    .tracker tr {
        background: var(--surface);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 16px;
        margin-bottom: 16px;
        position: relative;
        box-shadow: var(--shadow);
        transition: var(--transition);
    }
    .tracker tr:hover {
        background: var(--surface-hover);
        border-color: var(--border-hover);
    }
    
    .tracker td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03);
        border-right: none;
        gap: 16px;
        white-space: normal;
    }
    .tracker td:last-child {
        border-bottom: none;
    }
    
    /* Inject standard uppercase labels on the left of row inputs */
    .tracker td::before {
        content: attr(data-label);
        font-size: 11px;
        color: var(--text-dim);
        text-transform: uppercase;
        letter-spacing: 0.05em;
        font-weight: 700;
        flex: 0 0 auto;
    }
    
    /* Align mobile inputs correctly on the right hand side */
    .tracker td .field { 
        max-width: 60%; 
        padding: 6px 10px;
        background: var(--surface-2);
        border-color: var(--border);
        text-align: right;
        min-width: 0 !important;
    }
    .tracker td select.field {
        background-position: calc(100% - 12px) 50%, calc(100% - 8px) 50%;
        text-align-last: right;
        padding-right: 22px;
    }
    
    .tracker td.calc { 
        justify-content: space-between; 
        font-size: 14px;
        font-weight: 700;
    }
    
    /* Absolute delete buttons positioned at the top-right of mobile cards */
    .tracker td.col-actions {
        position: absolute;
        top: 12px;
        right: 12px;
        padding: 0;
        width: auto;
        border-bottom: none;
    }
    .tracker td.col-actions::before { 
        display: none; 
    }
    .tracker td.col-actions .btn.danger {
        background: rgba(244, 63, 94, 0.08);
        border: 1px solid rgba(244, 63, 94, 0.15);
        color: var(--danger);
        border-radius: 50%;
        width: 32px;
        height: 32px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Paid checkbox cell on mobile cards */
    .tracker td.col-paid {
        border-bottom: none;
        padding-top: 12px;
        justify-content: space-between;
    }
    .tracker td.col-paid .check span {
        width: 26px;
        height: 26px;
        border-radius: 8px;
    }
    .tracker td.col-paid .check input:checked + span::after {
        left: 9px;
        top: 4px;
    }

    /* Product / Event name: full width, left-aligned, stacked below label */
    .tracker td[data-label="Product"],
    .tracker td[data-label="Product / Event"] {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    .tracker td[data-label="Product"] .field,
    .tracker td[data-label="Product / Event"] .field {
        max-width: 100%;
        text-align: left;
        font-size: 15px;
        font-weight: 600;
        color: var(--text);
    }

    /* Tickets inside Card overrides */
    .tracker td[data-label="Verkopen"] {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03);
        padding: 10px 0;
    }
    .tracker td[data-label="Verkopen"]::before {
        margin-bottom: 4px;
    }
    .sales-list {
        width: 100%;
        align-items: stretch;
    }
    .sale-item {
        max-width: 100%;
        width: 100%;
        justify-content: space-between;
    }
    .btn-add-sale {
        text-align: center;
        padding: 6px;
        width: 100%;
    }
}

@media (max-width: 480px) {
    /* Even smaller phones screen density tuning */
    .totals-grid { 
        grid-template-columns: 1fr; 
        gap: 8px;
    }
    .tab-btn {
        padding: 8px 6px;
        font-size: 12px;
    }
}
