/* Global Reset & Fonts */
:root {
    --primary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --bg-color: #f4f7f6;
    --card-bg: #fff;
    --header-height: 38px;
    --icon-beer: url("https://raw.githubusercontent.com/microsoft/fluentui-emoji/main/assets/Beer%20mug/3D/beer_mug_3d.png");
    --icon-dashboard: url("https://raw.githubusercontent.com/microsoft/fluentui-emoji/main/assets/Bar%20chart/3D/bar_chart_3d.png");
    --icon-kitchen: url("https://raw.githubusercontent.com/microsoft/fluentui-emoji/main/assets/Cooking/3D/cooking_3d.png");
    --icon-tresen: url("https://raw.githubusercontent.com/microsoft/fluentui-emoji/main/assets/Cash%20register/3D/cash_register_3d.png");
    --icon-tickets: url("https://raw.githubusercontent.com/microsoft/fluentui-emoji/main/assets/Admission%20tickets/3D/admission_tickets_3d.png");
    --icon-display: url("https://raw.githubusercontent.com/microsoft/fluentui-emoji/main/assets/Television/3D/television_3d.png");
    --icon-market: url("https://raw.githubusercontent.com/microsoft/fluentui-emoji/main/assets/Chart%20increasing/3D/chart_increasing_3d.png");
    --icon-settings: url("https://raw.githubusercontent.com/microsoft/fluentui-emoji/main/assets/Gear/3D/gear_3d.png");
    --icon-admin: url("https://raw.githubusercontent.com/microsoft/fluentui-emoji/main/assets/Clipboard/3D/clipboard_3d.png");
    --icon-power: url("https://raw.githubusercontent.com/microsoft/fluentui-emoji/main/assets/Power%20button/3D/power_button_3d.png");
    --icon-external: url("https://raw.githubusercontent.com/microsoft/fluentui-emoji/main/assets/Up-right%20arrow/3D/up-right_arrow_3d.png");
    --icon-plus: url("https://raw.githubusercontent.com/microsoft/fluentui-emoji/main/assets/Heavy%20plus%20sign/3D/heavy_plus_sign_3d.png");
    --icon-edit: url("https://raw.githubusercontent.com/microsoft/fluentui-emoji/main/assets/Pencil/3D/pencil_3d.png");
    --icon-trash: url("https://raw.githubusercontent.com/microsoft/fluentui-emoji/main/assets/Wastebasket/3D/wastebasket_3d.png");
    --icon-check: url("https://raw.githubusercontent.com/microsoft/fluentui-emoji/main/assets/Check%20mark%20button/3D/check_mark_button_3d.png");
    --icon-stop: url("https://raw.githubusercontent.com/microsoft/fluentui-emoji/main/assets/No%20entry/3D/no_entry_3d.png");
}

* { box-sizing: border-box; }
body {
    font-family: 'Open Sans', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: #333 !important; /* Force dark text regardless of DB settings */
    padding-top: var(--header-height); /* For fixed header */
}

.ui-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.25));
    vertical-align: -4px;
}

.ui-icon-lg {
    width: 44px;
    height: 44px;
    vertical-align: middle;
}

.ui-icon-xl {
    width: 56px;
    height: 56px;
    vertical-align: middle;
}

.ui-icon-beer { background-image: var(--icon-beer); }
.ui-icon-dashboard { background-image: var(--icon-dashboard); }
.ui-icon-kitchen { background-image: var(--icon-kitchen); }
.ui-icon-tresen { background-image: var(--icon-tresen); }
.ui-icon-tickets { background-image: var(--icon-tickets); }
.ui-icon-display { background-image: var(--icon-display); }
.ui-icon-market { background-image: var(--icon-market); }
.ui-icon-settings { background-image: var(--icon-settings); }
.ui-icon-admin { background-image: var(--icon-admin); }
.ui-icon-power { background-image: var(--icon-power); }
.ui-icon-external { background-image: var(--icon-external); }
.ui-icon-plus { background-image: var(--icon-plus); }
.ui-icon-edit { background-image: var(--icon-edit); }
.ui-icon-trash { background-image: var(--icon-trash); }
.ui-icon-check { background-image: var(--icon-check); }
.ui-icon-stop { background-image: var(--icon-stop); }

