@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600&display=swap');

:root {
    /* Role Colors (Default / Owner) */
    --primary: #8e44ad;
    --primary-dark: #732d91;
    --secondary: #f39c12;
    --accent: #e74c3c;
    --bg-main: #f8f9fa;
    --bg-card: #ffffff;
    --text-main: #2c3e50;
    --text-muted: #7f8c8d;
    --border: #dcdde1;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --glass: rgba(255, 255, 255, 0.7);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 20px;
}

/* Role Themes */
[data-role="owner"] {
    --primary: #8e44ad;
    --primary-dark: #732d91;
}

[data-role="staff"] {
    --primary: #2980b9;
    --primary-dark: #1f6391;
}

[data-role="partner"] {
    --primary: #27ae60;
    --primary-dark: #1e8449;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Kanit', sans-serif;
}

/* Global Font Size Increase */
body {
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    font-size: 18px;
    /* Increased from default */
}

.glass-morphism {
    background: var(--bg-card);
    /* Use solid color for better contrast in main pages */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

/* --- Improved Inputs (White & Black Text) --- */
input,
select,
textarea {
    background-color: #ffffff !important;
    color: #000000 !important;
    border: 2px solid var(--border) !important;
    border-radius: 12px !important;
    padding: 14px 18px !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    outline: none !important;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 10px rgba(142, 68, 173, 0.2) !important;
}

label {
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    color: var(--text-main) !important;
    margin-bottom: 8px !important;
    display: block !important;
}

button {
    border-radius: 8px;
    padding: 10px 15px;
    border: 1px solid var(--border);
    outline: none;
    transition: all 0.3s ease;
}

button {
    cursor: pointer;
    background-color: var(--primary);
    color: white;
    border: none;
    font-weight: 500;
}

button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

button:active {
    transform: translateY(0);
}

.auth-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    text-align: center;
}

.auth-card h1 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.auth-card p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
}

.btn-login {
    width: 100%;
    padding: 12px;
    font-size: 1.1rem;
    margin-top: 1rem;
}

/* --- PREMIUM NAVBAR SYSTEM (Refactored to Horizontal Top Bar) --- */
:root {
    --navbar-height: 75px;
}

#main-app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.premium-navbar {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    width: 100%;
    height: var(--navbar-height);
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
}

.main-container {
    flex: 1;
    margin-top: var(--navbar-height);
    display: flex;
    flex-direction: column;
    width: 100%;
}

#content-area {
    padding: 15px !important;
    width: 100%;
}

.nav-left {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
}

#sync-status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#sync-status-indicator:hover {
    background: rgba(255, 255, 255, 0.15);
}

.brand-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    text-align: left;
}

.brand-name {
    font-size: 1rem;
    font-weight: 800;
    color: #ffffff;
}

.brand-sub {
    font-size: 0.6rem;
    font-weight: 700;
    color: #4ade80;
    background: rgba(74, 222, 128, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
}

.navbar-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.nav-btn {
    display: flex;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px 12px !important;
    gap: 8px !important;
    cursor: pointer;
    border-radius: 10px !important;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    transform: translateY(-2px);
}

.icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem !important;
}

.nav-btn .label {
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: #cbd5e1 !important;
    margin-top: 0 !important;
    display: block;
}

.menu-toggle {
    display: none !important;
}

.sidebar-overlay {
    display: none !important;
}

