/* ==========================================================================
   DESIGN SYSTEM - TZI TECHNOLOGY PRICE LIST
   ========================================================================== */

/* Variables */
:root {
    --bg-dark: #08080a; /* Pure deep charcoal black */
    --bg-card: #121215; /* Elegant solid dark gray card background */
    --bg-card-hover: #16161a;
    --border-color: rgba(255, 255, 255, 0.08); /* Clean thin border */
    --border-color-hover: rgba(255, 0, 0, 0.35); /* Elegant brand red hover */
    
    --text-primary: #ffffff;
    --text-secondary: #c5c5d2;
    --text-muted: #8e8e93;
    
    --coral-primary: #e60000; /* Pure bold brand red */
    --coral-hover: #ff1a1a;
    --coral-glow: rgba(230, 0, 0, 0.15);
    
    --whatsapp-green: #25d366;
    --whatsapp-hover: #20ba5a;
    
    --stock-yes-bg: rgba(37, 211, 102, 0.1);
    --stock-yes-text: #25d366;
    --stock-no-bg: rgba(230, 0, 0, 0.1);
    --stock-no-text: #e60000;
    
    --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease-out;
    
    --border-radius-sm: 6px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    
    --box-shadow-glow: none; /* Removed neon glow shadows */
    --glass-backdrop: none; /* Removed heavy blurs */
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-family);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Background Glowing Orbs (Disabled for cleaner design) */
.glow-orb {
    display: none !important;
}

/* Helper Utilities */
.text-coral { color: var(--coral-primary); }
.hidden { display: none !important; }
.link-effect {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}
.link-effect:hover {
    color: var(--coral-primary);
    text-shadow: 0 0 8px rgba(255, 59, 48, 0.5);
}

/* Scroll Fade utilities */
.scroll-fade {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    pointer-events: none;
    z-index: 2;
    transition: var(--transition-smooth);
}
.fade-left {
    left: 0;
    background: linear-gradient(to right, rgba(8, 8, 10, 0.95), rgba(8, 8, 10, 0));
    opacity: 0;
}
.fade-right {
    right: 0;
    background: linear-gradient(to left, rgba(8, 8, 10, 0.95), rgba(8, 8, 10, 0));
}

/* Elegant Solid Card Style */
.card-glass {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
    transition: var(--transition-smooth);
}

/* Button UI */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-family);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    user-select: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--coral-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--coral-hover);
    transform: translateY(-1px);
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-muted);
}

