/* Main variables and styling reset */
:root {
    --bg-color: #0c0f1d;
    --panel-bg: rgba(20, 24, 46, 0.45);
    --panel-border: rgba(255, 255, 255, 0.08);
    --glow-color-1: rgba(123, 97, 255, 0.15);
    --glow-color-2: rgba(0, 240, 255, 0.1);
    
    --primary-color: #7b61ff;
    --primary-hover: #9681ff;
    --secondary-color: #00f0ff;
    --secondary-hover: #57f5ff;
    
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dark: #111827;
    
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Decorative Elements */
.background-decor {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
}

.circle-1 {
    top: -10%;
    right: 10%;
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, var(--glow-color-1) 0%, transparent 70%);
}

.circle-2 {
    bottom: -10%;
    left: -5%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, var(--glow-color-2) 0%, transparent 70%);
}

/* App Container and Header */
.app-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-icon {
    font-size: 2.2rem;
    color: var(--secondary-color);
    filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.4));
}

.title-meta h1 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sub-title {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.header-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    padding: 6px 14px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-indicator.online {
    background-color: var(--success-color);
    box-shadow: 0 0 8px var(--success-color);
    animation: pulse 2s infinite;
}

/* Glassmorphism Panel styles */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Workspace Grid */
.workspace-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 24px;
    align-items: start;
    flex-grow: 1;
}

@media (max-width: 1024px) {
    .workspace-grid {
        grid-template-columns: 1fr;
    }
}

/* Control Panel (Left Side) */
.control-panel {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.panel-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.panel-section h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-section h2 i {
    color: var(--primary-color);
}

/* Search and Auto-Suggest styling */
.search-box {
    position: relative;
    width: 100%;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 15px rgba(123, 97, 255, 0.25);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.95rem;
    pointer-events: none;
}

.dropdown-list {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    background: #15192e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.dropdown-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.2s ease;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--secondary-color);
}

.dropdown-item.no-hover {
    cursor: default;
    color: var(--text-muted);
    font-style: italic;
}

.dropdown-item.no-hover:hover {
    background: transparent;
    color: var(--text-muted);
}

.id-tag, .code-tag {
    background: rgba(123, 97, 255, 0.2);
    color: #a5b4fc;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.rfc-tag {
    color: var(--text-muted);
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
}

.price-tag {
    margin-left: auto;
    color: var(--secondary-color);
    font-weight: 600;
}

/* Selected Client Card styling */
.selected-card {
    background: rgba(123, 97, 255, 0.06);
    border: 1px solid rgba(123, 97, 255, 0.2);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: fadeIn 0.3s ease;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.client-id-badge {
    background: var(--primary-color);
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 0 8px rgba(123, 97, 255, 0.4);
}

.card-header h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
}

.card-body-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 0.85rem;
}

.card-body-grid div {
    color: var(--text-muted);
}

.card-body-grid span {
    color: var(--text-main);
    font-weight: 500;
}

.card-body-grid .full-width {
    grid-column: span 2;
}

/* Article Adder Form */
.adder-form {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: fadeIn 0.3s ease;
}

.adder-details h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 4px;
}

