/* Design Tokens / CSS Variables */
:root {
    --bg-main: #0b0f19;
    --bg-card: rgba(17, 24, 39, 0.75);
    --bg-sidebar: #0f1626;
    --border-color: rgba(255, 255, 255, 0.08);
    
    --primary: #f27a1a; /* Trendyol Orange */
    --primary-hover: #db6a13;
    --hb-red: #ff6000; /* Hepsiburada Red-Orange */
    
    --success: #10b981;
    --success-soft: rgba(16, 185, 129, 0.15);
    --warning: #f59e0b;
    --warning-soft: rgba(245, 158, 11, 0.15);
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.15);
    --info: #3b82f6;
    --info-soft: rgba(59, 130, 246, 0.15);
    
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dark: #1f2937;
    
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(at 0% 0%, rgba(242, 122, 26, 0.05) 0px, transparent 50%),
        radial-gradient(at 50% 0%, rgba(59, 130, 246, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(255, 96, 0, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

/* App Container Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.logo-icon {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--primary), var(--hb-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rotateLogo 8s linear infinite;
}

@keyframes rotateLogo {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

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

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-item i {
    font-size: 1.25rem;
}

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

.nav-item.active {
    background: linear-gradient(90deg, rgba(242, 122, 26, 0.15) 0%, rgba(242, 122, 26, 0.02) 100%);
    border-left: 3px solid var(--primary);
    box-shadow: inset 5px 0 10px -5px rgba(242, 122, 26, 0.5);
}

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.mode-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.simulation-active {
    background-color: var(--info-soft);
    color: var(--info);
    border: 1px solid rgba(59, 130, 246, 0.25);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.1);
}

.live-active {
    background-color: var(--success-soft);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.footer-info {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

.v-num {
    opacity: 0.5;
    margin-top: 0.25rem;
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    margin-left: 280px;
    padding: 2.5rem;
    max-width: calc(100vw - 280px);
}

/* Header */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.header-title h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

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

.header-actions {
    display: flex;
    gap: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--hb-red));
    color: #fff;
    box-shadow: 0 4px 15px rgba(242, 122, 26, 0.25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(242, 122, 26, 0.35);
}

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

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

.btn-success {
    background-color: var(--success);
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.btn-success:hover {
    background-color: #0d9488;
    transform: translateY(-1px);
}

.btn-danger {
    background-color: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-info {
    background-color: var(--info);
    color: #fff;
}

.btn-info:hover {
    background-color: #2563eb;
}

.btn-sm {
    padding: 0.5rem 0.85rem;
    font-size: 0.8rem;
    border-radius: 0.5rem;
}

/* Page Section Toggling */
.page-section {
    display: none;
}

.page-section.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

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

/* Stats Cards Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: var(--card-shadow);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.bg-soft-primary { background-color: rgba(242, 122, 26, 0.15); }
.bg-soft-warning { background-color: var(--warning-soft); }
.bg-soft-success { background-color: var(--success-soft); }
.bg-soft-info { background-color: var(--info-soft); }

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

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

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0.15rem;
}

/* Section Cards Layout */
.section-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
}

.card-actions {
    display: flex;
    gap: 1rem;
}

/* Custom Search & Filter inputs */
.search-box {
    position: relative;
    width: 300px;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 0.65rem 1rem 0.65rem 2.5rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    color: var(--text-main);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s ease;
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(242, 122, 26, 0.2);
}

.form-select, .form-control {
    padding: 0.65rem 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    color: var(--text-main);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s ease;
}

.form-select:focus, .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(242, 122, 26, 0.2);
}

.form-select option {
    background-color: #0b0f19;
    color: var(--text-main);
}

/* Tables Styling */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.table th {
    padding: 1rem;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-color);
}

.table td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

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

.product-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.product-icon {
    width: 38px;
    height: 38px;
    border-radius: 0.5rem;
    background-color: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.product-name-info {
    display: flex;
    flex-direction: column;
}

.prod-title {
    font-weight: 600;
    color: var(--text-main);
}

.text-monospace {
    font-family: monospace;
    font-size: 0.85rem;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    color: var(--text-muted);
}

/* Price Subtitle under stock */
.stock-val {
    font-weight: 600;
}

.price-sub {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-success {
    background-color: var(--success-soft);
    color: var(--success);
}

.badge-warning {
    background-color: var(--warning-soft);
    color: var(--warning);
}

.badge-danger {
    background-color: var(--danger-soft);
    color: var(--danger);
}

/* Wizard / Config Layout */
.wizard-container {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    padding: 2.5rem;
    box-shadow: var(--card-shadow);
}

/* Steps Progress bar */
.wizard-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3.5rem;
    position: relative;
    gap: 1.5rem;
}

.wizard-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 40px;
    right: 40px;
    height: 2px;
    background-color: var(--border-color);
    z-index: 1;
}

.step-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    z-index: 2;
    cursor: pointer;
    flex: 1;
}

