:root {
    /* ========================================
       PRIMARY COLORS
       ======================================== */
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #e0e7ff;
    --primary-rgb: 79, 70, 229;
    
    /* ========================================
       SEMANTIC COLORS
       ======================================== */
    --success: #10b981;
    --success-hover: #059669;
    --success-light: #d1fae5;
    --success-dark: #065f46;
    --success-border: #a7f3d0;
    
    --warning: #f59e0b;
    --warning-hover: #d97706;
    --warning-light: #fef3c7;
    --warning-dark: #92400e;
    --warning-border: #fde68a;
    
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --danger-light: #fee2e2;
    --danger-dark: #991b1b;
    --danger-border: #fecaca;
    
    --info: #0ea5e9;
    --info-light: #e0f2fe;
    --info-dark: #0369a1;
    --info-border: #7dd3fc;
    
    /* ========================================
       NEUTRAL COLORS
       ======================================== */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* ========================================
       BACKGROUNDS
       ======================================== */
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-hover: #f1f5f9;
    --bg-dark: #1e293b;
    --bg-darker: #0f172a;
    
    /* ========================================
       TEXT COLORS
       ======================================== */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-light: #e2e8f0;
    --text-inverse: #ffffff;
    
    /* ========================================
       BORDERS & SHADOWS
       ======================================== */
    --border: #e2e8f0;
    --border-light: #f0f0f0;
    --border-dark: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    
    /* ========================================
       SIDEBAR
       ======================================== */
    --sidebar-bg: #1e293b;
    --sidebar-text: #94a3b8;
    --sidebar-active: #4f46e5;
    --sidebar-hover: rgba(255, 255, 255, 0.05);
    --sidebar-border: rgba(255, 255, 255, 0.1);
    
    /* ========================================
       BADGE COLORS (RGBA for transparency)
       ======================================== */
    --badge-success-bg: rgba(74, 222, 128, 0.1);
    --badge-success-color: #4ade80;
    --badge-success-border: rgba(34, 197, 94, 0.2);
    
    --badge-warning-bg: rgba(250, 204, 21, 0.1);
    --badge-warning-color: #eab308;
    --badge-warning-border: rgba(250, 204, 21, 0.2);
    
    --badge-danger-bg: rgba(248, 113, 113, 0.1);
    --badge-danger-color: #f87171;
    --badge-danger-border: rgba(248, 113, 113, 0.2);
    
    --badge-neutral-bg: rgba(156, 163, 175, 0.1);
    --badge-neutral-color: #9ca3af;
    --badge-neutral-border: rgba(156, 163, 175, 0.2);
    
    --badge-info-bg: rgba(99, 102, 241, 0.2);
    --badge-info-color: #818cf8;
    --badge-info-border: rgba(99, 102, 241, 0.3);
    
    /* ========================================
       SPACING
       ======================================== */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    
    /* ========================================
       BORDER RADIUS
       ======================================== */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --radius-full: 9999px;
    
    /* ========================================
       TRANSITIONS
       ======================================== */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.2s ease;
    --transition-slow: 0.3s ease;
    
    /* ========================================
       FONTS
       ======================================== */
    --font-sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-mono: 'Consolas', 'Monaco', monospace;
    
    /* ========================================
       LAYOUT
       ======================================== */
    --sidebar-width: 260px;
    --content-max-width: 1200px;
}

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

body {
    font-family: var(--font-sans);
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ========================================
   APP LAYOUT - Sidebar + Main Content
   ======================================== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Vertical Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-header h1 {
    font-size: 1.25rem;
    color: var(--text-inverse);
    margin-bottom: var(--spacing-xs);
}

.sidebar-header p {
    font-size: 0.75rem;
    color: var(--sidebar-text);
}

.sidebar-section {
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    padding: var(--spacing-sm) var(--spacing-lg);
    margin-bottom: var(--spacing-xs);
}

/* Sidebar navigation items - works for both <button> and <a> elements */
.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem var(--spacing-lg);
    border: none;
    background: transparent;
    color: var(--sidebar-text);
    font-size: 0.9rem;
    cursor: pointer;
    text-align: left;
    transition: all var(--transition-fast);
    text-decoration: none;
    box-sizing: border-box;
}

/* Reset link styles for sidebar nav */
a.sidebar-nav-item {
    text-decoration: none;
    color: var(--sidebar-text);
}

a.sidebar-nav-item:visited {
    color: var(--sidebar-text);
}

.sidebar-nav-item:hover {
    background: var(--sidebar-hover);
    color: var(--text-inverse);
}

.sidebar-nav-item.active {
    background: var(--sidebar-active);
    color: var(--text-inverse);
}

a.sidebar-nav-item.active,
a.sidebar-nav-item.active:visited {
    color: var(--text-inverse);
}

.sidebar-nav-item .nav-icon {
    font-size: 1.1rem;
    width: 1.5rem;
    text-align: center;
}

.sidebar-nav-item .nav-text {
    flex: 1;
}

.sidebar-footer {
    margin-top: auto;
    padding: var(--spacing-md) var(--spacing-lg);
    border-top: 1px solid var(--sidebar-border);
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: var(--spacing-xl);
    min-height: 100vh;
}

/* Legacy container support */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
}

header h1 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

header p {
    color: var(--text-secondary);
}

.api-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 1rem;
}

.api-status.online {
    background: #d1fae5;
    color: #065f46;
}

.api-status.offline {
    background: #fee2e2;
    color: #991b1b;
}

.api-status .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.api-status.online .dot {
    background: #10b981;
}

.api-status.offline .dot {
    background: #ef4444;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0;
}

.tab {
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

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

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

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-lg);
}

.card-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border);
}

.card-header h2 {
    font-size: 1.25rem;
}

.page-subtitle {
    flex-basis: 100%;
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: -0.25rem;
}

.status-indicator {
    font-size: 1.5rem;
}

.status-indicator.pending {
    color: #f59e0b;
}

.status-indicator.processed {
    color: #10b981;
}

.status-indicator.expired {
    color: #ef4444;
}

.method-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.method-badge.post {
    background: #dbeafe;
    color: #1d4ed8;
}

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

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

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

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

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

.endpoint-path {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.875rem;
    color: var(--text-secondary);
    background: var(--bg-main);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

label .required {
    color: var(--danger);
}

label .optional {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 0.875rem;
}

input[type="text"],
input[type="number"],
input[type="date"],
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: white;
}

/* Explicitly white select/dropdown */
select,
.filter-select {
    background-color: white !important;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

input::placeholder {
    color: var(--text-secondary);
}

/* Field row for 3 columns */
.field-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

/* Modal overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* File Upload */
.file-upload {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-main);
}

.file-upload:hover {
    border-color: var(--primary);
    background: #f1f5f9;
}