.btn-whatsapp {
    background: var(--whatsapp-green);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    background: var(--whatsapp-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
}

.btn-full {
    width: 100%;
}

.btn-link {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
}

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

.close-icon-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

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

/* Header styling */
.app-header {
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
    padding: 18px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

/* Brand Logo (TZI Technology logo styling) */
.brand-logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.brand-logo-svg {
    filter: drop-shadow(0 0 10px rgba(255, 59, 48, 0.25));
}

.logo-circle {
    transform-origin: center;
    animation: slow-spin 20s linear infinite;
}

@keyframes slow-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.brand-logo-img {
    width: 60px;
    height: 60px;
    border-radius: 50%; /* Circular matching logo */
    object-fit: cover;
    border: 2px solid var(--coral-primary);
    transition: var(--transition-smooth);
}

.brand-logo-img:hover {
    transform: scale(1.05);
}

/* Sizing specific for header */
.app-header .brand-logo-img {
    width: 65px;
    height: 65px;
}

.logo-text-tzi {
    font-family: var(--font-family);
    font-weight: 800;
    font-size: 58px;
    fill: #ffffff;
    letter-spacing: 5px;
}

.logo-text-tech {
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 15px;
    fill: #ffffff;
    letter-spacing: 4px;
}

.brand-text h1 {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #ffffff;
    margin-bottom: 2px;
}

.brand-text .tagline {
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Branch Info Card */
.branch-info-card {
    display: flex;
    gap: 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: var(--border-radius-md);
}

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

.info-item i {
    color: var(--coral-primary);
    font-size: 1.2rem;
    background: rgba(230, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Main Container Layout */
.app-main {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Controls Section (Search & Filter) */
.controls-section {
    padding: 24px;
}

.search-bar-row {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
    min-width: 280px;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
    pointer-events: none;
    transition: var(--transition-fast);
}

.search-input-wrapper input {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 14px 45px 14px 45px;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: var(--coral-primary);
    box-shadow: 0 0 15px rgba(255, 59, 48, 0.15);
    background: rgba(0, 0, 0, 0.35);
}

.search-input-wrapper input:focus + .search-icon {
    color: var(--coral-primary);
}

.clear-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    display: none; /* Controlled by JS */
    transition: var(--transition-fast);
}

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

.action-buttons-wrapper {
    display: flex;
    gap: 12px;
}

.btn-cart-indicator {
    position: relative;
}

.cart-badge {
    background: #ffffff;
    color: var(--bg-dark);
    font-size: 0.75rem;
    font-weight: 800;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 1.5px solid var(--coral-primary);
}

/* Category Filter Layout */
.categories-wrapper {
    position: relative;
    margin: 0 -24px;
    padding: 0 24px;
}

.categories-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none; /* Firefox */
}

.categories-container::-webkit-scrollbar {
    display: none; /* Safari/Chrome */
}

.category-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 18px;
    border-radius: 50px;
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    white-space: nowrap;
    user-select: none;
}

.category-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.category-pill.active {
    background: var(--coral-primary);
    color: #ffffff;
    border-color: var(--coral-primary);
}

/* Table Section Styling */
.table-section {
    padding: 24px;
    min-height: 400px;
}

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

.items-count {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.last-update {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.table-responsive-wrapper {
    overflow-x: auto;
    width: 100%;
}

.prices-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.prices-table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.prices-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
    vertical-align: middle;
    transition: var(--transition-fast);
}

.prices-table tbody tr {
    transition: var(--transition-fast);
}

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

/* Table Columns Specifics */
.col-stock { width: 90px; text-align: center; }
.col-article { font-weight: 500; }
.col-price { width: 140px; font-weight: 700; color: var(--coral-primary); font-size: 1.05rem; }
.col-brand { width: 130px; }
.col-photo { width: 80px; text-align: center; }

/* Badges and Buttons in Table */
.badge-stock {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.badge-stock.yes {
    background: var(--stock-yes-bg);
    color: var(--stock-yes-text);
}

.badge-stock.no {
    background: var(--stock-no-bg);
    color: var(--stock-no-text);
}

.badge-brand {
    display: inline-block;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.btn-photo-trigger {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-photo-trigger:hover {
    background: rgba(255, 59, 48, 0.1);
    color: var(--coral-primary);
    border-color: var(--coral-primary);
    transform: scale(1.1);
}


/* Spinner and States */
.loading-state {
    text-align: center;
    padding: 60px 0 !important;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 59, 48, 0.1);
    border-top-color: var(--coral-primary);
    border-radius: 50%;
    margin: 0 auto 15px auto;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-icon {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.empty-state h3 {
    margin-bottom: 8px;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Admin / Import Panel styling */
.admin-section {
    padding: 24px;
    border-color: rgba(255, 59, 48, 0.2);
    box-shadow: 0 8px 32px 0 rgba(255, 59, 48, 0.05);
}

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

.admin-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 900px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

.admin-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.admin-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
}

.admin-help {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.import-source-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 8px 16px;
    cursor: pointer;
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 2px solid transparent;
    transition: var(--transition-fast);
}

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

.tab-btn.active {
    color: var(--coral-primary);
    border-bottom-color: var(--coral-primary);
}

.tab-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

textarea#import-excel-text {
    width: 100%;
    min-height: 220px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: #e4e4e7;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    padding: 12px;
    resize: vertical;
    transition: var(--transition-smooth);
}

textarea#import-excel-text:focus {
    outline: none;
    border-color: var(--coral-primary);
    box-shadow: 0 0 10px rgba(255, 59, 48, 0.1);
}

/* File Drop Zone */
.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 40px 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.01);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    justify-content: center;
    min-height: 220px;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--coral-primary);
    background: rgba(255, 59, 48, 0.02);
}

.drop-icon {
    font-size: 2.5rem;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.drop-zone:hover .drop-icon {
    color: var(--coral-primary);
    transform: translateY(-5px);
}

.browse-link {
    color: var(--coral-primary);
    text-decoration: underline;
    font-weight: 500;
}

/* Mapping Settings */
.mapping-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mapping-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.mapping-row label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.mapping-row select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: var(--font-family);
    padding: 6px 12px;
    outline: none;
    font-size: 0.9rem;
    min-width: 160px;
    transition: var(--transition-fast);
}

.mapping-row select:focus {
    border-color: var(--coral-primary);
}

.admin-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.admin-sub-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    margin-top: 5px;
}

/* Animations classes */
.animate-slide-down {
    animation: slideDown 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

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

/* Cart Drawer */
.cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.cart-drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.cart-drawer-container {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 480px;
    height: 100%;
    background: #0f0f15;
    border-left: 1px solid var(--border-color);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.cart-drawer-overlay.active .cart-drawer-container {
    transform: translateX(0);
}

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

.cart-drawer-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.cart-items-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cart-empty-message {
    color: var(--text-muted);
    text-align: center;
    padding: 60px 0;
    font-style: italic;
}

/* Individual Cart Item Card */
.cart-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 12px 14px;
    border-radius: var(--border-radius-sm);
    position: relative;
    transition: var(--transition-smooth);
}

.cart-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

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

.cart-item-brand {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-secondary);
}

.cart-item-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--coral-primary);
}

