/* ==================== CSS Variables ==================== */
:root {
    --primary-color: #6b21a8; /* Purple */
    --primary-hover: #d4af37;
    --primary-light: #7c3aed;
    --secondary-color: #d4af37; /* Gold */
    --secondary-hover: #d0d30f;
    --success-color: #22c55e;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --background-color: #d8d7ba;
    --card-background: #ffffff;
    --text-color: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --radius-lg: 12px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: none;
}

/* ==================== Navbar ==================== */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), #4c1d95);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-logo i {
    color: #ffffff;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    text-decoration: none;
}

.nav-link i {
    color: var(--secondary-color);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-toggle::after {
    content: '\f0d7';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: 0.25rem;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card-background);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    padding: 0.5rem 0;
    list-style: none;
    display: none;
    z-index: 101;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    transition: background-color 0.2s;
}

.dropdown-menu li a:hover {
    background-color: var(--background-color);
    color: var(--primary-color);
}

/* ==================== Container ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* ==================== Buttons ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

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

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

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

.btn-secondary:hover {
    background-color: var(--secondary-hover);
    color: white;
}

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

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

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

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* ==================== Alerts ==================== */
.alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ==================== Cards ==================== */
.card {
    background: var(--card-background);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}

.card-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-color);
}

.card-icon {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.card-body {
    padding: 1.25rem;
}

/* ==================== Page Header ==================== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-header h1 i {
    color: var(--secondary-color);
}

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

/* ==================== Breadcrumb ==================== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

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

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

/* ==================== Scanner Section ==================== */
.scanner-section {
    text-align: center;
    padding: 2rem;
    background: var(--card-background);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

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

.scanner-header p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.scanner-container {
    max-width: 500px;
    margin: 0 auto;
}

.reader {
    width: 100%;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1rem;
    border: 2px solid var(--secondary-color);
}

.reader #reader__scan_region {
    min-height: 300px;
}

.scanner-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.manual-input {
    padding: 1.5rem;
    background: var(--background-color);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.manual-input p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.manual-input form {
    display: flex;
    gap: 0.75rem;
}

.manual-input input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
}

.manual-input input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Scanner Overlay and Results */
.scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.scanner-overlay .scan-line {
    position: absolute;
    width: 80%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #ff0000, transparent);
    box-shadow: 0 0 10px #ff0000, 0 0 20px #ff0000;
    animation: scanLine 2s ease-in-out infinite;
    opacity: 0;
}

.scanner-overlay .scan-line.active {
    opacity: 1;
}

@keyframes scanLine {
    0%, 100% {
        top: 30%;
    }
    50% {
        top: 70%;
    }
}

.reader.scanning {
    position: relative;
}

.reader.scanning .scanner-overlay .scan-line {
    opacity: 1;
}

#reader__scan_region {
    position: relative;
}

.scanned-result {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: var(--radius);
    font-weight: 500;
    display: none;
}

.scanned-result.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

.scanned-result.success {
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #86efac;
}

.scanned-result.error {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
}

.scanned-result.not-found {
    background: #fef3c7;
    color: #d97706;
    border: 1px solid #fcd34d;
}

.scanned-result i {
    margin-right: 0.5rem;
}

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

#scannedCode {
    font-weight: 700;
    color: var(--primary-color);
    font-family: monospace;
    font-size: 1.2em;
}

/* ==================== Quick Links ==================== */
.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.quick-link-card {
    background: var(--card-background);
    padding: 2rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
}

.quick-link-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
    text-decoration: none;
}

.quick-link-card .icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.quick-link-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.quick-link-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ==================== Data Tables ==================== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-background);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

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

.data-table th {
    background: linear-gradient(135deg, var(--primary-color), #4c1d95);
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
}

.data-table th i {
    color: var(--secondary-color);
    margin-right: 0.5rem;
}

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

.data-table .actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    white-space: nowrap;
}

/* Table Responsive */
.table-responsive {
    overflow-x: auto;
}

@media (max-width: 768px) {
    .data-table {
        font-size: 0.875rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
    }
}

/* ==================== Search Section ==================== */
.search-section {
    margin-bottom: 1.5rem;
}

