/* CSS Reset & Variable Definitions */
:root,
html[data-theme="light"] {
    /* Brand Theme Custom Colors */
    --bg: #f3f6fb;
    --bg-soft: #eef3f9;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --primary: #173BA9;
    --primary-bright: #2563eb;
    --text: #0f172a;
    --text-strong: #020617;
    --muted: #64748b;
    --muted-2: #475569;
    --border: #d8e1ef;
    --border-strong: #bfcee3;

    /* Semantic Compatibility Variables */
    --surface-2: #ffffff;
    --surface-3: #f1f5f9;
    --bg-light: #f3f6fb;
    --card-bg: #ffffff;
    --border-color: #d8e1ef;
    --text-primary: #0f172a;
    --text-muted: #64748b;
    
    /* Button Hovers & Feedback States */
    --primary-hover: #1e40af;
    --primary-pressed: #1e3a8a;
    --secondary: #e2e8f0;
    --secondary-hover: #cbd5e1;
    --secondary-pressed: #94a3b8;
    --dark: #0f172a;
    --dark-hover: #1e293b;
    --dark-pressed: #0f172a;
    --success: #10B981;
    --success-hover: #059669;
    --success-pressed: #047857;
    --danger: #EF4444;
    --danger-hover: #DC2626;
    --danger-pressed: #B91C1C;
    
    /* Premium Shadows */
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
    --shadow-premium: 0 20px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.06);
    
    /* Design Tokens */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 14px;
    --radius-full: 9999px;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Dynamic UI */
    --header-bg: #ffffff;
}

html[data-theme="dark"] {
    --bg: #030712;
    --bg-soft: #07111f;
    --surface: #0b1120;
    --surface-soft: #111827;
    --primary: #173BA9;
    --primary-bright: #2F63FF;
    --text: #F9FAFB;
    --text-strong: #FFFFFF;
    --muted: #CBD5E1;
    --muted-2: #94A3B8;
    --border: rgba(47, 99, 255, 0.28);
    --border-strong: rgba(47, 99, 255, 0.45);

    /* Semantic Compatibility Variables */
    --surface-2: #111827;
    --surface-3: #1f2937;
    --bg-light: #030712;
    --card-bg: #0b1120;
    --border-color: rgba(47, 99, 255, 0.28);
    --text-primary: #F9FAFB;
    --text-muted: #CBD5E1;
    
    /* Button Hovers & Feedback States */
    --primary-hover: #2557D6;
    --primary-pressed: #0F2670;
    --secondary: #1F2937;
    --secondary-hover: #374151;
    --secondary-pressed: #111827;
    --dark: #070D19;
    --dark-hover: #173BA9;
    --dark-pressed: #0b1120;
    --success: #10B981;
    --success-hover: #34D399;
    --success-pressed: #059669;
    --danger: #EF4444;
    --danger-hover: #F87171;
    --danger-pressed: #DC2626;
    
    /* Premium Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
    --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.7), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
    
    /* Dynamic UI */
    --header-bg: rgba(11, 17, 32, 0.85);
}