.art-code-badge {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.form-group input {
    padding: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

/* Grid Panel (Right Side) */
.grid-panel {
    padding: 24px;
    display: flex;
    flex-direction: column;
    min-height: 500px;
    height: 100%;
}

.panel-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.panel-header-row h2 {
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-header-row h2 i {
    color: var(--secondary-color);
}

/* Table styles */
.table-container {
    flex-grow: 1;
    overflow-x: auto;
    margin-bottom: 24px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.01);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: left;
}

th, td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

th {
    background: rgba(255, 255, 255, 0.03);
    font-weight: 600;
    color: var(--text-muted);
}

tr:last-child td {
    border-bottom: none;
}

.empty-row-placeholder td {
    padding: 60px 20px;
    color: var(--text-muted);
}

.placeholder-icon {
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.05);
    margin-bottom: 16px;
    display: inline-block;
}

.code-tag-table {
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: monospace;
    color: var(--text-muted);
}

.brand-tag {
    background: rgba(0, 240, 255, 0.08);
    color: #a5f3fc;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* Summary and Action buttons */
.summary-action-area {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

@media (max-width: 640px) {
    .summary-action-area {
        flex-direction: column;
        align-items: stretch;
    }
}

.totals-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 250px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.total-row span:last-child {
    color: var(--text-main);
    font-weight: 500;
}

.total-row.grand-total {
    font-size: 1.15rem;
    color: var(--text-main);
    font-weight: 700;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 8px;
    margin-top: 4px;
}

.total-row.grand-total span:last-child {
    color: var(--secondary-color);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

/* Button styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #6366f1 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(123, 97, 255, 0.35);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #4f46e5 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(123, 97, 255, 0.45);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.15);
    box-shadow: none;
    cursor: not-allowed;
}

.btn-secondary {
    background: rgba(0, 240, 255, 0.08);
    color: var(--secondary-color);
    border: 1px solid rgba(0, 240, 255, 0.15);
}

.btn-secondary:hover {
    background: rgba(0, 240, 255, 0.15);
    border-color: var(--secondary-color);
}

.btn-text {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.btn-text:hover {
    color: var(--error-color);
}

.btn-delete-row {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.2s ease;
}

.btn-delete-row:hover {
    color: var(--error-color);
}

/* Modal Overlay and Modal Content */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 8, 17, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    max-width: 500px;
    width: 90%;
    padding: 36px 28px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.modal-icon {
    font-size: 4rem;
    margin-bottom: 8px;
}

.modal-icon.success {
    color: var(--success-color);
    filter: drop-shadow(0 0 15px rgba(16, 185, 129, 0.4));
}

.modal-icon.question {
    color: var(--warning-color);
    filter: drop-shadow(0 0 15px rgba(245, 158, 11, 0.3));
}

.modal-icon.error {
    color: var(--danger-color, #ef4444);
    filter: drop-shadow(0 0 15px rgba(239, 68, 68, 0.4));
}

.modal-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.modal-details-box {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px;
    margin: 8px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.detail-item .label {
    color: var(--text-muted);
}

.detail-item .val {
    font-family: monospace;
    font-weight: 600;
    color: var(--text-main);
    font-size: 1rem;
}

.detail-item .val.highlight {
    font-family: inherit;
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 1.15rem;
}

/* Toast Notification */
.toast-error {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: rgba(239, 68, 68, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 14px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    font-weight: 500;
}

/* Utility classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.5; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); opacity: 0.5; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.bounce-in {
    animation: bounceIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

.slide-in {
    animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideIn {
    from { transform: translateY(100px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* F1 Keyboard Badge */
.f1-badge {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--secondary-color);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.5);
    margin-left: 8px;
    cursor: help;
    display: inline-block;
    vertical-align: middle;
}

/* F1 Modal specific styling */
.f1-modal-content {
    max-width: 900px;
    width: 95%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 24px;
}

.f1-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 12px;
}

.f1-modal-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.f1-modal-header h2 i {
    color: var(--primary-color);
}

.btn-close-icon {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.btn-close-icon:hover {
    color: var(--error-color);
}

.f1-search-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.f1-search-area .search-box {
    flex-grow: 1;
}

.search-help-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.search-help-text kbd {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    padding: 1px 4px;
    font-family: inherit;
    font-weight: 600;
}

.f1-results-container {
    flex-grow: 1;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.15);
    position: relative;
    min-height: 250px;
}

.f1-results-container table {
    width: 100%;
}

.f1-results-container tr {
    cursor: pointer;
    transition: all 0.1s ease;
}

.f1-results-container tr.selected-row {
    background: var(--primary-color) !important;
    color: #ffffff;
}

.f1-results-container tr.selected-row .code-tag-table,
.f1-results-container tr.selected-row .brand-tag,
.f1-results-container tr.selected-row .rfc-tag,
.f1-results-container tr.selected-row .id-tag {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.f1-results-container tbody tr:hover:not(.selected-row) {
    background: rgba(255, 255, 255, 0.03);
}

.f1-loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.1rem;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.f1-empty-state-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-muted);
}

/* Inline quantity input in grid */
.grid-qty-input {
    width: 80px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-main);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.grid-qty-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.25);
}

.grid-qty-input option {
    background-color: #14182e;
    color: #ffffff;
}

/* Stock Toast */
.toast-stock {
    position: fixed;
    top: 24px;
    right: 24px;
    background: rgba(16, 185, 129, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 14px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    z-index: 1002;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Login Card and Modal */
.login-card {
    max-width: 420px;
    width: 100%;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    text-align: center;
}

.login-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.login-icon-lg {
    font-size: 3.5rem;
    color: var(--primary-color);
    filter: drop-shadow(0 0 15px rgba(123, 97, 255, 0.4));
}

.login-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.login-header p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
    margin-bottom: 16px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
}

.btn-block {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 1rem;
    margin-top: 8px;
}

.seller-display-name {
    background: rgba(123, 97, 255, 0.1);
    border: 1px solid rgba(123, 97, 255, 0.2);
    color: var(--primary-hover);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.login-sellers-list-toggle {
    margin-top: 8px;
}

.login-sellers-container {
    max-height: 180px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.login-seller-item {
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.login-seller-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.login-seller-item.selected {
    background: var(--primary-color);
    color: #ffffff;
}

.login-seller-item .seller-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.login-seller-item.selected .seller-badge {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
}

.login-seller-item .pwd-indicator {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.login-seller-item.selected .pwd-indicator {
    color: rgba(255, 255, 255, 0.7);
}

/* Logged-in Seller Status in Header */
.vendedor-active-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 12px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    margin-right: 8px;
    color: var(--secondary-color);
    font-weight: 600;
}

.btn-logout {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-right: 12px;
}

.btn-logout:hover {
    color: #ffffff;
    background: rgba(123, 97, 255, 0.2);
    border-color: rgba(123, 97, 255, 0.4);
    box-shadow: 0 0 10px rgba(123, 97, 255, 0.2);
}

/* Developer Watermark */
.watermark-footer {
    position: fixed;
    bottom: 10px;
    right: 12px;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.08);
    font-family: inherit;
    pointer-events: none;
    z-index: 9999;
    user-select: none;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Input with Icon Outer (Left align & outside icon) */
.input-with-icon-outer {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.input-with-icon-outer input,
.input-with-icon-outer select {
    flex-grow: 1;
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    text-align: left; /* Ensure text is aligned left */
    transition: all 0.3s ease;
}

.input-with-icon-outer input:focus,
.input-with-icon-outer select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 15px rgba(123, 97, 255, 0.25);
}

.outer-icon {
    font-size: 1.25rem;
    color: var(--text-muted);
    width: 24px;
    text-align: center;
    flex-shrink: 0;
    filter: drop-shadow(0 0 8px rgba(123, 97, 255, 0.15));
}

.input-with-icon-outer select option {
    background-color: #14182e;
    color: #ffffff;
}

/* History Table compact styling */
.history-table th,
.history-table td {
    padding: 8px 10px !important;
    font-size: 0.82rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.history-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Delphi style modal classes */
.delphi-btn {
    box-shadow: none !important;
    transition: none !important;
}
    justify-content: center;
    padding: 12px;
    font-size: 1rem;
    margin-top: 8px;
}

.seller-display-name {
    background: rgba(123, 97, 255, 0.1);
    border: 1px solid rgba(123, 97, 255, 0.2);
    color: var(--primary-hover);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.login-sellers-list-toggle {
    margin-top: 8px;
}

.login-sellers-container {
    max-height: 180px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.login-seller-item {
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.login-seller-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.login-seller-item.selected {
    background: var(--primary-color);
    color: #ffffff;
}

.login-seller-item .seller-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.login-seller-item.selected .seller-badge {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
}

.login-seller-item .pwd-indicator {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.login-seller-item.selected .pwd-indicator {
    color: rgba(255, 255, 255, 0.7);
}

/* Logged-in Seller Status in Header */
.vendedor-active-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 12px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    margin-right: 8px;
    color: var(--secondary-color);
    font-weight: 600;
}

.btn-logout {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-right: 12px;
}

.btn-logout:hover {
    color: #ffffff;
    background: rgba(123, 97, 255, 0.2);
    border-color: rgba(123, 97, 255, 0.4);
    box-shadow: 0 0 10px rgba(123, 97, 255, 0.2);
}

/* Developer Watermark */
.watermark-footer {
    position: fixed;
    bottom: 10px;
    right: 12px;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.08);
    font-family: inherit;
    pointer-events: none;
    z-index: 9999;
    user-select: none;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Input with Icon Outer (Left align & outside icon) */
.input-with-icon-outer {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.input-with-icon-outer input,
.input-with-icon-outer select {
    flex-grow: 1;
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    text-align: left; /* Ensure text is aligned left */
    transition: all 0.3s ease;
}

.input-with-icon-outer input:focus,
.input-with-icon-outer select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 15px rgba(123, 97, 255, 0.25);
}

.outer-icon {
    font-size: 1.25rem;
    color: var(--text-muted);
    width: 24px;
    text-align: center;
    flex-shrink: 0;
    filter: drop-shadow(0 0 8px rgba(123, 97, 255, 0.15));
}

.input-with-icon-outer select option {
    background-color: #14182e;
    color: #ffffff;
}

/* History Table compact styling */
.history-table th,
.history-table td {
    padding: 8px 10px !important;
    font-size: 0.82rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.history-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Delphi style modal classes */
.delphi-btn {
    box-shadow: none !important;
    transition: none !important;
}
.delphi-btn:active {
    border-color: #808080 #ffffff #ffffff #808080 !important;
    padding-top: 1px !important;
    padding-left: 1px !important;
}
.delphi-btn:disabled {
    color: #808080 !important;
    cursor: not-allowed !important;
    border-color: #ffffff #808080 #808080 #ffffff !important;
    background-color: #f0f0f0 !important;
}

/* Chrome, Safari, Edge, Opera: Remove spin-buttons */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox: Remove spin-buttons */
input[type=number] {
    -moz-appearance: textfield;
}


/* F5: stock availability by branch */
.stock-branches-card {
    position: relative;
    width: min(760px, calc(100vw - 32px));
    max-height: min(720px, calc(100vh - 40px));
    padding: 24px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: hidden;
}

.stock-modal-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-right: 34px;
}

.stock-modal-heading h2 {
    margin: 0 0 4px;
    color: var(--text-main);
    font-size: 1.25rem;
}

.stock-modal-heading p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 580px;
}

.stock-modal-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: #a78bfa;
    font-size: 1.2rem;
    background: rgba(123, 97, 255, 0.16);
    border: 1px solid rgba(167, 139, 250, 0.28);
}

.stock-modal-x {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.2s ease;
}

.stock-modal-x:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.stock-branches-list {
    min-height: 180px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 12px;
    padding-right: 4px;
}

.stock-branch-row {
    min-height: 42px;
    padding: 8px 14px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.075);
}

.stock-branch-name {
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
}

.stock-branch-status {
    min-width: 92px;
    padding: 5px 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.stock-branch-status.has-stock {
    color: #34d399;
    background: rgba(16, 185, 129, 0.13);
    border: 1px solid rgba(52, 211, 153, 0.25);
}

.stock-branch-status.no-stock {
    color: #fb7185;
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(251, 113, 133, 0.22);
}

.stock-modal-loading,
.stock-modal-error {
    min-height: 180px;
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    color: var(--text-muted);
}

.stock-modal-error {
    color: #fb7185;
}

.stock-modal-close {
    width: 100%;
    justify-content: center;
}

@media (max-width: 560px) {
    .stock-branches-card {
        padding: 20px;
    }

    .stock-modal-heading p {
        max-width: 250px;
    }
}

.search-box input {
    padding-right: 48px !important;
}

.f1-inline-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(123, 97, 255, 0.12);
    border: 1px solid rgba(123, 97, 255, 0.25);
    color: var(--secondary-color);
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    outline: none;
    height: 24px;
    z-index: 5;
}
.f1-inline-btn:hover {
    background: var(--secondary-color);
    color: #000;
    box-shadow: 0 0 8px rgba(123, 97, 255, 0.4);
    border-color: var(--secondary-color);
}
.f1-inline-btn:active {
    transform: scale(0.95);
}

.btn-stock-f5 {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #34d399;
    font-family: 'Outfit', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    outline: none;
}
.btn-stock-f5:hover {
    background: #10b981;
    color: #000;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
    border-color: #10b981;
}
.btn-stock-f5:active {
    transform: scale(0.9);
}

/* --- Mobile Responsiveness and UI Enhancements (Facebook-style Clean Layout) --- */

.mobile-tabs-container {
    display: none !important;
}

@media (max-width: 768px) {
    .f1-badge {
        display: none !important;
    }

    /* Single continuous vertical flow, just like desktop but stacked */
    .workspace-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
        padding: 12px !important;
        margin-bottom: 20px !important;
    }

    /* Panels compact styling */
    .control-panel, 
    .grid-panel {
        width: 100% !important;
        margin-bottom: 0 !important;
        padding: 14px !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    }
    
    /* Header adaptation - keep all actions but make them compact */
    .app-header {
        padding: 10px 12px !important;
        flex-direction: column !important;
        gap: 8px !important;
        align-items: flex-start !important;
    }
    
    .logo-area {
        width: 100% !important;
        justify-content: flex-start !important;
    }
    
    .logo-area img {
        height: 32px !important;
    }
    
    .app-header h1 {
        font-size: 1.15rem !important;
    }
    
    .header-status {
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
        padding-top: 8px !important;
        align-items: center !important;
    }
    
    /* Show action buttons in header, but make them small and compact */
    .header-status #btn-supervisor-panel,
    .header-status #btn-logout,
    .header-status #exchange-rate-badge {
        display: inline-flex !important;
        height: 32px !important;
        padding: 4px 10px !important;
        font-size: 0.78rem !important;
        border-radius: 6px !important;
        margin-right: 0 !important;
    }

    /* Compact search box heights to prevent giants inputs */
    .search-box {
        height: 38px !important;
        padding: 0 12px !important;
        border-radius: 8px !important;
        gap: 8px !important;
    }
    
    .search-box input {
        font-size: 0.88rem !important;
    }
    
    .search-box .search-icon {
        font-size: 0.85rem !important;
    }
    
    .f1-inline-btn {
        height: 22px !important;
        font-size: 0.68rem !important;
        padding: 1px 6px !important;
        border-radius: 4px !important;
    }

    /* Transform Table into Responsive Cards to prevent horizontal overflow */
    #invoice-table {
        border: none !important;
        background: transparent !important;
    }
    
    #invoice-table thead {
        display: none !important;
    }
    
    #invoice-table tbody,
    #invoice-table tr,
    #invoice-table td {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    #invoice-table tbody tr {
        background: rgba(255, 255, 255, 0.02) !important;
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
        border-radius: 12px !important;
        padding: 10px 12px !important;
        margin-bottom: 10px !important;
        position: relative !important;
    }
    
    #invoice-table td {
        padding: 4px 0 !important;
        border: none !important;
        text-align: left !important;
        font-size: 0.88rem !important;
    }
    
    /* Card details styling */
    #invoice-table td:nth-child(1) {
        display: inline-block !important;
        width: auto !important;
        color: var(--secondary-color) !important;
        font-weight: 800 !important;
        font-size: 0.75rem !important;
        border-radius: 4px !important;
        background: rgba(123, 97, 255, 0.12) !important;
        padding: 1px 6px !important;
        margin-bottom: 4px !important;
    }
    
    #invoice-table td:nth-child(2) {
        display: inline-block !important;
        width: auto !important;
        margin-left: 6px !important;
        margin-bottom: 4px !important;
    }
    
    #invoice-table td:nth-child(3) {
        font-size: 0.92rem !important;
        font-weight: 600 !important;
        color: var(--text-color) !important;
        margin-bottom: 4px !important;
    }
    
    #invoice-table td:nth-child(4) {
        display: inline-block !important;
        width: auto !important;
        font-size: 0.75rem !important;
    }
    
    /* Quantity row layout */
    #invoice-table td:nth-child(5) {
        display: flex !important;
        align-items: center !important;
        margin-top: 8px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.03) !important;
        padding-top: 8px !important;
    }
    
    #invoice-table td:nth-child(5)::before {
        content: "Cant:" !important;
        font-weight: 600 !important;
        color: var(--text-muted) !important;
        margin-right: 8px !important;
        font-size: 0.8rem !important;
    }
    
    .grid-qty-input {
        width: 70px !important;
        height: 32px !important;
        font-size: 0.88rem !important;
        padding: 4px 6px !important;
    }
    
    /* Price type selection and price input row */
    #invoice-table td:nth-child(6) {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        margin-top: 6px !important;
    }
    
    #invoice-table td:nth-child(6)::before {
        content: "Precio:" !important;
        font-weight: 600 !important;
        color: var(--text-muted) !important;
        margin-right: 8px !important;
        font-size: 0.8rem !important;
    }
    
    #invoice-table td:nth-child(6) > div {
        align-items: flex-start !important;
        width: auto !important;
    }
    
    .price-type-group {
        height: 24px !important;
        margin-bottom: 4px !important;
    }
    
    .price-type-btn {
        padding: 1px 4px !important;
        font-size: 0.62rem !important;
    }
    
    .grid-price-input {
        width: 90px !important;
        height: 30px !important;
        font-size: 0.88rem !important;
        padding: 4px 6px !important;
    }
    
    /* Subtotal row */
    #invoice-table td:nth-child(7) {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        border-top: 1px dashed rgba(255, 255, 255, 0.03) !important;
        padding-top: 6px !important;
        margin-top: 4px !important;
    }
    
    #invoice-table td:nth-child(7)::before {
        content: "Subtotal:" !important;
        font-weight: 600 !important;
        color: var(--text-muted) !important;
    }
    
    /* Total row */
    #invoice-table td:nth-child(8) {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        font-size: 0.95rem !important;
    }
    
    #invoice-table td:nth-child(8)::before {
        content: "Total (C/IVA):" !important;
        font-weight: 600 !important;
        color: var(--text-muted) !important;
    }
    
    /* Auth state row */
    #invoice-table td:nth-child(9) {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        margin-top: 4px !important;
    }
    
    /* Delete button */
    #invoice-table td:nth-child(10) {
        position: absolute !important;
        top: 8px !important;
        right: 8px !important;
        width: auto !important;
        padding: 0 !important;
    }
    
    .btn-delete-row {
        width: 32px !important;
        height: 32px !important;
        border-radius: 999px !important;
        font-size: 0.9rem !important;
    }

    /* Modal dialogs size on mobile */
    .modal-content {
        width: 96% !important;
        margin: 15px auto !important;
        max-height: 94vh !important;
        border-radius: 12px !important;
        padding: 16px !important;
    }
    
    .f1-modal-card {
        height: 94vh !important;
        margin: 3vh auto !important;
    }
    
    .modal-content button {
        min-height: 38px !important;
        font-size: 0.88rem !important;
    }

    /* F1 Modal responsive adaptations */
    .f1-search-area {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }
    
    .f1-search-area .search-box {
        width: 100% !important;
    }
    
    .search-help-text {
        display: none !important; /* Keyboard shortcuts are useless on touch screens */
    }

    #f1-results-table {
        border: none !important;
        background: transparent !important;
    }
    
    #f1-results-table thead {
        display: none !important;
    }
    
    #f1-results-table tbody,
    #f1-results-table tr,
    #f1-results-table td {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    #f1-results-table tbody tr {
        background: rgba(255, 255, 255, 0.02) !important;
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
        border-radius: 10px !important;
        padding: 10px 12px !important;
        margin-bottom: 8px !important;
        cursor: pointer !important;
    }
    
    #f1-results-table tbody tr:hover {
        background: rgba(255, 255, 255, 0.05) !important;
    }
    
    #f1-results-table td {
        padding: 3px 0 !important;
        border: none !important;
        text-align: left !important;
        font-size: 0.88rem !important;
    }
    
    /* Specific column label formats for results on mobile */
    #f1-results-table td::before {
        font-weight: 700 !important;
        color: var(--text-muted) !important;
        margin-right: 8px !important;
    }
    
    /* Client search results styling */
    .client-result-id::before {
        content: "ID:" !important;
    }
    .client-result-name::before {
        content: "Nombre:" !important;
    }
    .client-result-rfc::before {
        content: "RFC:" !important;
    }
    
    /* Article search results styling */
    .article-result-code::before {
        content: "Clave:" !important;
    }
    .article-result-desc::before {
        content: "Descripción:" !important;
    }
    .article-result-brand::before {
        content: "Marca:" !important;
    }
    .article-result-price::before {
        content: "Precio:" !important;
    }
    .article-result-stock::before {
        content: "Exist:" !important;
    }

    /* Hide recent quotations section on mobile devices to save vertical space */
    #history-section {
        display: none !important;
    }
}