.file-upload.dragover {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
}

.file-upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.file-upload input {
    display: none;
}

.file-upload p {
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.file-upload .file-name {
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--bg-card);
    border-radius: 8px;
    font-weight: 500;
    color: var(--primary);
}

/* Checkbox */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.checkbox-group input {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 0.875rem var(--spacing-lg);
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-primary {
    background: var(--primary);
    color: var(--text-inverse);
}

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

.btn-primary:disabled {
    background: #a5b4fc;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--bg-main);
    color: var(--text-primary);
    border: 1.5px solid var(--border);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-success {
    background: #22c55e;
    color: var(--text-inverse);
}

.btn-success:hover {
    background: var(--success-hover);
}

.btn-success:disabled {
    background: #86efac;
    cursor: not-allowed;
}

/* Disabled state for any button */
.btn-disabled,
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-group {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* Grid Layout */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

/* Response Area */
.response-container {
    margin-top: 2rem;
}

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

.response-header h3 {
    font-size: 1rem;
    color: var(--text-secondary);
}

.response-status {
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.response-status.success {
    background: #d1fae5;
    color: #065f46;
}

.response-status.error {
    background: #fee2e2;
    color: #991b1b;
}

.response-status.warning {
    background: #fef3c7;
    color: #92400e;
}

/* Database Warning Banner */
.db-warning-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    border-left: 4px solid #f59e0b;
}

.db-warning-banner .warning-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.db-warning-banner .warning-content {
    flex: 1;
}

.db-warning-banner .warning-content strong {
    display: block;
    color: #92400e;
    margin-bottom: 0.25rem;
}

.db-warning-banner .warning-content p {
    color: #a16207;
    font-size: 0.875rem;
    margin: 0;
}

.db-warning-banner .warning-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #92400e;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.db-warning-banner .warning-close:hover {
    color: #78350f;
}

/* Database Success Banner */
.db-success-banner {
    position: relative;
    padding: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    border-radius: 12px;
    border-left: 5px solid #10b981;
    background: linear-gradient(135deg, #d1fae5 0%, #ecfdf5 100%);
}

.db-success-banner .banner-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.db-success-banner .banner-header .icon {
    font-size: 1.5rem;
}

.db-success-banner .banner-header strong {
    font-size: 1.1rem;
    color: #065f46;
}

.db-success-banner .changes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.db-success-banner .change-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    background: white;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #065f46;
    border: 1px solid #10b981;
}

.db-success-banner .change-tag .field-name {
    font-weight: 600;
}

.db-success-banner .success-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #065f46;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.db-success-banner .success-close:hover {
    color: #064e3b;
}

.response-body {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 8px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.875rem;
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
}

.response-body pre {
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Loading Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff40;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Products Table */
.products-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.products-table th,
.products-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.products-table th {
    background: var(--bg-main);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.products-table tr:hover {
    background: #f8fafc;
}

.halal-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    min-width: 100px;
    text-align: center;
}

/* Circular indicator for halal badges */
.halal-badge::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Halal flag badges (boolean) */
.halal-badge.halal-true {
    background: var(--badge-success-bg);
    color: var(--badge-success-color);
    box-shadow: inset 0 0 0 1px var(--badge-success-border);
}

.halal-badge.halal-true::before {
    background: var(--success);
    box-shadow: 0 0 0 2px var(--badge-success-border);
}

.halal-badge.halal-false {
    background: var(--badge-danger-bg);
    color: var(--badge-danger-color);
    box-shadow: inset 0 0 0 1px var(--badge-danger-border);
}

.halal-badge.halal-false::before {
    background: var(--danger);
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

/* Halal pending/unverified - less alarming gray color */
.halal-badge.halal-pending {
    background: var(--badge-neutral-bg);
    color: var(--badge-neutral-color);
    box-shadow: inset 0 0 0 1px var(--badge-neutral-border);
}

.halal-badge.halal-pending::before {
    background: var(--gray-300);
    box-shadow: 0 0 0 2px rgba(209, 213, 219, 0.3);
}

/* Process status badges */
.process-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 500;
    min-width: 140px;
    text-align: center;
}

.process-badge.processed {
    background: var(--badge-success-bg);
    color: var(--badge-success-color);
    box-shadow: inset 0 0 0 1px var(--badge-success-border);
}

.process-badge.pending {
    background: var(--badge-warning-bg);
    color: var(--badge-warning-color);
    box-shadow: inset 0 0 0 1px var(--badge-warning-border);
}

.process-badge.expired {
    background: var(--badge-danger-bg);
    color: var(--badge-danger-color);
    box-shadow: inset 0 0 0 1px var(--badge-danger-border);
}

.process-badge.inactive {
    background: rgba(156, 163, 175, 0.15);
    color: var(--gray-500);
    box-shadow: inset 0 0 0 1px rgba(156, 163, 175, 0.3);
    text-decoration: line-through;
    text-decoration-thickness: 1px;
    text-decoration-color: var(--gray-500);
}

/* Expired by indicator inside process badge */
.expired-by-indicator {
    font-size: 0.65rem;
    font-weight: 500;
    opacity: 0.8;
    cursor: help;
}

/* Legacy support for old halal_flag strings */
.halal-badge.certified {
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.2);
}

.halal-badge.pending {
    background: rgba(250, 204, 21, 0.1);
    color: #eab308;
    box-shadow: inset 0 0 0 1px rgba(250, 204, 21, 0.2);
}

.halal-badge.expired {
    background: rgba(248, 113, 113, 0.1);
    color: #f87171;
    box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.2);
}

.halal-badge.rejected {
    background: rgba(248, 113, 113, 0.1);
    color: #f87171;
    box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.2);
}

/* ========================================
   Verify Status Badges (Orders Table)
   ======================================== */
.verify-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 140px;
    text-align: center;
}


.verify-status-badge.verify-completed {
    background: var(--badge-success-bg);
    color: var(--badge-success-color);
    box-shadow: inset 0 0 0 1px var(--badge-success-border);
}

.verify-status-badge.verify-pending-review {
    background: var(--badge-warning-bg);
    color: var(--badge-warning-color);
    box-shadow: inset 0 0 0 1px var(--badge-warning-border);
}

.verify-status-badge.verify-pending {
    background: var(--badge-warning-bg);
    color: var(--badge-warning-color);
    box-shadow: inset 0 0 0 1px var(--badge-warning-border);
}

.verify-status-badge.verify-failed {
    background: var(--badge-danger-bg);
    color: var(--danger);
    box-shadow: inset 0 0 0 1px var(--badge-danger-border);
}

.verify-status-badge.verify-unknown {
    background: var(--badge-neutral-bg);
    color: var(--gray-500);
    box-shadow: inset 0 0 0 1px var(--badge-neutral-border);
}