/* Quantity Control */
.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.qty-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.qty-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.qty-val {
    width: 30px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    transition: var(--transition-fast);
}

.cart-item-remove:hover {
    color: var(--coral-primary);
    transform: scale(1.1);
}

.cart-drawer-footer {
    padding: 24px;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.total-row {
    font-size: 1.25rem;
    color: var(--text-primary);
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.total-row strong {
    color: var(--coral-primary);
    font-weight: 800;
}

.cart-notes-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cart-notes-wrapper label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.cart-notes-wrapper textarea {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    padding: 10px;
    font-family: var(--font-family);
    font-size: 0.85rem;
    resize: none;
    height: 70px;
    outline: none;
    transition: var(--transition-fast);
}

.cart-notes-wrapper textarea:focus {
    border-color: var(--coral-primary);
}

/* Image Preview Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1100;
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

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

.modal-container {
    background: #0f0f15;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--transition-fast);
}

.modal-close-btn:hover {
    background: var(--coral-primary);
}

.modal-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.modal-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    text-align: center;
    color: var(--text-primary);
}

.modal-image-wrapper {
    width: 100%;
    height: 320px;
    background: #07070a;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}

.modal-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.modal-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

.modal-details .badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 4px 10px;
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
}

.modal-details .price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--coral-primary);
}

/* Floating Actions */
.floating-actions {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
}

.floating-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    position: relative;
    transition: var(--transition-smooth);
}

.floating-btn:hover {
    transform: translateY(-5px) scale(1.05);
}

.btn-coral {
    background: var(--coral-primary);
    box-shadow: 0 6px 20px rgba(255, 59, 48, 0.4);
}

.btn-coral:hover {
    background: var(--coral-hover);
    box-shadow: 0 8px 25px rgba(255, 59, 48, 0.6);
}

.floating-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: white;
    color: var(--bg-dark);
    font-weight: 800;
    font-size: 0.75rem;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--coral-primary);
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    background: rgba(15, 15, 21, 0.95);
    border: 1px solid var(--whatsapp-green);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    padding: 14px 24px;
    border-radius: 50px;
    z-index: 1500;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: opacity 0.3s, transform 0.3s;
}

.toast.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(20px);
}

.toast-icon {
    color: var(--whatsapp-green);
    font-size: 1.25rem;
}

#toast-message {
    color: white;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Desktop Only Helper */
@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
}

