/* Vape & Hookah Accounting System Style Sheet
   Premium Dark Glassmorphism Theme (Vape Lounge Aesthetic)
*/

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-base: #07090e;
    --bg-surface: rgba(15, 23, 42, 0.65);
    --bg-surface-hover: rgba(30, 41, 59, 0.85);
    --border-color: rgba(255, 255, 255, 0.06);
    --border-glow: rgba(59, 130, 246, 0.12);
    
    --primary: #3b82f6; /* Sleek Royal Blue */
    --primary-glow: rgba(59, 130, 246, 0.35);
    --primary-dark: #1e3a8a;
    
    --accent: #f97316; /* Neon Orange */
    --accent-glow: rgba(249, 115, 22, 0.3);
    
    --danger: #ef4444; /* Vibrant Red */
    --danger-glow: rgba(239, 68, 68, 0.25);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dark: #070a13;
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.65);
    --shadow-glow: 0 0 15px var(--primary-glow);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', 'Inter', sans-serif;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 90% 80%, rgba(249, 115, 22, 0.05) 0%, transparent 45%),
        linear-gradient(rgba(255, 255, 255, 0.006) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.006) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 30px 30px, 30px 30px;
    display: flex;
}

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

/* App Containers */
#login-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    position: fixed;
    top: 0;
    left: 0;
    background: radial-gradient(circle at center, #0f172a 0%, #020617 100%);
}

#app-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* LOGIN SCREEN STYLE */
.login-card {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    border-radius: 28px;
    width: 100%;
    max-width: 440px;
    padding: 40px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    text-align: center;
    border-top: 3px solid var(--primary);
    animation: fadeInUp var(--transition-normal);
}

.login-logo {
    font-size: 50px;
    color: var(--primary);
    filter: drop-shadow(0 0 15px var(--primary-glow));
    margin-bottom: 15px;
    animation: float 4s ease-in-out infinite;
}

.login-card h2 {
    font-weight: 800;
    font-size: 26px;
    margin-bottom: 5px;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff 50%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-card p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 30px;
}

/* Form Controls */
.form-group {
    margin-bottom: 22px;
    text-align: right;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    padding-right: 5px;
}

.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-wrapper i {
    position: absolute;
    right: 15px;
    color: var(--text-muted);
    font-size: 16px;
    transition: var(--transition-fast);
}

.form-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 13px 45px 13px 15px;
    color: var(--text-main);
    font-size: 14px;
    transition: var(--transition-fast);
    outline: none;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.15);
}

.form-control:focus + i {
    color: var(--primary);
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, #1e40af 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(59, 130, 246, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

/* MAIN LAYOUT SIDEBAR */
.sidebar {
    width: 280px;
    background: var(--bg-surface);
    border-left: 1px solid var(--border-color);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 100;
    transition: var(--transition-normal);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 10px 30px 10px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 25px;
}

.sidebar-logo i {
    font-size: 28px;
    color: var(--primary);
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

.sidebar-logo div h1 {
    font-size: 18px;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-logo div p {
    font-size: 11px;
    color: var(--text-muted);
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition-fast);
}

.nav-item a:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
}

.nav-item.active a {
    color: #fff;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.05);
}

.nav-item.active a i {
    color: var(--primary);
    filter: drop-shadow(0 0 5px var(--primary-glow));
}

.nav-item i {
    font-size: 18px;
    transition: var(--transition-fast);
}

/* User Card Bottom Sidebar */
.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    margin-top: auto;
}

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    font-weight: 800;
}

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

.user-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 11px;
    color: var(--primary);
    font-weight: 600;
}

.logout-btn {
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    transition: var(--transition-fast);
}

.logout-btn:hover {
    color: var(--danger);
}

/* MAIN CONTENT WORKSPACE */
.main-workspace {
    flex-grow: 1;
    height: 100vh;
    overflow-y: auto;
    padding: 40px;
    display: flex;
    flex-direction: column;
}

/* Header Action Bar */
.workspace-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
}

.workspace-title h2 {
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 12px;
}

.workspace-title h2 i {
    color: var(--primary);
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

.workspace-title p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 3px;
}