h1, h2, h3, h4, h5, h6 {
    color: #2c3e50 !important; /* Force dark headings */
}

/* Video Background */
.video-background {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -2;
    overflow: hidden;
}
.video-background video {
    min-width: 100%; min-height: 100%;
    width: auto; height: auto;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover;
}
.video-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background:
        radial-gradient(circle at 20% 10%, rgba(255,255,255,0.92), rgba(255,255,255,0.78) 42%, rgba(0,0,0,0.10) 100%),
        repeating-linear-gradient(45deg, rgba(52,152,219,0.10) 0 14px, rgba(255,255,255,0.00) 14px 28px);
    backdrop-filter: blur(10px);
    z-index: -1;
}

/* Header */
.bavarian-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-height);
    background: rgba(255,255,255,0.82);
    border-bottom: 2px solid #3498db; /* Bavarian blue */
    display: flex;
    align-items: center;
    padding: 0 8px;
    z-index: 1000;
    box-shadow: 0 14px 40px rgba(0,0,0,0.10);
    backdrop-filter: blur(10px);
}
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.logo {
    font-size: 1.02rem;
    font-weight: bold;
    text-decoration: none;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1;
}

.logo .logo-icon {
    width: 16px;
    height: 16px;
}
.nav-toggle-btn {
    background: none;
    border: none;
    font-size: 1.02rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
}

.header-time {
    display: inline-flex;
    align-items: center;
    padding: 3px 7px;
    border-radius: 9px;
    background: rgba(255,255,255,0.65);
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 10px 26px rgba(0,0,0,0.10);
    line-height: 1;
}

.nav-active-page {
    display: flex;
    align-items: center;
    line-height: 1;
}

.active-page-link {
    font-weight: 900;
    letter-spacing: 0.4px;
    color: rgba(17,34,51,0.85);
    font-size: 0.86rem;
    white-space: nowrap;
}
.nav-menu {
    display: none; /* Hidden by default on mobile/tablet, toggled via JS */
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 280px;
    max-height: 80vh;
    overflow: auto;
    background: white;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.1);
    flex-direction: column;
    padding: 10px;
    pointer-events: auto;
}
.nav-menu.active {
    display: block;
    z-index: 2000;
}
.nav-menu a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    border-radius: 5px;
}
.nav-menu a:hover, .nav-menu a.active {
    background: #f0f4f8;
    color: #3498db;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px;
}

/* Cards */
.card {
    background: rgba(255,255,255,0.88);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 18px 55px rgba(0,0,0,0.12);
    border: 1px solid rgba(0,0,0,0.06);
    margin-bottom: 20px;
}
.card h2 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #2c3e50;
}

/* Buttons */
.btn {
    --btn-border: rgba(120, 160, 255, 0.65);
    --btn-glow: rgba(120, 160, 255, 0.50);
    --btn-bg-top: #ffffff;
    --btn-bg-bottom: #f6faff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 800;
    cursor: pointer;
    border: 1px solid var(--btn-border);
    color: #112233;
    font-size: 0.9rem;
    background:
        radial-gradient(circle at 30% 20%, rgba(255,255,255,0.9), rgba(255,255,255,0.4) 55%),
        linear-gradient(180deg, var(--btn-bg-top), var(--btn-bg-bottom));
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.06) inset,
        0 0 16px var(--btn-glow),
        0 12px 28px rgba(0,0,0,0.12);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, filter 0.15s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.08) inset,
        0 0 20px var(--btn-glow),
        0 14px 32px rgba(0,0,0,0.16);
}

.btn:active {
    transform: translateY(0px);
    filter: brightness(0.97);
}

.btn:focus {
    outline: none;
}

/* Alerts */
.alert {
    padding: 12px 14px;
    border-radius: 12px;
    margin: 12px 0;
    font-weight: 800;
    background: rgba(255,255,255,0.88);
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 14px 40px rgba(0,0,0,0.10);
}
.alert-success {
    background: rgba(46, 204, 113, 0.12);
    border-color: rgba(46, 204, 113, 0.35);
    color: #145a32;
}
.alert-error {
    background: rgba(231, 76, 60, 0.12);
    border-color: rgba(231, 76, 60, 0.35);
    color: #7b241c;
}