/* ==========================================
   LIGHT MODE THEME OVERRIDES
   ========================================== */
body.light-mode {
    --bg-color: #f0f2f5;
    --panel-bg: rgba(255, 255, 255, 0.85);
    --panel-border: rgba(0, 0, 0, 0.1);
    --glow-color-1: rgba(123, 97, 255, 0.05);
    --glow-color-2: rgba(0, 240, 255, 0.03);
    
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #0891b2;
    --secondary-hover: #0e7490;
    
    --text-main: #1f2937;
    --text-muted: #4b5563;
    --text-dark: #f9fafb;
    
    --success-color: #059669;
    --error-color: #dc2626;
    --warning-color: #d97706;
}

body.light-mode .title-meta h1 {
    background: linear-gradient(135deg, #111827 0%, #4338ca 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.light-mode .btn-logout {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #4b5563;
}

body.light-mode .btn-logout:hover {
    color: #111827;
    background: rgba(79, 70, 229, 0.1);
    border-color: rgba(79, 70, 229, 0.3);
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.1);
}

body.light-mode .header-status {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

body.light-mode .app-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-mode td,
body.light-mode th,
body.light-mode .glass-panel,
body.light-mode .app-header,
body.light-mode .control-panel,
body.light-mode .workspace-grid {
    border-color: rgba(0, 0, 0, 0.08) !important;
}

body.light-mode input,
body.light-mode select,
body.light-mode textarea {
    background-color: #ffffff !important;
    color: #111827 !important;
    border: 1px solid #d1d5db !important;
}

body.light-mode input:focus,
body.light-mode select:focus,
body.light-mode textarea:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1) !important;
}