/* ========================================
   Archived Products Page Styling
   ======================================== */

/* Status indicator for archived */
.status-indicator.archived {
    color: #6b7280;
}

/* Archive info banner */
.archive-info-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 8px;
    margin-top: 1rem;
}

.archive-info-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.archive-info-text {
    flex: 1;
}

.archive-info-text strong {
    display: block;
    font-size: 0.875rem;
    color: #3d3e3f;
    margin-bottom: 0.25rem;
}

.archive-info-text p {
    font-size: 0.8rem;
    color: #3b3b3b;
    margin: 0;
    line-height: 1.5;
}

/* Archived badge */
.process-badge.archived {
    background: rgba(107, 114, 128, 0.1);
    color: #9ca3af;
    box-shadow: inset 0 0 0 1px rgba(107, 114, 128, 0.2);
}

/* Archived table specific styling */
.archived-table tr:hover {
    background: rgba(99, 102, 241, 0.03);
}

/* Delete button styling */
.btn-icon.danger {
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
}

.btn-icon.danger:hover {
    background: rgba(248, 113, 113, 0.2);
    color: #ef4444;
}

/* Delete confirmation modal */
.delete-confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.delete-confirm-content {
    background: #1e293b;
    border-radius: 12px;
    padding: 0;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: modalSlideIn 0.2s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.delete-confirm-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.delete-confirm-header .delete-icon {
    font-size: 1.5rem;
}

.delete-confirm-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #f1f5f9;
}

.delete-confirm-body {
    padding: 1.25rem 1.5rem;
}

.delete-confirm-body p {
    margin: 0 0 1rem 0;
    color: #94a3b8;
    font-size: 0.9rem;
}

.delete-product-info {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.delete-product-info .product-id {
    display: inline-block;
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.delete-product-info .product-name {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 0.25rem;
}

.delete-product-info .product-brand {
    display: block;
    font-size: 0.8rem;
    color: #64748b;
}

.delete-warning {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.2);
    border-radius: 6px;
    padding: 0.75rem;
    color: #f87171;
    font-size: 0.85rem;
    margin-bottom: 0;
}

.delete-confirm-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.3);
    border-radius: 0 0 12px 12px;
}

/* Danger button */
.btn-danger {
    background: #ef4444;
    color: white;
}

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

.btn-danger:disabled {
    background: rgba(239, 68, 68, 0.5);
    cursor: not-allowed;
}

/* ========================================
   Orders Table Styling (Mimics Products)
   ======================================== */
.order-row {
    transition: background-color 0.15s ease;
}

.order-row:hover {
    background-color: #f9fafb;
}

.order-id {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2rem;
    padding: 0 0.5rem;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
}

.order-info-compact {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.order-main {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.order-number-text {
    font-weight: 600;
    color: #111827;
    font-size: 0.875rem;
}

.order-supplier-text {
    color: #6b7280;
    font-size: 0.8125rem;
    font-weight: 400;
}

.date-cell {
    color: #6b7280;
    font-size: 0.8125rem;
}

/* ========================================
   Edit Mode Notice (Order Edit Modal)
   ======================================== */
.edit-mode-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px dashed #0ea5e9;
    border-radius: 12px;
    padding: 2rem;
    margin: 1rem;
    min-height: 200px;
}

.edit-notice-content {
    text-align: center;
    color: #0369a1;
}

.edit-notice-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.5rem;
}

