/* ====================================================================
   RAKU TIPS - PREMIUM GLASSMORPHISM DESIGN SYSTEM (VANILLA CSS)
   ==================================================================== */

/* --- Modern Theme Variables --- */
:root {
    --font-heading: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    /* Tailored HSL Colors */
    --color-bg-dark: hsl(222, 47%, 7%);
    --color-bg-deep: hsl(222, 40%, 10%);
    --color-text-main: hsl(210, 40%, 98%);
    --color-text-muted: hsl(215, 20%, 65%);
    --color-text-dark: hsl(222, 20%, 15%);
    
    /* Vibrant HSL Accents */
    --color-teal: hsl(160, 84%, 39%);
    --color-teal-glow: hsla(160, 84%, 39%, 0.15);
    --color-purple: hsl(262, 80%, 55%);
    --color-purple-glow: hsla(262, 80%, 55%, 0.15);
    --color-gold: hsl(38, 92%, 50%);
    --color-gold-glow: hsla(38, 92%, 50%, 0.15);
    --color-danger: hsl(354, 76%, 53%);
    --color-danger-glow: hsla(354, 76%, 53%, 0.15);

    /* Glassmorphism Variables */
    --glass-bg: hsla(222, 30%, 14%, 0.65);
    --glass-bg-hover: hsla(222, 30%, 20%, 0.75);
    --glass-border: hsla(217, 30%, 25%, 0.35);
    --glass-border-focus: hsla(160, 84%, 39%, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glass-blur: blur(16px);

    /* UI Measurements */
    --border-radius-sm: 8px;
    --border-radius-md: 14px;
    --border-radius-lg: 24px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* --- Base Resets & Structure --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--color-bg-dark);
    color: var(--color-text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.5;
}

/* --- Premium Background Mesh Gradients --- */
.bg-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}

.mesh-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.18;
    mix-blend-mode: screen;
    animation: float-slow 20s infinite alternate ease-in-out;
}

.mesh-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--color-teal) 0%, transparent 70%);
    top: -200px;
    right: -100px;
}

.mesh-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--color-purple) 0%, transparent 70%);
    bottom: -150px;
    left: -100px;
    animation-delay: -5s;
    animation-duration: 25s;
}

@keyframes float-slow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(80px, 50px) scale(1.15); }
}

/* --- Utility Class: Glassmorphism Card --- */
.glass {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.card {
    border-radius: var(--border-radius-md);
    padding: 24px;
    transition: var(--transition-smooth);
}

.card:hover {
    border-color: hsla(217, 30%, 35%, 0.5);
    transform: translateY(-2px);
}

/* --- Layout Container --- */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    min-height: 100vh;
}