/* User Avatar adjustments for colored bg */
.user-avatar {
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

/* Hidden by default */
.hidden {
    display: none !important;
}

/* Mobile Responsive - Enhanced Font Sizes */
@media (max-width: 600px) {

    /* Base font size increase */
    /* Base font size increase */
    body {
        font-size: 16px !important;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    nav {
        padding: 0.5rem 0.8rem;
        flex-wrap: nowrap;
        /* Keep on one line if possible */
        gap: 10px;
    }

    .navbar-brand {
        font-size: 1.1rem;
        /* Smaller brand text */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex: 1;
        /* Allow it to shrink */
        min-width: 0;
    }

    .user-info {
        padding: 4px 10px !important;
        /* Compact padding */
        gap: 8px !important;
        /* Smaller gap */
        flex-shrink: 0;
        /* Keep buttons visible */
        background: transparent !important;
    }

    #user-display-name {
        display: none;
    }

    /* Make tables scrollable */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        font-size: 0.95rem !important;
    }

    table th,
    table td {
        font-size: 0.95rem !important;
        padding: 12px 8px !important;
    }

    /* Adjust grids */
    .stats-grid,
    .action-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* Buttons - Larger and easier to tap */
    button {
        font-size: 1rem !important;
        padding: 10px 14px !important;
        min-height: 44px;
    }

    .big-btn {
        padding: 18px !important;
        font-size: 1.1rem !important;
    }

    /* Dashboard Header */
    #dashboard-header h1 {
        font-size: 1.6rem !important;
        text-align: center;
        line-height: 1.3;
    }

    #dashboard-header p {
        text-align: center;
        font-size: 0.9rem;
    }

    /* POS Page Responsiveness */
    .pos-layout {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        gap: 15px !important;
    }

    .pos-left,
    .pos-right {
        width: 100% !important;
        height: auto !important;
    }

    /* Modal Responsiveness */
    .modal-content {
        width: 95% !important;
        padding: 20px !important;
        margin: 10px !important;
    }

    /* Stats Grid */
    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    /* History and Lists */
    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .history-item .status {
        align-self: flex-end;
    }
}

/* --- POS Layout System --- */

/* Base Layout (Mobile First) */
.pos-layout {
    display: flex;
    flex-direction: column;
    padding-bottom: 120px;
    /* Space for fixed bottom sheet */
    gap: 15px;
}

/* Mobile Bottom Sheet (Default for .pos-right) */
.pos-right {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    border-top: 1px solid var(--border);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Bouncy transition */
    transform: translateY(calc(100% - 110px));
    /* Lifted up higher as requested */
    padding: 0 !important;
    /* Override inline padding */
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.pos-right.expanded {
    transform: translateY(0);
}

.pos-footer-handle {
    width: 100%;
    height: 35px;
    /* Taller for text */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #f8fafc;
    border-radius: 20px 20px 0 0;
    border-bottom: 1px solid #f1f5f9;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.pos-footer-handle::before {
    content: '';
    width: 40px;
    height: 4px;
    background: #cbd5e1;
    border-radius: 10px;
    margin-bottom: 4px;
}

.pos-footer-handle::after {
    content: '🔼 แตะเพื่อขยาย';
    /* Default: Up arrow */
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 600;
    margin-top: 2px;
    animation: fadeInText 2s infinite alternate;
}

/* Change text when expanded */
.pos-right.expanded .pos-footer-handle::after {
    content: '🔽 แตะเพื่อย่อ';
    /* Expanded: Down arrow */
    animation: none;
    /* Stop pulsing when open to be less distracting */
    color: var(--primary);
    /* Highlight color when open */
}

/* Cool Pulse Effect for the handle bar */
@keyframes fadeInText {
    0% {
        opacity: 0.6;
        transform: translateY(0);
    }

    100% {
        opacity: 1;
        transform: translateY(-2px);
    }
}

/* Utility for Mobile Logic */
.pos-mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    backdrop-filter: blur(2px);
}

.pos-mobile-overlay.active {
    display: block;
}

.mobile-only {
    display: block;
}

.desktop-only {
    display: none !important;
}

