/**
 * infoBusiness - Main Stylesheet
 * Store Management System
 */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    --primary-color: #667eea;
    --primary-dark: #5a67d8;
    --primary-hover: #f8f9fa;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --body-bg: #f5f7fa;
    --surface-color: #ffffff;
    --surface-elevated: #ffffff;
    --surface-muted: #f8f9fa;
    --border-color: #eeeeee;
    --text-color: #333333;
    --text-muted: #666666;
    --text-soft: #555555;
    --purple-color: #9b59b6;
    
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --header-height: 60px;
    --footer-height: 50px;
    
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    --box-shadow-lg: 0 5px 20px rgba(0,0,0,0.15);
    
    --transition: all 0.3s ease;
}

/* ============================================
   RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--body-bg);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* ============================================
   LAYOUT
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: white;
    box-shadow: var(--box-shadow);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    padding: 10px;
    border-radius: 5px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.sidebar-toggle:hover {
    background: #f0f0f0;
    color: var(--primary-color);
}

.sidebar-toggle:active {
    background: #e0e0e0;
    transform: scale(0.95);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo i {
    font-size: 1.8rem;
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* POS Button - White Text */
.header-actions .btn-primary {
    color: white !important;
}

.header-actions .btn-primary i,
.header-actions .btn-primary span {
    color: white !important;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}

.user-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
    transition: var(--transition);
}

.user-toggle:hover {
    background: #f0f0f0;
}