.status-indicator-bar {
    display: flex;
    gap: 15px;
    align-items: center;
}

.sync-badge {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sync-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.sync-dot.online {
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    animation: pulse 2s infinite;
}

.sync-dot.offline {
    background: var(--danger);
    box-shadow: 0 0 10px var(--danger);
}

/* WORKSPACE PANELS & CARDS */
.workspace-panel {
    display: none;
    animation: fadeIn var(--transition-normal);
}

.workspace-panel.active {
    display: block;
}

/* Grid & Cards layout */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition-fast);
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: rgba(16, 185, 129, 0.25);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.stat-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--primary);
}

.stat-card-icon.accent {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
    color: var(--accent);
}

.stat-card-icon.danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.stat-card-info {
    display: flex;
    flex-direction: column;
}

.stat-card-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.stat-card-value {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    margin-top: 3px;
    font-family: 'Inter', 'Cairo', sans-serif;
}

/* SECTION STRUCTURES */
.grid-2col {
    display: grid;
    grid-template-columns: 1.8fr 1.2fr;
    gap: 30px;
}

@media (max-width: 1100px) {
    .grid-2col {
        grid-template-columns: 1fr;
    }
}

.card-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 30px;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    margin-bottom: 30px;
}

.card-panel-title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

/* INVOICING WORKSPACE SPECIFICS */
.barcode-box-alert {
    background: rgba(59, 130, 246, 0.08);
    border: 1px dashed var(--primary);
    border-radius: 14px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.barcode-pulse-icon {
    font-size: 20px;
    color: var(--primary);
    animation: beacon 1.5s infinite ease-in-out;
}

.barcode-box-alert span {
    font-size: 13px;
    color: var(--text-main);
    font-weight: 600;
}

/* Global Barcode Flash Overlay */
#barcode-flash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(59, 130, 246, 0.12);
    box-shadow: inset 0 0 100px rgba(59, 130, 246, 0.35);
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease-out;
}

/* Product Basket Table list */
.basket-table-container {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.main-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
}

.main-table th {
    background: #0f172a; /* Solid background to prevent scroll glitch */
    color: var(--text-muted);
    font-weight: 700;
    font-size: 13px;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 10;
}

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

.main-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: fit-content;
    padding: 3px;
}

.qty-btn {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: none;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

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

.qty-val {
    width: 30px;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
}

.delete-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 15px;
    transition: var(--transition-fast);
    padding: 5px;
}

.delete-btn:hover {
    color: var(--danger);
}

/* Invoice Bill panel summary */
.bill-summary {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bill-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 600;
}

.bill-row.highlight {
    color: #ffffff;
    font-size: 16px;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
    margin-top: 5px;
}

.bill-row.highlight .price-value {
    color: var(--accent);
    font-size: 22px;
    font-weight: 900;
}

.price-value {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    font-weight: 700;
}

/* Quick Search and Add Section */
.search-add-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-results-box {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #0f172a;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 50;
    box-shadow: var(--shadow-lg);
    display: none;
}

.search-result-item {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-fast);
}

.search-result-item:hover {
    background: rgba(16, 185, 129, 0.1);
}

.search-result-name {
    font-weight: 600;
    font-size: 13px;
}

.search-result-details {
    font-size: 11px;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
}

/* TREASURY RECONCILIATION DESIGN */
.treasury-meter-box {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 25px;
}

.balance-bar-visual {
    height: 14px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
}

.balance-fill {
    height: 100%;
    width: 50%; /* center is match */
    background: var(--primary);
    transition: width 0.5s ease-in-out, background-color 0.5s ease-in-out;
}

.balance-marker {
    position: absolute;
    left: 50%;
    top: 0;
    width: 2px;
    height: 100%;
    background: #ffffff;
    box-shadow: 0 0 5px #fff;
}

.difference-output-box {
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    transition: var(--transition-normal);
}

.difference-output-box.match {
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.05);
}

.difference-output-box.mismatch {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.05);
}

.difference-val {
    font-size: 28px;
    font-weight: 900;
    font-family: 'Inter', sans-serif;
    margin-top: 5px;
}

.difference-text {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
}