/* --- APP HEADER --- */
.app-header {
    border-radius: var(--border-radius-lg);
    padding: 16px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-emoji {
    font-size: 32px;
    animation: pop-bounce 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo-text h1 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff 30%, var(--color-text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-date {
    font-size: 13px;
    color: var(--color-teal);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* --- Cloud Sync Indicator --- */
.sync-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    background: hsla(0, 0%, 100%, 0.05);
    border: 1px solid hsla(0, 0%, 100%, 0.05);
    transition: var(--transition-smooth);
    color: var(--color-text-muted);
}

.icon-cloud {
    width: 16px;
    height: 16px;
    transition: var(--transition-smooth);
}

/* Sync States Classes */
.sync-status.local-only {
    color: var(--color-text-muted);
    border-color: transparent;
}

.sync-status.synced {
    color: var(--color-teal);
    border-color: hsla(160, 84%, 39%, 0.2);
    background: var(--color-teal-glow);
}

.sync-status.syncing {
    color: var(--color-gold);
    border-color: hsla(38, 92%, 50%, 0.2);
    background: var(--color-gold-glow);
}
.sync-status.syncing .icon-cloud {
    animation: pulse-spin 1.5s linear infinite;
}

.sync-status.error {
    color: var(--color-danger);
    border-color: hsla(354, 76%, 53%, 0.2);
    background: var(--color-danger-glow);
}

@keyframes pulse-spin {
    0% { transform: scale(1) rotate(0deg); opacity: 0.8; }
    50% { transform: scale(1.1) rotate(180deg); opacity: 1; }
    100% { transform: scale(1) rotate(360deg); opacity: 0.8; }
}

/* --- Language Selector Pills --- */
.lang-selector {
    display: flex;
    background: hsla(0, 0%, 0%, 0.2);
    padding: 3px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

.lang-btn {
    background: transparent;
    border: none;
    outline: none;
    color: var(--color-text-muted);
    font-size: 11px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 16px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.lang-btn:hover {
    color: var(--color-text-main);
}

.lang-btn.active {
    background: var(--color-teal);
    color: var(--color-bg-dark);
}

/* --- Lock Toggle Badge Button --- */
.lock-btn {
    background: hsla(262, 80%, 55%, 0.1);
    border: 1px solid hsla(262, 80%, 55%, 0.3);
    border-radius: 24px;
    padding: 6px 14px;
    color: var(--color-text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-bounce);
    box-shadow: 0 4px 12px hsla(262, 80%, 55%, 0.08);
}

.lock-btn:hover {
    background: hsla(262, 80%, 55%, 0.25);
    border-color: var(--color-purple);
    transform: scale(1.05);
}

.lock-btn.unlocked {
    background: hsla(38, 92%, 50%, 0.12);
    border-color: hsla(38, 92%, 50%, 0.4);
    box-shadow: 0 4px 12px hsla(38, 92%, 50%, 0.1);
}

.lock-btn.unlocked:hover {
    background: hsla(38, 92%, 50%, 0.22);
    border-color: var(--color-gold);
}

.icon-lock {
    width: 14px;
    height: 14px;
    transition: var(--transition-smooth);
}

.lock-btn.unlocked .icon-lock {
    color: var(--color-gold);
    transform: translateY(-1px) rotate(-15deg);
}

.role-badge {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.lock-btn.unlocked .role-badge {
    color: var(--color-gold);
}

/* --- Main Layout Grid --- */
.app-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: fade-in 0.4s ease-out;
}

.section-header {
    margin-bottom: 8px;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 4px;
}

.section-subtitle {
    color: var(--color-text-muted);
    font-size: 14px;
}

/* --- WAITER GRID SYSTEM --- */
.waiter-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
    align-items: start;
}

/* --- FORMS & INPUTS --- */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-main);
}

.input-helper {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: -2px;
}

/* --- Sleek Standard Inputs --- */
input[type="text"],
input[type="number"],
input[type="password"],
input[type="url"],
input[type="date"] {
    background: hsla(0, 0%, 0%, 0.25);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    color: var(--color-text-main);
    padding: 12px 14px;
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: var(--transition-smooth);
}

input:focus {
    border-color: var(--color-teal);
    background: hsla(0, 0%, 0%, 0.4);
    box-shadow: 0 0 0 3px var(--color-teal-glow);
}

/* Compact Editor Input Styling */
.amount-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-symbol {
    position: absolute;
    left: 16px;
    color: var(--color-teal);
    font-size: 20px;
    font-weight: 700;
    pointer-events: none;
}

.amount-input-wrapper input {
    width: 100%;
    padding-left: 36px;
    font-size: 24px;
    font-weight: 700;
    color: var(--color-teal);
    font-family: var(--font-heading);
}

/* --- CUSTOM SEARCHABLE MULTI-SELECT DROPDOWN --- */
.custom-multiselect {
    position: relative;
    width: 100%;
}

.multiselect-trigger {
    background: hsla(0, 0%, 0%, 0.25);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    padding: 12px 14px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    transition: var(--transition-smooth);
    min-height: 46px;
}

.multiselect-trigger:hover {
    border-color: hsla(217, 30%, 40%, 0.6);
}

.custom-multiselect.active .multiselect-trigger {
    border-color: var(--color-teal);
    box-shadow: 0 0 0 3px var(--color-teal-glow);
}

.chevron-icon {
    width: 16px;
    height: 16px;
    color: var(--color-text-muted);
    transition: var(--transition-smooth);
}

.custom-multiselect.active .chevron-icon {
    transform: rotate(180deg);
    color: var(--color-teal);
}

.selected-waiter-bubble {
    display: inline-flex;
    align-items: center;
    background: var(--color-teal-glow);
    border: 1px solid hsla(160, 84%, 39%, 0.2);
    color: var(--color-text-main);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 4px;
    margin-bottom: 2px;
    font-weight: 500;
}

/* Dropdown list popup styling */
.multiselect-options {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    border-radius: var(--border-radius-md);
    z-index: 10;
    max-height: 300px;
    display: flex;
    flex-direction: column;
    padding: 8px;
    box-shadow: var(--glass-shadow);
    transform: translateY(10px);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-bounce);
}

.custom-multiselect.active .multiselect-options {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.multiselect-search-box {
    display: flex;
    gap: 6px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 6px;
}

.multiselect-search-box input {
    flex: 1;
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 6px;
}

.btn-quick-add {
    background: var(--color-teal);
    border: none;
    color: var(--color-bg-dark);
    font-weight: 700;
    font-size: 18px;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.btn-quick-add:hover {
    background: hsl(160, 84%, 49%);
    transform: scale(1.05);
}

.multiselect-list {
    overflow-y: auto;
    flex: 1;
    max-height: 200px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.multiselect-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 13px;
    color: var(--color-text-main);
}

.multiselect-item:hover {
    background: hsla(0, 0%, 100%, 0.05);
}

.multiselect-item input[type="checkbox"] {
    accent-color: var(--color-teal);
    width: 15px;
    height: 15px;
    cursor: pointer;
}

/* Custom Scrollbar for list */
.multiselect-list::-webkit-scrollbar,
.waiters-list-wrapper::-webkit-scrollbar,
.today-shifts-container::-webkit-scrollbar {
    width: 6px;
}
.multiselect-list::-webkit-scrollbar-thumb,
.waiters-list-wrapper::-webkit-scrollbar-thumb,
.today-shifts-container::-webkit-scrollbar-thumb {
    background: hsla(0, 0%, 100%, 0.1);
    border-radius: 3px;
}

/* --- SHIFT SELECTOR PILLS --- */
.shift-selector-pills {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.shift-pill {
    cursor: pointer;
}

.shift-pill input[type="radio"] {
    display: none;
}

.shift-pill-content {
    background: hsla(0, 0%, 0%, 0.25);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition-smooth);
    text-align: center;
}

.shift-icon {
    font-size: 24px;
}

.shift-pill-content span:last-child {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-muted);
}

.shift-pill:hover .shift-pill-content {
    border-color: hsla(217, 30%, 40%, 0.6);
}

/* Selected Shift Pill Styling */
.shift-pill input[type="radio"]:checked + .shift-pill-content {
    background: var(--color-purple-glow);
    border-color: var(--color-purple);
    box-shadow: 0 0 0 3px hsla(262, 80%, 55%, 0.15);
}

.shift-pill input[type="radio"]:checked + .shift-pill-content span:last-child {
    color: var(--color-text-main);
}

/* Compact pills for editor */
.shift-selector-pills.compact {
    gap: 8px;
}
.shift-selector-pills.compact .shift-pill-content {
    padding: 8px;
    flex-direction: row;
    gap: 8px;
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: var(--border-radius-sm);
    padding: 12px 24px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    outline: none;
}

.btn-icon {
    width: 16px;
    height: 16px;
}

.btn-primary {
    background: var(--color-teal);
    color: var(--color-bg-dark);
}
.btn-primary:hover {
    background: hsl(160, 84%, 45%);
    box-shadow: 0 8px 20px hsla(160, 84%, 39%, 0.25);
    transform: translateY(-1px);
}

.btn-secondary {
    background: hsla(0, 0%, 100%, 0.08);
    color: var(--color-text-main);
    border: 1px solid var(--glass-border);
}
.btn-secondary:hover {
    background: hsla(0, 0%, 100%, 0.16);
    border-color: hsla(217, 30%, 40%, 0.6);
}

.btn-danger {
    background: var(--color-danger);
    color: var(--color-text-main);
}
.btn-danger:hover {
    background: hsl(354, 76%, 45%);
    box-shadow: 0 8px 20px hsla(354, 76%, 53%, 0.25);
    transform: translateY(-1px);
}

.btn-save {
    width: 100%;
    margin-top: 10px;
}

.btn-icon-only {
    padding: 8px;
    border-radius: 50%;
    background: hsla(0, 0%, 100%, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--color-text-main);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}
.btn-icon-only:hover {
    background: hsla(0, 0%, 100%, 0.15);
    border-color: var(--color-teal);
}
.btn-icon-only svg {
    width: 16px;
    height: 16px;
}

/* --- TODAY'S RECORD LIST CARD --- */
.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 14px;
    margin-bottom: 18px;
}

.card-header-flex h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
}