.user-avatar {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.user-name {
    font-weight: 500;
    color: #333;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
    min-width: 200px;
    display: none;
    z-index: 1001;
    margin-top: 10px;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.user-role {
    color: #666;
    font-size: 0.9rem;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: #333;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: #f8f9fa;
}

.dropdown-item.text-danger {
    color: var(--danger-color);
}

.dropdown-divider {
    height: 1px;
    background: #eee;
    margin: 5px 0;
}

/* Notifications */
.notifications-dropdown {
    position: relative;
}

.badge-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Notification Dropdown Menu */
.notification-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
    min-width: 350px;
    max-width: 400px;
    display: none;
    z-index: 1001;
    margin-top: 10px;
    overflow: hidden;
}

.notification-menu.show {
    display: block;
}

.notification-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.notification-header h4 {
    margin: 0;
    font-size: 1rem;
    color: #333;
}

.notification-header .mark-all-read {
    font-size: 0.85rem;
    color: var(--primary-color);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.notification-list {
    max-height: 350px;
    overflow-y: auto;
}

.notification-item {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.unread {
    background: #f0f7ff;
}

.notification-item.unread:hover {
    background: #e3f0ff;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon.warning {
    background: #fff3cd;
    color: #856404;
}

.notification-icon.danger {
    background: #f8d7da;
    color: #721c24;
}

.notification-icon.info {
    background: #cce5ff;
    color: #004085;
}

.notification-icon.success {
    background: #d4edda;
    color: #155724;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-content p {
    margin: 0 0 5px 0;
    font-size: 0.9rem;
    color: #333;
    line-height: 1.4;
}

.notification-content .time {
    font-size: 0.75rem;
    color: #999;
}

.notification-empty {
    padding: 40px 20px;
    text-align: center;
    color: #999;
}

.notification-empty i {
    font-size: 3rem;
    margin-bottom: 10px;
    color: #ddd;
}

.notification-footer {
    padding: 12px 20px;
    border-top: 1px solid #eee;
    text-align: center;
    background: #f8f9fa;
}

.notification-footer a {
    color: var(--primary-color);
    font-size: 0.9rem;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    background: white;
    box-shadow: var(--box-shadow);
    z-index: 999;
    overflow-y: auto;
    overflow-x: hidden;
    transition: width 0.3s ease;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar.collapsed .nav-header {
    display: none !important;
}

.sidebar.collapsed .nav-link span {
    display: none !important;
}

.sidebar.collapsed .nav-link {
    justify-content: center !important;
    padding: 15px 12px !important;
}

.sidebar.collapsed .nav-link i {
    font-size: 1.3rem;
    width: auto;
}

.sidebar.collapsed .sidebar-footer {
    display: none !important;
}

/* Tooltip for collapsed sidebar nav items */
.sidebar.collapsed .nav-item {
    position: relative;
}

.sidebar.collapsed .nav-link:hover::after {
    content: attr(title);
    position: absolute;
    left: 60px;
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    white-space: nowrap;
    z-index: 1000;
}

.sidebar-nav {
    padding: 15px 0;
}

.nav-list {
    list-style: none;
}

.nav-header {
    padding: 15px 20px 5px;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #999;
    font-weight: 600;
    letter-spacing: 1px;
}

.nav-item {
    margin: 2px 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #555;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background: #f8f9fa;
    color: var(--primary-color);
}

.nav-link-disabled,
.nav-link-disabled:hover {
    color: #9ca3af;
    cursor: not-allowed;
    background: transparent;
}

.nav-item.disabled {
    opacity: 0.75;
}

.nav-item.active .nav-link {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.1), transparent);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.nav-link.text-danger {
    color: var(--danger-color);
}

.nav-link.text-danger:hover {
    background: rgba(220, 53, 69, 0.1);
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: center;
    font-size: 0.8rem;
    color: #999;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
    display: none;
}

.sidebar-overlay.show {
    display: block;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    padding: 25px;
    min-height: calc(100vh - var(--header-height) - var(--footer-height));
    transition: var(--transition);
}

body.sidebar-collapsed .main-content {
    margin-left: var(--sidebar-collapsed) !important;
}

/* Footer */
.footer {
    margin-left: var(--sidebar-width);
    padding: 15px 25px;
    background: white;
    border-top: 1px solid #eee;
    text-align: center;
    font-size: 0.85rem;
    color: #666;
    transition: var(--transition);
}

body.sidebar-collapsed .footer {
    margin-left: var(--sidebar-collapsed) !important;
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
    margin-bottom: 25px;
}

.page-header h1 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-header h1 i {
    color: var(--primary-color);
}

.page-header p {
    color: #666;
}

/* ============================================
   QUICK ACTIONS
   ============================================ */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    border-radius: var(--border-radius);
    color: white;
    text-align: center;
    transition: var(--transition);
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-lg);
    color: white;
}

.action-btn i {
    font-size: 2rem;
}

.btn-primary { 
    background: linear-gradient(135deg, #667eea, #764ba2); 
    color: white !important;
}
.btn-primary i,
.btn-primary span {
    color: white !important;
}
.btn-success { 
    background: linear-gradient(135deg, #28a745, #20c997); 
    color: white !important;
}
.btn-success i,
.btn-success span {
    color: white !important;
}
.btn-info { 
    background: linear-gradient(135deg, #17a2b8, #6f42c1); 
    color: white !important;
}
.btn-info i,
.btn-info span {
    color: white !important;
}
.btn-secondary {
    background: linear-gradient(135deg, #334155, #475569);
    color: white !important;
}
.btn-secondary i,
.btn-secondary span {
    color: white !important;
}
.btn-history {
    background: linear-gradient(135deg, #0f4c81, #1d70b8);
    color: #ffffff !important;
    box-shadow: 0 10px 24px rgba(15, 76, 129, 0.22);
}
.btn-history i,
.btn-history span {
    color: #ffffff !important;
}
.btn-history:hover {
    color: #ffffff !important;
    box-shadow: 0 14px 28px rgba(15, 76, 129, 0.28);
}
.btn-warning { 
    background: linear-gradient(135deg, #ffc107, #fd7e14); 
    color: #333 !important; 
}
.btn-warning:hover { 
    color: #333 !important; 
}
.btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white !important;
}
.btn-danger i,
.btn-danger span {
    color: white !important;
}

/* ============================================
   STATISTICS CARDS
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-lg);
}

.stat-card.alert-card {
    border: 2px solid var(--danger-color);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.bg-primary { background: linear-gradient(135deg, #667eea, #764ba2); }
.bg-success { background: linear-gradient(135deg, #28a745, #20c997); }
.bg-info { background: linear-gradient(135deg, #17a2b8, #6f42c1); }
.bg-warning { background: linear-gradient(135deg, #ffc107, #fd7e14); }
.bg-danger { background: linear-gradient(135deg, #dc3545, #c82333); }
.bg-purple { background: linear-gradient(135deg, #9b59b6, #8e44ad); }
.bg-secondary { background: linear-gradient(135deg, #6c757d, #5a6268); }
.bg-dark { background: linear-gradient(135deg, #343a40, #23272b); }

.stat-info h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 3px;
}

.stat-info p {
    color: #666;
    font-size: 0.9rem;
}

/* ============================================
   DASHBOARD GRID
   ============================================ */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.dashboard-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 1.1rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header h3 i {
    color: var(--primary-color);
}

.btn-link {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 500;
}

.card-body {
    padding: 20px;
}

.no-data {
    text-align: center;
    color: #666;
    padding: 30px;
}

.no-data.text-success {
    color: var(--success-color);
}

/* ============================================
   TABLES
   ============================================ */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

.table-compact th,
.table-compact td {
    padding: 10px 12px;
    font-size: 0.9rem;
}

.table-danger {
    background: rgba(220, 53, 69, 0.1) !important;
}

.table-warning {
    background: rgba(255, 193, 7, 0.1) !important;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-cash { background: #d4edda; color: #155724; }
.badge-card { background: #cce5ff; color: #004085; }
.badge-mobile { background: #fff3cd; color: #856404; }
.badge-bank_transfer { background: #e0e7ff; color: #3730a3; }
.badge-credit { background: #f8d7da; color: #721c24; }
.badge-paid { background: #d4edda; color: #155724; }
.badge-pending { background: #fff3cd; color: #856404; }
.badge-partial { background: #cce5ff; color: #004085; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.btn-sm {
    padding: 6px 15px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 1.1rem;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 5px;
    color: #666;
    transition: var(--transition);
}

.btn-icon:hover {
    background: #f0f0f0;
    color: var(--primary-color);
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 15px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    transition: opacity 0.3s;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background: #cce5ff;
    color: #004085;
    border: 1px solid #b8daff;
}

/* ============================================
   QUICK LINKS
   ============================================ */
.quick-links {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
}

.quick-links h3 {
    margin-bottom: 15px;
    color: #333;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.quick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    color: #555;
    transition: var(--transition);
}

.quick-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.quick-link i {
    font-size: 1.5rem;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-control:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

.app-inline-feedback {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 0.92rem;
}

.app-inline-feedback[hidden] {
    display: none !important;
}

.app-inline-feedback-info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.app-inline-feedback-success {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857;
}

.app-inline-feedback-warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #b45309;
}

.app-inline-feedback-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.app-toast-stack {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 3000;
    display: grid;
    gap: 10px;
    width: min(360px, calc(100vw - 24px));
}

.app-toast {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 14px;
    color: #fff;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.22);
    animation: slideInUp 0.18s ease-out;
}

.app-toast.is-leaving {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.app-toast-title {
    font-size: 0.9rem;
}

.app-toast-message {
    font-size: 0.92rem;
    line-height: 1.45;
}

.app-toast-info {
    background: #1d4ed8;
}

.app-toast-success {
    background: #047857;
}

.app-toast-warning {
    background: #b45309;
}

.app-toast-error {
    background: #b91c1c;
}

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

select.form-control {
    cursor: pointer;
}

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

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.help-text {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
    color: #666;
}

.text-muted {
    color: #999;
}

.text-success {
    color: var(--success-color);
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    margin-bottom: 20px;
}

.card-title {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.card-title h2 {
    font-size: 1.3rem;
    color: #333;
}

.card-content {
    padding: 20px;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.pagination a,
.pagination span {
    padding: 8px 15px;
    border-radius: 5px;
    background: white;
    color: #333;
    transition: var(--transition);
}

.pagination a:hover {
    background: var(--primary-color);
    color: white;
}

.pagination .active {
    background: var(--primary-color);
    color: white;
}

.pagination .disabled {
    color: #999;
    cursor: not-allowed;
}

/* ============================================
   MODAL
   ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content,
    .footer {
        margin-left: 0;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .user-name {
        display: none;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE & TABLET
   ============================================ */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 220px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile (up to 768px) */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 260px;
    }
    
    /* Sidebar becomes overlay on mobile */
    .sidebar {
        position: fixed;
        left: -260px;
        top: var(--header-height);
        width: 260px;
        height: calc(100vh - var(--header-height));
        z-index: 1000;
        transition: left 0.3s ease;
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .sidebar.collapsed {
        left: -260px;
        width: 260px;
    }
    
    .sidebar.collapsed.show {
        left: 0;
    }
    
    /* Reset collapsed styles for mobile */
    .sidebar.collapsed .nav-header,
    .sidebar.collapsed .nav-link span,
    .sidebar.collapsed .sidebar-footer {
        display: block !important;
    }
    
    .sidebar.collapsed .nav-link {
        justify-content: flex-start !important;
        padding: 12px 20px !important;
    }
    
    /* Main content takes full width */
    .main-content {
        margin-left: 0 !important;
        padding: 15px;
    }
    
    body.sidebar-collapsed .main-content {
        margin-left: 0 !important;
    }
    
    /* Footer takes full width */
    .footer {
        margin-left: 0 !important;
    }
    
    body.sidebar-collapsed .footer {
        margin-left: 0 !important;
    }
    
    /* Overlay for mobile sidebar */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
    
    /* Header adjustments */
    .header {
        padding: 0 15px;
    }
    
    .header-title h1 {
        font-size: 1.1rem;
    }
    
    .header-actions {
        gap: 8px;
    }
    
    .header-actions .btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .header-actions .btn span {
        display: none;
    }
    
    /* Stats grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-icon {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
    
    .stat-info h3 {
        font-size: 1.3rem;
    }
    
    /* Page header */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .page-header h1 {
        font-size: 1.4rem;
    }
    
    /* Cards */
    .card {
        margin-bottom: 15px;
    }
    
    .card-title {
        padding: 15px 20px;
    }
    
    .card-content {
        padding: 15px 20px;
    }
    
    /* Tables */
    .table {
        font-size: 0.9rem;
    }
    
    .table th,
    .table td {
        padding: 10px 12px;
    }
    
    /* Forms */
    .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    /* Dashboard grid */
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* Quick actions */
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Notification menu */
    .notification-menu {
        position: fixed;
        top: var(--header-height);
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 0;
    }
    
    /* User dropdown */
    .user-dropdown {
        position: fixed;
        top: var(--header-height);
        right: 10px;
        left: 10px;
        width: auto;
    }
}

/* Small mobile (up to 480px) */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .header-title h1 {
        display: none;
    }
    
    .header-logo {
        font-size: 1.2rem;
    }
    
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table {
        min-width: 600px;
    }
}

/* ============================================
   SUPPORT & TRAINING
   ============================================ */
.support-layout {
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.support-index {
    position: sticky;
    top: calc(var(--header-height) + 20px);
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 18px;
    max-height: calc(100vh - var(--header-height) - 40px);
    overflow: auto;
}

.support-index-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-color);
    font-weight: 700;
    margin-bottom: 16px;
}

.support-index-section {
    margin-bottom: 18px;
}

.support-index-section:last-child {
    margin-bottom: 0;
}

.support-index-section h3 {
    margin: 0 0 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0;
}

.support-index-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 6px;
    color: var(--text-soft);
    font-size: 0.92rem;
}

.support-index-link:hover,
.support-index-link.active {
    background: var(--primary-hover);
    color: var(--primary-color);
}

.support-content {
    min-width: 0;
}

.support-hero-card {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 24px;
    margin-bottom: 24px;
}

.support-hero-card h2 {
    margin: 10px 0 8px;
    color: var(--text-color);
}

.support-hero-card p {
    color: var(--text-muted);
    max-width: 720px;
    margin: 0;
}

.support-hero-card > i {
    font-size: 3rem;
    color: var(--primary-color);
}

.support-topic-section {
    margin-bottom: 26px;
}

.support-topic-section h2 {
    margin: 0 0 14px;
    color: var(--text-color);
    font-size: 1.25rem;
}

.support-topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.support-topic-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 18px;
    gap: 14px;
    align-items: center;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 16px;
    color: var(--text-color);
    min-height: 136px;
}

.support-topic-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: var(--box-shadow-lg);
}

.support-topic-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(102, 126, 234, 0.12);
    color: var(--primary-color);
    font-size: 1.2rem;
}

.support-topic-card h3 {
    margin: 0 0 6px;
    color: var(--text-color);
    font-size: 1rem;
}

.support-topic-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.support-topic-arrow {
    color: var(--text-muted);
}

.support-detail-card {
    min-width: 0;
}

.support-detail-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 22px;
}

.support-detail-header h2 {
    margin: 10px 0 8px;
    color: var(--text-color);
    font-size: 1.7rem;
}

.support-detail-header p {
    margin: 0;
    color: var(--text-muted);
    max-width: 820px;
}

.support-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.support-guide-section {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
}

.support-guide-section-wide {
    grid-column: 1 / -1;
}

.support-guide-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    color: var(--text-color);
    font-size: 1.05rem;
}

.support-guide-section p {
    color: var(--text-muted);
    margin: 0 0 12px;
}

.support-guide-section p:last-child {
    margin-bottom: 0;
}

.support-step-list {
    margin: 0;
    padding-left: 20px;
    color: var(--text-muted);
}

.support-step-list li {
    margin-bottom: 8px;
}

.support-step-list li:last-child {
    margin-bottom: 0;
}

.support-screen {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: var(--surface-muted);
}

.support-screenshot-frame {
    margin: 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: var(--surface-muted);
}

.support-screenshot-frame img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: top left;
    background: var(--surface-color);
}

.support-screenshot-frame figcaption {
    padding: 10px 14px;
    color: var(--text-muted);
    font-size: 0.88rem;
    border-top: 1px solid var(--border-color);
}

.support-screen-header {
    display: flex;
    gap: 6px;
    padding: 10px;
    background: var(--surface-elevated);
    border-bottom: 1px solid var(--border-color);
}

.support-screen-header span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-color);
}

.support-screen-title {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
}

.support-screen-title i {
    color: var(--primary-color);
}

.support-screen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    padding: 14px;
}

.support-screen-panel {
    min-height: 76px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 12px;
    background: var(--surface-color);
}

.support-screen-panel span {
    display: block;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 8px;
}

.support-screen-panel strong {
    color: var(--text-color);
    font-size: 0.88rem;
}

.support-screen .help-text {
    margin: 0;
    padding: 0 14px 14px;
}

@media (max-width: 992px) {
    .support-layout,
    .support-detail-grid {
        grid-template-columns: 1fr;
    }

    .support-index {
        position: static;
        max-height: none;
    }
}

@media (max-width: 576px) {
    .support-hero-card,
    .support-detail-header {
        flex-direction: column;
    }

    .support-hero-card > i {
        display: none;
    }

    .support-topic-card {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .support-topic-arrow {
        display: none;
    }
}

/* ============================================
   DARK THEME
   ============================================ */
body.theme-dark {
    color-scheme: dark;
    --primary-color: #4F46E5;
    --primary-dark: #6366F1;
    --primary-hover: rgba(79, 70, 229, 0.16);
    --secondary-color: #0EA5E9;
    --success-color: #10B981;
    --danger-color: #EF4444;
    --warning-color: #F59E0B;
    --info-color: #38BDF8;
    --light-color: #1F2937;
    --dark-color: #F8FAFC;
    --body-bg: #0B1120;
    --surface-color: #111827;
    --surface-elevated: #182235;
    --surface-muted: #0F172A;
    --border-color: #273449;
    --text-color: #E5E7EB;
    --text-muted: #94A3B8;
    --text-soft: #CBD5E1;
    --box-shadow: 0 14px 34px rgba(0,0,0,0.28);
    --box-shadow-lg: 0 20px 46px rgba(0,0,0,0.38);
    background:
        radial-gradient(circle at top left, rgba(79, 70, 229, 0.16), transparent 32rem),
        radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.08), transparent 30rem),
        var(--body-bg);
    color: var(--text-color);
}

body.theme-dark .header,
body.theme-dark .sidebar,
body.theme-dark .footer,
body.theme-dark .dashboard-card,
body.theme-dark .quick-links,
body.theme-dark .stat-card,
body.theme-dark .card,
body.theme-dark .modal-content,
body.theme-dark .summary-card,
body.theme-dark .report-card,
body.theme-dark .filter-bar,
body.theme-dark .balance-hero,
body.theme-dark .receipt-template-card,
body.theme-dark .product-card,
body.theme-dark .customer-card,
body.theme-dark .settings-panel,
body.theme-dark .tab-content,
body.theme-dark .dropdown-menu,
body.theme-dark .notification-menu,
body.theme-dark .user-dropdown-menu,
body.theme-dark .branch-switcher,
body.theme-dark .pos-header,
body.theme-dark .pos-cart,
body.theme-dark .cart-summary {
    background: var(--surface-color) !important;
    border-color: var(--border-color) !important;
    color: var(--text-color) !important;
    box-shadow: var(--box-shadow);
}

body.theme-dark .header,
body.theme-dark .sidebar,
body.theme-dark .footer {
    border-color: var(--border-color);
}

body.theme-dark .sidebar {
    background: linear-gradient(180deg, #0F172A 0%, #111827 100%) !important;
}

body.theme-dark .main-content {
    background: transparent;
}

body.theme-dark .card-title,
body.theme-dark .card-header,
body.theme-dark .cart-header,
body.theme-dark .modal-header,
body.theme-dark .modal-footer,
body.theme-dark .table th,
body.theme-dark .table td,
body.theme-dark .category-filter,
body.theme-dark .sidebar-footer,
body.theme-dark .line-item,
body.theme-dark .report-card .line-item,
body.theme-dark .balance-hero .line-item {
    border-color: var(--border-color) !important;
}

body.theme-dark .page-header h1,
body.theme-dark .card-title h2,
body.theme-dark .card-header h3,
body.theme-dark .quick-links h3,
body.theme-dark .stat-info h3,
body.theme-dark .form-group label,
body.theme-dark .table th,
body.theme-dark .modal-header h2,
body.theme-dark .summary-card .value,
body.theme-dark .report-card header h3,
body.theme-dark .line-item span,
body.theme-dark .pl-row span,
body.theme-dark .pos-header h1,
body.theme-dark .cart-header h2,
body.theme-dark .product-info h4,
body.theme-dark h1,
body.theme-dark h2,
body.theme-dark h3,
body.theme-dark h4,
body.theme-dark h5,
body.theme-dark h6 {
    color: var(--text-color) !important;
}

body.theme-dark .page-header p,
body.theme-dark .help-text,
body.theme-dark .text-muted,
body.theme-dark .no-data,
body.theme-dark .stat-info p,
body.theme-dark .summary-card .caption,
body.theme-dark .summary-card .label,
body.theme-dark .report-card header p,
body.theme-dark .muted-note,
body.theme-dark .source-list,
body.theme-dark .chip,
body.theme-dark .product-code,
body.theme-dark .product-stock,
body.theme-dark .sidebar-footer,
body.theme-dark .nav-header {
    color: var(--text-muted) !important;
}

body.theme-dark a,
body.theme-dark .btn-link,
body.theme-dark .page-header h1 i,
body.theme-dark .card-header h3 i,
body.theme-dark .product-category {
    color: #A5B4FC;
}

body.theme-dark a:hover,
body.theme-dark .btn-link:hover {
    color: var(--primary-dark);
}

body.theme-dark .sidebar-toggle,
body.theme-dark .user-toggle,
body.theme-dark .modal-close,
body.theme-dark .btn-icon {
    color: var(--text-soft);
}

body.theme-dark .sidebar-toggle:hover,
body.theme-dark .user-toggle:hover,
body.theme-dark .btn-icon:hover,
body.theme-dark .nav-link:hover,
body.theme-dark .quick-link:hover,
body.theme-dark .pagination a:hover {
    background: var(--primary-hover) !important;
    color: #C7D2FE !important;
    border-color: rgba(79, 70, 229, 0.55) !important;
}

body.theme-dark .sidebar-toggle:active {
    background: rgba(79, 70, 229, 0.24) !important;
}

body.theme-dark .nav-link {
    color: var(--text-soft) !important;
}

body.theme-dark .nav-item.active .nav-link {
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.24), transparent) !important;
    color: #C7D2FE !important;
    border-left-color: var(--primary-color) !important;
}

body.theme-dark .nav-link-disabled,
body.theme-dark .nav-link-disabled:hover {
    color: #64748B !important;
    background: transparent !important;
}

body.theme-dark .quick-link,
body.theme-dark .table th,
body.theme-dark .table tbody tr:hover,
body.theme-dark .pl-section.highlight,
body.theme-dark .form-control,
body.theme-dark .pagination a,
body.theme-dark .pagination span,
body.theme-dark .app-inline-feedback,
body.theme-dark .muted-note,
body.theme-dark .chip,
body.theme-dark .recipient-box,
body.theme-dark .inline-form,
body.theme-dark .logo-upload-section,
body.theme-dark .current-logo,
body.theme-dark .line-item.highlight,
body.theme-dark .report-card .line-item.highlight {
    background: var(--surface-muted) !important;
    color: var(--text-color) !important;
    border-color: var(--border-color) !important;
}

body.theme-dark .form-control,
body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea {
    background: #0F172A !important;
    border-color: var(--border-color) !important;
    color: var(--text-color) !important;
}

body.theme-dark .form-control:focus,
body.theme-dark input:focus,
body.theme-dark select:focus,
body.theme-dark textarea:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.24);
}