/* Forms */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.form-group label {
    font-weight: 900;
    font-size: 0.92rem;
    letter-spacing: 0.2px;
    color: #223;
}

.form-group small {
    display: block;
    color: rgba(17, 34, 51, 0.68);
    font-weight: 700;
    font-size: 0.82rem;
    line-height: 1.2;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 11px 12px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.10);
    background: rgba(255,255,255,0.92);
    box-shadow: 0 1px 0 rgba(0,0,0,0.04) inset, 0 12px 28px rgba(0,0,0,0.06);
    font: inherit;
    color: #112233;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.form-group textarea {
    resize: vertical;
    min-height: 96px;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: rgba(52,152,219,0.65);
    box-shadow: 0 0 0 4px rgba(52,152,219,0.18), 0 14px 34px rgba(0,0,0,0.10);
}

.form-group input[type="file"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px dashed rgba(0,0,0,0.16);
    background: rgba(255,255,255,0.75);
    font: inherit;
}

.price-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 640px) {
    .price-inputs { grid-template-columns: 1fr; }
}

/* Menu Manager */
.menu-form {
    display: grid;
    gap: 14px;
}

.crash-settings-group {
    border-radius: 14px;
    padding: 14px;
    background: rgba(231, 76, 60, 0.10);
    border: 1px solid rgba(231, 76, 60, 0.22);
    box-shadow: 0 16px 45px rgba(0,0,0,0.10);
}

.crash-settings-group h3 {
    margin: 0 0 10px 0;
    font-size: 1rem;
    font-weight: 950;
    letter-spacing: 0.4px;
    color: #7b241c;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.menu-item {
    background: rgba(255,255,255,0.90);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 18px 55px rgba(0,0,0,0.10);
}

.menu-item .name {
    font-weight: 950;
    font-size: 1.05rem;
    color: #111;
    margin-bottom: 6px;
}

.menu-item .price {
    font-weight: 950;
    font-size: 1.05rem;
    color: #1e8449;
    margin-bottom: 10px;
}

.menu-item p {
    margin: 0 0 12px 0;
    color: rgba(17,34,51,0.85);
    font-weight: 650;
    line-height: 1.25;
}

.card.card-warn {
    background: rgba(231, 76, 60, 0.08);
    border-color: rgba(231, 76, 60, 0.24);
}

/* Fullscreen behavior */
html.is-fullscreen.page-index,
html.is-fullscreen.page-bar,
html.is-fullscreen.page-kitchen,
html.is-fullscreen.page-drinks {
    overflow: hidden;
    height: 100%;
}

html.is-fullscreen.page-index body,
html.is-fullscreen.page-bar body,
html.is-fullscreen.page-kitchen body,
html.is-fullscreen.page-drinks body {
    overflow: hidden;
    height: 100%;
}

html.is-fullscreen.page-drinks .container,
html.is-fullscreen.page-kitchen .container,
html.is-fullscreen.page-bar .container,
html.is-fullscreen.page-index .container {
    max-height: calc(100vh - var(--header-height));
    overflow: hidden;
}

html.is-fullscreen.page-drinks .drinks-layout {
    height: calc(100vh - var(--header-height) - 36px);
}