.today-tag {
    background: var(--color-teal-glow);
    border: 1px solid hsla(160, 84%, 39%, 0.3);
    color: var(--color-teal);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.today-shifts-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 480px;
    overflow-y: auto;
}

/* Shift Record Card design */
.shift-record-item {
    background: hsla(0, 0%, 0%, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-md);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    transition: var(--transition-smooth);
    animation: slide-up 0.3s ease-out;
}

.shift-record-item:hover {
    border-color: hsla(217, 30%, 40%, 0.5);
    background: hsla(0, 0%, 0%, 0.3);
}

.record-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.record-shift-tag {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}

.record-shift-tag.morning {
    background: var(--color-purple-glow);
    color: hsl(262, 80%, 75%);
    border: 1px solid hsla(262, 80%, 55%, 0.25);
}

.record-shift-tag.afternoon {
    background: var(--color-gold-glow);
    color: hsl(38, 92%, 75%);
    border: 1px solid hsla(38, 92%, 50%, 0.25);
}

.record-waiters-list {
    font-size: 13px;
    color: var(--color-text-muted);
}
.record-waiters-list strong {
    color: var(--color-text-main);
}

.record-math-split {
    font-size: 12px;
    color: var(--color-teal);
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.record-amount-display {
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.record-amount-val {
    font-size: 22px;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-teal);
}

/* Empty State Styling */
.empty-state {
    text-align: center;
    padding: 48px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--color-text-muted);
}

