/* style.css - Premium Glassmorphism Design System for Jam Diana POS */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Space+Mono:wght@400;700&display=swap');

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #121220;
    --glass-bg: rgba(30, 30, 50, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.03);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --primary: #6366f1; /* Indigo */
    --primary-glow: rgba(99, 102, 241, 0.15);
    --secondary: #06b6d4; /* Cyan */
    --secondary-glow: rgba(6, 182, 212, 0.15);
    
    --success: #10b981; /* Emerald */
    --warning: #f59e0b; /* Amber */
    --danger: #f43f5e; /* Rose */
    
    --sidebar-width: 260px;
    --bottombar-height: 65px;
    --header-height: 70px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    
    --shadow-main: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.25);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.12) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ----------------------------------------------------
   LAYOUT DESIGN
   ---------------------------------------------------- */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar for desktop/laptop */
.sidebar {
    width: var(--sidebar-width);
    background: var(--glass-bg);
    border-right: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    transition: var(--transition);
    overflow: hidden;
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid var(--glass-border);
}

.shop-logo {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-category-header {
    padding: 12px 16px 4px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    user-select: none;
}

.sidebar-menu {
    list-style: none;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.menu-item a {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    border: 1px solid transparent;
}

.menu-item a:hover {
    color: var(--text-primary);
    background: var(--glass-highlight);
    border-color: rgba(255,255,255,0.03);
}

.menu-item.active a {
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--primary-glow), var(--secondary-glow));
    border-color: var(--glass-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    font-size: 1.1rem;
    box-shadow: var(--shadow-glow);
}

.user-info {
    flex-grow: 1;
    overflow: hidden;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: capitalize;
}

.logout-btn {
    background: transparent;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.logout-btn:hover {
    background: rgba(244, 63, 94, 0.1);
}

/* Floating Bottom Bar for Mobile */
.bottom-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottombar-height);
    background: var(--glass-bg);
    border-top: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 100;
}

.bottom-menu {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100%;
    list-style: none;
    padding: 0 8px;
}

.bottom-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.bottom-item.active a {
    color: var(--secondary);
    transform: translateY(-2px);
}

.bottom-item a svg {
    width: 20px;
    height: 20px;
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    padding: 24px;
    min-height: 100vh;
    padding-bottom: 40px;
    transition: var(--transition);
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 800;
}

.page-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ----------------------------------------------------
   DESIGN COMPONENTS (CARDS, BUTTONS, MODALS)
   ---------------------------------------------------- */
.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-main);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* Glow Accent for Cards */
.card-glow {
    position: relative;
    overflow: hidden;
}
.card-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    color: #fff;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: var(--shadow-glow);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.4);
}

.btn-success {
    background: var(--success);
}
.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.btn-danger {
    background: var(--danger);
}
.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(244, 63, 94, 0.3);
}

.btn-warning {
    background: var(--warning);
    color: #000;
}
.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
}

.btn-outline {
    background: transparent;
    border-color: var(--glass-border);
    color: var(--text-primary);
}
.btn-outline:hover {
    background: var(--glass-highlight);
    border-color: var(--text-secondary);
}

/* Form Controls */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

select.form-control {
    cursor: pointer;
}

select.form-control option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(8px);
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-main);
    animation: modalShow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid var(--glass-border);
}