/* Dark theme logo contrast */
html[data-theme="dark"] img[src="saledock-logo.png"] {
    filter: brightness(0) invert(1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    max-width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
    font-family: var(--font-body);
    background-color: var(--bg-light);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

body {
    max-width: 100%;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-weight: 700;
}

/* Global Buttons System (Matches App.axaml classes!) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 42px;
    text-decoration: none;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
}

.btn-large {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: 10px;
}

.btn-full {
    width: 100%;
}

.btn-primary {
    background-color: var(--primary);
    color: #FFFFFF;
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
.btn-primary:active {
    background-color: var(--primary-pressed);
    transform: translateY(0);
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--text-primary);
}
.btn-secondary:hover {
    background-color: var(--secondary-hover);
    color: var(--text-primary);
}
.btn-secondary:active {
    background-color: var(--secondary-pressed);
}

.btn-dark {
    background-color: var(--dark);
    color: #FFFFFF;
}
.btn-dark:hover {
    background-color: var(--dark-hover);
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(11, 31, 58, 0.2);
}
.btn-dark:active {
    background-color: var(--dark-pressed);
    transform: translateY(0);
}

.btn-success {
    background-color: var(--success);
    color: #FFFFFF;
}
.btn-success:hover {
    background-color: var(--success-hover);
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
}
.btn-success:active {
    background-color: var(--success-pressed);
    transform: translateY(0);
}

.btn-danger {
    background-color: var(--danger);
    color: #FFFFFF;
}
.btn-danger:hover {
    background-color: var(--danger-hover);
    color: #FFFFFF;
}
.btn-danger:active {
    background-color: var(--danger-pressed);
}

/* Header & Navigation */
.app-header {
    background-color: var(--header-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand-logo-img {
    height: 38px;
    width: auto;
    object-fit: contain;
    display: block;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.app-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex: 0 0 auto;
    min-width: 0;
}

.logo-icon {
    font-size: 24px;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    white-space: nowrap;
}

.logo-accent {
    color: var(--primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.mobile-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-soft);
    color: var(--text);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    flex: 0 0 44px;
}

.mobile-menu-toggle span {
    width: 20px;
    height: 2px;
    border-radius: var(--radius-full);
    background: currentColor;
    display: block;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 14px;
    transition: color 0.2s ease;
}

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

.nav-btn {
    text-decoration: none;
    color: #FFFFFF;
    background-color: var(--primary);
    border: 1px solid var(--border-strong);
    padding: 8px 16px;
    font-weight: 600;
    font-size: 13px;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    overflow-wrap: anywhere;
}

.nav-btn:hover {
    background-color: var(--primary-bright);
    border-color: var(--primary-bright);
    color: #FFFFFF;
    box-shadow: 0 0 10px rgba(37, 99, 255, 0.4);
}

.theme-toggle-btn {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 14px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
    background: var(--surface);
    border-color: var(--primary-bright);
    color: var(--primary-bright);
    transform: translateY(-1px);
}

/* Section Anchor Sticky Navbar Offset */
section[id] {
    scroll-margin-top: 100px;
}

/* Hero Section */
.hero-section {
    padding: 80px 24px;
    background: radial-gradient(circle at top right, rgba(37, 87, 214, 0.12), transparent 45%),
                radial-gradient(circle at bottom left, rgba(37, 87, 214, 0.08), transparent 45%);
    text-align: center;
}

.hero-container {
    max-width: 800px;
    margin: 0 auto;
}

.hero-logo-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.hero-brand-img {
    height: 120px;
    width: auto;
    max-width: min(100%, 220px);
    object-fit: contain;
    filter: drop-shadow(0 0 25px rgba(37, 87, 214, 0.45));
}

.hero-badge {
    display: inline-block;
    max-width: 100%;
    background-color: rgba(37, 87, 214, 0.2);
    color: var(--text);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 24px;
    border: 1px solid var(--border);
    overflow-wrap: anywhere;
}

.hero-section h1 {
    font-size: 48px;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
    overflow-wrap: break-word;
}

.hero-tagline {
    font-size: 18px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 36px;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 40px;
}

.hero-platforms {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
}

.platform-chip {
    display: inline-block;
    background-color: var(--surface-soft);
    border: 1px solid var(--border-color);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    color: var(--text);
    overflow-wrap: anywhere;
}

/* Sections Global */
.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 40px auto;
    padding: 0 24px;
}

.section-header h2 {
    font-size: 32px;
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.5;
}

/* POS Container Grid */
.simulator-section {
    padding: 60px 24px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.pos-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
    overflow: hidden;
}

.catalogue-panel, .cart-panel {
    display: flex;
    flex-direction: column;
    min-height: 640px;
}

.catalogue-panel {
    background-color: var(--surface);
    border-right: 1px solid var(--border);
    padding: 22px;
}

.cart-panel {
    padding: 22px;
    background-color: var(--surface-2);
}

.panel-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-strong);
}

.search-bar-row {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.input-field, .select-field, .input-field-sm, .select-field-sm {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-strong);
    background-color: var(--surface-3);
    outline: none;
    transition: all 0.2s ease;
}

.input-field {
    flex: 1;
    height: 42px;
    padding: 0 14px;
}

.input-field:focus, .select-field:focus {
    border-color: var(--primary-bright);
    box-shadow: 0 0 0 2px var(--primary-soft);
}

.select-field {
    width: 160px;
    height: 42px;
    padding: 0 10px;
}

/* Product Cards Grid */
.product-grid {
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    padding-right: 4px;
}

.product-card {
    background-color: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
    user-select: none;
}

.product-card:hover {
    border-color: var(--primary-bright);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    background-color: var(--surface-3);
}

.prod-category {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--muted-2);
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.prod-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 8px;
    color: var(--text-strong);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.prod-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.prod-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-bright);
}