/* --- Desktop Layout (>= 768px) --- */
@media (min-width: 768px) {
    .pos-layout {
        display: grid;
        grid-template-columns: 1fr 380px;
        /* Right panel fixed width */
        height: calc(100vh - 120px);
        padding-bottom: 0;
        gap: 20px;
        overflow: hidden;
        /* Prevent body scroll */
    }

    .pos-left {
        overflow-y: auto;
        height: 100%;
    }

    .pos-right {
        position: static;
        /* Reset fixed position */
        transform: none;
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: 16px;
        box-shadow: var(--shadow);
        padding: 20px !important;
        height: 100%;
        max-height: none;
        display: flex;
        flex-direction: column;
        z-index: 1;
    }

    .pos-footer-handle {
        display: none;
    }

    .pos-mobile-overlay {
        display: none !important;
    }

    .mobile-only {
        display: none !important;
    }

    .desktop-only {
        display: block !important;
    }

    .btn-checkout-mobile-visible {
        display: none !important;
    }
}

#dashboard-header h1 {
    font-size: 2.5rem;
    color: var(--primary);
}

#dashboard-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* Login */
.auth-card {
    padding: 1.5rem;
    margin: 10px;
}

/* Form elements - Larger for better usability */
.form-group label {
    font-size: 1rem !important;
}

.form-group input,
.form-group select,
.form-group textarea {
    font-size: 1.1rem !important;
    padding: 14px !important;
    min-height: 48px;
    /* Easier to tap */
}

/* Headings */
h1 {
    font-size: 1.8rem !important;
}

h2 {
    font-size: 1.5rem !important;
}

h3 {
    font-size: 1.3rem !important;
}

h4 {
    font-size: 1.1rem !important;
}

/* Paragraphs and general text */
p {
    font-size: 1rem !important;
    line-height: 1.6 !important;
}

/* Metric cards */
.metric-card {
    font-size: 1rem !important;
    color: white !important;
    padding: 24px !important;
    border-radius: 20px !important;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.metric-card .stat-value,
.metric-card>div:last-child {
    font-size: 1.8rem !important;
    font-weight: 800 !important;
}

/* Modern cards */
.modern-card {
    font-size: 1rem !important;
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}


/* Modern Dashboard Utilities */
.card-gradient-1 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
}

.card-gradient-2 {
    background: linear-gradient(135deg, #5ee7df 0%, #b490d1 100%) !important;
}

.card-gradient-3 {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%) !important;
}

.card-gradient-4 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.25);
    margin-bottom: 12px;
    font-size: 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.metric-card::after {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
}

.progress-ring-circle {
    transition: stroke-dashoffset 0.35s;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* --- DEEP SPACE IMPACT LOGIN (COMPACT & VIBRANT) --- */

.auth-container {
    background: radial-gradient(circle at center, #1a0b2e 0%, #000000 100%);
    position: relative;
    overflow-y: auto;
    /* Allow scrolling if content overflows */
    min-height: 100vh;
    height: auto;
    /* Remove fixed height */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

/* Nebula Glow Behind Card */
.auth-container::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 30%, rgba(76, 29, 149, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(14, 165, 233, 0.3) 0%, transparent 50%);
    filter: blur(40px);
    z-index: 0;
    pointer-events: none;
}

/* Stars - Optimized */
.auth-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(white, rgba(255, 255, 255, .3) 2px, transparent 3px),
        radial-gradient(white, rgba(255, 255, 255, .1) 1px, transparent 2px);
    background-size: 550px 550px, 250px 250px;
    background-position: 0 0, 40px 60px;
    animation: starMove 60s linear infinite;
    /* Slower, majestic movement */
    z-index: 0;
}

@keyframes starMove {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-550px);
    }
}

.auth-card {
    background: rgba(10, 10, 20, 0.6);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.8),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    /* Inner rim light */
    border-radius: 20px;
    padding: 2rem 1.5rem;
    /* Tighter padding */
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 360px;
    /* More compact width */
    margin: auto;
}

/* Logo - Compact & Float */
.logo-wrapper.floating img {
    width: 100% !important;
    max-width: 250px;
    /* Reduced max width for mobile fit */
    height: auto;
    filter: drop-shadow(0 0 25px rgba(100, 200, 255, 0.3));
    animation: floatPulse 5s ease-in-out infinite;
    display: block;
    margin: 0 auto;
}