@keyframes modalShow {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ----------------------------------------------------
   LOGIN MODULE
   ---------------------------------------------------- */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    background-image: radial-gradient(circle at center, rgba(99, 102, 241, 0.15) 0%, transparent 60%);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.login-card {
    width: 100%;
    max-width: 420px;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 30px;
}

/* ----------------------------------------------------
   DASHBOARD KPI & METRICS
   ---------------------------------------------------- */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.kpi-card {
    display: flex;
    align-items: center;
    gap: 20px;
}

.kpi-icon-box {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.kpi-icon-box.purple {
    background: linear-gradient(135deg, #8b5cf6, #c084fc);
}
.kpi-icon-box.cyan {
    background: linear-gradient(135deg, #06b6d4, #67e8f9);
}
.kpi-icon-box.emerald {
    background: linear-gradient(135deg, #10b981, #34d399);
}
.kpi-icon-box.amber {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.kpi-val {
    font-size: 1.5rem;
    font-weight: 800;
    margin-top: 2px;
}

.kpi-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Charts Grid */
.dashboard-details-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

/* ----------------------------------------------------
   POS PAGE (SALES WORKFLOW)
   ---------------------------------------------------- */
.pos-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    height: calc(100vh - 120px);
}

.pos-catalog {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
}

.catalog-search-bar {
    display: flex;
    gap: 12px;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    overflow-y: auto;
    padding-bottom: 20px;
    flex-grow: 1;
}

.product-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: var(--transition);
}

.product-item:hover {
    border-color: var(--secondary);
    background: rgba(6, 182, 212, 0.04);
    transform: translateY(-2px);
}

.product-code {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    color: var(--secondary);
    font-weight: 600;
}

.product-name {
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 6px;
    flex-grow: 1;
}

.product-brand {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 12px;
}

.product-stock {
    font-size: 0.75rem;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stock-tag {
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.stock-tag.in {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}
.stock-tag.low {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}
.stock-tag.out {
    background: rgba(244, 63, 94, 0.15);
    color: var(--danger);
}

/* POS Cart Sidebar */
.pos-cart {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cart-header {
    font-weight: 700;
    font-size: 1.1rem;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-items-list {
    flex-grow: 1;
    overflow-y: auto;
    padding: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    padding: 12px;
    border-radius: var(--radius-sm);
}

.cart-item-info {
    flex-grow: 1;
    padding-right: 12px;
}

.cart-item-name {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
}

.cart-item-price {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.qty-btn:hover {
    background: var(--primary);
}

.cart-item-qty {
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.cart-item-remove {
    background: transparent;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
}

.cart-totals {
    border-top: 1px solid var(--glass-border);
    padding-top: 16px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.total-row.grand {
    font-size: 1.3rem;
    font-weight: 800;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--glass-border);
    color: var(--text-primary);
}

.cart-checkout-btn {
    width: 100%;
    margin-top: 16px;
    padding: 14px;
}

/* ----------------------------------------------------
   SERVICE CENTER (REPAIRS & STATUS WORKFLOW)
   ---------------------------------------------------- */
.service-header-actions {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.service-filter-tabs {
    display: flex;
    background: rgba(0,0,0,0.25);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 4px;
}

.filter-tab {
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    border: none;
    background: transparent;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.filter-tab.active {
    background: var(--glass-bg);
    color: var(--text-primary);
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

/* Service Grid/List */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.service-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--text-muted);
}

.service-card.antri {
    border-left-color: var(--warning);
}
.service-card.proses {
    border-left-color: var(--primary);
}
.service-card.selesai {
    border-left-color: var(--success);
}
.service-card.diambil {
    border-left-color: var(--text-muted);
}

.service-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.service-code {
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--secondary);
}

.service-status-badge {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
}

.status-antri-badge { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.status-proses-badge { background: rgba(99, 102, 241, 0.15); color: var(--primary); }
.status-selesai-badge { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.status-diambil-badge { background: rgba(255, 255, 255, 0.1); color: var(--text-secondary); }

.service-customer {
    margin-top: 12px;
}

.customer-name {
    font-size: 1rem;
    font-weight: 700;
}

.customer-phone {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.service-watch-info {
    margin-top: 12px;
    font-size: 0.85rem;
    background: rgba(255,255,255,0.02);
    padding: 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
}

.watch-model {
    font-weight: 600;
    color: var(--text-primary);
}

.watch-problem {
    color: var(--text-secondary);
    margin-top: 4px;
}

.service-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--glass-border);
}

.service-cost {
    font-size: 1.1rem;
    font-weight: 800;
}

.service-date {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ----------------------------------------------------
   TABLE DESIGN & DATA VIEWS
   ---------------------------------------------------- */
.table-responsive {
    overflow-x: auto;
    width: 100%;
    margin-top: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.table th {
    background: rgba(0, 0, 0, 0.3);
    padding: 14px 16px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--glass-border);
}

.table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
}

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

.table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* ----------------------------------------------------
   REPORTS PAGE
   ---------------------------------------------------- */
.reports-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    margin-bottom: 24px;
}

.report-chart-container {
    height: 320px;
    position: relative;
    margin-top: 20px;
}

/* ----------------------------------------------------
   NOTIFICATION & TOASTS
   ---------------------------------------------------- */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 280px;
    padding: 16px 20px;
    background: rgba(20, 20, 35, 0.9);
    border: 1px solid var(--glass-border);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-main);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: toastIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.success { border-left-color: var(--success); }
.toast.warning { border-left-color: var(--warning); }
.toast.danger { border-left-color: var(--danger); }

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

/* Offline Indicator */
.offline-banner {
    display: none;
    background: var(--danger);
    color: #fff;
    text-align: center;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 4000;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

/* ----------------------------------------------------
   DIRECT THERMAL PRINT STYLING
   ---------------------------------------------------- */
#receipt-print-area {
    display: none;
}

@media print {
    /* Hide everything on screen */
    body * {
        visibility: hidden;
    }
    
    /* Display only the target container */
    #receipt-print-area, #receipt-print-area * {
        visibility: visible;
    }
    
    #receipt-print-area {
        display: block !important;
        position: absolute;
        left: 0;
        top: 0;
        width: 58mm; /* Standard narrow thermal printer width */
        margin: 0;
        padding: 2mm;
        background: #fff !important;
        color: #000 !important;
        font-family: 'Space Mono', 'Courier New', Courier, monospace;
        font-size: 9pt;
        line-height: 1.2;
    }

    .receipt-header, .receipt-footer {
        text-align: center;
        white-space: pre-line;
        margin-bottom: 4mm;
    }
    
    .receipt-title {
        font-weight: bold;
        font-size: 11pt;
        text-transform: uppercase;
        margin-bottom: 2mm;
    }

    .receipt-divider {
        border-top: 1px dashed #000;
        margin: 3mm 0;
    }

    .receipt-line {
        display: flex;
        justify-content: space-between;
    }

    .receipt-item-row {
        margin-bottom: 2mm;
    }
    
    .receipt-item-name {
        font-weight: bold;
    }

    .receipt-item-meta {
        display: flex;
        justify-content: space-between;
        padding-left: 2mm;
    }
}

/* ----------------------------------------------------
   RESPONSIVE MEDIA QUERIES
   ---------------------------------------------------- */

/* Laptop / Desktop */
@media (min-width: 1025px) {
    .main-content {
        margin-left: var(--sidebar-width);
    }
}

/* Tablet (Landscape & Portrait) */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 80px;
    }
    
    /* Shorten Sidebar items for tablet */
    .sidebar {
        width: var(--sidebar-width);
    }
    
    .sidebar-header {
        justify-content: center;
        padding: 0;
    }
    
    .shop-logo span {
        display: none;
    }
    
    .menu-item a {
        justify-content: center;
        padding: 14px 0;
        border-radius: 50%;
        width: 50px;
        height: 50px;
        margin: 0 auto;
    }
    
    .menu-item a span {
        display: none;
    }
    
    .user-info, .sidebar-footer {
        display: none;
    }
    
    .main-content {
        margin-left: var(--sidebar-width);
    }
    
    .pos-layout {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }
    
    .pos-cart {
        height: auto;
        margin-top: 24px;
    }
    
    .dashboard-details-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile Devices (HP) */
@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }
    
    body {
        padding-bottom: var(--bottombar-height);
    }
    
    .sidebar {
        display: none; /* Hide standard sidebar */
    }
    
    .bottom-bar {
        display: block; /* Show floating mobile bottom bar */
    }
    
    .main-content {
        margin-left: 0;
        padding: 16px;
        padding-bottom: 40px;
    }
    
    .main-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .service-header-actions {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .service-filter-tabs {
        width: 100%;
        overflow-x: auto;
    }
    
    .catalog-search-bar {
        flex-direction: column;
    }
    
    .reports-filter {
        flex-direction: column;
        align-items: stretch;
    }
    
    .reports-filter button, .reports-filter input {
        width: 100%;
    }
    
    .modal-content {
        margin-top: 40px;
        max-height: 85vh;
    }
}
