@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=Playfair+Display:ital,wght@0,600;0,700;1,600&display=swap');

:root {
    /* Core Brand Palette - Luxury Botanical & Artisan Espresso */
    --basera-pista-green: #4E7D38;
    --basera-pista-dark: #1A2A16;
    --basera-pista-darker: #121E0F;
    --basera-pista-light: #EDF5E8;
    --basera-pista-hover: #5E9444;

    --basera-golden-brown: #B47129;
    --basera-golden-hover: #C88235;
    --basera-golden-gold: #D69E4E;
    --basera-golden-light: #FBF5EB;
    --basera-coffee-brown: #5A3510;

    /* Aliases for all views */
    --pista-green: var(--basera-pista-green);
    --pista-dark: var(--basera-pista-dark);
    --golden-brown: var(--basera-golden-brown);
    --beige-light: #F8F5EE;

    /* Surfaces & Borders */
    --basera-bg: #F5F2EA;
    --basera-card-bg: #FFFFFF;
    --basera-surface-alt: #EFECE2;
    --basera-border: #E2DBD0;
    --basera-border-Warm: rgba(180, 113, 41, 0.16);

    /* Typography & Semantic Colors */
    --basera-text-primary: #1F241D;
    --basera-text-secondary: #4A5246;
    --basera-text-muted: #767C72;
    --basera-danger: #D93829;
    --basera-success: #2E7D32;
    --basera-warning: #D97706;
    --basera-info: #0284C7;

    /* Elevation Shadows */
    --shadow-xs: 0 1px 3px rgba(26, 42, 22, 0.05);
    --shadow-sm: 0 4px 14px -2px rgba(26, 42, 22, 0.06), 0 2px 6px -1px rgba(180, 113, 41, 0.04);
    --shadow-md: 0 10px 25px -5px rgba(26, 42, 22, 0.09), 0 4px 10px -2px rgba(180, 113, 41, 0.05);
    --shadow-lg: 0 20px 40px -10px rgba(26, 42, 22, 0.14);
    --shadow-glow-green: 0 6px 18px rgba(78, 125, 56, 0.32);
    --shadow-glow-gold: 0 6px 18px rgba(180, 113, 41, 0.30);
}

/* Base Body & Typography */
body {
    background-color: var(--basera-bg);
    background-image: 
        radial-gradient(at 0% 0%, rgba(78, 125, 56, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(214, 158, 78, 0.07) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--basera-text-primary);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.015em;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
}
::-webkit-scrollbar-thumb {
    background: rgba(78, 125, 56, 0.35);
    border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(78, 125, 56, 0.6);
}

/* ==========================================================================
   SIDEBAR NAVIGATION (Luxury Dark Botanical Theme)
   ========================================================================== */
.basera-sidebar {
    width: 262px;
    background: linear-gradient(180deg, #152212 0%, #1F311A 50%, #142010 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
    border-right: 1px solid rgba(214, 158, 78, 0.18);
    z-index: 1000;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
}

.basera-body-shell {
    margin-left: 262px;
    width: calc(100% - 262px);
    min-height: 100vh;
}

.basera-sidebar .brand-header {
    padding: 20px 18px 16px 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(214, 158, 78, 0.06) 100%);
    border-bottom: 1px solid rgba(214, 158, 78, 0.2);
    display: flex;
    align-items: center;
    gap: 13px;
}

.basera-sidebar .brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    padding: 2px;
    border: 2px solid var(--basera-golden-gold);
    box-shadow: 0 0 16px rgba(214, 158, 78, 0.35);
    transition: transform 0.25s ease;
}

.basera-sidebar .brand-logo:hover {
    transform: scale(1.06) rotate(3deg);
}

.basera-sidebar .brand-title {
    color: #FFFFFF;
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: 1.12rem;
    line-height: 1.2;
    letter-spacing: 0.2px;
}