.prod-add-btn {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    background-color: var(--primary);
    color: #FFFFFF;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.product-card:hover .prod-add-btn {
    background-color: var(--primary-bright);
    color: #FFFFFF;
}

/* Cart Panel elements */
.cart-table-wrapper {
    flex: 1;
    overflow: auto;
    background-color: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 18px;
}

.cart-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    font-size: 13px;
}

.cart-table th {
    background-color: var(--surface-3);
    color: var(--muted);
    font-weight: 600;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.cart-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--surface-3);
    vertical-align: middle;
    color: var(--text);
}

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

.cart-item-name {
    font-weight: 600;
}

.cart-item-type {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    font-style: italic;
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 6px;
}

.qty-btn {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    border: none;
    background-color: var(--primary);
    color: #FFFFFF;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease;
}

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

.qty-val {
    font-weight: 700;
    min-width: 16px;
    text-align: center;
}

.remove-item-btn {
    background: none;
    border: none;
    color: #B91C1C;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.3;
}

/* Totals inputs */
.totals-section {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 18px;
}

.totals-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 14px;
    border-bottom: 1px solid #F1F5F9;
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
}

.input-field-sm, .select-field-sm {
    height: 34px;
    padding: 0 10px;
}

.totals-breakdown {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

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

.total-discount span {
    color: var(--danger);
}

.grand-total {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    border-top: 1px dashed var(--border-color);
    padding-top: 6px;
    margin-top: 4px;
}

.balance-due {
    font-size: 13px;
    font-weight: 700;
}

.text-danger {
    color: var(--danger) !important;
}

.cart-actions-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 12px;
}

/* Modal overlays (matches dialog overlays) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(3, 7, 18, 0.6);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-card {
    background-color: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
    width: 520px;
    max-width: 90%;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    animation: scaleUp 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: var(--text-strong);
}

@keyframes scaleUp {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.small-modal {
    width: 420px;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.modal-header h4 {
    font-size: 20px;
    font-weight: 700;
}

.modal-success-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
    background-color: rgba(22, 163, 74, 0.1);
    color: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
}

.summary-card {
    background-color: var(--surface-3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: var(--text);
}

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

.modal-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.format-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

/* Receipt Preview Card & Paper Simulation */
.receipt-card {
    width: 440px;
}

.receipt-preview-body {
    max-height: 480px;
    overflow-y: auto;
    background-color: #ECEFF1;
    padding: 16px;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: center;
}

.receipt-container {
    background-color: #FFFFFF;
    width: 100%;
    max-width: 320px;
    padding: 24px 16px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    font-family: monospace;
    font-size: 12px;
    line-height: 1.4;
    color: #000000;
    text-align: left;
}

.receipt-header {
    text-align: center;
    border-bottom: 1px dashed #000000;
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.receipt-logo {
    font-size: 24px;
    margin-bottom: 4px;
}

.receipt-title {
    font-size: 14px;
    font-weight: bold;
}

.receipt-meta {
    margin-bottom: 12px;
    font-size: 11px;
}

.receipt-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
}

.receipt-table th {
    border-bottom: 1px dashed #000000;
    text-align: left;
    font-weight: bold;
}

.receipt-table td, .receipt-table th {
    padding: 4px 0;
}

.receipt-totals {
    border-top: 1px dashed #000000;
    padding-top: 6px;
    margin-bottom: 12px;
}

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

.receipt-totals-line.bold {
    font-weight: bold;
    font-size: 13px;
}