html.is-fullscreen.page-drinks .drinks-col {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

html.is-fullscreen.page-drinks .drinks-orders,
html.is-fullscreen.page-drinks .drinks-archive-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

html.is-fullscreen.page-kitchen .container {
    display: flex;
    flex-direction: column;
}

html.is-fullscreen.page-kitchen .kitchen-orders-card {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

html.is-fullscreen.page-kitchen .kitchen-orders-card .tab-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

/* Bar (Kasse) must never scroll the whole page */
body.page-bar,
body.page-bar {
    height: 100%;
    overflow: hidden;
}

body.page-bar {
    overflow: hidden;
}

body.page-bar .filter-sticky {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    z-index: 950;
    margin: 0;
    padding-left: 8px;
    padding-right: 8px;
}

body.page-bar .container {
    max-height: calc(100vh - var(--header-height) - var(--bar-filter-height, 64px));
    overflow: hidden;
    padding-top: calc(10px + var(--bar-filter-height, 64px));
    padding-bottom: 10px;
}

body.page-bar .bar-main-grid {
    height: calc(100vh - var(--header-height) - var(--bar-filter-height, 64px) - 36px);
    min-height: 0;
    overflow: hidden;
}

body.page-bar .bar-main-grid .card,
body.page-bar .bar-main-grid #kasse-content,
body.page-bar .bar-main-grid #order-summary,
body.page-bar .bar-main-grid #order-items {
    min-height: 0;
}

body.page-bar * {
    scrollbar-width: none;
}
body.page-bar *::-webkit-scrollbar {
    width: 0;
    height: 0;
}

@media (max-width: 768px) {
    body.page-bar .bar-main-grid {
        grid-template-columns: 1fr !important;
        min-height: 0;
    }
    body.page-bar .bar-main-grid .card:first-child {
        max-height: none;
        min-height: 0;
    }
    body.page-bar .bar-main-grid .card:last-child {
        height: auto;
        min-height: 0;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    body.page-bar .bar-main-grid {
        min-height: 0;
    }
}

@media (min-width: 1024px) and (orientation: landscape) {
    body.page-bar .bar-main-grid {
        grid-template-columns: 3fr 1fr;
    }
    body.page-bar .drink-button {
        padding: 6px !important;
    }
    body.page-bar .drink-name {
        font-size: 0.85rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    body.page-bar .drink-image {
        width: 20px !important;
        height: 20px !important;
    }
    body.page-bar .drink-buttons {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)) !important;
        gap: 6px !important;
    }
}

@media (orientation: landscape) and (max-height: 600px) {
    body.page-bar .bar-main-grid {
        min-height: 0;
    }
    body.page-bar .bar-main-grid .card:last-child {
        min-height: 0;
        overflow: hidden !important;
    }
    body.page-bar .bar-main-grid .card h2 {
        font-size: 1rem !important;
        margin-bottom: 4px !important;
    }
}

@media (orientation: landscape) and (max-height: 500px) {
    body.page-bar .bar-main-grid {
        min-height: 0;
    }
    body.page-bar #received-amount {
        padding: 3px !important;
        font-size: 0.75rem !important;
    }
    body.page-bar .btn {
        padding: 4px !important;
        font-size: 0.7rem !important;
    }
}

body.page-bar .sumup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2500;
    padding: 18px;
}
body.page-bar .sumup-overlay-card {
    width: min(520px, 100%);
    background: rgba(255,255,255,0.96);
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.15);
    padding: 16px;
    color: #111;
}
body.page-bar .sumup-overlay-title {
    font-weight: 900;
    font-size: 1.2rem;
    margin-bottom: 10px;
}
body.page-bar .sumup-overlay-text {
    font-size: 1rem;
    color: #333;
    margin-bottom: 14px;
    line-height: 1.25;
}
body.page-bar .sumup-overlay-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
@media (max-width: 520px) {
    body.page-bar .sumup-overlay-actions {
        grid-template-columns: 1fr;
    }
}

.btn:disabled,
.btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.06) inset,
        0 0 10px rgba(120, 160, 255, 0.18),
        0 10px 22px rgba(0,0,0,0.12);
}

.btn-sm {
    padding: 6px 9px;
    font-size: 0.8rem;
    border-radius: 9px;
}

.btn-md {
    padding: 10px 14px;
    font-size: 0.95rem;
    border-radius: 10px;
}

.btn-lg {
    padding: 13px 18px;
    font-size: 1.05rem;
    border-radius: 12px;
}

.full-width,
.btn.full-width {
    width: 100%;
}

.btn-primary,
.btn-secondary {
    --btn-border: rgba(150, 170, 200, 0.75);
    --btn-glow: rgba(160, 190, 240, 0.55);
}

.btn-success {
    --btn-border: rgba(46, 204, 113, 0.85);
    --btn-glow: rgba(46, 204, 113, 0.45);
    --btn-bg-bottom: #f3fff7;
    --btn-bg-top: #ffffff;
    color: #0d5f35;
}

.btn-danger {
    --btn-border: rgba(231, 76, 60, 0.85);
    --btn-glow: rgba(231, 76, 60, 0.45);
    --btn-bg-bottom: #fff5f4;
    --btn-bg-top: #ffffff;
    color: #7c1f15;
}

.btn-warning {
    --btn-border: rgba(243, 156, 18, 0.85);
    --btn-glow: rgba(243, 156, 18, 0.45);
    --btn-bg-bottom: #fffaf2;
    --btn-bg-top: #ffffff;
    color: #7a4b0b;
}