.edit-notice-text {
    font-size: 1.5rem;
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.edit-notice-content p {
    font-size: 0.875rem;
    color: #0284c7;
    margin: 0;
}

/* Product Info Banner (Halal Form) - Redesigned */
.product-info-banner {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 1rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    animation: fadeIn 0.25s ease-out;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

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

/* Banner top section - product info */
.banner-top {
    padding: 1rem 1.25rem;
    background: white;
}

.product-main-info {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.product-id-mini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
}

.product-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
    line-height: 1.4;
}

.product-subtitle {
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 400;
    margin-left: auto;
}

/* Banner bottom section - status badges */
.banner-bottom {
    padding: 0.875rem 1.25rem;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.status-badges {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.product-info-banner .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Circular indicator for status badge halal badges */
.status-badge.halal-badge::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Halal status badge colors */
.status-badge.halal-badge.halal-true {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.status-badge.halal-badge.halal-true::before {
    background: #10b981;
}

.status-badge.halal-badge.halal-false {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.status-badge.halal-badge.halal-false::before {
    background: #ef4444;
}

.status-badge.halal-badge.halal-pending {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}

.status-badge.halal-badge.halal-pending::before {
    background: #9ca3af;
}

/* Process state badge colors */
.status-badge.process-badge.processed {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.status-badge.process-badge.pending {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.status-badge.process-badge.expired {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Origin badge */
.status-badge.origin-badge.proof {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.status-badge.origin-badge.alias {
    background: #e0e7ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
}

/* Alias info */
.alias-info {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: #6b7280;
}

.alias-label {
    font-weight: 500;
}

.alias-name {
    color: #4f46e5;
    font-weight: 600;
}

/* Legacy support */
.product-info-banner.status-processed {
    /* No background color - using banner-bottom background */
}

.product-info-banner.status-pending {
    /* No background color - using banner-bottom background */
}

.product-info-banner.status-expired {
    /* No background color - using banner-bottom background */
}

.product-info-banner.status-certified {
    /* No background color - using banner-bottom background */
}

.product-info-banner.status-rejected {
    /* No background color - using banner-bottom background */
}

.product-info-banner.status-unknown {
    /* No background color - using banner-bottom background */
}

/* Old styles for backward compatibility */
.product-info-banner .product-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.status-indicators {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.product-info-banner .product-icon {
    font-size: 1.75rem;
}

.product-info-banner .product-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.product-info-banner .product-brand {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.product-info-banner .product-details {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.product-info-banner .product-details span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Status row split for side-by-side badges */
.status-row-split {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Halal Update Success Banner */
.halal-update-banner {
    padding: 1.25rem;
    margin: 1rem 0;
    border-radius: 12px;
    border-left: 5px solid #10b981;
    background: linear-gradient(135deg, #d1fae5 0%, #ecfdf5 100%);
}

.halal-update-banner .banner-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.halal-update-banner .banner-header .icon {
    font-size: 1.5rem;
}

.halal-update-banner .banner-header strong {
    font-size: 1.1rem;
    color: #065f46;
}

.halal-update-banner .changes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.halal-update-banner .change-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    background: white;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #065f46;
    border: 1px solid #10b981;
}

.halal-update-banner .change-tag .field-name {
    font-weight: 600;
}

.halal-update-banner .close-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #065f46;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

/* Auto halal info in update banner */
.halal-update-banner .auto-halal-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #10b981;
}

.halal-update-banner .halal-result {
    font-weight: 600;
    font-size: 0.9rem;
}

.halal-update-banner .halal-result.halal-true {
    color: #065f46;
}

.halal-update-banner .halal-result.halal-false {
    color: #991b1b;
}

.halal-update-banner .origin-info {
    font-size: 0.8rem;
    color: #6b7280;
}

/* Halal auto-info hint in form */
.halal-auto-info {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: #f0fdf4;
    border-radius: 6px;
    border: 1px solid #86efac;
    color: #166534;
    font-size: 0.875rem;
    line-height: 1.5;
}

.halal-auto-info .info-icon {
    font-size: 1.125rem;
    flex-shrink: 0;
    line-height: 1.5;
    display: flex;
    align-items: center;
    margin-top: 0.05rem;
}

.halal-auto-info .info-text {
    line-height: 1.5;
}

/* Halal indicator in product header */
.halal-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.halal-indicator.halal-true {
    background: #d1fae5;
    color: #065f46;
}

.halal-indicator.halal-false {
    background: #fee2e2;
    color: #991b1b;
}

/* Origin badge */
.origin-badge {
    display: inline-block;
    padding: 0.125rem 0.375rem;
    background: #e0f2fe;
    color: #0369a1;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Validation message */
.validation-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    color: #dc2626;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* Halal form specific styles */

/* Form Sections */
.form-section {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
}

.form-section:last-of-type {
    border-bottom: none;
}

.section-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.section-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.section-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.125rem;
}

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

/* Product Meta Row */
.product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.btn-link:hover {
    background: rgba(79, 70, 229, 0.1);
}

/* Field Groups */
.field-group {
    margin-bottom: 1.5rem;
}

.field-group-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--border);
}

/* Alias Search Dropdown */
.alias-search-container {
    position: relative;
}

.alias-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-height: 250px;
    overflow-y: auto;
    z-index: 1100;
}

.alias-dropdown-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.alias-dropdown-item:last-child {
    border-bottom: none;
}

.alias-dropdown-item:hover {
    background: #f8fafc;
}

.alias-dropdown-item .alias-name {
    font-weight: 600;
    color: #1e293b;
    flex: 1;
}

.alias-dropdown-item .alias-info {
    font-size: 0.75rem;
    color: #64748b;
}

.alias-dropdown-item .alias-cert {
    font-size: 0.7rem;
    color: #10b981;
    width: 100%;
    margin-top: 0.25rem;
}

.alias-dropdown-empty {
    padding: 1rem;
    text-align: center;
    color: #64748b;
    font-size: 0.875rem;
}

.selected-alias-badge {
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #e0f2fe;
    border: 1px solid #0ea5e9;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.selected-alias-badge .alias-text {
    font-weight: 500;
    color: #0369a1;
}

.selected-alias-badge .clear-alias {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0 0.25rem;
}

.selected-alias-badge .clear-alias:hover {
    color: #dc2626;
}

/* Locked alias badge - gray instead of blue */
.selected-alias-badge.locked {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.selected-alias-badge.locked .alias-text {
    color: #6b7280;
}

/* Hide clear button when alias is locked */
.selected-alias-badge.locked .clear-alias {
    display: none;
}

/* Halal Flag 3-state badges */
.halal-badge.halal-pending {
    background: rgba(156, 163, 175, 0.1);
    color: #9ca3af;
    box-shadow: inset 0 0 0 1px rgba(156, 163, 175, 0.2);
}

.halal-badge-mini.halal-pending {
    background: rgba(156, 163, 175, 0.1);
    color: #9ca3af;
    box-shadow: inset 0 0 0 1px rgba(156, 163, 175, 0.2);
}

/* Status row split layout - side by side badges */
.status-row-split {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.status-row-split .status-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.status-row-split .status-item label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.status-row-split .process-badge,
.status-row-split .halal-badge,
.status-row-split .origin-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    min-width: 160px;
    justify-content: center;
}

.field-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.field-row:last-child {
    margin-bottom: 0;
}

@media (max-width: 600px) {
    .field-row {
        grid-template-columns: 1fr;
    }
}

/* Update Fields Section */
.update-fields {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.update-fields .form-group {
    margin-bottom: 0;
}

.update-fields label {
    font-size: 0.9rem;
    margin-bottom: 0.375rem;
}

.update-fields input,
.update-fields select {
    padding: 0.625rem 0.875rem;
    font-size: 0.95rem;
}

#halal .form-group:first-child {
    margin-bottom: 1.5rem;
}

#halal select#productId {
    font-size: 1rem;
    padding: 1rem 3rem 1rem 3rem;
    min-height: 3.5rem;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: transparent;
    cursor: pointer;
    border: 2px solid var(--border);
    border-radius: 12px;
    transition: all 0.2s ease;
}

#halal select#productId:hover {
    border-color: var(--primary);
    background: #f8fafc;
}

#halal select#productId:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
}

#halal select#productId option {
    padding: 12px 16px;
    font-size: 0.95rem;
}

/* Custom Select Wrapper */
.custom-select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.custom-select-wrapper .select-icon {
    position: absolute;
    left: 1rem;
    font-size: 1.25rem;
    pointer-events: none;
    z-index: 1;
}

.custom-select-wrapper .select-arrow {
    position: absolute;
    right: 1rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    pointer-events: none;
    transition: transform 0.2s ease;
}

.custom-select-wrapper:hover .select-arrow {
    color: var(--primary);
}

.custom-select-wrapper select:focus + .select-arrow {
    transform: rotate(180deg);
    color: var(--primary);
}

/* Product Select Group */
.product-select-group {
    margin-bottom: 1.5rem !important;
}

.product-select-group label {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.product-count {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Pagination Controls */
.pagination-controls {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination-info {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.875rem;
    border: 1px solid var(--border);
    background: var(--bg-card);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-current {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    padding: 0 0.5rem;
    min-width: 100px;
    text-align: center;
}

#halal #refreshProductsBtn {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Utility classes */
.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}

.info-text {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.mt-1 {
    margin-top: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .tabs {
        flex-wrap: wrap;
    }

    .tab {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .btn-group {
        flex-direction: column;
    }
}

/* ========================================
   HALAL TAB - TABLE DESIGN STYLES
   ======================================== */

/* Edit button in table */
.btn-edit {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.4rem 0.75rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

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

/* Selected row highlight */
.products-table tr.selected-row {
    background: rgba(79, 70, 229, 0.08) !important;
    border-left: 3px solid var(--primary);
}

.products-table tr.selected-row td:first-child {
    padding-left: calc(1rem - 3px);
}

/* Halal tab table specific */
.halal-products-table {
    margin-top: 0;
}

/* Filter bar styling */
.halal-filter-bar {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.halal-filter-bar .filter-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.halal-filter-bar .filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.halal-filter-bar .filter-group label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.halal-filter-bar .filter-group select,
.halal-filter-bar .filter-group input {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
    min-width: 160px;
}

.halal-filter-bar .filter-group input[type="text"] {
    min-width: 200px;
}

.product-count-summary {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Circular indicators for product count summary */
.count-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 0.25rem;
    vertical-align: middle;
}

.count-indicator.halal-true {
    background: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.count-indicator.halal-false {
    background: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.count-indicator.halal-pending {
    background: #d1d5db;
    box-shadow: 0 0 0 2px rgba(209, 213, 219, 0.3);
}

/* Verify status count indicators for orders */
.count-indicator.verify-pending-review-dot {
    background: #eab308;
    box-shadow: 0 0 0 2px rgba(234, 179, 8, 0.2);
}

.count-indicator.verify-completed-dot {
    background: #4ade80;
    box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.2);
}

.count-indicator.verify-pending-dot {
    background: #6b7280;
    box-shadow: 0 0 0 2px rgba(107, 114, 128, 0.2);
}

/* Action button in table (icon-only) */
.btn-action {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-action:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: scale(1.05);
}

/* Product ID badge in edit banner */
.product-id-badge {
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-right: 0.5rem;
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
}

/* Edit card styling */
#halalEditCard {
    animation: slideIn 0.3s ease-out;
}

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

#halalEditCard .card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
    margin: -1.5rem -1.5rem 1.5rem -1.5rem;
    padding: 1.25rem 1.5rem;
    border-radius: 12px 12px 0 0;
}

#editCardTitle {
    flex: 1;
    font-size: 1.1rem;
}

.btn-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    line-height: 1;
    margin-left: auto;
}

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

/* Edit product banner inside edit card */
#editProductBanner {
    margin-bottom: 1.5rem;
}

/* Make the table more compact on halal tab */
.halal-products-table th,
.halal-products-table td {
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
}

.halal-products-table th:last-child,
.halal-products-table td:last-child {
    text-align: center;
    width: 90px;
}

/* Responsive adjustments for halal table */
@media (max-width: 1024px) {
    .halal-products-table th:nth-child(5),
    .halal-products-table td:nth-child(5),
    .halal-products-table th:nth-child(6),
    .halal-products-table td:nth-child(6) {
        display: none;
    }
}

@media (max-width: 768px) {
    .halal-products-table th:nth-child(7),
    .halal-products-table td:nth-child(7) {
        display: none;
    }
    
    .halal-filter-bar .filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .halal-filter-bar .filter-group select,
    .halal-filter-bar .filter-group input {
        width: 100%;

    }    
}

/* Alias Sync Banner */
.alias-sync-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fef9c3 100%);
    border: 1px solid #f59e0b;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    position: relative;
    animation: fadeIn 0.3s ease-out;
}

.alias-sync-banner .sync-icon {
    font-size: 1.5rem;
}

.alias-sync-banner .sync-content {
    flex: 1;
}

.alias-sync-banner .sync-content strong {
    color: #92400e;
    display: block;
    margin-bottom: 0.25rem;
}

.alias-sync-banner .sync-content p {
    margin: 0;
    font-size: 0.9rem;
    color: #78350f;
}

.alias-sync-banner .sync-details {
    margin-top: 0.5rem !important;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.85rem !important;
    color: #a16207 !important;
}

.btn-sync {
    background: #f59e0b;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-sync:hover {
    background: #d97706;
    transform: translateY(-1px);
}

.alias-sync-banner .sync-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: transparent;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: #92400e;
    opacity: 0.7;
    line-height: 1;
}

.alias-sync-banner .sync-close:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .alias-sync-banner {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .btn-sync {
        width: 100%;
        margin-top: 0.5rem;
    }
}

/* Parent Product Preview Banner */
#parentProductPreview {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #0ea5e9;
    border-radius: 8px;
    animation: slideIn 0.3s ease-out;
}

#parentProductPreview .product-info-banner {
    margin: 0;
    border-left-width: 3px;
}

#parentProductPreview .product-header {
    gap: 0.5rem;
}

#parentProductPreview .product-name {
    font-size: 0.95rem;
}

#parentProductPreview .product-details {
    font-size: 0.85rem;
}

/* ========================================
   OCR PREVIEW MODAL
   ======================================== */

/* Modal Overlay */
.preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease-out;
}