@keyframes floatPulse {

    0%,
    100% {
        transform: translateY(0) scale(1);
        filter: drop-shadow(0 0 25px rgba(100, 200, 255, 0.3));
    }

    50% {
        transform: translateY(-8px) scale(1.02);
        filter: drop-shadow(0 0 35px rgba(100, 200, 255, 0.5));
    }
}

/* Neon Text - Cyber Space Style */
.text-3d-modern {
    font-family: 'Prompt', sans-serif;
    font-weight: 800;
    font-size: 1.8rem !important;
    /* Smaller, sharper */
    background: linear-gradient(to bottom, #fff 0%, #a5f3fc 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    text-align: center;
    margin: 10px 0 15px 0;
    letter-spacing: 2px;
    filter: drop-shadow(0 0 10px rgba(6, 182, 212, 0.6));
    animation: none;
    /* Removed heavy texture flicker for clean look */
}

/* Old Sci-Fi styles removed to prevent conflict with new global white theme */

/* Warp Speed Button */
.btn-login {
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    /* Cyan to Blue */
    color: #000;
    font-size: 1.1rem;
    font-weight: 800;
    padding: 14px;
    border-radius: 50px;
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.4);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.3s ease;
    border: none;
    margin-top: 10px;
}

.btn-login:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 0 40px rgba(6, 182, 212, 0.7);
    color: white;
}

/* Checkbox style */
#remember-me {
    accent-color: #00b8ff;
    width: 18px;
    height: 18px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* --- POS Mobile Optimized Styles --- */
.pos-cart-container {
    width: 100%;
    overflow-x: hidden;
    margin-top: 15px;
}

.pos-cart-table {
    width: 100%;
    border-collapse: collapse;
}

.pos-cart-header {
    background: #f8fafc;
    border-bottom: 2px solid var(--border);
}

.pos-cart-header th {
    padding: 12px 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
}

.cart-item-row {
    border-bottom: 1px solid var(--border);
}