.btn-row {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.btn-row > .btn {
    margin: 0;
}

.btn-fill {
    flex: 1 1 0;
    min-width: 120px;
}

/* Dashboard Grid (index.php) */
.page-index .container {
    padding: 12px;
}

.page-index h2.dashboard-title {
    margin: 12px 0 10px;
    font-size: 1.15rem;
    font-weight: 950;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: rgba(17,34,51,0.88) !important;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}
.dashboard-card {
    text-align: center;
    transition: transform 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
    background: rgba(255,255,255,0.86);
    border-radius: 18px;
    padding: 14px;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 18px 55px rgba(0,0,0,0.12);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 65px rgba(0,0,0,0.14);
}
.dashboard-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.dashboard-card h3 {
    margin: 0;
    font-weight: 950;
    font-size: 1.05rem;
    letter-spacing: 0.2px;
}

.dashboard-card p {
    margin: 0;
    font-weight: 750;
    font-size: 0.9rem;
    line-height: 1.2;
    color: rgba(17,34,51,0.80);
}

.dashboard-card .card-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 2px;
}

.page-index .dashboard-card .ui-icon-xl {
    width: 44px;
    height: 44px;
}

.page-index .dashboard-card p {
    display: none;
}

/* Admin Tabs */
.nav-tabs {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.nav-tab {
    --btn-border: rgba(150, 170, 200, 0.75);
    --btn-glow: rgba(160, 190, 240, 0.55);
    --btn-bg-top: #ffffff;
    --btn-bg-bottom: #f6faff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    font-size: 0.9rem;
    background:
        radial-gradient(circle at 30% 20%, rgba(255,255,255,0.9), rgba(255,255,255,0.4) 55%),
        linear-gradient(180deg, var(--btn-bg-top), var(--btn-bg-bottom));
    border: 1px solid var(--btn-border);
    border-radius: 10px;
    color: #112233;
    cursor: pointer;
    font-weight: 850;
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.06) inset,
        0 0 16px var(--btn-glow),
        0 12px 28px rgba(0,0,0,0.12);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, filter 0.15s ease;
}
.nav-tab:hover {
    transform: translateY(-1px);
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.08) inset,
        0 0 20px var(--btn-glow),
        0 14px 32px rgba(0,0,0,0.16);
}
.nav-tab.active {
    --btn-border: rgba(52,152,219,0.85);
    --btn-glow: rgba(52,152,219,0.45);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}