.empty-icon {
    font-size: 40px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 13px;
}

/* --- MANAGER TABS NAVIGATION --- */
.manager-tabs {
    display: flex;
    border-bottom: 1px solid var(--glass-border);
    gap: 8px;
}

.tab-btn {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 12px 18px;
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
    border-radius: 4px 4px 0 0;
}

.tab-btn:hover {
    color: var(--color-text-main);
    background: hsla(0, 0%, 100%, 0.03);
}

.tab-btn.active {
    color: var(--color-teal);
    border-bottom-color: var(--color-teal);
    background: var(--color-teal-glow);
}

.tab-icon {
    width: 16px;
    height: 16px;
}

.tab-pane {
    display: none;
    animation: fade-in 0.3s ease-out;
}

.tab-pane.active {
    display: block;
}

/* --- TAB 1: CALENDAR VIEW STYLE --- */
.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: var(--border-radius-md);
    padding: 14px 20px;
    margin-bottom: 16px;
}

.calendar-controls h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    min-width: 140px;
    text-align: center;
}

.calendar-card {
    padding: 18px;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}

.calendar-grid-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

/* Calendar Day Cell */
.calendar-day-cell {
    aspect-ratio: 1.1 / 1;
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    padding: 6px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    background: hsla(0, 0%, 0%, 0.1);
    transition: var(--transition-smooth);
    min-height: 80px;
}

.calendar-day-cell:hover {
    background: var(--glass-bg-hover);
    border-color: hsla(217, 30%, 45%, 0.5);
    transform: translateY(-1px);
}

.day-number {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-muted);
}

.calendar-day-cell.today .day-number {
    color: var(--color-bg-dark);
    background: var(--color-teal);
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
}

.calendar-day-cell.other-month {
    opacity: 0.25;
    pointer-events: none;
}

/* Shift Summary Indicators inside Day cell */
.day-shifts-preview {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.day-shift-preview-bar {
    font-size: 9px;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.1;
}

.day-shift-preview-bar.morning {
    background: var(--color-purple-glow);
    color: hsl(262, 80%, 75%);
    border: 1px solid hsla(262, 80%, 55%, 0.15);
}

.day-shift-preview-bar.afternoon {
    background: var(--color-gold-glow);
    color: hsl(38, 92%, 75%);
    border: 1px solid hsla(38, 92%, 50%, 0.15);
}

/* --- TAB 2: STATISTICS VIEW STYLE --- */
.stats-filter-card {
    padding: 20px 24px;
    border-radius: var(--border-radius-md);
    margin-bottom: 24px;
}

.stats-filter-card h3 {
    font-family: var(--font-heading);
    font-size: 16px;
    margin-bottom: 14px;
    font-weight: 600;
}

.filter-row {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 20px;
}

.form-group.inline {
    margin-bottom: 0;
    flex: 1;
    min-width: 180px;
}

/* Statistics Grid Layout */
.stats-results-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 24px;
    align-items: start;
}