body.light-mode .glass-panel {
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
}

body.light-mode ::placeholder {
    color: #9ca3af !important;
}

body.light-mode .search-results-dropdown {
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
}

body.light-mode .search-result-item:hover {
    background: #f3f4f6 !important;
}

body.light-mode tr.selected-row {
    background: rgba(79, 70, 229, 0.1) !important;
}

body.light-mode .modal-content {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1) !important;
}

body.light-mode .history-table tr:hover {
    background: #f3f4f6 !important;
}

body.light-mode .exchange-rate-badge {
    background: rgba(5, 150, 105, 0.08) !important;
    border: 1px solid rgba(5, 150, 105, 0.2) !important;
    color: #059669 !important;
}

/* Better readability overrides for Light Mode */
body.light-mode {
    --bg-color: #f8fafc; /* Softer, premium slate-50 background */
}

/* Tactile Soft Grey Keycaps for Shortcuts */
body.light-mode .f1-badge {
    background: #e2e8f0 !important;
    border: 1px solid #cbd5e1 !important;
    border-bottom: 2.5px solid #94a3b8 !important;
    color: #475569 !important;
    box-shadow: 0 1.5px 0 rgba(0, 0, 0, 0.1) !important;
}

/* High Contrast Brand/Marca tag (dark cyan) */
body.light-mode .brand-tag {
    background: rgba(8, 145, 178, 0.08) !important;
    color: #0891b2 !important;
    font-weight: 600 !important;
}