.stat-card {
    background: rgba(255,255,255,0.86);
    padding: 12px;
    border-radius: 18px;
    text-align: center;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 18px 55px rgba(0,0,0,0.12);
    backdrop-filter: blur(10px);
}
.stat-card .number { font-size: 1.35rem; font-weight: 950; color: #3498db; letter-spacing: 0.4px; }
.stat-card.crash-active .number { color: #e74c3c; }

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
}
.table th, .table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}
.table th { background: #f8f9fa; font-weight: 600; }

/* Status Badges */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 900;
}
.status-admin { background: #e1f5fe; color: #0288d1; }
.status-staff { background: #e8f5e9; color: #2e7d32; }
.status-new { background: #fff3e0; color: #ef6c00; }
.status-completed { background: #e8f5e9; color: #2e7d32; }

/* === BAR / POS STYLES === */
.bar-main-grid {
    display: grid;
    grid-template-columns: 1fr 350px; /* Products left, Cart right */
    gap: 20px;
    height: calc(100vh - 100px); /* Fixed height for sticky layout */
}

/* Responsive Bar Grid - More specific styles might be in bar.php <style> block */

/* Drink Buttons */
.drink-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}
.drink-button {
    background: white;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80px;
}
.drink-button:active {
    transform: scale(0.98);
    background: #f8f9fa;
}
.drink-name {
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.2;
}
.drink-price {
    color: #7f8c8d;
    font-size: 0.9rem;
}
.drink-counter {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #3498db;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.drink-counter.has-items {
    display: flex;
}

/* Red Minus Button (User Request) */
.drink-minus-btn {
    position: absolute;
    top: -5px;
    left: -5px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e74c3c;
    color: white;
    border: none;
    font-weight: bold;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.2s;
}
/* Show minus button only when parent has items */
.drink-button.has-items .drink-minus-btn {
    display: flex;
}

/* Filter Sticky */
.filter-sticky {
    position: sticky;
    top: var(--header-height);
    z-index: 900;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(5px);
    padding: 2px 0;
    margin-bottom: 4px;
    border-bottom: 1px solid #eee;
}
.filter-container {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 0;
}
.drink-filters {
    display: inline-flex;
    gap: 4px;
}
.filter-btn {
    --btn-border: rgba(220, 230, 245, 0.85);
    --btn-glow: rgba(220, 230, 245, 0.55);
    --btn-bg-top: rgba(18, 19, 22, 0.92);
    --btn-bg-bottom: rgba(7, 8, 10, 0.92);
    padding: 7px 10px;
    border-radius: 10px;
    border: 1px solid var(--btn-border);
    background:
        radial-gradient(circle at 30% 20%, rgba(255,255,255,0.10), rgba(255,255,255,0) 55%),
        linear-gradient(180deg, var(--btn-bg-top), var(--btn-bg-bottom));
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.06) inset,
        0 0 14px var(--btn-glow),
        0 10px 24px rgba(0,0,0,0.18);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 800;
    color: #fff;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, filter 0.15s ease;
    user-select: none;
}
.filter-btn:hover {
    transform: translateY(-1px);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.08) inset,
        0 0 18px var(--btn-glow),
        0 12px 28px rgba(0,0,0,0.20);
}
.filter-btn.active {
    --btn-border: rgba(120, 170, 255, 0.95);
    --btn-glow: rgba(120, 170, 255, 0.60);
}

/* Numpad (User Request: Larger) */
.numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 10px;
}
.numpad-btn {
    padding: 20px; /* Enlarged from 15px */
    background: white;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    font-size: 1.5rem; /* Enlarged from 1.2rem */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.numpad-btn:hover {
    background: #f8f9fa;
    border-color: #cbd5e0;
}
.numpad-btn:active {
    background: #e2e8f0;
    transform: scale(0.95);
}
.numpad-clear {
    background: rgba(231, 76, 60, 0.1);
    color: #c0392b;
    border-color: rgba(231, 76, 60, 0.2);
}

/* Very Small Images under Tresen (User Request) */
.drink-image {
    width: 30px !important;
    height: 30px !important;
}

/* Utility */
.text-right { text-align: right; }
.text-center { text-align: center; }

body.page-lights .le-header {
    margin-top: 12px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255,255,255,0.75);
    border: 1px solid rgba(0,0,0,0.08);
    backdrop-filter: blur(10px);
    box-shadow: 0 14px 40px rgba(0,0,0,0.10);
}

body.page-lights .le-header-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
}

body.page-lights .le-header-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 120px;
    flex: 0 0 auto;
}

body.page-lights .container {
    max-width: none;
    width: 100%;
    padding-left: 18px;
    padding-right: 18px;
}

body.page-lights .le-main {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr) 380px;
    gap: 12px;
    margin-top: 12px;
}

body.page-lights .le-left,
body.page-lights .le-right {
    border-radius: 14px;
    background: rgba(255,255,255,0.75);
    border: 1px solid rgba(0,0,0,0.08);
    backdrop-filter: blur(10px);
    box-shadow: 0 14px 40px rgba(0,0,0,0.10);
    padding: 10px;
    min-height: 280px;
}

body.page-lights .le-left {
    padding: 0;
    overflow: visible;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 5;
}

body.page-lights .le-tracktime-spacer {
    height: 26px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    background: rgba(255,255,255,0.55);
}

body.page-lights .le-track-scroll {
    padding: 10px;
    overflow-y: auto;
    overflow-x: visible;
    flex: 1 1 auto;
    position: relative;
}

body.page-lights .le-center {
    border-radius: 14px;
    background: rgba(20, 24, 36, 0.90);
    border: 1px solid rgba(0,0,0,0.08);
    backdrop-filter: blur(10px);
    box-shadow: 0 14px 40px rgba(0,0,0,0.10);
    overflow: hidden;
    min-height: 280px;
    display: flex;
    flex-direction: column;
}

body.page-lights .le-timebar {
    height: 26px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    position: relative;
    background: rgba(0,0,0,0.25);
}