.receipt-footer {
    text-align: center;
    border-top: 1px dashed #000000;
    padding-top: 8px;
    font-size: 11px;
}

.close-icon-btn {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    margin-left: auto;
    color: var(--text-muted);
}

.close-icon-btn:hover {
    color: var(--text-primary);
}

/* Features Grid */
.features-section {
    background-color: var(--surface);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 70px 24px;
}

.features-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    padding: 0 24px;
}

.feature-card {
    background-color: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: all 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-bright);
    box-shadow: var(--shadow-lg);
    background-color: var(--surface-3);
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 18px;
}

.feature-card h4 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-strong);
}

.feature-card p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

/* Download Section */
.download-section {
    padding: 80px 24px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    padding: 0 24px;
}

.release-panel {
    background-color: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin: 0 24px 32px;
    box-shadow: var(--shadow-sm);
}

.stable-release-panel {
    border-color: rgba(16, 185, 129, 0.45);
}

.beta-release-panel {
    border-color: rgba(245, 158, 11, 0.45);
    background-color: color-mix(in srgb, var(--surface) 92%, #f59e0b 8%);
}

.release-panel-header {
    margin-bottom: 22px;
}

.release-panel-header h3 {
    font-family: var(--font-heading);
    font-size: 28px;
    color: var(--text-strong);
    margin: 8px 0;
}

.release-panel-header p {
    color: var(--muted);
    line-height: 1.6;
    max-width: 760px;
}

.release-label {
    display: inline-flex;
    align-items: center;
    border-radius: var(--radius-full);
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stable-label {
    color: #047857;
    background-color: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.28);
}

.beta-label {
    color: #92400e;
    background-color: rgba(245, 158, 11, 0.16);
    border: 1px solid rgba(245, 158, 11, 0.34);
}

.beta-feature-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
    margin: 0 0 24px;
    padding-left: 20px;
    color: var(--text);
    font-size: 14px;
}

.release-panel .download-grid {
    padding: 0;
}

.download-card {
    min-width: 0;
    background-color: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
}

.platform-icon {
    font-size: 48px;
}

.download-version {
    background-color: rgba(22, 163, 74, 0.1);
    color: var(--success);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    margin-top: -6px;
}

.stable-version {
    background-color: rgba(16, 185, 129, 0.12);
    color: #047857;
}

.beta-version {
    background-color: rgba(245, 158, 11, 0.16);
    color: #92400e;
}

.download-card .btn {
    width: 100%;
    margin-top: 10px;
}

.setup-instructions {
    border-top: 1px solid var(--border-color);
    width: 100%;
    padding-top: 20px;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setup-instructions h5 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.setup-instructions ol {
    padding-left: 18px;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.setup-instructions li {
    margin-bottom: 6px;
}

.setup-instructions pre {
    max-width: 100%;
    background-color: var(--surface-soft);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-family: monospace;
    font-size: 11px;
    color: var(--text);
    overflow-x: auto;
    margin: 4px 0;
}

/* Cloud/support section */
.cloud-coming-soon-section {
    padding: 70px 24px;
    background: radial-gradient(circle at bottom, rgba(37, 87, 214, 0.12), transparent 50%);
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.cloud-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.cloud-badge {
    background-color: var(--surface-soft);
    color: var(--text-strong);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 700;
    border: 1px solid var(--border);
}

.cloud-coming-soon-section h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-strong);
}

.cloud-copy {
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.6;
    max-width: 650px;
    margin: 0 auto;
}

.support-card {
    margin-top: 16px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    background-color: var(--surface);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: 100%;
    max-width: 500px;
}

.support-card h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-strong);
    margin-bottom: 4px;
}

.support-card p {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
}

.support-btn {
    gap: 8px;
    min-height: 42px;
}