/* Responsive Cart Card for Mobile */
@media (max-width: 768px) {

    /* Layout Adjustments */
    .pos-layout {
        display: flex;
        flex-direction: column;
        height: auto;
    }

    .pos-left {
        flex: none !important;
        padding-bottom: 320px !important;
        /* Slightly reduced as footer is now shorter */
    }

    .pos-right {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98) !important;
        /* Slightly more opaque for better legibility */
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        z-index: 1000;
        padding: 10px 18px 15px 18px !important;
        /* Reduced padding for compactness */
        border-radius: 18px 18px 0 0 !important;
        /* Sharper but still smooth corners */
        box-shadow: 0 -12px 35px rgba(0, 0, 0, 0.15) !important;
        border-top: 1px solid var(--border) !important;
        margin: 0 !important;
    }

    /* Cart Sliding (Horizontal Scroll) */
    .pos-cart-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-top: 10px;
        background: #fff;
        border-radius: 12px;
        border: 1px solid var(--border);
        width: 100%;
    }

    .pos-cart-table {
        min-width: 750px;
        /* Increased width to ensure no squishing */
        table-layout: fixed;
    }

    /* Flexible column widths - removed fixed nth-child widths that break with new columns */
    .pos-cart-table th,
    .pos-cart-table td {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .pos-cart-table thead {
        display: table-header-group !important;
    }

    .pos-cart-table tr {
        display: table-row !important;
    }

    .pos-cart-table td,
    .pos-cart-table th {
        display: table-cell !important;
        padding: 12px 10px !important;
        white-space: normal !important;
        /* Allow wrapping within the wide table if needed */
    }

    .item-name {
        font-weight: 700 !important;
        color: var(--text-main);
    }

    /* Compact Price Input */
    .price-input-mobile {
        width: 65px !important;
        padding: 6px 4px !important;
        text-align: center !important;
        font-size: 1rem !important;
        border: 2px solid #ddd !important;
        border-radius: 6px !important;
        -moz-appearance: textfield;
        appearance: textfield;
        /* Firefox & Standard */
    }

    /* Hide spin buttons for Webkit/Edge */
    .price-input-mobile::-webkit-outer-spin-button,
    .price-input-mobile::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

    .summary-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 5px;
        /* Tighter margin */
    }

    /* Style for Quick Service buttons to be uniform */
    .btn-service-quick {
        font-size: 0.85rem !important;
        /* Slightly smaller to fit on one line */
        white-space: nowrap !important;
        /* Prevent line breaks */
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        /* Graceful handling of very long names */
        padding: 12px 5px !important;
        /* Uniform padding */
        height: 50px !important;
        /* Uniform height */
        display: flex !important;
        align-items: center;
        justify-content: center;
        font-weight: 600 !important;
        border-radius: 10px !important;
    }

    /* Adjust payment buttons in sticky footer */
    #payment-method-section button {
        padding: 8px !important;
        font-size: 0.95rem !important;
    }

    .pos-right button[onclick="POS.checkout()"] {
        padding: 12px !important;
        margin-top: 10px !important;
    }

    /* POS Header Vertical Buttons */
    .pos-header-btn {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 8px 12px !important;
        border-radius: 14px !important;
        color: white !important;
        border: none !important;
        min-width: 65px !important;
        gap: 4px !important;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1) !important;
    }

    .pos-header-btn .btn-icon {
        font-size: 1.2rem !important;
        line-height: 1 !important;
    }

    .pos-header-btn .btn-text {
        font-size: 0.75rem !important;
        font-weight: 700 !important;
        white-space: nowrap !important;
    }


    /* Product Name and SKU */
    .item-info {
        margin-bottom: 12px;
        padding-right: 40px;
        /* Space for delete button */
    }

    .item-name {
        font-size: 1.1rem !important;
        line-height: 1.4 !important;
        color: var(--text-main);
        font-weight: 700 !important;
        display: block;
        word-break: break-word;
    }

    /* Price and Qty Controls - Flex row */
    .item-controls {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin-top: 10px;
        flex-wrap: wrap;
    }

    .item-price-edit {
        flex: 1;
        min-width: 100px;
    }

    .item-price-edit input {
        width: 100% !important;
        padding: 8px 12px !important;
        font-size: 1rem !important;
        border-radius: 8px !important;
    }

    .item-qty-controls {
        display: flex;
        align-items: center;
        gap: 12px;
        background: #f1f5f9;
        padding: 5px 10px;
        border-radius: 10px;
    }

    .qty-btn {
        width: 36px !important;
        height: 36px !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem !important;
        padding: 0 !important;
        background: white !important;
        border: 1px solid var(--border) !important;
        color: var(--text-main) !important;
        border-radius: 8px !important;
    }

    .item-subtotal {
        font-size: 1.1rem;
        font-weight: 800;
        color: var(--primary);
        margin-top: 5px;
        display: block;
        width: 100%;
        text-align: right;
    }

    .item-remove {
        position: absolute;
        top: 15px;
        right: 10px;
        width: 30px;
        height: 30px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        color: var(--accent) !important;
        font-size: 1.5rem !important;
        background: #f8fafc !important;
        border-radius: 50% !important;
    }
}

/* Global Animations */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(142, 68, 173, 0.4);
    }

    70% {
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(142, 68, 173, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(142, 68, 173, 0);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===== Enterprise Shift Banner (Shared) ===== */
.shift-banner {
    border-radius: 14px;
    padding: 8px 18px;
    /* tighter */
    margin: 8px auto 12px;
    width: min(720px, calc(100% - 20px));

    /* premium depth */
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.18),
        0 0 0 1px rgba(255, 255, 255, 0.08) inset;

    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);

    animation: shiftBannerFade .25s ease;
}

.shift-banner__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
}