.search-form {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.search-form input {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
}

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

/* ==================== Product Count ==================== */
.product-count {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

/* ==================== Empty State ==================== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--card-background);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.empty-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
    color: var(--primary-color);
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.empty-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ==================== Product Detail ==================== */
.product-detail {
    background: var(--card-background);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 2rem;
    border: 1px solid var(--border-color);
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.product-header h1 {
    font-size: 1.75rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.product-sl {
    background: linear-gradient(135deg, var(--primary-color), #4c1d95);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.product-sl .label {
    color: rgba(255, 255, 255, 0.8);
    margin-right: 0.5rem;
}

.product-sl .value {
    font-family: monospace;
    font-weight: 600;
}

.product-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.info-card {
    background: var(--background-color);
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.info-card.highlight {
    background: linear-gradient(135deg, var(--primary-color), #4c1d95);
    color: white;
}

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

.info-card.highlight .info-label {
    color: rgba(255, 255, 255, 0.8);
}

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

.info-value.price {
    color: var(--secondary-color);
    font-size: 1.5rem;
}

.info-card.highlight .info-value.price {
    color: #ffffff;
}

.product-description {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--background-color);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary-color);
}

.product-description h3 {
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-meta {
    margin-bottom: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

.product-meta p {
    margin-bottom: 0.25rem;
}

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

/* ==================== Forms ==================== */
.form-container {
    background: var(--card-background);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 2rem;
    border: 1px solid var(--border-color);
}

.form-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
}

.form-header h1 {
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-header h1 i {
    color: var(--secondary-color);
}

.form-header p {
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.product-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

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

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group label i {
    color: var(--primary-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(107, 33, 168, 0.1);
}

.form-group small {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* ==================== Checkbox ==================== */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    cursor: pointer;
}

/* ==================== Import/Export ==================== */
.import-export-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.file-requirements {
    background: var(--background-color);
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.file-requirements h4 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.file-requirements ul {
    margin-left: 1.5rem;
    color: var(--text-muted);
}

.file-requirements li {
    margin-bottom: 0.25rem;
}

.file-input-wrapper {
    margin-bottom: 1rem;
}

.file-input-wrapper input {
    padding: 0.5rem;
}

.upload-form {
    margin-bottom: 1rem;
}

.note {
    font-size: 0.875rem;
    color: var(--text-muted);
    padding: 0.75rem;
    background: #fef3c7;
    border-radius: var(--radius);
    border-left: 4px solid var(--warning-color);
}

.export-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.export-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--background-color);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.export-btn:hover {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-color: var(--primary-color);
}

.export-icon {
    font-size: 2rem;
    color: var(--primary-color);
}

.export-btn:hover .export-icon {
    color: white;
}

.export-text strong {
    display: block;
}

.export-text small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.export-btn:hover .export-text small {
    color: rgba(255, 255, 255, 0.8);
}

.download-sample {
    margin-top: 1.5rem;
    text-align: center;
}

/* ==================== QR Section ==================== */
.qr-section {
    margin-top: 2rem;
    text-align: center;
    padding: 2rem;
    background: var(--card-background);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.qr-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.qr-section p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

#qrcode img {
    border: 4px solid var(--primary-color);
    border-radius: var(--radius);
}

/* ==================== Badges ==================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-admin {
    background: linear-gradient(135deg, var(--primary-color), #4c1d95);
    color: white;
}

.badge-user {
    background: var(--background-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.status-active {
    color: var(--success-color);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.status-inactive {
    color: var(--danger-color);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

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

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

/* ==================== Login Page ==================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 1rem;
}

.login-card {
    background: var(--card-background);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, var(--primary-color), #4c1d95);
    color: white;
    padding: 2rem;
    text-align: center;
}

.login-logo {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.login-logo i {
    color: var(--secondary-color);
}

.login-header h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: rgba(255, 255, 255, 0.8);
}

.login-form {
    padding: 2rem;
}

.login-form .form-group {
    margin-bottom: 1.25rem;
}

.login-footer {
    padding: 1rem 2rem 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    border-top: 1px solid var(--border-color);
    margin-top: 1rem;
}

/* ==================== Login Prompt ==================== */
.login-prompt {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.prompt-card {
    background: var(--card-background);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    text-align: center;
    max-width: 400px;
    border: 1px solid var(--border-color);
}

.prompt-card i {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.prompt-card h2 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.prompt-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* ==================== Filter & Sort Section ==================== */
.filter-sort-section {
    background: var(--card-background);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.filter-sort-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.filter-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.filter-group input,
.filter-group select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.875rem;
    min-width: 150px;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

/* ==================== Pagination ==================== */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 1rem;
}

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

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

.pagination-link {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s;
}

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

.pagination-current {
    padding: 0.5rem 0.75rem;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
}

.pagination-ellipsis {
    padding: 0.5rem;
    color: var(--text-muted);
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .container {
        padding: 1rem;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    /* Scanner Section Mobile */
    .scanner-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .scanner-header h1 {
        font-size: 1.5rem;
    }
    
    .scanner-container {
        max-width: 100%;
    }
    
    .reader {
        width: 100%;
        min-height: 250px;
    }
    
    .reader #reader__scan_region {
        min-height: 250px;
    }
    
    .scanner-overlay .scan-line {
        width: 90%;
    }
    
    .scanned-result {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .scanner-controls {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .scanner-controls .btn {
        width: 100%;
    }
    
    .manual-input {
        padding: 1rem;
    }
    
    .manual-input form {
        flex-direction: column;
    }
    
    .manual-input input {
        width: 100%;
    }
    
    .manual-input .btn {
        width: 100%;
    }
    
    .product-header {
        flex-direction: column;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .product-actions .btn {
        width: 100%;
    }
    
    .import-export-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-sort-form {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group input,
    .filter-group select {
        width: 100%;
        min-width: unset;
    }
    
    .filter-actions {
        width: 100%;
        justify-content: stretch;
    }
    
    .filter-actions .btn {
        flex: 1;
    }
    
    .pagination {
        flex-direction: column;
        text-align: center;
    }
    
    .pagination-links {
        justify-content: center;
    }
    
    /* Price History Mobile */
    .price-history-section {
        padding: 1rem;
    }
    
    .price-history-header {
        flex-direction: column;
        text-align: center;
    }
    
    .price-history-item {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    /* Table Mobile */
    .data-table {
        display: block;
        overflow-x: auto;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }
    
    /* Login Page Mobile */
    .login-container {
        padding: 1rem;
    }
    
    .login-box {
        padding: 1.5rem;
    }
    
    .login-box h1 {
        font-size: 1.5rem;
    }
    
    .form-group input {
        font-size: 1rem;
        padding: 0.75rem;
    }
    
    /* Quick Links Mobile */
    .quick-links {
        grid-template-columns: 1fr;
    }
    
    .quick-link-card {
        padding: 1.5rem;
    }
    
    /* Prompt Card Mobile */
    .prompt-card {
        padding: 2rem 1.5rem;
    }
    
    .prompt-card h2 {
        font-size: 1.5rem;
    }
    
    /* Alert Mobile */
    .alert {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    /* Dropdown Mobile */
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: 1px solid var(--border-color);
        margin-top: 0.5rem;
    }
    
    .nav-item.dropdown ul.dropdown-menu li a {
        padding: 0.5rem 1rem;
    }
    
    /* Product Detail Mobile */
    .product-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .product-image-container {
        max-width: 100%;
    }
    
    .product-info h1 {
        font-size: 1.25rem;
    }
    
    .product-price {
        font-size: 1.5rem;
    }
    
    .product-meta {
        grid-template-columns: 1fr;
    }
    
    /* Admin Page Mobile */
    .admin-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-card h3 {
        font-size: 2rem;
    }
    
    /* User Actions Mobile */
    .user-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .user-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Form Actions Mobile */
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

/* iPhone SE and Small Phones */
@media (max-width: 375px) {
    .nav-logo {
        font-size: 1rem;
    }
    
    .nav-menu {
        gap: 0.25rem;
    }
    
    .nav-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .container {
        padding: 0.75rem;
    }
    
    .scanner-header h1 {
        font-size: 1.25rem;
    }
    
    .reader {
        min-height: 200px;
    }
    
    .scanned-result {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
    
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.875rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.75rem;
    }
    
    .login-box {
        padding: 1rem;
    }
    
    .prompt-card {
        padding: 1.5rem 1rem;
    }
    
    .prompt-card i {
        font-size: 2.5rem;
    }
    
    .prompt-card h2 {
        font-size: 1.25rem;
    }
    
    .quick-link-card {
        padding: 1rem;
    }
    
    .quick-link-card .icon {
        font-size: 2rem;
    }
    
    .quick-link-card h3 {
        font-size: 1rem;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .scanner-section {
        padding: 1rem;
    }
    
    .reader {
        min-height: 200px;
    }
    
    .quick-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==================== Price History Section ==================== */
.price-history-section {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-top: 1.5rem;
    box-shadow: var(--shadow);
}

.price-history-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.price-history-header i {
    font-size: 1.25rem;
    color: var(--primary-color);
}

.price-history-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.price-history-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.price-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-light);
    border-radius: var(--radius);
    transition: all 0.2s;
}

.price-history-item:hover {
    background: var(--border-color);
}

.price-history-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.price-history-date {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.price-history-user {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.price-history-amount {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.price-history-change {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 50px;
    font-weight: 500;
}

.price-history-change.increase {
    background: #fee2e2;
    color: #dc2626;
}

.price-history-change.decrease {
    background: #dcfce7;
    color: #16a34a;
}

.price-history-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.price-history-empty i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}