.preview-modal-content {
    background: white;
    width: 95%;
    max-width: 1400px;
    height: 90vh;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: slideIn 0.3s ease-out;
}

/* Modal Header */
.preview-header {
    display: flex;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px 16px 0 0;
    position: relative;
}

.preview-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text);
}

.preview-subtitle {
    margin: 0 0 0 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.preview-header .btn-close {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.75rem;
}

/* Page Navigation */
.preview-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 0.75rem 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--primary);
    border-radius: 8px;
    background: var(--primary);
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-btn:hover:not(:disabled) {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
}

.nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #a5b4fc;
    border-color: #a5b4fc;
}

.nav-arrow {
    font-size: 1.1rem;
}

.page-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text);
}

.page-title {
    margin-left: 0.75rem;
    padding-left: 0.75rem;
    border-left: 2px solid var(--border);
    color: var(--text-secondary);
    font-weight: 400;
}

/* Side-by-Side Layout */
.preview-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.preview-image-panel {
    width: 45%;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    background: #1a1a2e;
}

.preview-data-panel {
    width: 55%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
}

.preview-image-panel .panel-header {
    background: #2d2d44;
    color: white;
    border-bottom-color: #3d3d5c;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.btn-expand {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.btn-expand:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Expanded Image Modal */
.image-expand-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.image-expand-modal img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.image-expand-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.image-expand-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.edit-hint {
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Image Container */
.image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow: auto;
}

.image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.pdf-notice {
    text-align: center;
    color: #94a3b8;
}

.pdf-notice .pdf-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
}

.pdf-notice p {
    font-size: 1.25rem;
    margin: 0 0 0.5rem;
}

.pdf-notice small {
    opacity: 0.7;
}

/* Preview Pages */
.preview-page {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.5rem;
}

/* Verification Banner */
.verification-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fef9c3 100%);
    border: 1px solid #f59e0b;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.verification-banner .warning-icon {
    font-size: 1.5rem;
}

.verification-banner .warning-content strong {
    color: #92400e;
    display: block;
    margin-bottom: 0.25rem;
}

.verification-banner .warning-content p {
    margin: 0;
    color: #78350f;
    font-size: 0.9rem;
}