.basera-sidebar .brand-tagline {
    color: #E8C68A;
    font-size: 0.73rem;
    font-style: italic;
    margin-top: 2px;
    opacity: 0.92;
}

.basera-nav {
    list-style: none;
    padding: 12px 0;
    margin: 0;
    flex-grow: 1;
    overflow-y: auto;
}

.basera-nav-item {
    margin: 4px 12px;
}

.basera-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.89rem;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    border: 1px solid transparent;
}

.basera-nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
    transform: translateX(3px);
    border-color: rgba(214, 158, 78, 0.2);
}

.basera-nav-link.active {
    background: linear-gradient(135deg, #52853B 0%, #3A6128 100%);
    color: #FFFFFF;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(214, 158, 78, 0.45);
}

.basera-nav-link.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 20%;
    height: 60%;
    width: 4px;
    background: var(--basera-golden-gold);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 8px var(--basera-golden-gold);
}

.basera-nav-icon {
    font-size: 1.12rem;
    width: 24px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.75rem;
}

/* ==========================================================================
   GLASSMORPHIC STICKY HEADER BAR
   ========================================================================== */
.basera-header {
    background: linear-gradient(135deg, #D5E8C8 0%, #E7E0C8 50%, #F0D9B8 100%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    min-height: 90px;
    height: auto;
    border-bottom: 1.5px solid rgba(180, 113, 41, 0.36);
    box-shadow: 0 4px 16px rgba(26, 42, 22, 0.08), inset 0 -1px 0 rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    position: sticky;
    top: 0;
    z-index: 999;
}

.basera-header-title {
    font-size: 1.28rem;
    font-weight: 800;
    color: var(--basera-pista-dark);
    margin: 0;
    letter-spacing: -0.02em;
}

.basera-clock-pill {
    background: #F6F4ED;
    border: 1px solid #E2DBD0;
    border-radius: 50px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--basera-text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.live-dot {
    width: 8px;
    height: 8px;
    background-color: #22C55E;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
    animation: pulseLive 2s infinite;
}

@keyframes pulseLive {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
    70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.basera-user-badge {
    background: linear-gradient(135deg, #FFFFFF 0%, #FDFBF6 100%);
    border: 1.5px solid rgba(180, 113, 41, 0.32);
    border-radius: 50px;
    padding: 6px 18px 6px 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 14px rgba(42, 30, 15, 0.07), inset 0 1px 0 #FFFFFF;
    transition: all 0.2s ease;
}

.basera-user-badge:hover {
    border-color: rgba(180, 113, 41, 0.52);
    box-shadow: 0 6px 18px rgba(42, 30, 15, 0.11), inset 0 1px 0 #FFFFFF;
}

.basera-user-avatar {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #C07A2E 0%, #784814 100%);
    border: 2px solid #F3DEC0;
    color: #FFFFFF;
    font-weight: 800;
    font-size: 1.02rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(120, 72, 20, 0.26);
}

.basera-user-status-dot {
    position: absolute;
    bottom: 0px;
    right: 0px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #22C55E;
    border: 2px solid #FFFFFF;
}

.basera-user-info {
    line-height: 1.25;
    gap: 3px;
}

.basera-user-name {
    font-size: 0.92rem;
    font-weight: 800;
    color: #1A2A16;
    letter-spacing: -0.01em;
}

.basera-user-role-pill {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 50px;
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
    color: #047857;
    border: 1px solid #A7F3D0;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.basera-outlet-switch-wrap,
.basera-user-branch {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.81rem;
    font-weight: 600;
    color: #5C3A1D;
}

.basera-outlet-icon {
    color: #B47129;
    font-size: 0.78rem;
    flex-shrink: 0;
}

.basera-outlet-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: none;
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16' fill='none' stroke='%23784814' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 2px center;
    background-size: 12px 12px;
    padding: 1px 20px 1px 0;
    font-size: 0.82rem;
    font-weight: 700;
    color: #5C3A1D;
    cursor: pointer;
    outline: none;
    min-width: 130px;
    max-width: 230px;
    text-overflow: ellipsis;
}

.basera-outlet-select:hover,
.basera-outlet-select:focus {
    color: #2E4B22;
}

/* ==========================================================================
   MAIN CONTENT AREA & CARDS
   ========================================================================== */
.basera-main {
    flex-grow: 1;
    padding: 24px 28px;
    position: relative;
}

.basera-watermark-backdrop {
    position: fixed;
    top: 52%;
    left: 56%;
    transform: translate(-50%, -50%);
    width: 420px;
    height: 420px;
    background-image: url('/images/logo.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.06;
    pointer-events: none;
    z-index: 0;
}

.basera-card,
.card {
    background-color: var(--basera-card-bg);
    border: 1px solid var(--basera-border-Warm);
    border-radius: 14px !important;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    position: relative;
    z-index: 2;
}

.basera-card {
    padding: 20px;
}

.card-header {
    border-top-left-radius: 14px !important;
    border-top-right-radius: 14px !important;
    border-bottom: 1px solid rgba(180, 113, 41, 0.12);
}

.basera-metric-card,
.stat-card {
    background: linear-gradient(180deg, #FFFFFF 0%, #FDFBF7 100%);
    border: 1px solid rgba(180, 113, 41, 0.18);
    border-radius: 14px !important;
    padding: 16px 18px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.basera-metric-card:hover,
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* ==========================================================================
   PREMIUM DATA TABLES
   ========================================================================== */
.basera-table,
.table:not(.table-borderless) {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #FFFFFF;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(180, 113, 41, 0.2);
    box-shadow: var(--shadow-xs);
    margin-bottom: 0;
}

.basera-table thead,
.basera-table thead tr,
.table:not(.table-borderless) thead,
.table:not(.table-borderless) thead tr {
    background: linear-gradient(90deg, #1F331A 0%, #3E632D 55%, #A66A25 100%) !important;
}

.basera-table thead th,
.table:not(.table-borderless) thead th {
    background: transparent !important;
    background-color: transparent !important;
    color: #FFFFFF !important;
    font-weight: 700;
    font-size: 0.83rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 13px 14px;
    border: none;
    border-bottom: 2px solid #D69E4E;
    vertical-align: middle;
}

.basera-table tbody td,
.table:not(.table-borderless) tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid #EFEAE0;
    font-size: 0.9rem;
    color: var(--basera-text-primary);
    vertical-align: middle;
    transition: background-color 0.15s ease;
}

.basera-table tbody tr:last-child td,
.table tbody tr:last-child td {
    border-bottom: none;
}

.basera-table tbody tr:nth-child(even) {
    background-color: #FCFBF9;
}

.basera-table tbody tr:hover td,
.table-hover tbody tr:hover td {
    background-color: #F2F7EE !important;
}

/* ==========================================================================
   PREMIUM BUTTONS & CONTROLS
   ========================================================================== */
.btn {
    border-radius: 9px;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-basera-primary,
.btn-primary,
.btn-success {
    background: linear-gradient(135deg, #54883C 0%, #396127 100%);
    color: #FFFFFF !important;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 3px 10px rgba(57, 97, 39, 0.22);
}

.btn-basera-primary:hover,
.btn-primary:hover,
.btn-success:hover {
    background: linear-gradient(135deg, #609946 0%, #43702E 100%);
    color: #FFFFFF !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow-green);
}

.btn-basera-secondary,
.btn-warning {
    background: linear-gradient(135deg, #C68035 0%, #9E5E1B 100%);
    color: #FFFFFF !important;
    border: none;
    box-shadow: 0 3px 10px rgba(158, 94, 27, 0.22);
}

.btn-basera-secondary:hover,
.btn-warning:hover {
    background: linear-gradient(135deg, #D48C3E 0%, #AD6922 100%);
    color: #FFFFFF !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow-gold);
}

.btn-basera-outline,
.btn-outline-secondary {
    background: #FFFFFF;
    border: 1px solid #D5CEC0;
    color: var(--basera-text-primary);
    font-weight: 600;
}

.btn-basera-outline:hover,
.btn-outline-secondary:hover {
    background: #F7F4EC;
    border-color: var(--basera-pista-green);
    color: var(--basera-pista-dark);
}

/* Inputs & Selects */
.form-control,
.form-select {
    border-radius: 9px;
    border: 1px solid #D8D0C2;
    background-color: #FFFFFF;
    padding: 0.52rem 0.85rem;
    font-size: 0.9rem;
    color: var(--basera-text-primary);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--basera-pista-green);
    box-shadow: 0 0 0 3.5px rgba(78, 125, 56, 0.16);
    background-color: #FFFFFF;
}

.input-group-text {
    border-radius: 9px;
    border-color: #D8D0C2;
    background-color: #F9F7F2;
    color: var(--basera-golden-brown);
}

/* Badges */
.badge {
    padding: 0.42em 0.78em;
    font-weight: 600;
    border-radius: 6px;
    letter-spacing: 0.02em;
}

/* Navigation Pills */
.nav-pills .nav-link {
    border-radius: 10px;
    font-weight: 600;
    color: var(--basera-text-secondary);
    padding: 8px 18px;
    transition: all 0.2s ease;
}

.nav-pills .nav-link.active {
    background: linear-gradient(135deg, #54883C 0%, #396127 100%) !important;
    color: #FFFFFF !important;
    box-shadow: var(--shadow-glow-green);
}

/* ==========================================================================
   POS SCREEN & ARTISAN MENU CARDS
   ========================================================================== */
.pos-categories-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
    margin-bottom: 14px;
}

.pos-categories-bar::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.pos-cat-pill {
    padding: 5px 13px;
    border-radius: 50px;
    background: #FFFFFF;
    border: 1px solid #DDD5C7;
    color: var(--basera-text-secondary);
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-xs);
}

.pos-cat-pill:hover {
    border-color: var(--basera-pista-green);
    color: var(--basera-pista-dark);
    transform: translateY(-1px);
}

.pos-cat-pill.active {
    background: linear-gradient(135deg, #52853B 0%, #365B24 100%);
    color: #FFFFFF;
    border-color: transparent;
    box-shadow: var(--shadow-glow-green);
}

.pos-item-card {
    background: #FFFFFF;
    border: 2px solid #10B981;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
    height: 100%;
    min-height: 228px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 6px 18px -4px rgba(15, 23, 42, 0.08), inset 0 4px 0 0 #059669;
}

.pos-item-card:hover {
    transform: translateY(-6px) scale(1.015);
}

.pos-item-img {
    height: 146px;
    background: linear-gradient(135deg, #FAF8F3 0%, #F2EDE2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: 1.5px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.pos-item-img img {
    max-height: 130px;
    max-width: 92%;
    object-fit: contain;
    transition: transform 0.32s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.pos-item-card:hover .pos-item-img img {
    transform: scale(1.1);
}

/* 6 Colorful Border & Header Accent Themes for POS Item Blocks */
.pos-item-card.pos-color-0 {
    border-color: #10B981 !important;
    box-shadow: 0 8px 20px -4px rgba(16, 185, 129, 0.16), inset 0 4px 0 0 #059669 !important;
}
.pos-item-card.pos-color-0 .pos-item-img {
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
    border-bottom-color: #A7F3D0;
}
.pos-item-card.pos-color-0:hover {
    box-shadow: 0 14px 28px -4px rgba(16, 185, 129, 0.28), inset 0 4px 0 0 #059669 !important;
}

.pos-item-card.pos-color-1 {
    border-color: #F59E0B !important;
    box-shadow: 0 8px 20px -4px rgba(245, 158, 11, 0.18), inset 0 4px 0 0 #D97706 !important;
}
.pos-item-card.pos-color-1 .pos-item-img {
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
    border-bottom-color: #FDE68A;
}
.pos-item-card.pos-color-1:hover {
    box-shadow: 0 14px 28px -4px rgba(245, 158, 11, 0.3), inset 0 4px 0 0 #D97706 !important;
}

.pos-item-card.pos-color-2 {
    border-color: #3B82F6 !important;
    box-shadow: 0 8px 20px -4px rgba(59, 130, 246, 0.16), inset 0 4px 0 0 #2563EB !important;
}
.pos-item-card.pos-color-2 .pos-item-img {
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    border-bottom-color: #BFDBFE;
}
.pos-item-card.pos-color-2:hover {
    box-shadow: 0 14px 28px -4px rgba(59, 130, 246, 0.28), inset 0 4px 0 0 #2563EB !important;
}

.pos-item-card.pos-color-3 {
    border-color: #EC4899 !important;
    box-shadow: 0 8px 20px -4px rgba(236, 72, 153, 0.16), inset 0 4px 0 0 #DB2777 !important;
}
.pos-item-card.pos-color-3 .pos-item-img {
    background: linear-gradient(135deg, #FDF2F8 0%, #FCE7F3 100%);
    border-bottom-color: #FBCFE8;
}
.pos-item-card.pos-color-3:hover {
    box-shadow: 0 14px 28px -4px rgba(236, 72, 153, 0.28), inset 0 4px 0 0 #DB2777 !important;
}

.pos-item-card.pos-color-4 {
    border-color: #8B5CF6 !important;
    box-shadow: 0 8px 20px -4px rgba(139, 92, 246, 0.16), inset 0 4px 0 0 #7C3AED !important;
}
.pos-item-card.pos-color-4 .pos-item-img {
    background: linear-gradient(135deg, #F5F3FF 0%, #EDE9FE 100%);
    border-bottom-color: #DDD6FE;
}
.pos-item-card.pos-color-4:hover {
    box-shadow: 0 14px 28px -4px rgba(139, 92, 246, 0.28), inset 0 4px 0 0 #7C3AED !important;
}

.pos-item-card.pos-color-5 {
    border-color: #06B6D4 !important;
    box-shadow: 0 8px 20px -4px rgba(6, 182, 212, 0.16), inset 0 4px 0 0 #0891B2 !important;
}
.pos-item-card.pos-color-5 .pos-item-img {
    background: linear-gradient(135deg, #ECFEFF 0%, #CFFAFE 100%);
    border-bottom-color: #A5F3FC;
}
.pos-item-card.pos-color-5:hover {
    box-shadow: 0 14px 28px -4px rgba(6, 182, 212, 0.28), inset 0 4px 0 0 #0891B2 !important;
}

/* Modals */
.modal-content {
    border-radius: 18px !important;
    border: 1px solid rgba(214, 158, 78, 0.25);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, #1A2A16 0%, #2F4B25 100%);
    color: #FFFFFF;
    border-bottom: 2px solid var(--basera-golden-gold);
    padding: 16px 22px;
}

.modal-header .modal-title {
    font-weight: 700;
    color: #FFFFFF !important;
}

.modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* ==========================================================================
   COLORFUL ORDER HISTORY BLOCKS & LOGO WATERMARK
   ========================================================================== */
.order-history-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px !important;
    background: #FFFFFF;
    font-size: 0.82rem;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease;
}

.order-history-card:hover {
    transform: translateY(-3px);
}

.order-history-card:hover .order-card-watermark {
    transform: translate(-50%, -50%) scale(1.06);
    opacity: 0.38 !important;
}

/* Centered Circular Logo Watermark inside each Order Card & Screen (No outer square) */
.basera-watermark-backdrop {
    position: fixed;
    top: 52%;
    left: calc(50% + 131px);
    transform: translate(-50%, -50%);
    width: 340px;
    height: 340px;
    border-radius: 50% !important;
    clip-path: circle(48.2% at 50% 50%);
    background-image: url('/images/logo.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 103% 103%;
    border: 2px solid rgba(92, 114, 54, 0.5);
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: 0;
}

.order-card-watermark {
    position: absolute;
    top: 52%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 118px;
    height: 118px;
    border-radius: 50% !important;
    clip-path: circle(48.2% at 50% 50%);
    background-image: url('/images/logo.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 103% 103%;
    border: 2px solid rgba(92, 114, 54, 0.65);
    box-shadow: inset 0 0 0 1.5px rgba(214, 158, 78, 0.55);
    opacity: 0.32 !important;
    mix-blend-mode: multiply;
    filter: contrast(1.22) saturate(1.28);
    pointer-events: none;
    z-index: 1;
    transition: transform 0.28s ease, opacity 0.28s ease;
}

.order-history-card .card-header,
.order-history-card .card-body,
.order-history-card .card-footer {
    position: relative;
    z-index: 2;
}

.order-items-glass {
    background: rgba(255, 255, 255, 0.26) !important;
    border: 1px dashed rgba(71, 85, 105, 0.32) !important;
    border-radius: 8px;
}

/* 1. Running / Unpaid Blue-Indigo Theme */
.order-theme-running {
    border: 2px solid #3B82F6 !important;
    box-shadow: 0 8px 24px -4px rgba(59, 130, 246, 0.16), inset 0 4px 0 0 #2563EB !important;
}
.order-theme-running .card-header {
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%) !important;
    border-bottom: 1.5px solid #BFDBFE !important;
}

/* 2. Kitchen / Served Amber-Orange Theme */
.order-theme-kitchen {
    border: 2px solid #F59E0B !important;
    box-shadow: 0 8px 24px -4px rgba(245, 158, 11, 0.18), inset 0 4px 0 0 #D97706 !important;
}
.order-theme-kitchen .card-header {
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%) !important;
    border-bottom: 1.5px solid #FDE68A !important;
}

/* 3. Completed / Paid Emerald-Gold Theme */
.order-theme-completed {
    border: 2px solid #10B981 !important;
    box-shadow: 0 8px 24px -4px rgba(16, 185, 129, 0.16), inset 0 4px 0 0 #059669 !important;
}
.order-theme-completed .card-header {
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%) !important;
    border-bottom: 1.5px solid #A7F3D0 !important;
}

/* 4. Cancelled / Deleted Crimson-Rose Theme */
.order-theme-cancelled {
    border: 2px solid #EF4444 !important;
    box-shadow: 0 8px 24px -4px rgba(239, 68, 68, 0.15), inset 0 4px 0 0 #DC2626 !important;
}
.order-theme-cancelled .card-header {
    background: linear-gradient(135deg, #FEF2F2 0%, #FEE2E2 100%) !important;
    border-bottom: 1.5px solid #FECACA !important;
}

/* ==========================================================================
   THERMAL PRINT LAYOUT (80mm & 58mm)
   ========================================================================== */
@media print {
    body {
        background: #FFFFFF !important;
        background-image: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .no-print, .basera-sidebar, .basera-header {
        display: none !important;
    }

    .thermal-receipt {
        width: 78mm !important;
        max-width: 78mm !important;
        margin: 0 auto !important;
        padding: 4px !important;
        font-family: 'Segoe UI', monospace !important;
        font-size: 11px !important;
        color: #000000 !important;
        border: none !important;
    }
}

/* ==========================================================================
   POS DRAGGABLE SPLIT-PANE RESIZER (ITEMS <-> CART)
   ========================================================================== */
.pos-split-container {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
    gap: 0;
    position: relative;
}

.pos-items-pane {
    width: 68%;
    min-width: 38%;
    max-width: 82%;
    flex-shrink: 0;
    transition: none;
}

.pos-cart-pane {
    flex: 1 1 auto;
    min-width: 245px;
    transition: none;
}

/* Auto-fill responsive grid so sliding Items pane wider fits more columns automatically */
#posMenuGrid.pos-dynamic-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)) !important;
    gap: 16px !important;
    margin: 0 !important;
}

#posMenuGrid.pos-dynamic-grid > .pos-item-wrapper {
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Center Vertical Draggable Slider Handle */
.pos-split-resizer {
    width: 16px;
    cursor: col-resize;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    user-select: none;
    z-index: 20;
    flex-shrink: 0;
    margin: 0 2px;
}

.pos-split-resizer::before {
    content: "";
    position: absolute;
    top: 12px;
    bottom: 12px;
    width: 4px;
    border-radius: 4px;
    background: linear-gradient(180deg, rgba(58, 93, 44, 0.22) 0%, rgba(214, 158, 78, 0.55) 50%, rgba(58, 93, 44, 0.22) 100%);
    transition: width 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.pos-split-resizer:hover::before,
.pos-split-resizer.dragging::before {
    width: 6px;
    background: linear-gradient(180deg, #3A5D2C 0%, #D69E4E 50%, #3A5D2C 100%);
    box-shadow: 0 0 12px rgba(214, 158, 78, 0.65);
}

.pos-resizer-handle {
    width: 22px;
    height: 54px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1E3119 0%, #3A5D2C 100%);
    border: 1.5px solid #D69E4E;
    color: #FFE082;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    z-index: 2;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.pos-split-resizer:hover .pos-resizer-handle,
.pos-split-resizer.dragging .pos-resizer-handle {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(214, 158, 78, 0.45);
}

body.pos-resizing-active {
    cursor: col-resize !important;
    user-select: none !important;
}

/* ==========================================================================
   RESPONSIVE DESIGN SYSTEM (MOBILE: 320-767px | TABLET: 768-1023px | DESKTOP: 1024px+)
   ========================================================================== */

/* Global horizontal overflow prevention */
html, body {
    max-width: 100%;
    overflow-x: clip;
}

img, svg, video, canvas {
    max-width: 100%;
}

@media print {
    .basera-body-shell {
        margin-left: 0 !important;
        width: 100% !important;
    }
}

/* Desktop defaults (>= 1024px): Hide mobile/tablet hamburger & drawer controls */
.basera-menu-toggle,
.basera-sidebar-close,
.basera-sidebar-backdrop {
    display: none;
}

/* Ensure all table wrappers scroll smoothly inside their container without scrolling the page */
.table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* --------------------------------------------------------------------------
   TABLET & MOBILE SHARED (< 1024px : 320px – 1023.98px)
   -------------------------------------------------------------------------- */
@media (max-width: 1023.98px) {
    .basera-body-shell {
        margin-left: 0 !important;
        width: 100% !important;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    /* Watermark constrained to viewport */
    .basera-watermark-backdrop {
        left: 50% !important;
        width: min(260px, 75vw) !important;
        height: min(260px, 75vw) !important;
    }

    /* Off-Canvas Collapsible Sidebar Drawer */
    .basera-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        height: 100vh !important;
        width: 272px !important;
        max-width: 84vw !important;
        z-index: 1055 !important;
        transform: translateX(-104%);
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 10px 0 32px rgba(0, 0, 0, 0.45) !important;
    }

    .basera-sidebar.show {
        transform: translateX(0);
    }

    /* Backdrop Overlay */
    .basera-sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 24, 12, 0.58);
        backdrop-filter: blur(3px);
        z-index: 1050;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s ease, visibility 0.25s ease;
    }

    .basera-sidebar-backdrop.show {
        opacity: 1;
        visibility: visible;
    }

    /* Hamburger Toggle Button in Header */
    .basera-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        border-radius: 10px;
        border: 1.5px solid rgba(58, 93, 44, 0.28);
        background: #FFFFFF;
        color: var(--basera-pista-dark);
        font-size: 1.05rem;
        flex-shrink: 0;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
        transition: all 0.18s ease;
    }

    .basera-menu-toggle:hover,
    .basera-menu-toggle:active {
        background: var(--basera-pista-green);
        color: #FFFFFF;
        border-color: var(--basera-pista-green);
    }

    /* Close Button Inside Sidebar Brand Header */
    .basera-sidebar-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.22);
        background: rgba(255, 255, 255, 0.1);
        color: #FFE082;
        font-size: 0.95rem;
        flex-shrink: 0;
        margin-left: auto;
    }

    /* POS Split Container: Stack Items & Cart vertically on Tablet & Mobile */
    .pos-split-container {
        flex-direction: column !important;
        gap: 16px !important;
    }

    .pos-items-pane,
    .pos-cart-pane {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .pos-split-resizer {
        display: none !important;
    }

    #posCartPane > .basera-card {
        min-height: auto !important;
    }

    #posMenuGrid {
        max-height: 60vh !important;
    }
}

/* --------------------------------------------------------------------------
   TABLET BREAKPOINT (768px – 1023.98px)
   -------------------------------------------------------------------------- */
@media (min-width: 768px) and (max-width: 1023.98px) {
    .basera-header {
        height: auto;
        min-height: 78px;
        padding: 12px 18px;
    }

    .basera-header-title {
        font-size: 1.15rem;
    }

    .basera-main {
        padding: 18px 20px;
    }

    #posMenuGrid.pos-dynamic-grid {
        grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)) !important;
        gap: 12px !important;
    }
}

/* --------------------------------------------------------------------------
   MOBILE BREAKPOINT (320px – 767.98px)
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    .basera-header {
        height: auto !important;
        min-height: 68px;
        padding: 11px 12px !important;
        gap: 8px;
    }

    .basera-header-title {
        font-size: 0.98rem !important;
    }

    .basera-user-badge {
        padding: 4px !important;
        border-radius: 50% !important;
    }

    .basera-main {
        padding: 12px 10px !important;
    }

    .basera-card {
        padding: 14px 12px !important;
        border-radius: 14px;
    }

    .basera-metric-card {
        padding: 12px 14px !important;
        border-radius: 12px;
    }

    /* POS Items Grid on Mobile (2 columns on standard phones, 1 column on 320px) */
    #posMenuGrid.pos-dynamic-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
        gap: 10px !important;
        max-height: 54vh !important;
    }

    .pos-item-img {
        height: 96px !important;
    }

    .pos-item-card .p-3 {
        padding: 10px !important;
    }

    .pos-cat-pill {
        padding: 7px 13px !important;
        font-size: 0.8rem !important;
    }

    /* Tables horizontal scroll inside card */
    .basera-table th,
    .basera-table td,
    .table th,
    .table td {
        white-space: nowrap;
        padding: 9px 10px;
        font-size: 0.82rem;
    }

    #cartTable th,
    #cartTable td {
        white-space: normal;
        padding: 6px 4px;
    }

    /* Modals fit 100% inside mobile screen without overflow */
    .modal-dialog {
        margin: 8px !important;
        max-width: calc(100vw - 16px) !important;
    }

    .modal-content {
        border-radius: 14px;
    }

    /* Add Items Modal left pane border fix when stacked on mobile */
    #addItemsOrderModal .border-end {
        border-right: none !important;
        border-bottom: 1px solid #E2E8F0 !important;
        padding-bottom: 12px;
        margin-bottom: 8px;
    }

    /* Navigation pills & button groups wrap cleanly */
    .nav-pills {
        flex-wrap: wrap;
        gap: 6px;
    }

    .nav-pills .nav-link {
        font-size: 0.82rem;
        padding: 6px 12px;
    }
}

/* Extra-small Mobile screens (320px – 359px) */
@media (max-width: 359.98px) {
    #posMenuGrid.pos-dynamic-grid {
        grid-template-columns: 1fr !important;
    }

    .basera-header-title {
        font-size: 0.88rem !important;
    }
}