.metric-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 20px 0;
}

.metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 12px;
}

.metric-label {
    font-size: 13px;
    color: var(--color-text-muted);
}

.metric-value {
    font-size: 18px;
    font-weight: 700;
    font-family: var(--font-heading);
}

.metric-value-highlight {
    font-size: 26px;
    font-weight: 700;
    color: var(--color-teal);
    font-family: var(--font-heading);
}

.calculation-notice {
    display: flex;
    gap: 12px;
    background: hsla(0, 0%, 100%, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    padding: 12px;
}

.notice-icon {
    font-size: 18px;
}

.calculation-notice p {
    font-size: 11px;
    color: var(--color-text-muted);
    line-height: 1.4;
}

/* Premium styling for Data tables */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.premium-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13px;
}

.premium-table th {
    color: var(--color-text-muted);
    font-weight: 600;
    border-bottom: 2px solid var(--glass-border);
    padding: 12px 10px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.premium-table td {
    padding: 14px 10px;
    border-bottom: 1px solid var(--glass-border);
    color: var(--color-text-main);
    vertical-align: middle;
}

.premium-table tbody tr:hover td {
    background: hsla(0, 0%, 100%, 0.02);
}

.text-right {
    text-align: right !important;
}

.text-center {
    text-align: center !important;
}

.waiter-rank-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.waiter-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-purple-glow);
    border: 1px solid var(--color-purple);
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.tips-bar-container {
    margin-top: 4px;
    width: 100%;
    height: 4px;
    background: hsla(0, 0%, 100%, 0.05);
    border-radius: 2px;
    overflow: hidden;
}

.tips-bar-fill {
    height: 100%;
    background: var(--color-teal);
    border-radius: 2px;
    transition: width 1s ease-out;
}

/* --- TAB 3: SYSTEM SETTINGS STYLE --- */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.settings-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.settings-desc {
    font-size: 13px;
    color: var(--color-text-muted);
    line-height: 1.4;
}

.add-waiter-form .form-group.inline {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.add-waiter-form input {
    flex: 1;
}

.waiters-list-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.waiter-roster-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 180px;
    overflow-y: auto;
    padding: 4px;
}

/* Roster list tag deletes */
.roster-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: hsla(0, 0%, 100%, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--color-text-main);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-bounce);
}

.roster-tag:hover {
    background: var(--color-danger-glow);
    border-color: var(--color-danger);
    color: var(--color-danger);
    transform: scale(0.95);
}

.roster-tag-remove-x {
    font-weight: 700;
    font-size: 10px;
}

.sb-input {
    font-family: monospace !important;
    font-size: 12px !important;
}