/* Data Sections */
.data-section {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.data-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.section-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.item-count {
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.btn-add-item {
    margin-left: auto;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-item:hover {
    background: var(--primary-dark);
}

/* Data Fields */
.data-field {
    margin-bottom: 0.75rem;
}

.data-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-field label .required {
    color: var(--danger);
    margin-left: 2px;
}

.data-field-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.data-field-row .data-field {
    flex: 1;
    margin-bottom: 0;
}

.preview-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s;
    background: #f8fafc;
}

.preview-input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.preview-input.highlight-total {
    font-weight: 600;
    font-size: 1rem;
    background: #ecfdf5;
    border-color: #10b981;
}

textarea.preview-input {
    resize: vertical;
    min-height: 60px;
}

/* Line Items Container */
.line-items-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.line-item-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    position: relative;
}

.line-item-card:hover {
    border-color: var(--primary);
}

.line-item-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.line-item-number {
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.line-item-header input {
    flex: 1;
    font-weight: 500;
}

.btn-remove-item {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 24px;
    height: 24px;
    border: none;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.2s;
}

.line-item-card:hover .btn-remove-item {
    opacity: 1;
}

.btn-remove-item:hover {
    background: #dc2626;
    color: white;
}

.line-item-fields {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.line-item-fields .data-field {
    margin-bottom: 0;
}

/* View-only line item styles */
.line-item-card.view-only {
    background: #ffffff;
    border-color: #e2e8f0;
}

.line-item-card.view-only .line-item-header {
    margin-bottom: 0.5rem;
}

.line-item-card.view-only .line-item-description-text {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
}

.view-fields {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.data-field-view {
    background: #f8fafc;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
}

.data-field-view label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 0.15rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.data-field-view .field-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Line item action buttons container */
.line-item-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

/* Edit button on view-only cards */
.btn-edit-item {
    width: 32px;
    height: 32px;
    border: none;
    background: #e0e7ff;
    color: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-edit-item:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

/* Delete button on view-only cards */
.btn-delete-item {
    width: 32px;
    height: 32px;
    border: none;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-delete-item:hover {
    background: #dc2626;
    color: white;
    transform: scale(1.1);
}

/* Editing state for line item */
.line-item-card.editing {
    background: #fffbeb;
    border-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.line-item-card.editing .line-item-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.line-item-card.editing .line-item-header input {
    flex: 1;
    font-weight: 500;
}

/* Save and Cancel buttons for editing */
.btn-save-item, .btn-cancel-item {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-save-item {
    background: #d1fae5;
    color: #059669;
}

.btn-save-item:hover {
    background: #10b981;
    color: white;
}

.btn-cancel-item {
    background: #fee2e2;
    color: #dc2626;
}

.btn-cancel-item:hover {
    background: #ef4444;
    color: white;
}

/* ========================================
   PAGE ACTION CONTAINER & UPDATE STATUS
   ======================================== */
.page-action-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.page-action-container .btn-primary {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.update-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.update-status-badge.status-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.update-status-badge.status-success .status-icon::before {
    content: '✓';
}

.update-status-badge.status-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.update-status-badge.status-error .status-icon::before {
    content: '✗';
}

.update-status-badge.status-saving {
    background: #e0e7ff;
    color: #3730a3;
    border: 1px solid #6366f1;
}

.update-status-badge.status-saving .status-icon::before {
    content: '⟳';
    animation: spin 1s linear infinite;
}

/* Mini version for inline display next to headers */
.update-status-badge.mini {
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    border-radius: 12px;
    margin-left: 0.5rem;
    gap: 0.3rem;
}

.update-status-badge.mini .status-icon {
    font-size: 0.7rem;
}

/* Inline status badge for individual line items */
.line-item-status {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
    margin-left: 0.5rem;
    transition: opacity 0.3s ease;
}

.line-item-status.status-success {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

.line-item-status.status-error {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

.line-item-hint {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Modal Footer */
.preview-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: #f8fafc;
    border-radius: 0 0 16px 16px;
}

.footer-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Verify Status Selector in footer */
.verify-status-selector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.verify-status-selector:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.verify-status-selector label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    letter-spacing: -0.01em;
    padding-top: 0.5rem;
}

.verify-status-selector select {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
    border: 1.5px solid var(--border);
    background: white;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 12px;
    cursor: pointer;
    min-width: 160px;
    color: var(--text-primary);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: all 0.2s ease;
}

.verify-status-selector select:hover {
    border-color: var(--primary);
    background-color: #fafafa;
}

.verify-status-selector select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    background-color: white;
}

.verify-status-selector select option {
    padding: 0.5rem;
    font-weight: 500;
}

.footer-actions {
    display: flex;
    gap: 0.75rem;
}

#confirmUploadBtn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* Resume Review Banner */
.resume-review-container {
    margin-top: 2rem;
    margin-bottom: 1.5rem;
}

.resume-review-banner {
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    border: 1px solid #0ea5e9;
    border-radius: 10px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: fadeIn 0.3s ease;
}

.resume-review-banner .info-icon {
    font-size: 1.75rem;
    flex-shrink: 0;
}

.resume-review-banner .resume-text {
    flex: 1;
}

.resume-review-banner .resume-text strong {
    color: #0c4a6e;
    display: block;
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.resume-review-banner .resume-text p {
    color: #0369a1;
    margin: 0;
    font-size: 0.9rem;
}

.resume-review-banner .btn-sm {
    flex-shrink: 0;
}

/* Processing Overlay */
.processing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: 12px;
}

.processing-content {
    text-align: center;
    padding: 2rem;
}

.processing-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #e1e5eb;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

.processing-content h3 {
    color: #1e293b;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.processing-content p {
    color: #64748b;
    font-size: 0.95rem;
}

/* Duplicate Warning Banner */
.duplicate-warning-banner {
    background: linear-gradient(135deg, #fef3cd 0%, #fff8e6 100%);
    border: 1px solid #f0ad4e;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    animation: fadeIn 0.3s ease;
}

.duplicate-warning-banner .warning-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.duplicate-warning-banner .warning-icon {
    font-size: 2rem;
}

.duplicate-warning-banner .warning-text h4 {
    color: #856404;
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
}

.duplicate-warning-banner .warning-text p {
    color: #6c5300;
    margin: 0;
    font-size: 0.9rem;
}

.duplicate-warning-banner .warning-invoice {
    background: rgba(133, 100, 4, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-family: monospace;
    color: #856404;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.duplicate-warning-banner .warning-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.duplicate-warning-banner .btn-outline {
    padding: 0.5rem 1rem;
    border: 2px solid #856404;
    background: transparent;
    color: #856404;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.duplicate-warning-banner .btn-outline:hover {
    background: #856404;
    color: white;
}

.duplicate-warning-banner .btn-edit-invoice {
    background: #856404;
    color: white;
    border-color: #856404;
}

.duplicate-warning-banner .btn-edit-invoice:hover {
    background: #6c5300;
    border-color: #6c5300;
}

/* Responsive */
@media (max-width: 1024px) {
    .preview-body {
        flex-direction: column;
    }
    
    .preview-image-panel,
    .preview-data-panel {
        width: 100%;
    }
    
    .preview-image-panel {
        height: 40%;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    
    .preview-data-panel {
        height: 60%;
    }
    
    .line-item-fields {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .preview-modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
    
    .preview-nav {
        gap: 0.5rem;
        padding: 0.5rem;
    }
    
    .nav-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .page-title {
        display: none;
    }
    
    .preview-footer {
        flex-direction: column;
        gap: 1rem;
    }
    
    .footer-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .footer-actions .btn {
        width: 100%;
    }
    
    .line-item-fields {
        grid-template-columns: 1fr;
    }
    
    .data-field-row {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* ========================================
   REDESIGNED PRODUCT TABLE STYLES
   ======================================== */

/* Compact product table rows */
.product-row {
    transition: background-color 0.15s ease;
}

.product-row:hover {
    background: #f0f9ff;
}

.id-cell {
    text-align: center;
}

.product-id {
    font-weight: 600;
    color: #6366f1;
    font-size: 0.875rem;
}

/* Compact product info */
.product-info-compact {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.product-main {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.product-name-text {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.9rem;
}

.product-brand-text {
    font-size: 0.75rem;
    color: #64748b;
}

.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.alias-tag {
    font-size: 0.7rem;
    padding: 0.125rem 0.375rem;
    background: #e0e7ff;
    color: #4338ca;
    border-radius: 3px;
    font-weight: 500;
}

/* Combined alias tag with origin indicator */
.alias-tag.combined {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.alias-tag .origin-indicator {
    font-size: 0.6rem;
    padding: 0.0625rem 0.25rem;
    border-radius: 2px;
    font-weight: 700;
    text-transform: uppercase;
}

.alias-tag .origin-indicator.alias {
    background: #f59e0b;
    color: white;
}

.alias-tag .origin-indicator.proof {
    background: #10b981;
    color: white;
}

.origin-tag {
    font-size: 0.65rem;
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-weight: 600;
    text-transform: uppercase;
}

.origin-tag.proof {
    background: #10b981;
    color: white;
}

.origin-tag.alias {
    background: #f59e0b;
    color: white;
}

/* Status stack */
.status-cell {
    vertical-align: middle;
}

.status-row {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    align-items: center;
}

.halal-badge-mini {
    font-size: 0.7rem;
    padding: 0.125rem 0.375rem;
    border-radius: 6px;
    font-weight: 500;
    min-width: 70px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.halal-badge-mini.halal-true {
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.2);
}

.halal-badge-mini.halal-false {
    background: rgba(248, 113, 113, 0.1);
    color: #f87171;
    box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.2);
}

/* Expired by indicator in table */
.expired-by-tag {
    font-size: 0.65rem;
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-weight: 500;
}

.expired-by-tag.system {
    background: #e0f2fe;
    color: #0369a1;
}

.expired-by-tag.user {
    background: #fef3c7;
    color: #92400e;
}

/* Certification cell */
.cert-cell {
    vertical-align: middle;
}

.cert-summary {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.cert-body {
    font-size: 0.8rem;
    font-weight: 500;
    color: #1e293b;
}

.cert-date {
    font-size: 0.7rem;
    color: #64748b;
}

.no-cert {
    font-size: 0.75rem;
    color: #94a3b8;
    font-style: italic;
}

/* Action buttons */
.action-cell {
    text-align: center;
}

.action-buttons {
    display: flex;
    gap: 0.375rem;
    justify-content: center;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    transition: all 0.15s ease;
}

.btn-icon:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: scale(1.05);
}

.btn-icon.primary {
    background: white;
    border-color: #e2e8f0;
}

.btn-icon.primary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: scale(1.05);
}


/* ========================================
   PRODUCT DETAILS MODAL
   ======================================== */

.product-details-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
}

.product-details-content {
    background: white;
    border-radius: 12px;
    max-width: 700px;
    width: 95%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.2s ease;
}

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

.product-details-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.product-details-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: #1e293b;
}

.product-details-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.product-details-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
}

/* Detail sections */
.detail-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}

/* Sticky Product Information Section */
.detail-section.sticky-product-info {
    position: sticky;
    top: 0;
    z-index: 10;
    background: white;
    margin: 0 -1.5rem 1rem -1.5rem;
    padding: 0.85rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 0;
}

/* Status Section Card */
.detail-section.status-section {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 1.5rem;
}

.status-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.status-card .status-row-split {
    gap: 1rem;
}

.status-card .status-item {
    flex: 1;
    min-width: 150px;
}

.status-card .status-item label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.status-card .detail-expired-by {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.sticky-product-compact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.product-id-mini {
    background: #f1f5f9;
    color: #475569;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    border: 1px solid #e2e8f0;
}

.product-name-compact {
    color: #1e293b;
    font-size: 1.05rem;
    font-weight: 700;
    flex: 1;
    min-width: 200px;
}

.product-brand-compact {
    color: #64748b;
    font-size: 0.85rem;
    font-style: italic;
    padding: 0.25rem 0.65rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.product-meta-row {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.product-meta-row .meta-item {
    color: #475569;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: #f8fafc;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.product-meta-row .meta-label {
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Orders & Suppliers Combined Section */
.detail-section.orders-suppliers-section {
    display: flex;
    flex-direction: column;
    max-height: 350px;
    margin-bottom: 1rem;
}

.orders-suppliers-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #fafafa;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

/* Scrollbar styling for orders/suppliers */
.orders-suppliers-scroll::-webkit-scrollbar {
    width: 8px;
}

.orders-suppliers-scroll::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 4px;
}

.orders-suppliers-scroll::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}

.orders-suppliers-scroll::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Supplier order cards */
.supplier-order-card {
    border-left: 3px solid #10b981;
    background: white;
}

.suppliers-order-list {
    margin-top: 0.5rem;
}

.suppliers-order-list .order-card {
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Compact origin info */
.suppliers-origin-info.compact {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.suppliers-origin-info.compact.alias {
    background: #f0f7ff;
    color: #1976d2;
}

.suppliers-origin-info.compact.proof {
    background: #f0fdf4;
    color: #16a34a;
}

.detail-section:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.detail-section.audit {
    background: #f8fafc;
    margin: 0 -1.5rem -1.5rem;
    padding: 1rem 1.5rem;
    border-radius: 0 0 12px 12px;
    border-bottom: none;
}

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

.detail-section-header h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #334155;
}

.section-icon {
    font-size: 1.1rem;
}

.detail-count {
    margin-left: auto;
    font-size: 0.75rem;
    color: #64748b;
    background: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* Detail grid */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.detail-item label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    font-weight: 500;
}

.detail-item span {
    font-size: 0.875rem;
    color: #1e293b;
}

.detail-item span.highlight {
    font-weight: 600;
    color: #6366f1;
}

.detail-item span.text-danger {
    color: #dc2626;
    font-weight: 500;
}

/* Status row in modal */
.status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.process-badge.large,
.halal-badge.large {
    font-size: 0.85rem;
    padding: 0.375rem 0.75rem;
}

.origin-badge.large {
    font-size: 0.8rem;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-weight: 600;
}

.origin-badge.large.proof {
    background: #10b981;
    color: white;
}

.origin-badge.large.alias {
    background: #f59e0b;
    color: white;
}

/* Expired by indicator in modal */
.detail-expired-by {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
}

.detail-expired-by.system {
    background: #e0f2fe;
    color: #0369a1;
}

.detail-expired-by.user {
    background: #fef3c7;
    color: #92400e;
}

.expired-icon {
    font-size: 1.25rem;
}

/* Order history */
.order-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.order-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

/* Certificate card matching order card design */
.cert-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

/* Product card matching order card design */
.product-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed #cbd5e1;
}

.product-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #334155;
}

.product-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.product-item {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.product-field {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 500;
}

.product-value {
    font-size: 0.85rem;
    color: #334155;
    font-weight: 500;
}

.product-value.highlight {
    color: #2563eb;
    font-weight: 600;
}

@media (max-width: 600px) {
    .product-details {
        grid-template-columns: 1fr;
    }
}

.cert-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed #cbd5e1;
}

.cert-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #334155;
}

.cert-origin {
    font-size: 0.65rem;
    padding: 0.125rem 0.5rem;
    border-radius: 3px;
    font-weight: 700;
    text-transform: uppercase;
}

.cert-origin.proof {
    background: #10b981;
    color: white;
}

.cert-origin.alias {
    background: #f59e0b;
    color: white;
}

.cert-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.cert-item {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.cert-field {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 500;
}

.cert-value {
    font-size: 0.85rem;
    color: #334155;
    font-weight: 500;
}

.cert-value.text-danger {
    color: #dc2626;
    font-weight: 600;
}

@media (max-width: 600px) {
    .cert-details {
        grid-template-columns: 1fr;
    }
}

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

.order-no {
    font-weight: 600;
    font-size: 0.9rem;
    color: #334155;
}

.order-date {
    font-size: 0.75rem;
    color: #64748b;
}

.order-details {
    font-size: 0.8rem;
    color: #64748b;
}

.supplier {
    display: block;
}

.supplier-address {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #64748b;
}

.line-items {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed #cbd5e1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.line-item {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #475569;
}

.item-qty {
    min-width: 60px;
}

.item-sku {
    flex: 1;
    color: #64748b;
}

.item-unit-price {
    min-width: 50px;
    color: #64748b;
    font-size: 0.7rem;
}

.item-price {
    font-weight: 500;
    color: #059669;
    min-width: 60px;
    text-align: right;
}

.no-orders {
    text-align: center;
    padding: 1.5rem;
    color: #94a3b8;
    font-style: italic;
    font-size: 0.875rem;
}

/* Audit info */
.audit-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #64748b;
}

/* Error message */
.error-message {
    text-align: center;
    padding: 2rem;
    color: #dc2626;
    font-size: 0.9rem;
}

/* Alias search container */
.alias-search-container {
    position: relative;
}

.alias-search-container.alias-selected .alias-selected-overlay {
    display: block;
}

.alias-selected-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #e0f2fe 0%, #b3e5fc 100%);
    border: 2px solid #2196f3;
    border-radius: 6px;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: #1565c0;
    z-index: 10;
}

.alias-selected-overlay .alias-text {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alias-selected-overlay .clear-alias {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #2196f3;
    color: #1565c0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
    pointer-events: all;
    transition: all 0.2s;
}

.alias-selected-overlay .clear-alias:hover {
    background: white;
    transform: scale(1.1);
}

/* Alias Lock Overlay */
.alias-lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 6px;
    pointer-events: none;
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: #92400e;
    z-index: 10;
}

.alias-lock-overlay .lock-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.alias-lock-overlay .lock-icon {
    font-size: 1rem;
}

.alias-lock-overlay .lock-text strong {
    color: #78350f;
}

.alias-search-container.alias-selected #aliasSearchInput {
    background: rgba(255, 255, 255, 0.9);
    border-color: #2196f3;
    box-shadow: 0 0 0 1px #2196f3;
}

/* Alias Lock Notice */
.alias-lock-notice {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.alias-lock-notice .lock-icon {
    font-size: 1.25rem;
}

.alias-lock-notice .lock-text {
    color: #92400e;
}

.alias-lock-notice .lock-text strong {
    color: #78350f;
}

.alias-lock-notice .lock-text em {
    color: #a16207;
}

/* ========================================
   SUPPLIERS SECTION STYLES
   ======================================== */

/* Loading state */
.suppliers-loading {
    text-align: center;
    padding: 1.5rem;
    color: #64748b;
    font-size: 0.875rem;
}

/* Origin info banner */
.suppliers-origin-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}

.suppliers-origin-info.alias {
    background: #f0f7ff;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.suppliers-origin-info.proof {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.suppliers-origin-info .info-icon {
    font-size: 1rem;
}

/* Suppliers list */
.suppliers-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Supplier card */
.supplier-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

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

.supplier-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #334155;
}

.supplier-order-count {
    font-size: 0.75rem;
    color: #64748b;
    background: #e2e8f0;
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
}

.supplier-card .supplier-address {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

/* Products tags */
.supplier-products {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed #e2e8f0;
}

.supplier-products .products-label {
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 500;
}

.product-tag {
    background: #ede9fe;
    color: #7c3aed;
    font-size: 0.7rem;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

/* Order tags */
.supplier-orders {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.order-tag {
    background: #f1f5f9;
    color: #475569;
    font-size: 0.7rem;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
}

.more-orders {
    color: #64748b;
    font-size: 0.7rem;
    font-style: italic;
}

/* No suppliers message */
.no-suppliers {
    text-align: center;
    padding: 1.5rem;
    color: #94a3b8;
    font-style: italic;
    font-size: 0.875rem;
}

/* Responsive for modal */
@media (max-width: 600px) {
    .product-details-content {
        max-height: 95vh;
        border-radius: 8px;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .status-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .supplier-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}