/* ==========================================================================
   MOBILE RESPONSIVENESS - TABLE CARD TRANSFORMATION
   ========================================================================== */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .brand-logo-container {
        justify-content: center;
        text-align: center;
        flex-direction: column;
        gap: 5px;
    }
    
    .brand-text h1 {
        font-size: 1.5rem;
    }
    
    .branch-info-card {
        flex-direction: column;
        gap: 10px;
        padding: 12px 16px;
    }
    
    .info-item {
        justify-content: flex-start;
    }
    
    .search-bar-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-input-wrapper {
        width: 100%;
        min-width: 100%;
    }
    
    .action-buttons-wrapper {
        width: 100%;
    }
    
    .action-buttons-wrapper button {
        flex: 1;
    }
    
    .controls-section {
        padding: 16px;
    }
    
    .categories-wrapper {
        margin: 0 -16px;
        padding: 0 16px;
    }
    
    .table-section {
        padding: 16px;
    }
    
    /* Table transformation to Cards */
    .prices-table, 
    .prices-table thead, 
    .prices-table tbody, 
    .prices-table th, 
    .prices-table td, 
    .prices-table tr {
        display: block;
    }
    
    .prices-table thead {
        display: none; /* Hide header completely on mobile */
    }
    
    .prices-table tbody {
        display: flex;
        flex-direction: column;
        gap: 14px;
    }
    
    .prices-table tbody tr {
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius-md);
        padding: 16px;
        position: relative;
        display: grid;
        grid-template-areas: 
            "stock brand photo"
            "article article article"
            "price price price";
        grid-template-columns: 1fr auto 50px;
        grid-template-rows: auto auto auto;
        gap: 12px 0;
        transition: var(--transition-smooth);
    }
    
    .prices-table tbody tr:hover {
        background: rgba(255, 255, 255, 0.04);
        border-color: var(--border-color-hover);
        box-shadow: 0 5px 15px rgba(255, 59, 48, 0.05);
    }
    
    .prices-table tbody tr.row-active {
        border-color: var(--coral-primary);
        background: rgba(255, 59, 48, 0.04);
    }
    
    /* Grid cells positioning */
    .prices-table td {
        padding: 0;
        border: none;
        width: auto !important;
    }
    
    /* Stock Column */
    .prices-table td.col-stock {
        grid-area: stock;
        text-align: left;
        display: flex;
        align-items: center;
    }
    
    /* Article Column */
    .prices-table td.col-article {
        grid-area: article;
        font-size: 1.05rem;
        color: #ffffff;
        font-weight: 600;
        line-height: 1.4;
        padding-right: 10px;
    }
    
    /* Price Column */
    .prices-table td.col-price {
        grid-area: price;
        font-size: 1.25rem;
        display: flex;
        align-items: center;
        color: var(--coral-primary);
        font-weight: 800;
    }
    
    /* Brand Column */
    .prices-table td.col-brand {
        grid-area: brand;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        padding-right: 8px;
    }
    
    /* Photo Column */
    .prices-table td.col-photo {
        grid-area: photo;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Make controls slightly larger for touch targets */
    .btn-photo-trigger {
        width: 42px;
        height: 42px;
    }

    /* Stack form columns on mobile for better usability */
    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* ==========================================================================
   HELP GUIDE STYLING
   ========================================================================== */
.help-section {
    padding: 24px;
    margin-bottom: 5px;
    border-color: rgba(255, 59, 48, 0.15);
    box-shadow: 0 8px 32px 0 rgba(255, 59, 48, 0.03);
}

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

.help-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.help-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.help-step {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.help-step-icon {
    background: rgba(255, 59, 48, 0.08);
    border: 1px solid rgba(255, 59, 48, 0.2);
    color: var(--coral-primary);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
    box-shadow: 0 0 10px rgba(255, 59, 48, 0.05);
}

.help-step-body h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.help-step-body p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.highlight-step {
    background: rgba(37, 211, 102, 0.03);
    border: 1px solid rgba(37, 211, 102, 0.1);
    border-radius: var(--border-radius-sm);
    padding: 8px;
    margin: -8px;
}

.highlight-step .help-step-icon {
    background: rgba(37, 211, 102, 0.08);
    border-color: rgba(37, 211, 102, 0.2);
    color: var(--whatsapp-green);
    box-shadow: 0 0 10px rgba(37, 211, 102, 0.05);
}

/* Help Section Mobile Overrides */
@media (max-width: 768px) {
    .help-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .help-section {
        padding: 16px;
    }
    
    .highlight-step {
        margin: 0;
        padding: 0;
        background: none;
        border: none;
    }
}

/* ==========================================================================
   ADMIN PANEL STYLING
   ========================================================================== */

/* Login Overlay */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(4, 4, 6, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(20px);
    transition: var(--transition-smooth);
}

.login-overlay:not(.active) {
    opacity: 0;
    pointer-events: none;
}

.login-card {
    width: 90%;
    max-width: 400px;
    padding: 40px 30px;
    border-color: var(--border-color);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    background: rgba(230, 0, 0, 0.08);
    color: var(--coral-primary);
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.login-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.login-header p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

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

.login-form-group input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: #fff;
    padding: 12px 16px;
    font-family: var(--font-family);
    font-size: 0.95rem;
    text-align: left;
    letter-spacing: normal;
    transition: var(--transition-smooth);
}

.login-form-group input::placeholder {
    letter-spacing: normal;
}

.login-form-group input:focus {
    outline: none;
    border-color: var(--coral-primary);
}

.login-error {
    color: var(--coral-primary);
    font-size: 0.8rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255, 59, 48, 0.05);
    padding: 8px;
    border-radius: 6px;
}

/* Admin Layout Tabs Nav */
.admin-tabs-nav {
    display: flex;
    padding: 10px;
    gap: 10px;
    overflow-x: auto;
}

.tab-nav-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 12px 24px;
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition-smooth);
}

