/* Global Reset & Fonts */
:root {
    --primary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --bg-color: #f4f7f6;
    --card-bg: #fff;
    --header-height: 60px;
    --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/Beer%20mug/3D/beer_mug_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: rgba(255, 255, 255, 0.85); /* Glassmorphism light */
    backdrop-filter: blur(5px);
    z-index: -1;
}

/* Header */
.bavarian-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-height);
    background: white;
    border-bottom: 2px solid #3498db; /* Bavarian blue */
    display: flex;
    align-items: center;
    padding: 0 20px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.logo {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-toggle-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}
.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: 20px;
}

/* Cards */
.card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    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: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 800;
    cursor: pointer;
    border: 1px solid var(--btn-border);
    color: #112233;
    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;
}

.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: 7px 10px;
    font-size: 0.82rem;
    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;
}

.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) */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}
.dashboard-card {
    text-align: center;
    transition: transform 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}
.dashboard-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

/* Admin Tabs */
.nav-tabs {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.nav-tab {
    --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);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 10px;
    font-size: 0.82rem;
    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));
    border: 1px solid var(--btn-border);
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    font-weight: 800;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.06) inset,
        0 0 14px var(--btn-glow),
        0 12px 26px rgba(0,0,0,0.20);
    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(255,255,255,0.08) inset,
        0 0 18px var(--btn-glow),
        0 14px 30px rgba(0,0,0,0.22);
}
.nav-tab.active {
    --btn-border: rgba(120, 170, 255, 0.95);
    --btn-glow: rgba(120, 170, 255, 0.60);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.stat-card .number { font-size: 2rem; font-weight: bold; color: #3498db; }
.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.85rem;
    font-weight: 600;
}
.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: 10px 0;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
}
.filter-container {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 5px;
}
.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; }


/* 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: #978d3f;
    --button-border: #8d6e63;
    --button-text: #fff8e1;
    --button-hover-bg: #968f8d;
    --button-hover-border: #A1887F;
    --button-hover-text: #FFD54F;
    --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;
}