/* Footer styling */
.app-footer {
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-soft);
    padding: 50px 24px;
    color: var(--text);
    font-size: 13px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.footer-brand img {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.footer-brand span {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    color: var(--text-strong);
}

.footer-brand span span {
    color: var(--primary-bright);
}

.footer-copy {
    font-size: 13px;
    color: var(--text-muted);
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.footer-link:hover {
    color: var(--primary-bright);
}

.footer-divider {
    color: var(--border-strong);
    opacity: 0.5;
}

.footer-tag {
    background-color: var(--surface-soft);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
}

/* Responsive Overrides */
@media (max-width: 1180px) {
    .header-container,
    .simulator-section,
    .download-section {
        padding-left: 20px;
        padding-right: 20px;
    }

    .nav-links {
        gap: 14px;
    }

    .features-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .hero-section {
        padding: 64px 20px;
    }

    .hero-section h1 {
        font-size: 42px;
    }

    .pos-container {
        grid-template-columns: minmax(0, 1fr);
    }

    .catalogue-panel {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        min-height: auto;
    }

    .cart-panel {
        min-height: 620px;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: 520px;
    }

    .download-grid {
        grid-template-columns: minmax(0, 1fr);
        max-width: 720px;
        margin: 0 auto;
    }

    .release-panel {
        margin-left: 0;
        margin-right: 0;
    }

    .beta-feature-list {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 900px) {
    .app-header {
        position: sticky;
    }

    .header-container {
        flex-wrap: wrap;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .mobile-menu-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .nav-links {
        display: none;
        flex: 1 0 100%;
        order: 3;
        width: 100%;
        align-items: stretch;
        gap: 10px;
        padding-top: 12px;
        border-top: 1px solid var(--border);
    }

    .nav-links.is-open {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nav-link,
    .nav-btn,
    .theme-toggle-btn {
        min-height: 44px;
        justify-content: center;
        text-align: center;
    }

    .nav-link {
        display: inline-flex;
        align-items: center;
        background: var(--surface-soft);
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        padding: 8px 12px;
    }
}

@media (max-width: 768px) {
    .hero-section,
    .features-section,
    .download-section,
    .cloud-coming-soon-section {
        padding-top: 52px;
        padding-bottom: 52px;
    }

    .section-header {
        margin-bottom: 28px;
        padding: 0;
    }

    .section-header h2,
    .cloud-coming-soon-section h2 {
        font-size: 28px;
    }

    .section-header p,
    .hero-tagline,
    .cloud-copy {
        font-size: 15px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions .btn {
        width: 100%;
        min-width: 0;
    }

    .platform-chip {
        white-space: normal;
    }

    .search-bar-row,
    .totals-form-grid,
    .cart-actions-row {
        grid-template-columns: 1fr;
    }

    .search-bar-row {
        display: grid;
    }

    .select-field,
    .input-field,
    .input-field-sm,
    .select-field-sm {
        width: 100%;
    }

    .features-grid {
        grid-template-columns: minmax(0, 1fr);
        padding: 0;
    }

    .download-grid {
        padding: 0;
    }

    .footer-container {
        flex-direction: column;
        gap: 18px;
        text-align: center;
        padding: 0;
    }

    .footer-brand,
    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 560px) {
    .header-container {
        padding-left: 14px;
        padding-right: 14px;
        gap: 10px;
    }

    .brand-logo-img {
        height: 32px;
    }

    .logo-text {
        font-size: 18px;
    }

    .mobile-menu-toggle {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    .nav-links.is-open {
        grid-template-columns: 1fr;
    }

    .theme-toggle-btn,
    .nav-btn,
    .nav-link {
        width: 100%;
    }

    .hero-section {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero-brand-img {
        height: 92px;
    }

    .hero-badge {
        font-size: 12px;
    }

    .hero-section h1 {
        font-size: 32px;
    }

    .btn-large {
        padding-left: 18px;
        padding-right: 18px;
        font-size: 15px;
    }

    .hero-platforms {
        align-items: stretch;
    }

    .hero-platforms > span:first-child,
    .platform-chip {
        width: 100%;
        max-width: 100%;
    }

    .simulator-section,
    .features-section,
    .download-section,
    .cloud-coming-soon-section,
    .app-footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .pos-container {
        border-radius: var(--radius-md);
    }

    .catalogue-panel {
        padding: 16px;
    }

    .cart-panel {
        padding: 16px;
        min-height: auto;
    }

    .product-grid {
        grid-template-columns: 1fr;
        max-height: none;
        overflow-y: visible;
        padding-right: 0;
    }

    .product-card {
        min-height: 110px;
    }

    .cart-table-wrapper {
        flex: none;
        max-height: 360px;
    }

    .totals-section {
        padding: 14px;
    }

    .modal-card {
        width: calc(100% - 24px);
        max-width: none;
        padding: 18px;
    }

    .modal-actions-grid {
        grid-template-columns: 1fr;
    }

    .receipt-preview-body {
        padding: 10px;
    }

    .download-card,
    .feature-card,
    .support-card {
        padding: 22px;
    }

    .download-grid {
        gap: 20px;
    }

    .download-card .btn,
    .support-btn {
        width: 100%;
    }

    .footer-container {
        align-items: stretch;
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
    }

    .footer-divider {
        display: none;
    }
}

@media (max-width: 360px) {
    .header-container {
        padding-left: 10px;
        padding-right: 10px;
        gap: 8px;
    }

    .brand-logo-img {
        height: 28px;
    }

    .logo-text {
        font-size: 15px;
    }

    .hero-section h1 {
        font-size: 28px;
    }

    .section-header h2,
    .cloud-coming-soon-section h2 {
        font-size: 25px;
    }

    .download-card,
    .feature-card,
    .support-card,
    .catalogue-panel,
    .cart-panel {
        padding: 14px;
    }
}

/* ==========================================================================
   EXPLICIT THEME OVERRIDES FOR NAVBAR & LOGOS
   ========================================================================== */

/* 1. LIGHT THEME OVERRIDES */
html[data-theme="light"] .app-header {
    background-color: #ffffff !important;
    border-bottom: 1px solid #d8e1ef !important;
}

html[data-theme="light"] .logo-text {
    color: #0f172a !important;
}

html[data-theme="light"] .logo-accent {
    color: #173BA9 !important;
}

html[data-theme="light"] .nav-link {
    color: #334155 !important;
}

html[data-theme="light"] .nav-link:hover {
    color: #173BA9 !important;
}

html[data-theme="light"] .theme-toggle-btn {
    color: #0f172a !important;
    background-color: #ffffff !important;
    border: 1px solid #2563eb !important;
}

html[data-theme="light"] .theme-toggle-btn:hover {
    background-color: #f8fafc !important;
    color: #173BA9 !important;
    border-color: #173BA9 !important;
}

html[data-theme="light"] .brand-logo-img {
    filter: none !important;
    opacity: 1 !important;
}

/* 2. DARK THEME OVERRIDES */
html[data-theme="dark"] .app-header {
    background-color: rgba(11, 17, 32, 0.95) !important;
    border-bottom: 1px solid rgba(47, 99, 255, 0.28) !important;
}

html[data-theme="dark"] .logo-text {
    color: #FFFFFF !important;
}

html[data-theme="dark"] .logo-accent {
    color: #2F63FF !important;
}

html[data-theme="dark"] .nav-link {
    color: #CBD5E1 !important;
}

html[data-theme="dark"] .nav-link:hover {
    color: #2F63FF !important;
}

html[data-theme="dark"] .theme-toggle-btn {
    color: #F9FAFB !important;
    background-color: #111827 !important;
    border: 1px solid rgba(47, 99, 255, 0.28) !important;
}

html[data-theme="dark"] .theme-toggle-btn:hover {
    background-color: #0b1120 !important;
    color: #2F63FF !important;
    border-color: #2F63FF !important;
}

html[data-theme="dark"] img[src="saledock-logo.png"],
html[data-theme="dark"] .brand-logo-img {
    filter: brightness(0) invert(1) !important;
    opacity: 1 !important;
}

/* ==========================================================================
   PR ACCESSIBILITY AND CSS/JS STYLE CONSISTENCY FIXES
   ========================================================================== */

/* 1. Quantity Adjuster and Compact Input Styles */
.qty-adjuster {
    display: flex;
    align-items: center;
    gap: 6px;
}

.qty-input {
    width: 36px;
    height: 24px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background-color: var(--surface-3);
    color: var(--text-strong);
    font-weight: 700;
    font-size: 13px;
    outline: none;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* 2. Dynamic 80mm Thermal Receipt Preview Styles */
.thermal-receipt {
    width: 100%;
    font-family: monospace;
    font-size: 11px;
    color: #000000;
}

.thermal-header {
    text-align: center;
    margin-bottom: 10px;
}

.thermal-header h2 {
    font-size: 14px;
    font-weight: bold;
    color: #000000;
    margin-bottom: 4px;
}

.thermal-meta {
    margin-bottom: 10px;
    font-size: 11px;
}

.thermal-meta p, .thermal-header p {
    margin: 2px 0;
    color: #000000;
}

.thermal-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}

.thermal-table th {
    border-bottom: 1px dashed #000000;
    text-align: left;
    font-weight: bold;
    padding: 4px 0;
    color: #000000;
}

.thermal-table td {
    padding: 4px 0;
    vertical-align: top;
    color: #000000;
}

.thermal-totals {
    margin-top: 5px;
}

.thermal-row {
    display: flex;
    justify-content: space-between;
    margin: 2px 0;
}

.thermal-row.grand-row {
    font-weight: bold;
    font-size: 12px;
}

.thermal-footer {
    text-align: center;
    margin-top: 15px;
    font-size: 10px;
}

.divider {
    text-align: center;
    margin: 4px 0;
}

.text-bold {
    font-weight: bold;
}

/* 3. Dynamic A4 Invoice Preview Styles */
.a4-invoice {
    width: 100%;
    font-family: var(--font-body);
    font-size: 11px;
    color: #1e293b;
}

.a4-header-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.a4-brand {
    font-size: 14px;
    font-weight: 800;
    color: #173BA9;
    margin-bottom: 2px;
}

.a4-subtitle {
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
}

.invoice-title-text {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    margin-top: 6px;
}

.invoice-meta-box {
    font-size: 10px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 6px;
    border-radius: 4px;
    margin-top: 4px;
}

.invoice-meta-box p {
    margin: 2px 0;
}

.badge-paid, .badge-unpaid, .badge-partial {
    display: inline-block;
    padding: 2px 6px;
    font-size: 9px;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
}

.badge-paid {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-unpaid {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-partial {
    background-color: #fef3c7;
    color: #92400e;
}

.invoice-divider {
    border: 0;
    border-top: 1px solid #cbd5e1;
    margin: 10px 0;
}

.customer-info-box {
    margin-bottom: 12px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 6px;
    border-radius: 4px;
}

.customer-info-box h4 {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 2px;
    text-transform: uppercase;
}

.customer-info-box p {
    margin: 2px 0;
}

.cust-name {
    font-weight: bold;
    color: #0f172a;
}

.a4-invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
    font-size: 10px;
}

.a4-invoice-table th {
    background-color: #f1f5f9;
    color: #475569;
    font-weight: bold;
    padding: 4px;
    border-bottom: 1px solid #cbd5e1;
}

.a4-invoice-table td {
    padding: 6px 4px;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
}

.item-name {
    font-weight: bold;
    color: #0f172a;
}

.item-desc {
    font-size: 8px;
    color: #64748b;
    margin-top: 1px;
}

.a4-totals-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.terms-box {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 6px;
    border-radius: 4px;
    font-size: 8px;
    color: #64748b;
}

.terms-box h5 {
    font-size: 9px;
    font-weight: bold;
    color: #475569;
    margin-bottom: 2px;
}

.terms-box p {
    margin: 1px 0;
}

.a4-totals-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10px;
}

.a4-totals-table td {
    padding: 3px 0;
    color: #475569;
}

.a4-totals-table tr.grand-total-row td {
    font-weight: bold;
    font-size: 11px;
    color: #173BA9;
    border-top: 1px dashed #cbd5e1;
    padding-top: 6px;
}

.a4-totals-table tr.balance-due-row td {
    font-weight: bold;
    border-top: 1px solid #cbd5e1;
    padding-top: 4px;
}

.a4-footer {
    text-align: center;
    margin-top: 15px;
    font-size: 9px;
    color: #94a3b8;
}