.tab-nav-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.tab-nav-btn.active {
    background: rgba(255, 59, 48, 0.1);
    color: var(--coral-primary);
    border: 1px solid rgba(255, 59, 48, 0.2);
}

.admin-tab-content.hidden {
    display: none !important;
}

/* CRUD Workspace Grid */
.admin-workspace-grid {
    display: grid;
    grid-template-columns: 450px 1fr;
    gap: 25px;
    align-items: start;
}

@media (max-width: 1024px) {
    .admin-workspace-grid {
        grid-template-columns: 1fr;
    }
}

/* Forms Card & Controls */
.form-card {
    padding: 24px;
}

.form-card h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-field input, 
.form-field select, 
.form-field textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: #fff;
    padding: 10px 14px;
    font-family: var(--font-family);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition-smooth);
}

.form-field input:focus, 
.form-field select:focus, 
.form-field textarea:focus {
    border-color: var(--coral-primary);
    box-shadow: 0 0 10px rgba(255, 59, 48, 0.1);
    background: rgba(0, 0, 0, 0.35);
}

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

.form-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

/* Table Card Management Area */
.table-card {
    padding: 24px;
}

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

.table-card-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-search-wrapper {
    position: relative;
    width: 320px;
}

@media (max-width: 600px) {
    .admin-search-wrapper {
        width: 100%;
    }
}

.admin-search-wrapper input {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px 15px 10px 40px;
    color: #fff;
    font-family: var(--font-family);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition-smooth);
}

.admin-search-wrapper input:focus {
    border-color: var(--coral-primary);
}

.admin-search-wrapper .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.admin-table-wrapper {
    overflow-x: auto;
    max-height: 550px;
    scrollbar-width: thin;
}

.admin-table td {
    padding: 12px 14px !important;
}

/* Instructions Code Block */
.code-box-container {
    position: relative;
    margin-top: 15px;
}

.code-box-container pre {
    background: #040407;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 20px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.82rem;
    color: #e4e4e7;
    line-height: 1.5;
    max-height: 300px;
}

.btn-copy {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 0.8rem;
    padding: 6px 12px;
}

/* Floating WhatsApp Button */
.whatsapp-float-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #ffffff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 999;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: whatsapp-pulse 2s infinite;
}

.whatsapp-float-btn:hover {
    transform: translateY(-5px) scale(1.08);
    background-color: #20ba5a;
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
    color: #ffffff;
}

@keyframes whatsapp-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Adjust position for mobile screens */
@media (max-width: 768px) {
    .whatsapp-float-btn {
        bottom: 20px;
        right: 20px;
        width: 52px;
        height: 52px;
        font-size: 28px;
    }
}