/* EMPLOYEE SALARY LOG CARDS */
.employee-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.employee-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 20px;
    cursor: pointer;
    transition: var(--transition-normal);
}

.employee-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.employee-card.active {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.03);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.08);
}

.employee-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.employee-card-name {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
}

.employee-card-status {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 20px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary);
    font-weight: 700;
}

.employee-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.employee-card-stat {
    display: flex;
    justify-content: space-between;
}

.employee-card-stat .val {
    font-family: 'Inter', sans-serif;
    color: #ffffff;
    font-weight: 700;
}

/* Modal overlays & utility dialogs */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: #0f172a;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    width: 100%;
    max-width: 500px;
    padding: 30px;
    box-shadow: var(--shadow-lg);
    transform: scale(0.9);
    transition: transform var(--transition-normal);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

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

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 20px;
}

.modal-close-btn:hover {
    color: #fff;
}

/* Badges and Stock indicators */
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge.success {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
}

.badge.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent);
}

.badge.danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* Charts Wrapper */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
    margin-top: 15px;
}

/* Switch styling for configurations */
.switch-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.switch-label {
    font-size: 14px;
    font-weight: 600;
}

.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border-radius: 34px;
    border: 1px solid var(--border-color);
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(22px);
}

/* Print Receipt Layout - Hidden by default */
#receipt-print-wrapper {
    display: none;
}

/* Utilities */
.text-left { text-align: left; }
.text-center { text-align: center; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-10 { gap: 10px; }
.gap-15 { gap: 15px; }
.w-full { width: 100%; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.pointer { cursor: pointer; }

/* Buttons */
.btn {
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition-fast);
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    justify-content: center;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent) 0%, #d97706 100%);
    color: #fff;
}

.btn-accent:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: #fff;
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 11px;
    border-radius: 6px;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.5; }
}

@keyframes beacon {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

/* PRINT MEDIA CONFIGURATION */
@media print {
    body {
        display: block !important;
        overflow: visible !important;
        background: #fff !important;
    }
    
    #login-container, #app-container, #barcode-flash-overlay, .modal-overlay {
        display: none !important;
    }
    
    #receipt-print-wrapper, #receipt-print-wrapper * {
        visibility: visible !important;
    }
    
    #receipt-print-wrapper {
        display: block !important;
        position: relative !important;
        left: auto !important;
        top: auto !important;
        width: 80mm; /* Standard POS printer width */
        padding: 5mm;
        background: #fff;
        color: #000;
        font-family: 'Cairo', sans-serif;
        box-shadow: none;
        margin: 0;
    }
    
    #receipt-print-wrapper.a4-report {
        width: 100% !important;
        max-width: 210mm;
        padding: 12mm;
        border: 1px solid #ccc;
        border-radius: 4px;
    }
    
    #receipt-print-wrapper.a4-report .print-header h1 {
        font-size: 22px;
        margin-bottom: 5px;
    }
    
    #receipt-print-wrapper.a4-report .print-table {
        font-size: 11px;
    }
    
    #receipt-print-wrapper.a4-report .print-table th, 
    #receipt-print-wrapper.a4-report .print-table td {
        padding: 8px;
    }
    
    .print-header {
        text-align: center;
        border-bottom: 1px dashed #000;
        padding-bottom: 8px;
        margin-bottom: 10px;
    }
    
    .print-header h1 {
        font-size: 16px;
        font-weight: 800;
        margin-bottom: 3px;
    }
    
    .print-header p {
        font-size: 10px;
        margin: 2px 0;
    }
    
    .print-info {
        font-size: 10px;
        margin-bottom: 10px;
        border-bottom: 1px dashed #000;
        padding-bottom: 8px;
    }
    
    .print-info-row {
        display: flex;
        justify-content: space-between;
        margin-bottom: 3px;
    }
    
    .print-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 10px;
        margin-bottom: 10px;
    }
    
    .print-table th {
        border-bottom: 1px solid #000;
        padding: 4px 0;
        text-align: right;
    }
    
    .print-table td {
        padding: 5px 0;
        border-bottom: 1px solid #f2f2f2;
    }
    
    .print-totals {
        border-top: 1px dashed #000;
        padding-top: 8px;
        font-size: 11px;
        margin-bottom: 15px;
    }
    
    .print-totals-row {
        display: flex;
        justify-content: space-between;
        margin-bottom: 4px;
    }
    
    .print-totals-row.bold {
        font-weight: 800;
        font-size: 13px;
    }
    
    .print-footer {
        text-align: center;
        font-size: 9px;
        margin-top: 20px;
        border-top: 1px dashed #000;
        padding-top: 8px;
    }
}