.step-number {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: #1e293b;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.step-label {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.step-nav.active .step-number {
    background: linear-gradient(135deg, var(--primary), var(--hb-red));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 0 15px rgba(242, 122, 26, 0.4);
}

.step-nav.active .step-label {
    color: var(--text-main);
}

.step-nav.completed .step-number {
    background-color: var(--success);
    border-color: transparent;
    color: #fff;
}

.step-nav.completed .step-label {
    color: var(--success);
}

/* Wizard Steps Content toggling */
.wizard-step-content {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.wizard-step-content.active {
    display: block;
}

.wizard-header {
    margin-bottom: 2.5rem;
}

.wizard-header h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Store Cards Grid */
.stores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.store-config-card {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.border-trendyol {
    border-top: 4px solid var(--primary);
}

.border-hb {
    border-top: 4px solid var(--hb-red);
}

.store-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.store-card-header i {
    font-size: 1.5rem;
}

.store-card-header h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
}

.text-trendyol { color: var(--primary); }
.text-hb { color: var(--hb-red); }

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

.form-control {
    width: 100%;
}

.single-store-card {
    max-width: 480px;
    margin: 0 auto 2.5rem auto;
}

/* Step 3 layout */
.settings-form-container {
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
}

.system-settings-card {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
}

.system-settings-card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.form-check-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
}

.check-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-right: 1.5rem;
}

.check-title {
    font-weight: 600;
    font-size: 0.95rem;
}

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

/* Switch Styles */
.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

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

.toggle-switch label {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #334155;
    transition: .4s;
    border-radius: 34px;
}

.toggle-switch label:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.toggle-switch input:checked + label {
    background-color: var(--success);
}

.toggle-switch input:checked + label:before {
    transform: translateX(24px);
}

.text-small {
    font-size: 0.8rem;
}

.mb-2 { margin-bottom: 0.5rem; }
.mt-4 { margin-top: 1.5rem; }

.wizard-footer-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.right-buttons {
    display: flex;
    gap: 1rem;
}

/* Modals */
.modal-backdrop {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background-color: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    width: 550px;
    max-width: 90%;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-card-wide {
    width: 1080px;
    max-width: 95%;
}

.modal-backdrop.show .modal-card {
    transform: scale(1);
}

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

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.75rem;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-main);
}

.modal-body {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-product-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-group {
    display: flex;
}

.info-label {
    width: 140px;
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.info-value {
    font-weight: 600;
    font-size: 0.9rem;
}

.divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 1.25rem 0;
}

.modal-subheading {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.modal-stores-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.modal-store-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-store-row:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
}

.store-row-identity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.store-row-stock {
    font-weight: 700;
    font-size: 0.95rem;
}

.input-number-group {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    overflow: hidden;
    width: 160px;
}

.input-number-group button {
    background: none;
    border: none;
    color: var(--text-main);
    width: 45px;
    height: 42px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    transition: background-color 0.2s;
}

.input-number-group button:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.input-number-group input {
    flex-grow: 1;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.1rem;
    font-weight: 600;
    outline: none;
}

/* Remove up/down spinners on target stock input */
.input-number-group input::-webkit-outer-spin-button,
.input-number-group input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.store-selector-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.store-checkbox-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.store-checkbox-card input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Sync Progress Layout in Modal */
.sync-progress-box {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #0b0f19;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
}

.progress-bar-container {
    height: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--success));
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.progress-steps {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-height: 150px;
    overflow-y: auto;
    font-size: 0.8rem;
}

.progress-steps li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-steps li.success { color: var(--success); }
.progress-steps li.pending { color: var(--text-muted); }
.progress-steps li.error { color: var(--danger); }

/* Spinners & Loaders */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.05);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Alert styles */
.alert-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 400px;
}