.btn-group-row {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.btn-group-row button {
    flex: 1;
}

/* --- OVERLAY MODALS --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    background: rgba(4, 7, 14, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    width: 100%;
    max-width: 440px;
    border-radius: var(--border-radius-lg);
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transform: scale(0.9);
    transition: var(--transition-bounce);
}

.modal-overlay:not(.hidden) .modal-card {
    transform: scale(1);
}

.modal-header {
    text-align: center;
}

.modal-header-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}

.modal-subtitle {
    color: var(--color-text-muted);
    font-size: 13px;
    line-height: 1.4;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-body input {
    text-align: center;
    font-size: 16px;
}

.password-error {
    color: var(--color-danger);
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}

.modal-footer {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.modal-footer button {
    flex: 1;
}

/* Day Inspector Modal Custom Sizing */
.inspector-modal-card {
    max-width: 580px;
}

.btn-close-modal {
    background: transparent;
    border: none;
    font-size: 24px;
    color: var(--color-text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: var(--transition-smooth);
}
.btn-close-modal:hover {
    color: var(--color-text-main);
}

.inspector-shifts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
    max-height: 250px;
    overflow-y: auto;
}

.day-edit-form {
    border-top: 1px solid var(--glass-border);
    padding-top: 18px;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: slide-up 0.3s ease-out;
}

.day-edit-form h4 {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
}

.amount-input-wrapper.compact input {
    font-size: 18px;
    padding-left: 32px;
}
.amount-input-wrapper.compact .currency-symbol {
    left: 14px;
    font-size: 16px;
}

/* Day Inspector row actions */
.inspector-shift-item {
    background: hsla(0, 0%, 0%, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-md);
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.inspector-actions {
    display: flex;
    gap: 6px;
}

.btn-action-icon {
    padding: 6px;
    border-radius: 6px;
    background: hsla(0, 0%, 100%, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--color-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}
.btn-action-icon:hover {
    background: hsla(0, 0%, 100%, 0.15);
    color: var(--color-text-main);
}
.btn-action-icon.edit:hover {
    border-color: var(--color-purple);
    color: hsl(262, 80%, 75%);
}
.btn-action-icon.delete:hover {
    border-color: var(--color-danger);
    color: var(--color-danger);
}
.btn-action-icon svg {
    width: 14px;
    height: 14px;
}

/* --- TOAST FLOATING NOTIFICATIONS --- */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 260px;
    max-width: 380px;
    padding: 14px 20px;
    border-radius: var(--border-radius-md);
    color: var(--color-text-main);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: toast-slide-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--glass-border);
}

.toast.success {
    background: hsla(160, 84%, 10%, 0.85);
    border-color: hsla(160, 84%, 39%, 0.4);
    color: hsl(160, 84%, 75%);
}

.toast.error {
    background: hsla(354, 76%, 10%, 0.85);
    border-color: hsla(354, 76%, 53%, 0.4);
    color: hsl(354, 76%, 75%);
}

.toast.info {
    background: hsla(262, 80%, 10%, 0.85);
    border-color: hsla(262, 80%, 55%, 0.4);
    color: hsl(262, 80%, 75%);
}

.toast-close {
    margin-left: auto;
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    opacity: 0.5;
}
.toast-close:hover {
    opacity: 1;
}

/* --- HIDING ELEMENTS --- */
.hidden {
    display: none !important;
}

/* --- ANIMATIONS --- */
@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slide-up {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toast-slide-in {
    from { opacity: 0; transform: translateY(20px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pop-bounce {
    0% { transform: scale(0.5); opacity: 0; }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

/* Password error shake animation */
.shake {
    animation: shake-anim 0.4s ease;
}

@keyframes shake-anim {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

/* --- FOOTER --- */
.app-footer {
    text-align: center;
    padding: 16px;
    font-size: 12px;
    color: var(--color-text-muted);
    border-top: 1px solid var(--glass-border);
    margin-top: auto;
}

/* --- RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 900px) {
    .waiter-grid {
        grid-template-columns: 1fr;
    }
    .stats-results-grid {
        grid-template-columns: 1fr;
    }
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .app-header {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
    }
    
    .header-right {
        justify-content: space-between;
        margin-top: 8px;
    }
    
    .calendar-weekdays {
        font-size: 11px;
    }
    
    .calendar-day-cell {
        min-height: 64px;
        padding: 4px;
    }
    
    .day-number {
        font-size: 11px;
    }
    
    .day-shift-preview-bar {
        font-size: 8px;
        padding: 0 2px;
    }
}

/* --- REFINEMENT STYLES --- */

/* Selected waiters text bubble layout wrap */
#selected-waiters-text, 
#edit-selected-waiters-text {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    max-width: 90%;
}

/* Disabled States for Shift Pills */
.shift-pill.disabled {
    cursor: not-allowed !important;
    opacity: 0.4;
}

.shift-pill.disabled .shift-pill-content {
    background: hsla(0, 0%, 0%, 0.15) !important;
    border-color: hsla(0, 0%, 100%, 0.03) !important;
    box-shadow: none !important;
    pointer-events: none;
}

.shift-pill.disabled:hover .shift-pill-content {
    border-color: hsla(0, 0%, 100%, 0.03) !important;
}

/* Disabled State for save button */
.btn-save.btn-disabled,
.btn-save:disabled {
    background: hsla(0, 0%, 100%, 0.05) !important;
    border-color: hsla(0, 0%, 100%, 0.05) !important;
    color: var(--color-text-muted) !important;
    cursor: not-allowed !important;
    opacity: 0.5;
    box-shadow: none !important;
}

/* Export Excel Report Actions Panel */
.export-actions-wrapper {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.export-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-main);
    letter-spacing: 0.5px;
}

.export-buttons-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

@media (min-width: 480px) {
    .export-buttons-row {
        flex-direction: row;
    }
    .export-buttons-row .btn-export {
        flex: 1;
    }
}

.btn-export {
    background: linear-gradient(135deg, hsla(160, 84%, 39%, 0.1) 0%, hsla(160, 84%, 30%, 0.1) 100%);
    border: 1px solid hsla(160, 84%, 39%, 0.25);
    color: var(--color-teal);
    font-size: 13px;
    padding: 10px 14px;
    border-radius: var(--border-radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-export:hover {
    background: linear-gradient(135deg, hsla(160, 84%, 39%, 0.2) 0%, hsla(160, 84%, 30%, 0.2) 100%);
    border-color: var(--color-teal);
    color: var(--color-text-main);
    box-shadow: 0 0 0 3px var(--color-teal-glow);
}

/* Premium Glassmorphic Tooltip Styling */
.tooltip-trigger {
    position: relative;
}

.tooltip-trigger::after {
    content: attr(data-tip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #f8fafc;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
}

.tooltip-trigger:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* --- Stats Name Filter Search Box --- */
.stats-filter-name-box {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0 18px;
    padding: 10px 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    transition: var(--transition-smooth);
}

.stats-filter-name-box:focus-within {
    border-color: var(--glass-border-focus);
    box-shadow: 0 0 0 3px var(--color-teal-glow);
}

.stats-filter-name-box .search-icon {
    width: 18px;
    height: 18px;
    color: var(--color-text-muted);
    flex-shrink: 0;
}

.stats-filter-name-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--color-text-main);
    font-family: var(--font-body);
    font-size: 14px;
}

.stats-filter-name-box input::placeholder {
    color: var(--color-text-muted);
}

/* --- Shift Date Detail Tags (Payout Table) --- */
.shift-dates-detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 140px;
    overflow-y: auto;
    padding-right: 4px;
}

.shift-dates-detail::-webkit-scrollbar {
    width: 4px;
}

.shift-dates-detail::-webkit-scrollbar-track {
    background: transparent;
}

.shift-dates-detail::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 4px;
}

.shift-date-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    background: hsla(222, 30%, 18%, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    font-size: 12px;
    color: var(--color-text-muted);
    transition: var(--transition-smooth);
    white-space: nowrap;
}

.shift-date-tag:hover {
    background: hsla(222, 30%, 22%, 0.8);
    border-color: var(--color-teal);
    color: var(--color-text-main);
}

.shift-date-icon {
    font-size: 11px;
}

.shift-date-text {
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--color-text-main);
    font-size: 11.5px;
}

.shift-date-amount {
    color: var(--color-teal);
    font-weight: 600;
    font-size: 11.5px;
}

/* --- New Shift Button (Day Inspector) --- */
.btn-new-shift {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 16px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    border: 2px dashed var(--color-teal);
    background: var(--color-teal-glow);
    color: var(--color-teal);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-new-shift:hover {
    background: hsla(160, 84%, 39%, 0.25);
    color: var(--color-text-main);
    box-shadow: 0 0 16px var(--color-teal-glow);
}

.btn-new-shift .btn-icon {
    width: 18px;
    height: 18px;
}

/* --- Utility: Text Muted --- */
.text-muted {
    color: var(--color-text-muted);
}

/* --- Backup & Restore --- */
.backup-cloud-note {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius-sm);
    margin-bottom: 1rem;
}

.backup-note-cloud {
    background: hsla(160, 84%, 39%, 0.12);
    color: var(--color-teal);
}

.backup-note-local {
    background: hsla(38, 92%, 50%, 0.12);
    color: var(--color-gold);
}

.backup-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    margin-bottom: 0.5rem;
    background: hsla(222, 30%, 18%, 0.5);
    transition: var(--transition-smooth);
}

.backup-item:hover {
    background: var(--glass-bg-hover);
}

.backup-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.backup-item-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text-main);
}

.backup-item-meta {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.backup-item-actions {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}

.btn-xs {
    padding: 0.25rem 0.65rem !important;
    font-size: 0.78rem !important;
    border-radius: 6px !important;
    min-height: unset !important;
}