/* ==========================================
   PREMIUM SETTINGS WORKSPACE STYLING
   ========================================== */
.settings-workspace {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 25px;
    min-height: 520px;
}

body.light-mode .settings-workspace {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.06);
}

.settings-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-left: 1px solid var(--border-color);
    padding-left: 20px;
}

body.light-mode .settings-sidebar {
    border-left-color: rgba(0, 0, 0, 0.06);
}

.settings-nav-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 18px;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 14px;
    color: var(--text-muted);
    cursor: pointer;
    text-align: right;
    transition: var(--transition-normal);
    width: 100%;
}

.settings-nav-btn i {
    font-size: 18px;
    color: var(--text-muted);
    transition: var(--transition-normal);
    width: 20px;
    display: flex;
    justify-content: center;
}

.settings-nav-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.settings-nav-title {
    font-weight: 700;
    font-size: 13.5px;
    color: var(--text-main);
}

.settings-nav-desc {
    font-size: 10.5px;
    color: var(--text-muted);
}

.settings-nav-btn:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
}

body.light-mode .settings-nav-btn:hover {
    background: rgba(0, 0, 0, 0.02);
}

.settings-nav-btn.active {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.15);
    color: var(--primary);
}

.settings-nav-btn.active i {
    color: var(--primary);
}

body.light-mode .settings-nav-btn.active {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.15);
}

.settings-content {
    padding: 0;
}

.settings-section {
    display: none;
    animation: settingsFadeIn 0.3s ease;
}

.settings-section.active {
    display: block;
}

@keyframes settingsFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsiveness for Settings Sidebar */
@media (max-width: 992px) {
    .settings-workspace {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 20px;
    }
    .settings-sidebar {
        border-left: none;
        border-bottom: 1px solid var(--border-color);
        padding-left: 0;
        padding-bottom: 18px;
        flex-direction: row;
        overflow-x: auto;
        gap: 10px;
    }
    body.light-mode .settings-sidebar {
        border-bottom-color: rgba(0, 0, 0, 0.06);
    }
    .settings-nav-btn {
        flex-shrink: 0;
        width: auto;
        padding: 10px 14px;
        border-radius: 10px;
    }
    .settings-nav-desc {
        display: none; /* Hide descriptions on mobile/tablet to save space */
    }
}

.starting-cash-card {
    border-left: 4px solid var(--primary) !important;
}

.employees-mgmt-card {
    border-left: 4px solid var(--accent) !important;
}

.users-mgmt-card {
    border-left: 4px solid var(--danger) !important;
}

.settings-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    margin-bottom: 12px;
    transition: var(--transition-normal);
}

.settings-list-item:hover {
    transform: translateX(-3px);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}

body.light-mode .settings-list-item {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.05);
}

body.light-mode .settings-list-item:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
}

.settings-item-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.settings-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.settings-avatar.blue {
    background: linear-gradient(135deg, var(--primary) 0%, #1e40af 100%);
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.2);
}