.alert {
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    font-weight: 500;
    font-size: 0.9rem;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.alert-success { background-color: #065f46; border-left: 5px solid var(--success); }
.alert-error { background-color: #991b1b; border-left: 5px solid var(--danger); }
.alert-info { background-color: #1e40af; border-left: 5px solid var(--info); }
.alert-warning { background-color: #92400e; border-left: 5px solid var(--warning); }

/* Product Thumbnail and Variant Styles */
.product-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}
.product-thumb:hover {
    transform: scale(1.1);
    border-color: #3b82f6;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* Hover Zoom Preview */
.img-preview-popup {
    position: fixed;
    z-index: 99999;
    pointer-events: none;
    width: 250px;
    height: 350px;
    border-radius: 1.25rem;
    background-color: #3b82f6; /* Thick blue frame */
    padding: 10px; /* Padding for the frame */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 15px rgba(59, 130, 246, 0.4);
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.img-preview-popup.visible {
    opacity: 1;
    transform: scale(1);
}
.img-preview-popup::before {
    content: '';
    position: absolute;
    top: 25px;
    left: -8px;
    width: 16px;
    height: 16px;
    background-color: #3b82f6;
    transform: rotate(45deg);
    border-radius: 2px;
}
.img-preview-popup img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.85rem;
}
.variant-badge {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    border: 1px solid var(--border-color);
}

.model-badge {
    display: inline-block;
    font-size: 0.75rem;
    color: #60a5fa;
    margin-top: 0.25rem;
    background-color: rgba(59, 130, 246, 0.1);
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Store Sandbox Filters */
.store-sandbox-container {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    scrollbar-width: thin;
}
.store-sandbox-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    min-width: 160px;
    flex-shrink: 0;
}
.store-sandbox-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}
.store-sandbox-item.active {
    background: rgba(59, 130, 246, 0.12);
    border-color: #3b82f6;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.25);
}
.store-sandbox-icon {
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    transition: all 0.2s ease;
}
.store-sandbox-item.active .store-sandbox-icon {
    background: rgba(59, 130, 246, 0.25);
    color: #60a5fa;
}
.store-sandbox-item:hover .store-sandbox-icon {
    color: var(--text-light);
}
.store-sandbox-info {
    display: flex;
    flex-direction: column;
}
.store-sandbox-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    transition: color 0.2s ease;
}
.store-sandbox-item.active .store-sandbox-name {
    color: #60a5fa;
}
.store-sandbox-count {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Sync inputs grid and price group */
.sync-inputs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
.input-price-group {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    padding: 0.25rem 1rem;
    height: 48px;
}
.input-price-group input {
    flex-grow: 1;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.1rem;
    font-weight: 600;
    outline: none;
    text-align: center;
}
.input-price-group input::-webkit-outer-spin-button,
.input-price-group input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.currency-symbol {
    font-weight: bold;
    color: var(--primary);
    margin-left: 0.5rem;
    font-size: 1rem;
}

/* Pagination Controls */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: rgba(255, 255, 255, 0.01);
}

.pagination-info {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.pagination-buttons {
    display: flex;
    gap: 0.75rem;
}

.pagination-buttons .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Barcode List in Modal */
.barcode-list-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 340px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.barcode-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.barcode-row:hover {
    background-color: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.15);
}

.barcode-row-info {
    flex: 1;
    min-width: 0;
}

.barcode-row-store {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
}

.barcode-row-code {
    font-family: monospace;
    font-size: 0.78rem;
    color: var(--text-muted);
    background-color: rgba(255, 255, 255, 0.04);
    padding: 0.1rem 0.35rem;
    border-radius: 0.2rem;
    display: inline-block;
    word-break: break-all;
}

.barcode-row-current {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.barcode-row-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.barcode-input-mini {
    width: 70px;
    padding: 0.4rem 0.5rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    outline: none;
    transition: all 0.2s ease;
}

.barcode-input-mini:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(242, 122, 26, 0.2);
}

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

.barcode-input-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.barcode-input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.btn-barcode-update {
    padding: 0.4rem 0.6rem;
    background: linear-gradient(135deg, var(--primary), var(--hb-red));
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-barcode-update:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(242, 122, 26, 0.3);
}

.btn-barcode-update:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Log Detail Popup styles */
.log-detail-popup {
    position: fixed;
    z-index: 99998;
    pointer-events: none;
    width: 390px;
    border-radius: 1.25rem;
    background: rgba(15, 22, 38, 0.95);
    border: 1px solid var(--border-color);
    padding: 18px;
    box-shadow: var(--card-shadow), 0 0 20px rgba(59, 130, 246, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.log-detail-popup.visible {
    opacity: 1;
    transform: scale(1);
}

.log-detail-popup-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.log-detail-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.log-detail-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.log-detail-value {
    font-size: 0.92rem;
    font-weight: 500;
}

.log-detail-stores-list {
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.log-detail-store-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.log-detail-store-name {
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.log-detail-store-change {
    font-size: 0.85rem;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.log-detail-store-barcodes {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-body);
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Hover state on logs table rows */
.table tbody tr.log-row {
    transition: background-color 0.2s ease, transform 0.15s ease;
    cursor: pointer;
}

.table tbody tr.log-row:hover {
    background-color: rgba(255, 255, 255, 0.02) !important;
}

/* Model Sandbox Styles */
.sandbox-filters-grid {
    background: rgba(17, 24, 39, 0.4);
    border-radius: 1rem;
    border: 1px solid var(--border-color);
}

.sandbox-variant-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sandbox-variant-card:hover {
    background: rgba(59, 130, 246, 0.05);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.sandbox-variant-card .product-cell {
    flex: 1;
}