.shift-banner__icon {
    font-size: 20px;
    line-height: 1;
    transform: translateY(-1px);
}

.shift-banner__title {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.2px;
}

/* OPEN Gradient: Teal -> Cyan */
.shift-banner--open {
    color: #fff;
    background: linear-gradient(135deg, #2dd4bf, #0891b2);
}

/* CLOSE Gradient: Deep Red */
.shift-banner--close {
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #991b1b);
}

/* Fade & Slide Up */
@keyframes shiftBannerFade {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Shift Status Strip (below header, sticky) ===== */
.shift-status-strip {
    position: sticky;
    top: var(--navbar-height, 75px);
    z-index: 50;
    padding: 6px 10px;
    background: rgba(15, 23, 42, 0.30);
    /* subtle dark glass */
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.shift-status-strip__inner {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 28px;
}

/* ===== Shift Badge (pill) ===== */
.shift-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    /* pill size */
    border-radius: 999px;
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 0.25px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    white-space: nowrap;
}

.shift-badge--open {
    color: #052e2b;
    background: rgba(45, 212, 191, 0.92);
}

.shift-badge--closed {
    color: #fff;
    background: rgba(239, 68, 68, 0.92);
}

/* helper text below pill */
.shift-badge__hint {
    display: block;
    margin-top: 4px;
    font-weight: 400;
    opacity: 0.85;
    font-size: 11px;
    text-align: center;
}

/* ===== Info Density ~15% (tune safely) ===== */
.cs-header,
.cs-item,
.form-section-compact {
    padding: 13px !important;
}

.form-group-compact {
    margin-bottom: 10px !important;
}

/* Mobile tweaks */
@media (max-width: 480px) {
    .shift-banner {
        padding: 7px 14px;
        border-radius: 12px;
        margin: 8px auto 10px;
        width: calc(100% - 16px);
    }

    .shift-banner__icon {
        font-size: 18px;
    }

    .shift-banner__title {
        font-size: 16px;
    }

    .shift-status-strip {
        padding: 6px 8px;
        top: var(--header-height, 70px);
    }

    .shift-badge {
        font-size: 11px;
        padding: 4px 10px;
    }

    .shift-badge__hint {
        font-size: 11px;
    }
}

@media (max-width: 370px) {
    .shift-status-strip {
        top: var(--header-height, 70px);
    }

    /* Matches .premium-navbar responsive height */
}

/* --- PREMIUM NOTIFICATION BANNER (Singleton) --- */
#global-notify-slot {
    position: fixed;
    top: 90px;
    left: 0;
    right: 0;
    z-index: 10001;
    display: flex;
    justify-content: center;
    pointer-events: none;
    /* Allow clicks through empty slot */
    padding: 0 15px;
}

.notification-banner {
    pointer-events: auto;
    /* Enable clicks for the banner */
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 500px;
    height: 48px;
    padding: 0 20px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #1e293b;
    font-weight: 600;
    font-size: 0.95rem;
    animation: notify-enter 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    transition: all 0.3s ease;
}

.notification--success {
    border-left: 4px solid #4ade80;
}

.notification--error {
    border-left: 4px solid #f87171;
}

.notification--warning {
    border-left: 4px solid #fbbf24;
}

.notification--info {
    border-left: 4px solid #60a5fa;
}

.notify-icon {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
}

.notify-body {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notify-close {
    background: transparent !important;
    border: none !important;
    color: #94a3b8 !important;
    font-size: 1.4rem !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin-left: 5px !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    transform: none !important;
}

.notify-close:hover {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #64748b !important;
}

.notification--exit {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    pointer-events: none;
}

@keyframes notify-enter {
    from {
        transform: translateY(-30px) scale(0.9);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@media (max-width: 480px) {
    #global-notify-slot {
        top: 85px;
    }

    .notification-banner {
        width: 100%;
        max-width: 100%;
        font-size: 0.9rem;
        height: 44px;
    }
}