.settings-avatar.orange {
    background: linear-gradient(135deg, var(--accent) 0%, #ea580c 100%);
    box-shadow: 0 3px 8px rgba(249, 115, 22, 0.2);
}

.settings-avatar.red {
    background: linear-gradient(135deg, var(--danger) 0%, #b91c1c 100%);
    box-shadow: 0 3px 8px rgba(239, 68, 68, 0.2);
}

.settings-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.settings-title {
    font-weight: 700;
    font-size: 13px;
    color: var(--text-main);
}

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

.settings-badge {
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

body.light-mode .settings-badge {
    background: rgba(0, 0, 0, 0.03);
    color: #475569;
}

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

/* ==========================================
   LIGHT MODE STYLING OVERRIDES
   ========================================== */
body.light-mode {
    --bg-base: #f1f5f9; /* Slate 100 */
    --bg-surface: rgba(255, 255, 255, 0.75);
    --bg-surface-hover: rgba(241, 245, 249, 0.9);
    --border-color: rgba(15, 23, 42, 0.08);
    --border-glow: rgba(37, 99, 235, 0.08);
    
    --primary: #2563eb; /* Blue 600 */
    --primary-glow: rgba(37, 99, 235, 0.15);
    --primary-dark: #1e3a8a;
    
    --accent: #ea580c; /* Orange 600 */
    --accent-glow: rgba(234, 88, 12, 0.15);
    
    --danger: #dc2626; /* Red 600 */
    --danger-glow: rgba(220, 38, 38, 0.15);
    
    --text-main: #0f172a; /* Slate 900 */
    --text-muted: #475569; /* Slate 600 */
    --text-dark: #f8fafc;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 15px var(--primary-glow);
    
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(234, 88, 12, 0.03) 0%, transparent 45%),
        linear-gradient(rgba(15, 23, 42, 0.005) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.005) 1px, transparent 1px);
}

body.light-mode #login-container {
    background: radial-gradient(circle at center, #f8fafc 0%, #e2e8f0 100%);
}

body.light-mode .login-card {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.1);
}

body.light-mode .login-card h2 {
    background: linear-gradient(135deg, #0f172a 50%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.light-mode .form-control {
    background: rgba(15, 23, 42, 0.03);
    color: #0f172a;
}

body.light-mode .form-control:focus {
    background: #fff;
    border-color: var(--primary);
}

body.light-mode .sidebar {
    background: rgba(255, 255, 255, 0.85);
    border-left: 1px solid rgba(15, 23, 42, 0.08);
}

body.light-mode .sidebar-logo div h1 {
    background: linear-gradient(135deg, #0f172a, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.light-mode .nav-item a:hover {
    background: rgba(15, 23, 42, 0.02);
    color: #000;
}

body.light-mode .nav-item.active a {
    color: #fff;
    background: var(--primary);
    border-color: transparent;
}

body.light-mode .nav-item.active a i {
    color: #fff;
    filter: none;
}

body.light-mode .user-profile-badge {
    background: rgba(15, 23, 42, 0.02);
}

body.light-mode .user-avatar {
    color: #fff;
}

body.light-mode .user-name {
    color: #0f172a;
}

body.light-mode .workspace-title h2 {
    color: #0f172a;
}

body.light-mode .stat-card-value {
    color: #0f172a;
}

body.light-mode .qty-btn {
    background: rgba(0, 0, 0, 0.05);
    color: #0f172a;
}

body.light-mode .qty-btn:hover {
    background: var(--primary);
    color: #fff;
}

body.light-mode .qty-control {
    background: rgba(0, 0, 0, 0.02);
}

body.light-mode .main-table th {
    background: rgba(0, 0, 0, 0.02);
    color: #475569;
}

body.light-mode .main-table td {
    color: #0f172a;
}

body.light-mode .search-results-box {
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

body.light-mode .search-result-item {
    color: #0f172a;
}

body.light-mode .search-result-item:hover {
    background: rgba(37, 99, 235, 0.08);
}

body.light-mode .difference-output-box {
    background: rgba(0, 0, 0, 0.02);
}

body.light-mode .employee-card {
    background: rgba(0, 0, 0, 0.01);
}

body.light-mode .employee-card:hover {
    border-color: var(--primary);
}

body.light-mode .employee-card-name {
    color: #0f172a;
}

body.light-mode .employee-card-stat .val {
    color: #0f172a;
}

body.light-mode .modal-content {
    background: #ffffff;
    border-color: rgba(0,0,0,0.08);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

body.light-mode .modal-close-btn:hover {
    color: #000;
}

body.light-mode .modal-header h3 {
    color: #0f172a;
}

body.light-mode .bill-row.highlight {
    color: #0f172a;
}

body.light-mode .switch-control {
    color: #0f172a;
}

body.light-mode h4 {
    color: #0f172a !important;
}

body.light-mode .slider {
    background-color: rgba(0, 0, 0, 0.08);
}

body.light-mode #daily-reset-modal p {
    color: #475569 !important;
}

body.light-mode .btn-secondary {
    background: rgba(0, 0, 0, 0.03);
    color: #0f172a;
}

body.light-mode .btn-secondary:hover {
    background: rgba(0, 0, 0, 0.06);
}

/* Light Mode Card Panel Title Contrast Override */
body.light-mode .card-panel-title {
    color: var(--text-main);
    border-bottom-color: var(--border-color);
}

/* Light Mode Scrollbar Thumb Contrast Override */
body.light-mode ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
}
body.light-mode ::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* General Placeholder Styles */
.form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}
body.light-mode .form-control::placeholder {
    color: #475569;
    opacity: 0.6;
}

/* Sub Tabs Styling */
.sub-tabs-container {
    display: flex;
    gap: 6px;
    background: rgba(255, 255, 255, 0.03);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

body.light-mode .sub-tabs-container {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.06);
}

.sub-tab-btn {
    background: transparent;
    border: none;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
}

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

.sub-tab-btn.active {
    background: rgba(59, 130, 246, 0.15);
    color: #fff;
    border: 1px solid rgba(59, 130, 246, 0.25);
    box-shadow: var(--shadow-sm);
}

body.light-mode .sub-tab-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: transparent;
}