body.page-lights .le-timebar-scroll {
    position: relative;
    height: 100%;
    overflow: hidden;
}

body.page-lights .le-time-labels {
    position: relative;
    height: 100%;
}

body.page-lights .le-time-label {
    position: absolute;
    top: 4px;
    transform: translateX(-50%);
    font-size: 0.75rem;
    opacity: 0.75;
    color: rgba(255,255,255,0.78);
    white-space: nowrap;
    pointer-events: none;
}

body.page-lights .le-scroll {
    position: relative;
    flex: 1 1 auto;
    overflow: auto;
}

body.page-lights .le-grid {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-image: linear-gradient(to right, rgba(255,255,255,0.08) 1px, rgba(0,0,0,0) 1px);
    background-size: 35px 1px;
    pointer-events: none;
}

body.page-lights .le-playhead {
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    background: rgba(231, 76, 60, 0.9);
    pointer-events: none;
}

body.page-lights .le-timeline {
    position: relative;
    min-height: 100%;
}

body.page-lights .le-lane {
    position: absolute;
    left: 0;
    right: 0;
    border-bottom: 1px dashed rgba(255,255,255,0.08);
}

body.page-lights .le-lane:nth-child(even) {
    background: rgba(255,255,255,0.03);
}

body.page-lights .le-track-row {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 10px;
    padding: 8px;
    border-radius: 12px;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(0,0,0,0.06);
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

body.page-lights .le-track-row:focus-within {
    z-index: 25;
}

body.page-lights .le-track-row.is-muted {
    opacity: 0.65;
}

body.page-lights .le-track-title {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
}

body.page-lights .le-track-name {
    font-weight: 900;
    line-height: 1.15;
    font-size: 0.96rem;
}

body.page-lights .le-track-selects {
    display: grid;
    grid-template-columns: minmax(110px, 132px) minmax(0, 1fr);
    gap: 8px;
    align-items: center;
}

body.page-lights .le-track-sub {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    opacity: 0.88;
    font-size: 0.78rem;
    line-height: 1.25;
    color: rgba(44, 62, 80, 0.92);
}

body.page-lights .le-track-sub-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(52, 152, 219, 0.12);
    border: 1px solid rgba(52, 152, 219, 0.16);
    color: rgba(44, 62, 80, 0.95);
}

body.page-lights .le-clip {
    position: absolute;
    top: 6px;
    height: 32px;
    border-radius: 10px;
    background: rgba(52, 152, 219, 0.22);
    border: 1px solid rgba(52, 152, 219, 0.45);
    box-shadow: 0 10px 26px rgba(0,0,0,0.08);
    display: grid;
    grid-template-columns: 10px 1fr 10px;
    overflow: hidden;
    cursor: grab;
    user-select: none;
}

body.page-lights .le-clip-plug_hold {
    background: rgba(46, 204, 113, 0.20);
    border-color: rgba(46, 204, 113, 0.50);
}

body.page-lights .le-clip-plug_blink {
    background: rgba(241, 196, 15, 0.18);
    border-color: rgba(241, 196, 15, 0.55);
}

body.page-lights .le-clip-dmx_rgb_fade {
    background: rgba(155, 89, 182, 0.18);
    border-color: rgba(155, 89, 182, 0.55);
}

body.page-lights .le-clip-dmx_rgb_flash {
    background: rgba(231, 76, 60, 0.18);
    border-color: rgba(231, 76, 60, 0.55);
}

body.page-lights .le-clip-fixture_rgb_fade {
    background: rgba(52, 152, 219, 0.18);
    border-color: rgba(52, 152, 219, 0.55);
}

body.page-lights .le-clip-fixture_rgb_flash {
    background: rgba(241, 196, 15, 0.18);
    border-color: rgba(241, 196, 15, 0.55);
}

body.page-lights .le-clip.is-selected {
    outline: 2px solid rgba(231, 76, 60, 0.65);
    outline-offset: 2px;
}

body.page-lights .le-clip-handle {
    background: rgba(0,0,0,0.16);
    cursor: ew-resize;
}

body.page-lights .le-clip-body {
    padding: 4px 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    cursor: grab;
}