/* High Contrast ID and Code tag (dark indigo) */
body.light-mode .id-tag,
body.light-mode .code-tag {
    background: rgba(79, 70, 229, 0.08) !important;
    color: #4f46e5 !important;
    font-weight: 600 !important;
}

body.light-mode .rfc-tag {
    background: rgba(0, 0, 0, 0.04) !important;
    color: #4b5563 !important;
}

body.light-mode .code-tag-table {
    background: rgba(0, 0, 0, 0.04) !important;
    color: #4b5563 !important;
}

/* Prominent, readable Table Headers */
body.light-mode th {
    background: rgba(0, 0, 0, 0.03) !important;
    color: #1f2937 !important; /* Dark Slate */
    font-weight: 700 !important;
}

/* Softer and clearer borders between table rows */
body.light-mode td,
body.light-mode th {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}

/* Friendly active customer card design */
body.light-mode .selected-card {
    background: #f8fafc !important;
    border: 1.5px solid #cbd5e1 !important;
    color: #1f2937 !important;
}

/* Softer Price Input buttons */
body.light-mode .price-type-group {
    border-color: rgba(0, 0, 0, 0.15) !important;
}

body.light-mode .price-type-btn {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #4b5563 !important;
    border-right: 1px solid rgba(0, 0, 0, 0.1) !important;
}