/* Cloud sync settings extra card */
.cloud-sync-card {
    border-left: 4px solid #8b5cf6 !important;
}

/* Printing styles for A4 Report layout */
@media print {
    @page {
        size: A4 portrait;
        margin: 15mm;
    }
    
    #receipt-print-wrapper.a4-report {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        border: none !important;
        background: #ffffff !important;
        color: #000000 !important;
    }
    
    #receipt-print-wrapper.a4-report * {
        background: transparent !important;
        color: #000000 !important;
    }
    
    #receipt-print-wrapper.a4-report table {
        border-color: #000000 !important;
    }
    
    #receipt-print-wrapper.a4-report th, 
    #receipt-print-wrapper.a4-report td {
        border-bottom-color: #dddddd !important;
    }
}

#receipt-print-wrapper * {
    color: #000 !important;
}

/* Responsive Grid Form Styling */
.grid-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

@media (min-width: 768px) {
    .grid-form {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px 25px;
        align-items: end;
    }
    
    .grid-form .full-width {
        grid-column: 1 / -1;
    }
}

/* ==========================================
   MOBILE RESPONSIVENESS & SIDEBAR TOGGLE
   ========================================== */
.mobile-only-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition-fast);
}

body.light-mode .mobile-only-btn {
    color: #0f172a;
}

.mobile-only-btn:hover {
    color: var(--primary);
}

.close-sidebar-btn {
    font-size: 20px;
    padding: 5px;
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 90;
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
}

@media (max-width: 1024px) {
    .mobile-only-btn {
        display: block;
    }
    
    .sidebar {
        position: fixed;
        right: -300px; /* Hide to the right in RTL */
        top: 0;
        bottom: 0;
        z-index: 100;
        box-shadow: -5px 0 25px rgba(0,0,0,0.5);
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        height: 100vh;
        overflow-y: auto;
    }
    
    body.light-mode .sidebar {
        box-shadow: -5px 0 25px rgba(0,0,0,0.1);
    }
    
    .sidebar.show {
        right: 0;
    }
    
    .sidebar-overlay {
        display: block;
        pointer-events: none;
    }
    
    .sidebar-overlay.active {
        pointer-events: auto;
    }

    .main-workspace {
        padding: 20px;
    }

    .workspace-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .status-indicator-bar {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .grid-2col {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .card-panel {
        padding: 20px;
    }
}

@media (max-width: 576px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .login-card {
        padding: 30px 20px;
        margin: 15px;
    }
    
    .bill-row.highlight .price-value {
        font-size: 18px;
    }
    
    .main-workspace {
        padding: 10px;
    }
    
    .workspace-title h2 {
        font-size: 20px;
    }
    
    .card-panel-title {
        font-size: 16px;
    }
}