body.page-lights .le-clip-title {
    font-weight: 900;
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.page-lights .le-clip-meta {
    font-size: 0.72rem;
    opacity: 0.8;
    white-space: nowrap;
}

body.page-lights .le-track-actions {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: nowrap;
    flex: 0 0 auto;
    justify-content: flex-end;
}

body.page-lights .le-track-type-select,
body.page-lights .le-track-device-select {
    width: 100%;
    min-width: 0;
}

body.page-lights .le-track-actions .is-tool-active {
    background: rgba(231, 76, 60, 0.18) !important;
    border-color: rgba(231, 76, 60, 0.55) !important;
}

body.page-lights .le-props-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

body.page-lights .le-props-title {
    font-weight: 900;
}

body.page-lights .le-props-group {
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 12px;
    padding: 10px;
    background: rgba(255,255,255,0.55);
    margin-bottom: 10px;
}

body.page-lights .le-props-group-title {
    font-weight: 800;
    margin-bottom: 8px;
}

body.page-lights .le-props-target-name {
    font-weight: 900;
    font-size: 1rem;
    line-height: 1.2;
    margin-bottom: 4px;
}

body.page-lights .le-props-target-meta {
    font-size: 0.82rem;
    line-height: 1.35;
    opacity: 0.82;
}

body.page-lights .le-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 50;
}

body.page-lights .le-modal {
    width: min(520px, 100%);
    max-height: min(80vh, 720px);
    overflow: auto;
    border-radius: 14px;
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(0,0,0,0.10);
    backdrop-filter: blur(10px);
    box-shadow: 0 24px 70px rgba(0,0,0,0.28);
    padding: 12px;
}

body.page-lights .le-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

body.page-lights .le-modal-title {
    font-weight: 900;
}

body.page-lights .le-modal-sub {
    opacity: 0.8;
    margin-bottom: 10px;
}

@media (max-width: 1100px) {
    body.page-lights .le-main {
        grid-template-columns: 1fr;
    }
    body.page-lights .le-left,
    body.page-lights .le-right {
        min-height: auto;
    }
    body.page-lights .le-track-selects {
        grid-template-columns: 1fr;
    }
}

body.page-bar .bar-quick-scene-btn {
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.12);
    background: rgba(255,255,255,0.70);
    color: rgba(0,0,0,0.85);
    box-shadow: 0 8px 18px rgba(0,0,0,0.10);
}

body.page-bar .bar-quick-scene-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

body.page-bar .bar-quick-scene-btn.bar-quick-scene-1 { background: rgba(52,152,219,0.22); border-color: rgba(52,152,219,0.26); }
body.page-bar .bar-quick-scene-btn.bar-quick-scene-2 { background: rgba(46,204,113,0.20); border-color: rgba(46,204,113,0.26); }
body.page-bar .bar-quick-scene-btn.bar-quick-scene-3 { background: rgba(155,89,182,0.20); border-color: rgba(155,89,182,0.26); }
body.page-bar .bar-quick-scene-btn.bar-quick-scene-4 { background: rgba(241,196,15,0.22); border-color: rgba(241,196,15,0.30); }

body.page-bar .bar-quick-scene-btn.is-loading { opacity: 0.75; }
body.page-bar .bar-quick-scene-btn.is-ok { outline: 2px solid rgba(46,204,113,0.65); }
body.page-bar .bar-quick-scene-btn.is-error { outline: 2px solid rgba(231,76,60,0.65); }


/* Dynamische Overrides aus Datenbank */
:root {
    --primary-color: #5d4037;
    --accent-color: #D32F2F;
    --header-bg: #5d4037;
    --header-border: #8d6e63;
    --header-text: #ffd54f;
    --header-hover: #ffc107;
    --button-bg: ;
    --button-border: ;
    --button-text: ;
    --button-hover-bg: ;
    --button-hover-border: ;
    --button-hover-text: ;
    --card-bg: #5d4037;
    --card-border: #8d6e63;
    --card-text: #fff8e1;
    --card-title: #ffd54f;
    --background-color: #3e2723;
    --text-color: #fff8e1;
    --success-color: #4caf50;
    --danger-color: #D32F2F;
    --warning-color: #FF9800;
    --font-family: 'Arial', sans-serif;
    --font-size-base: 16px;
    --font-size-large: 1.2em;
    --font-size-title: 2.5rem;
}