/* Active Price button overrides */
body.light-mode .price-type-btn[style*="rgba(99,102,241,0.8)"],
body.light-mode .price-type-btn[style*="rgba(99, 102, 241, 0.8)"] {
    background-color: #6366f1 !important;
    color: #ffffff !important;
}
body.light-mode .price-type-btn[style*="rgba(16,185,129,0.8)"],
body.light-mode .price-type-btn[style*="rgba(16, 185, 129, 0.8)"] {
    background-color: #10b981 !important;
    color: #ffffff !important;
}
body.light-mode .price-type-btn[style*="rgba(245,158,11,0.8)"],
body.light-mode .price-type-btn[style*="rgba(245, 158, 11, 0.8)"] {
    background-color: #f59e0b !important;
    color: #ffffff !important;
}

/* F5 Stock button in grid */
body.light-mode .btn-stock-f5 {
    background: rgba(5, 150, 105, 0.08) !important;
    border-color: rgba(5, 150, 105, 0.25) !important;
    color: #059669 !important;
}
body.light-mode .btn-stock-f5:hover {
    background: #059669 !important;
    color: #ffffff !important;
    border-color: #059669 !important;
}

/* Grand Total (Indigo, text-shadow removed) */
body.light-mode .total-row.grand-total span:last-child {
    color: #4f46e5 !important;
    text-shadow: none !important;
    font-weight: 800 !important;
}