body.theme-dark .form-control::placeholder,
body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder {
    color: #64748B;
}

body.theme-dark .form-control:disabled,
body.theme-dark input:disabled,
body.theme-dark select:disabled,
body.theme-dark textarea:disabled {
    background: #111827 !important;
    color: #64748B !important;
    cursor: not-allowed;
}

body.theme-dark select option {
    background: #0F172A;
    color: var(--text-color);
}

body.theme-dark .table {
    color: var(--text-color);
}

body.theme-dark .table-danger {
    background: rgba(239, 68, 68, 0.14) !important;
}

body.theme-dark .table-warning {
    background: rgba(245, 158, 11, 0.14) !important;
}

body.theme-dark .btn,
body.theme-dark .action-btn,
body.theme-dark .btn-icon,
body.theme-dark .quick-link,
body.theme-dark .category-btn {
    border: 1px solid transparent;
}

body.theme-dark .btn:hover,
body.theme-dark .action-btn:hover,
body.theme-dark .product-card:hover,
body.theme-dark .stat-card:hover,
body.theme-dark .quick-link:hover {
    box-shadow: 0 18px 36px rgba(79, 70, 229, 0.24) !important;
}

body.theme-dark .btn-primary,
body.theme-dark .bg-primary,
body.theme-dark .action-btn.bg-primary {
    background: linear-gradient(135deg, #4F46E5, #2563EB) !important;
}

body.theme-dark .btn-primary:hover,
body.theme-dark .bg-primary:hover,
body.theme-dark .action-btn.bg-primary:hover {
    background: linear-gradient(135deg, #6366F1, #4F46E5) !important;
}

body.theme-dark .btn-success,
body.theme-dark .bg-success,
body.theme-dark .action-btn.bg-success {
    background: linear-gradient(135deg, #10B981, #059669) !important;
}

body.theme-dark .btn-success:hover,
body.theme-dark .bg-success:hover,
body.theme-dark .action-btn.bg-success:hover {
    background: linear-gradient(135deg, #34D399, #10B981) !important;
}

body.theme-dark .btn-info,
body.theme-dark .bg-info,
body.theme-dark .action-btn.bg-info {
    background: linear-gradient(135deg, #0EA5E9, #4F46E5) !important;
}

body.theme-dark .btn-secondary,
body.theme-dark .bg-secondary,
body.theme-dark .action-btn.bg-secondary {
    background: linear-gradient(135deg, #334155, #1F2937) !important;
}

body.theme-dark .btn-warning,
body.theme-dark .bg-warning,
body.theme-dark .action-btn.bg-warning {
    background: linear-gradient(135deg, #F59E0B, #D97706) !important;
    color: #111827 !important;
}

body.theme-dark .btn-danger,
body.theme-dark .bg-danger,
body.theme-dark .action-btn.bg-danger {
    background: linear-gradient(135deg, #EF4444, #B91C1C) !important;
}

body.theme-dark .bg-purple,
body.theme-dark .action-btn.bg-purple {
    background: linear-gradient(135deg, #7C3AED, #4F46E5) !important;
}

body.theme-dark .bg-dark,
body.theme-dark .action-btn.bg-dark {
    background: linear-gradient(135deg, #1E293B, #0F172A) !important;
}

body.theme-dark .badge-cash,
body.theme-dark .badge-paid {
    background: rgba(16, 185, 129, 0.16) !important;
    color: #6EE7B7 !important;
}

body.theme-dark .badge-card,
body.theme-dark .badge-partial,
body.theme-dark .badge-bank_transfer {
    background: rgba(79, 70, 229, 0.18) !important;
    color: #C7D2FE !important;
}

body.theme-dark .badge-mobile,
body.theme-dark .badge-pending {
    background: rgba(245, 158, 11, 0.18) !important;
    color: #FCD34D !important;
}

body.theme-dark .badge-credit {
    background: rgba(239, 68, 68, 0.18) !important;
    color: #FCA5A5 !important;
}

body.theme-dark .alert-success,
body.theme-dark .app-inline-feedback-success {
    background: rgba(16, 185, 129, 0.16) !important;
    border-color: rgba(16, 185, 129, 0.35) !important;
    color: #A7F3D0 !important;
}

body.theme-dark .alert-error,
body.theme-dark .app-inline-feedback-error {
    background: rgba(239, 68, 68, 0.16) !important;
    border-color: rgba(239, 68, 68, 0.35) !important;
    color: #FCA5A5 !important;
}

body.theme-dark .alert-warning,
body.theme-dark .app-inline-feedback-warning {
    background: rgba(245, 158, 11, 0.16) !important;
    border-color: rgba(245, 158, 11, 0.35) !important;
    color: #FCD34D !important;
}

body.theme-dark .alert-info,
body.theme-dark .app-inline-feedback-info {
    background: rgba(79, 70, 229, 0.16) !important;
    border-color: rgba(79, 70, 229, 0.35) !important;
    color: #C7D2FE !important;
}

body.theme-dark .text-success {
    color: #34D399 !important;
}

body.theme-dark .text-danger {
    color: #F87171 !important;
}

body.theme-dark .pl-section.final {
    background: linear-gradient(135deg, #312E81, #4F46E5) !important;
}

body.theme-dark .balance-hero {
    background:
        linear-gradient(135deg, rgba(79, 70, 229, 0.34), rgba(16, 185, 129, 0.12)),
        var(--surface-color) !important;
}

body.theme-dark .balance-pill {
    background: rgba(15, 23, 42, 0.72) !important;
    color: var(--text-soft) !important;
}

body.theme-dark .balance-pill.success {
    background: rgba(16, 185, 129, 0.2) !important;
}

body.theme-dark .balance-pill.warning {
    background: rgba(245, 158, 11, 0.2) !important;
}

body.theme-dark .sidebar-overlay,
body.theme-dark .modal {
    background: rgba(2, 6, 23, 0.72) !important;
}

/* Reference-inspired graphite dark theme */
body.theme-dark {
    --primary-color: #A06BFF;
    --primary-dark: #BE93FF;
    --primary-hover: rgba(160, 107, 255, 0.18);
    --secondary-color: #23D7F7;
    --success-color: #32D0A4;
    --danger-color: #FF6B6B;
    --warning-color: #FFBE55;
    --info-color: #23D7F7;
    --light-color: #464646;
    --dark-color: #F7F3FF;
    --body-bg: #282828;
    --surface-color: #3F3F3F;
    --surface-elevated: #4B4B4B;
    --surface-muted: #333333;
    --border-color: rgba(255, 255, 255, 0.08);
    --text-color: #F6F1FF;
    --text-muted: #B9B4C4;
    --text-soft: #DED8EA;
    --purple-color: #A06BFF;
    --dark-card-gradient: linear-gradient(180deg, rgba(78, 78, 78, 0.96) 0%, rgba(59, 59, 59, 0.98) 100%);
    --dark-card-gradient-soft: linear-gradient(180deg, rgba(92, 92, 92, 0.78) 0%, rgba(61, 61, 61, 0.96) 100%);
    --dark-input-bg: #383838;
    --dark-sidebar-bg: #2A2A2A;
    --dark-shadow: 0 18px 44px rgba(0, 0, 0, 0.38);
    --dark-shadow-soft: 0 10px 24px rgba(0, 0, 0, 0.26);
    --border-radius: 8px;
    background: #282828 !important;
    color: var(--text-color);
}

body.theme-dark .main-content,
body.theme-dark.pos-body,
body.theme-dark .pos-products {
    background: #282828 !important;
}

body.theme-dark .header,
body.theme-dark .footer {
    background: #282828 !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
    box-shadow: none !important;
}

body.theme-dark .sidebar {
    background: var(--dark-sidebar-bg) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: 18px 0 38px rgba(0, 0, 0, 0.28) !important;
}

body.theme-dark .logo {
    color: var(--primary-dark) !important;
}

body.theme-dark .logo i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: var(--primary-dark) !important;
    background:
        linear-gradient(135deg, rgba(160, 107, 255, 0.28), rgba(35, 215, 247, 0.08)),
        #3A3A3A;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

body.theme-dark .nav-header {
    color: #F2EDF9 !important;
    font-size: 0.92rem;
    text-transform: none;
    letter-spacing: 0;
}

body.theme-dark .nav-link {
    margin: 2px 12px;
    border-left: 0 !important;
    border-radius: 0;
    color: #C9C4D3 !important;
}

body.theme-dark .nav-link i {
    color: #D9D4E3 !important;
}

body.theme-dark .nav-link:hover,
body.theme-dark .nav-item.active .nav-link {
    background: #3B3B3B !important;
    color: #FFFFFF !important;
    border-color: transparent !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.theme-dark .nav-link:hover i,
body.theme-dark .nav-item.active .nav-link i {
    color: #FFFFFF !important;
}

body.theme-dark .sidebar-footer {
    background: transparent !important;
}

body.theme-dark .sidebar-toggle,
body.theme-dark .user-toggle,
body.theme-dark .notification-btn,
body.theme-dark .btn-icon,
body.theme-dark .modal-close {
    background: rgba(255, 255, 255, 0.04) !important;
    color: var(--text-soft) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

body.theme-dark .sidebar-toggle:hover,
body.theme-dark .user-toggle:hover,
body.theme-dark .notification-btn:hover,
body.theme-dark .btn-icon:hover,
body.theme-dark .modal-close:hover {
    background: #444444 !important;
    color: #FFFFFF !important;
    border-color: rgba(160, 107, 255, 0.42) !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22) !important;
}

body.theme-dark .user-name,
body.theme-dark .user-role,
body.theme-dark .dropdown-item,
body.theme-dark .notification-header h4,
body.theme-dark .notification-content p {
    color: #F8F4FF !important;
}

body.theme-dark .dropdown-header,
body.theme-dark .dropdown-divider,
body.theme-dark .notification-item,
body.theme-dark .notification-footer {
    border-color: rgba(255, 255, 255, 0.07) !important;
}

body.theme-dark .dropdown-item:hover,
body.theme-dark .notification-item:hover,
body.theme-dark .notification-item.unread,
body.theme-dark .notification-item.unread:hover {
    background: rgba(255, 255, 255, 0.055) !important;
}

body.theme-dark .notification-content .time,
body.theme-dark .notification-empty,
body.theme-dark .notification-empty i {
    color: var(--text-muted) !important;
}

body.theme-dark .card,
body.theme-dark .dashboard-card,
body.theme-dark .quick-links,
body.theme-dark .stat-card,
body.theme-dark .modal-content,
body.theme-dark .summary-card,
body.theme-dark .report-card,
body.theme-dark .filter-bar,
body.theme-dark .balance-hero,
body.theme-dark .receipt-template-card,
body.theme-dark .product-card,
body.theme-dark .customer-card,
body.theme-dark .settings-panel,
body.theme-dark .tab-content,
body.theme-dark .dropdown-menu,
body.theme-dark .notification-menu,
body.theme-dark .user-dropdown-menu,
body.theme-dark .branch-switcher,
body.theme-dark .support-hero-card,
body.theme-dark .support-topic-card,
body.theme-dark .support-index,
body.theme-dark .support-detail-header,
body.theme-dark .support-callout,
body.theme-dark .support-step-list li,
body.theme-dark .support-screen-panel,
body.theme-dark .pos-header,
body.theme-dark .pos-cart,
body.theme-dark .cart-summary {
    background: var(--dark-card-gradient) !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    border-radius: 8px !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        var(--dark-shadow) !important;
    color: var(--text-color) !important;
}

body.theme-dark .stat-card,
body.theme-dark .quick-link,
body.theme-dark .product-card,
body.theme-dark .customer-card,
body.theme-dark .receipt-template-card,
body.theme-dark .support-topic-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

body.theme-dark .stat-card:hover,
body.theme-dark .quick-link:hover,
body.theme-dark .product-card:hover,
body.theme-dark .customer-card:hover,
body.theme-dark .receipt-template-card:hover,
body.theme-dark .support-topic-card:hover {
    transform: translateY(-2px);
    border-color: rgba(160, 107, 255, 0.34) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 22px 46px rgba(0, 0, 0, 0.42) !important;
}

body.theme-dark .card-title,
body.theme-dark .card-header,
body.theme-dark .modal-header,
body.theme-dark .modal-footer,
body.theme-dark .cart-header,
body.theme-dark .notification-header,
body.theme-dark .notification-footer {
    background: transparent !important;
    border-color: rgba(255, 255, 255, 0.07) !important;
}

body.theme-dark .page-header h1,
body.theme-dark .card-title h2,
body.theme-dark .card-header h3,
body.theme-dark .quick-links h3,
body.theme-dark .modal-header h2,
body.theme-dark .summary-card .value,
body.theme-dark .report-card header h3,
body.theme-dark .line-item span,
body.theme-dark .pl-row span,
body.theme-dark .pos-header h1,
body.theme-dark .cart-header h2,
body.theme-dark .product-info h4,
body.theme-dark .form-group label,
body.theme-dark h1,
body.theme-dark h2,
body.theme-dark h3,
body.theme-dark h4,
body.theme-dark h5,
body.theme-dark h6 {
    color: #F8F4FF !important;
}

body.theme-dark .page-header h1 i,
body.theme-dark .card-header h3 i,
body.theme-dark .card-title h2 i,
body.theme-dark .support-topic-icon,
body.theme-dark .support-topic-arrow,
body.theme-dark .product-category {
    color: var(--primary-dark) !important;
}

body.theme-dark .page-header p,
body.theme-dark .help-text,
body.theme-dark .text-muted,
body.theme-dark .no-data,
body.theme-dark .stat-info p,
body.theme-dark .summary-card .caption,
body.theme-dark .summary-card .label,
body.theme-dark .report-card header p,
body.theme-dark .muted-note,
body.theme-dark .source-list,
body.theme-dark .chip,
body.theme-dark .product-code,
body.theme-dark .product-stock,
body.theme-dark .cart-item-details,
body.theme-dark .customer-info,
body.theme-dark .payment-help,
body.theme-dark .support-topic-card p,
body.theme-dark .support-detail-header p,
body.theme-dark .support-step-list p,
body.theme-dark .support-screen .help-text {
    color: var(--text-muted) !important;
}

body.theme-dark .stat-icon,
body.theme-dark .action-icon,
body.theme-dark .support-topic-icon {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.04)),
        #303030 !important;
    color: #FFFFFF !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

body.theme-dark .stat-icon {
    width: 54px;
    height: 54px;
}

body.theme-dark .bg-primary,
body.theme-dark .btn-primary,
body.theme-dark .action-btn.bg-primary {
    background: linear-gradient(135deg, #7B4DFF, #A06BFF) !important;
    color: #FFFFFF !important;
}

body.theme-dark .bg-success,
body.theme-dark .btn-success,
body.theme-dark .action-btn.bg-success {
    background: linear-gradient(135deg, #20C997, #23D7F7) !important;
    color: #131313 !important;
}

body.theme-dark .bg-info,
body.theme-dark .btn-info,
body.theme-dark .action-btn.bg-info {
    background: linear-gradient(135deg, #23D7F7, #5F7CFF) !important;
    color: #111111 !important;
}

body.theme-dark .bg-warning,
body.theme-dark .btn-warning,
body.theme-dark .action-btn.bg-warning {
    background: linear-gradient(135deg, #FFBE55, #FF8A4A) !important;
    color: #161616 !important;
}

body.theme-dark .bg-danger,
body.theme-dark .btn-danger,
body.theme-dark .action-btn.bg-danger {
    background: linear-gradient(135deg, #FF6B6B, #D94F6D) !important;
    color: #FFFFFF !important;
}

body.theme-dark .bg-purple,
body.theme-dark .action-btn.bg-purple {
    background: linear-gradient(135deg, #A06BFF, #6D5CFF) !important;
    color: #FFFFFF !important;
}

body.theme-dark .bg-secondary,
body.theme-dark .btn-secondary,
body.theme-dark .action-btn.bg-secondary,
body.theme-dark .bg-dark,
body.theme-dark .action-btn.bg-dark {
    background: linear-gradient(135deg, #565656, #3D3D3D) !important;
    color: #FFFFFF !important;
}

body.theme-dark .btn {
    border-radius: 7px;
    box-shadow: 0 9px 20px rgba(0, 0, 0, 0.22);
}

body.theme-dark .btn:hover,
body.theme-dark .action-btn:hover {
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.34) !important;
}

body.theme-dark .form-control,
body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea,
body.theme-dark .payment-input,
body.theme-dark .pos-search input,
body.theme-dark .customer-search input {
    background: var(--dark-input-bg) !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    border-radius: 8px !important;
    color: var(--text-color) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.theme-dark .form-control:focus,
body.theme-dark input:focus,
body.theme-dark select:focus,
body.theme-dark textarea:focus,
body.theme-dark .payment-input:focus,
body.theme-dark .pos-search input:focus,
body.theme-dark .customer-search input:focus {
    border-color: rgba(160, 107, 255, 0.78) !important;
    box-shadow:
        0 0 0 3px rgba(160, 107, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

body.theme-dark .form-control::placeholder,
body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder {
    color: #8C8797;
}

body.theme-dark select option {
    background: #333333;
    color: var(--text-color);
}

body.theme-dark .quick-link,
body.theme-dark .category-btn,
body.theme-dark .payment-method,
body.theme-dark .pagination a,
body.theme-dark .pagination span,
body.theme-dark .app-inline-feedback,
body.theme-dark .muted-note,
body.theme-dark .chip,
body.theme-dark .recipient-box,
body.theme-dark .inline-form,
body.theme-dark .logo-upload-section,
body.theme-dark .current-logo,
body.theme-dark .line-item.highlight,
body.theme-dark .report-card .line-item.highlight,
body.theme-dark .support-search-card,
body.theme-dark .support-topic-card.active {
    background: #383838 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: var(--text-color) !important;
}

body.theme-dark .category-btn:hover,
body.theme-dark .payment-method:hover,
body.theme-dark .pagination a:hover {
    background: #464646 !important;
    border-color: rgba(160, 107, 255, 0.42) !important;
    color: #FFFFFF !important;
}

body.theme-dark .category-btn.active,
body.theme-dark .payment-method.active,
body.theme-dark .tabs .active,
body.theme-dark .tab-button.active {
    background: linear-gradient(135deg, rgba(160, 107, 255, 0.95), rgba(107, 92, 255, 0.95)) !important;
    border-color: rgba(190, 147, 255, 0.78) !important;
    color: #FFFFFF !important;
}

body.theme-dark .table {
    color: var(--text-color);
    border-collapse: separate;
    border-spacing: 0;
}

body.theme-dark .table th {
    background: #343434 !important;
    color: #F7F3FF !important;
    border-color: rgba(255, 255, 255, 0.07) !important;
}

body.theme-dark .table td {
    border-color: rgba(255, 255, 255, 0.06) !important;
}

body.theme-dark .table tbody tr:hover {
    background: rgba(255, 255, 255, 0.045) !important;
}

body.theme-dark .pl-section {
    border-color: rgba(255, 255, 255, 0.07) !important;
}

body.theme-dark .pl-section.highlight {
    background: #393939 !important;
}

body.theme-dark .pl-section.final,
body.theme-dark .balance-hero {
    background:
        linear-gradient(135deg, rgba(160, 107, 255, 0.34), rgba(35, 215, 247, 0.12)),
        linear-gradient(180deg, #4A4A4A, #383838) !important;
    border-radius: 8px !important;
}

body.theme-dark .balance-pill {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #F2EDF9 !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px !important;
}

body.theme-dark .line-item {
    border-color: rgba(255, 255, 255, 0.07) !important;
}

body.theme-dark .line-item.total {
    border-top-color: rgba(160, 107, 255, 0.38) !important;
}

body.theme-dark .badge,
body.theme-dark .badge-cash,
body.theme-dark .badge-paid {
    background: rgba(35, 215, 247, 0.14) !important;
    color: #8DEEFF !important;
    border: 1px solid rgba(35, 215, 247, 0.22);
}

body.theme-dark .badge-card,
body.theme-dark .badge-partial,
body.theme-dark .badge-bank_transfer {
    background: rgba(160, 107, 255, 0.18) !important;
    color: #D9C7FF !important;
    border-color: rgba(160, 107, 255, 0.26);
}

body.theme-dark .badge-mobile,
body.theme-dark .badge-pending {
    background: rgba(255, 190, 85, 0.18) !important;
    color: #FFDCA2 !important;
    border-color: rgba(255, 190, 85, 0.26);
}

body.theme-dark .badge-credit,
body.theme-dark .badge-danger {
    background: rgba(255, 107, 107, 0.18) !important;
    color: #FFB4B4 !important;
    border-color: rgba(255, 107, 107, 0.28);
}

body.theme-dark .alert-success,
body.theme-dark .app-inline-feedback-success {
    background: rgba(50, 208, 164, 0.14) !important;
    border-color: rgba(50, 208, 164, 0.34) !important;
    color: #A9F5DD !important;
}

body.theme-dark .alert-error,
body.theme-dark .app-inline-feedback-error {
    background: rgba(255, 107, 107, 0.14) !important;
    border-color: rgba(255, 107, 107, 0.34) !important;
    color: #FFC2C2 !important;
}

body.theme-dark .alert-warning,
body.theme-dark .app-inline-feedback-warning {
    background: rgba(255, 190, 85, 0.14) !important;
    border-color: rgba(255, 190, 85, 0.34) !important;
    color: #FFE0A8 !important;
}

body.theme-dark .alert-info,
body.theme-dark .app-inline-feedback-info {
    background: rgba(160, 107, 255, 0.14) !important;
    border-color: rgba(160, 107, 255, 0.34) !important;
    color: #DBC9FF !important;
}

body.theme-dark .text-success {
    color: #76F0C9 !important;
}

body.theme-dark .text-danger {
    color: #FF9A9A !important;
}

body.theme-dark .text-warning {
    color: #FFD38A !important;
}

body.theme-dark .text-info {
    color: #80EAFF !important;
}

body.theme-dark canvas {
    filter: saturate(1.08) contrast(1.02);
}

body.theme-dark .sidebar-overlay,
body.theme-dark .modal {
    background: rgba(20, 20, 20, 0.76) !important;
}

/* ============================================
   MATERIAL DESIGN THEME
   ============================================ */
body.theme-material {
    color-scheme: light;
    --primary-color: #2563EB;
    --primary-dark: #1D4ED8;
    --primary-hover: #EAF1FF;
    --secondary-color: #0F766E;
    --success-color: #15803D;
    --danger-color: #B91C1C;
    --warning-color: #B45309;
    --info-color: #0369A1;
    --light-color: #F8FAFC;
    --dark-color: #172033;
    --body-bg: #EEF3FB;
    --surface-color: #FFFFFF;
    --surface-elevated: #FFFFFF;
    --surface-muted: #F5F7FB;
    --border-color: #CFD8E6;
    --text-color: #172033;
    --text-muted: #526070;
    --text-soft: #344256;
    --border-radius: 8px;
    --box-shadow: 0 10px 28px rgba(23, 32, 51, 0.08);
    --box-shadow-lg: 0 16px 36px rgba(23, 32, 51, 0.14);
    --transition: all 0.22s cubic-bezier(0.2, 0, 0, 1);
    background: linear-gradient(180deg, #EEF3FB 0%, #F8FAFC 55%, #FFFFFF 100%);
    color: var(--text-color);
}

body.theme-material .main-content {
    background: transparent;
    color: var(--text-color);
}

body.theme-material .header,
body.theme-material .sidebar,
body.theme-material .footer,
body.theme-material .dashboard-card,
body.theme-material .quick-links,
body.theme-material .stat-card,
body.theme-material .card,
body.theme-material .modal-content,
body.theme-material .summary-card,
body.theme-material .report-card,
body.theme-material .filter-bar,
body.theme-material .balance-hero,
body.theme-material .receipt-template-card,
body.theme-material .product-card,
body.theme-material .customer-card,
body.theme-material .settings-panel,
body.theme-material .tab-content,
body.theme-material .dropdown-menu,
body.theme-material .notification-menu,
body.theme-material .user-dropdown-menu,
body.theme-material .branch-switcher {
    background: var(--surface-color) !important;
    border: 1px solid var(--border-color);
    box-shadow: var(--box-shadow);
    color: var(--text-color);
}

body.theme-material .header {
    background: rgba(255, 255, 255, 0.96) !important;
    border-bottom: 1px solid var(--border-color);
}

body.theme-material .footer {
    background: #FFFFFF !important;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

body.theme-material .sidebar {
    background: #FFFFFF !important;
}

body.theme-material .logo,
body.theme-material .user-toggle,
body.theme-material .dropdown-item,
body.theme-material .nav-link {
    color: var(--text-soft) !important;
}

body.theme-material .nav-header,
body.theme-material .help-text,
body.theme-material .text-muted,
body.theme-material .no-data,
body.theme-material .stat-info p,
body.theme-material .product-code,
body.theme-material .product-stock,
body.theme-material .sidebar-footer {
    color: var(--text-muted) !important;
}

body.theme-material .nav-item.active .nav-link {
    background: var(--primary-hover) !important;
    border-left-color: var(--primary-color) !important;
    color: var(--primary-dark) !important;
    font-weight: 700;
}

body.theme-material .page-header h1,
body.theme-material .card-title h2,
body.theme-material h1,
body.theme-material h2,
body.theme-material h3,
body.theme-material h4,
body.theme-material h5,
body.theme-material h6 {
    color: var(--text-color) !important;
    letter-spacing: 0;
}

body.theme-material .btn,
body.theme-material .action-btn,
body.theme-material .btn-icon,
body.theme-material .quick-link,
body.theme-material .product-card,
body.theme-material .stat-card {
    transition: transform 0.18s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.18s cubic-bezier(0.2, 0, 0, 1), background 0.18s;
}

body.theme-material .btn:hover,
body.theme-material .action-btn:hover,
body.theme-material .quick-link:hover,
body.theme-material .product-card:hover,
body.theme-material .stat-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--box-shadow-lg) !important;
}

body.theme-material .btn-primary,
body.theme-material .bg-primary,
body.theme-material .action-btn.bg-primary {
    background: var(--primary-color) !important;
    color: #FFFFFF !important;
    border-color: var(--primary-color) !important;
}

body.theme-material .btn-primary:hover,
body.theme-material .action-btn.bg-primary:hover {
    background: var(--primary-dark) !important;
}

body.theme-material .btn-secondary,
body.theme-material .bg-secondary,
body.theme-material .action-btn.bg-secondary {
    background: #E7EDF7 !important;
    color: #203047 !important;
    border-color: #C7D2E3 !important;
}

body.theme-material .btn-success,
body.theme-material .bg-success,
body.theme-material .action-btn.bg-success {
    background: var(--success-color) !important;
    color: #FFFFFF !important;
}

body.theme-material .btn-warning,
body.theme-material .bg-warning,
body.theme-material .action-btn.bg-warning {
    background: #D97706 !important;
    color: #FFFFFF !important;
}

body.theme-material .btn-danger,
body.theme-material .bg-danger,
body.theme-material .action-btn.bg-danger {
    background: var(--danger-color) !important;
    color: #FFFFFF !important;
}

body.theme-material .btn-icon {
    background: #F8FAFC;
    color: var(--text-soft);
    border: 1px solid var(--border-color);
}

body.theme-material .form-control,
body.theme-material input,
body.theme-material select,
body.theme-material textarea {
    background: #FFFFFF;
    border-color: #BFCBE0;
    border-radius: 6px;
    color: var(--text-color) !important;
}

body.theme-material .form-control:focus,
body.theme-material input:focus,
body.theme-material select:focus,
body.theme-material textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

body.theme-material input::placeholder,
body.theme-material textarea::placeholder {
    color: #778397;
}

body.theme-material .table,
body.theme-material table {
    background: #FFFFFF;
    color: var(--text-color);
}

body.theme-material .table th,
body.theme-material table th {
    background: #EAF1FF !important;
    color: #1E3A8A !important;
    border-bottom-color: #BFD0F2 !important;
}

body.theme-material .table td,
body.theme-material table td {
    color: var(--text-color);
    border-bottom-color: #E3E9F3;
}

body.theme-material tbody tr:hover {
    background: #F4F8FF;
}

body.theme-material .badge,
body.theme-material .status-badge {
    color: #132038;
    border: 1px solid rgba(23, 32, 51, 0.12);
}

body.theme-material .alert-success {
    background: #EAF7EE;
    color: #14532D;
    border-color: #BCE7C8;
}

body.theme-material .alert-error,
body.theme-material .alert-danger {
    background: #FDECEC;
    color: #7F1D1D;
    border-color: #F5B8B8;
}

body.theme-material .alert-warning {
    background: #FFF7E6;
    color: #7C3F00;
    border-color: #F4CF8E;
}

body.theme-material .alert-info {
    background: #E8F6FC;
    color: #075985;
    border-color: #B7E1F2;
}

/* ============================================
   MINIMALIST THEME
   ============================================ */
body.theme-minimal {
    color-scheme: light;
    --primary-color: #0F766E;
    --primary-dark: #0B5C55;
    --primary-hover: #E6F5F2;
    --secondary-color: #4B5563;
    --success-color: #166534;
    --danger-color: #B42318;
    --warning-color: #9A5B00;
    --info-color: #2F6F8F;
    --light-color: #F8FAF8;
    --dark-color: #202326;
    --body-bg: #F6F8F6;
    --surface-color: #FFFFFF;
    --surface-elevated: #FFFFFF;
    --surface-muted: #F0F4F2;
    --border-color: #D8E0DD;
    --text-color: #202326;
    --text-muted: #5C6670;
    --text-soft: #333A41;
    --border-radius: 6px;
    --box-shadow: 0 1px 0 rgba(32, 35, 38, 0.08);
    --box-shadow-lg: 0 8px 20px rgba(32, 35, 38, 0.10);
    background: var(--body-bg);
    color: var(--text-color);
}

body.theme-minimal .header,
body.theme-minimal .sidebar,
body.theme-minimal .footer,
body.theme-minimal .dashboard-card,
body.theme-minimal .quick-links,
body.theme-minimal .stat-card,
body.theme-minimal .card,
body.theme-minimal .modal-content,
body.theme-minimal .summary-card,
body.theme-minimal .report-card,
body.theme-minimal .filter-bar,
body.theme-minimal .balance-hero,
body.theme-minimal .receipt-template-card,
body.theme-minimal .product-card,
body.theme-minimal .customer-card,
body.theme-minimal .settings-panel,
body.theme-minimal .tab-content,
body.theme-minimal .dropdown-menu,
body.theme-minimal .notification-menu,
body.theme-minimal .user-dropdown-menu,
body.theme-minimal .branch-switcher {
    background: var(--surface-color) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--box-shadow) !important;
    color: var(--text-color);
}

body.theme-minimal .main-content {
    background: var(--body-bg);
    color: var(--text-color);
}

body.theme-minimal .sidebar {
    background: #FFFFFF !important;
}

body.theme-minimal .header {
    background: #FFFFFF !important;
    border-bottom: 1px solid var(--border-color);
}

body.theme-minimal .footer {
    background: #FFFFFF !important;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

body.theme-minimal .card,
body.theme-minimal .dashboard-card,
body.theme-minimal .quick-links,
body.theme-minimal .summary-card,
body.theme-minimal .report-card {
    padding-top: 22px;
    padding-bottom: 22px;
}

body.theme-minimal .page-header h1,
body.theme-minimal .card-title h2,
body.theme-minimal h1,
body.theme-minimal h2,
body.theme-minimal h3,
body.theme-minimal h4,
body.theme-minimal h5,
body.theme-minimal h6 {
    color: var(--text-color) !important;
    font-weight: 600;
    letter-spacing: 0;
}

body.theme-minimal .help-text,
body.theme-minimal .text-muted,
body.theme-minimal .no-data,
body.theme-minimal .stat-info p,
body.theme-minimal .source-list,
body.theme-minimal .product-code,
body.theme-minimal .product-stock,
body.theme-minimal .sidebar-footer,
body.theme-minimal .nav-header {
    color: var(--text-muted) !important;
}

body.theme-minimal .logo,
body.theme-minimal .user-toggle,
body.theme-minimal .dropdown-item,
body.theme-minimal .nav-link {
    color: var(--text-soft) !important;
}

body.theme-minimal .nav-item.active .nav-link {
    background: var(--primary-hover) !important;
    border-left-color: var(--primary-color) !important;
    color: var(--primary-dark) !important;
    font-weight: 700;
}

body.theme-minimal .btn-primary,
body.theme-minimal .bg-primary,
body.theme-minimal .action-btn.bg-primary {
    background: var(--primary-color) !important;
    color: #FFFFFF !important;
    border-color: var(--primary-color) !important;
}

body.theme-minimal .btn-primary:hover,
body.theme-minimal .action-btn.bg-primary:hover {
    background: var(--primary-dark) !important;
}

body.theme-minimal .btn-secondary,
body.theme-minimal .bg-secondary,
body.theme-minimal .action-btn.bg-secondary {
    background: #EEF2F0 !important;
    color: var(--text-color) !important;
    border-color: var(--border-color) !important;
}

body.theme-minimal .btn-success,
body.theme-minimal .bg-success,
body.theme-minimal .action-btn.bg-success {
    background: var(--success-color) !important;
    color: #FFFFFF !important;
}

body.theme-minimal .btn-warning,
body.theme-minimal .bg-warning,
body.theme-minimal .action-btn.bg-warning {
    background: #B7791F !important;
    color: #FFFFFF !important;
}

body.theme-minimal .btn-danger,
body.theme-minimal .bg-danger,
body.theme-minimal .action-btn.bg-danger {
    background: var(--danger-color) !important;
    color: #FFFFFF !important;
}

body.theme-minimal .btn-icon {
    background: #FFFFFF;
    color: var(--text-soft);
    border: 1px solid var(--border-color);
}

body.theme-minimal .form-control,
body.theme-minimal input,
body.theme-minimal select,
body.theme-minimal textarea {
    background: #FFFFFF !important;
    border-color: #BFCBC6 !important;
    color: var(--text-color) !important;
}

body.theme-minimal .form-control:focus,
body.theme-minimal input:focus,
body.theme-minimal select:focus,
body.theme-minimal textarea:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14) !important;
}

body.theme-minimal input::placeholder,
body.theme-minimal textarea::placeholder {
    color: #77827B;
}

body.theme-minimal .table th,
body.theme-minimal table th {
    background: #EEF5F2 !important;
    color: #183B36 !important;
    border-bottom-color: #BED1CB !important;
}

body.theme-minimal .table,
body.theme-minimal table {
    background: #FFFFFF;
    color: var(--text-color);
}

body.theme-minimal .table td,
body.theme-minimal table td {
    color: var(--text-color);
    border-bottom-color: #E1E7E4;
}

body.theme-minimal tbody tr:hover {
    background: #F3F8F6;
}

body.theme-minimal .badge,
body.theme-minimal .status-badge {
    color: var(--text-color);
    border: 1px solid rgba(32, 35, 38, 0.12);
}

body.theme-minimal .alert-success {
    background: #EAF7EE;
    color: #14532D;
    border-color: #BCE7C8;
}

body.theme-minimal .alert-error,
body.theme-minimal .alert-danger {
    background: #FDECEC;
    color: #7F1D1D;
    border-color: #F5B8B8;
}

body.theme-minimal .alert-warning {
    background: #FFF7E6;
    color: #754400;
    border-color: #E8C178;
}

body.theme-minimal .alert-info {
    background: #EAF6FA;
    color: #21516B;
    border-color: #BFE0EA;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }

    .header,
    .sidebar,
    .footer,
    .btn,
    .action-btn {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0;
        margin-top: 0;
    }
}