/* Seller status and status container in header */
body.light-mode .vendedor-active-info {
    border-right: 1px solid rgba(0, 0, 0, 0.1) !important;
    color: #0891b2 !important;
}

/* History table specifically formatted tags */
body.light-mode .history-table .code-tag-table {
    color: #4f46e5 !important;
    background: rgba(79, 70, 229, 0.05) !important;
    font-weight: 600 !important;
}
body.light-mode .history-table td {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}
body.light-mode .history-table tr:hover {
    background: rgba(0, 0, 0, 0.02) !important;
}

/* Friendly placeholder color and input styles */
body.light-mode input::placeholder,
body.light-mode select::placeholder,
body.light-mode textarea::placeholder {
    color: #6b7280 !important;
    opacity: 0.8 !important;
}
body.light-mode input,
body.light-mode select,
body.light-mode textarea {
    border: 1px solid #cbd5e1 !important;
    font-weight: 500 !important;
}

/* Red tactile style for Limpiar Todo button in Light Mode */
body.light-mode #btn-clear-list {
    background: rgba(239, 68, 68, 0.05) !important;
    border: 1px solid rgba(239, 68, 68, 0.18) !important;
    color: #dc2626 !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}
body.light-mode #btn-clear-list:hover {
    background: #dc2626 !important;
    color: #ffffff !important;
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.2) !important;
}
