/* ===============================================
   ADMIN PANEL STYLES - WebTopup
   Modern dark admin panel matching website theme
   =============================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --admin-sidebar-width: 220px;
    --admin-primary: #0C951E;
    --admin-primary-dark: #0a7a19;
    --admin-dark-bg: #ffffff;
    --admin-card-bg: #ffffff;
    --admin-border: #e5e5e5;
    --admin-text-primary: #1a1a1a;
    --admin-text-secondary: #6b7280;
    --admin-success: #0C951E;
    --admin-danger: #ef4444;
    --admin-warning: #f59e0b;
    --admin-info: #3b82f6;
    --admin-bg-light: #f9fafb;
    --admin-light-bg: #f3f4f6;
    --admin-font-size: 13px;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

.admin-layout {
    background: var(--admin-bg-light);
    color: var(--admin-text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: var(--admin-font-size);
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* ===============================================
   ADMIN CONTAINER & LAYOUT
   =============================================== */

.admin-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.admin-main {
    flex: 1;
    margin-left: var(--admin-sidebar-width);
    background: var(--admin-bg-light);
    min-height: 100vh;
    width: calc(100% - var(--admin-sidebar-width));
    max-width: calc(100vw - var(--admin-sidebar-width));
    overflow-x: hidden;
}

/* ===============================================
   SIDEBAR
   =============================================== */

.admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--admin-sidebar-width);
    height: 100vh;
    background: #1a1a1a;
    border-right: 1px solid #2a2a2a;
    display: flex;
    flex-direction: column;
    z-index: 1010;
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid #2a2a2a;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--admin-text-primary);
}

.logo-img {
    width: 140px;
    height: auto;
    object-fit: contain;
}

.sidebar-close {
    display: none;
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 1px solid transparent;
    color: #b0b0b0;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 6px;
}

.logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--admin-primary);
}

/* ===============================================
   SIDEBAR NAVIGATION
   =============================================== */

.sidebar-nav {
    flex: 1;
    padding: 0.5rem 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.55rem 1rem;
    color: #b0b0b0;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.nav-item.active {
    background: rgba(12, 149, 30, 0.08);
    color: var(--admin-primary);
    border-left-color: var(--admin-primary);
    font-weight: 600;
}

.nav-item svg {
    flex-shrink: 0;
}

/* Logout button styled as nav-item */
button.nav-item.logout-btn {
    width: 100%;
    background: transparent !important;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}

.nav-divider {
    height: 1px;
    background: #2a2a2a;
    margin: 0.5rem 1rem;
}

/* ===============================================
   SIDEBAR FOOTER
   =============================================== */

.sidebar-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid #2a2a2a;
}

/* ===============================================
   SIDEBAR OVERLAY
   =============================================== */

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1005;
}

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

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--admin-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
    flex-shrink: 0;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.7rem;
    color: #b0b0b0;
}

/* ===============================================
   ADMIN HEADER
   =============================================== */

.admin-header {
    background: var(--admin-card-bg);
    border-bottom: 1px solid var(--admin-border);
    padding: 0.875rem 1.25rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.sidebar-toggle {
    display: none;
    background: transparent;
    border: 1px solid transparent;
    color: var(--admin-text-primary);
    cursor: pointer;
    padding: 0.5rem;
    margin-right: 1rem;
    border-radius: 8px;
}

.sidebar-toggle svg {
    width: 24px;
    height: 24px;
}

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

.page-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--admin-text-primary);
    margin: 0;
}

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

/* ===============================================
   ADMIN CONTENT
   =============================================== */

.admin-content {
    padding: 1.25rem;
}

/* ===============================================
   ALERTS
   =============================================== */

.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.alert svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.alert ul {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
}

.alert-success {
    background: rgba(12, 149, 30, 0.1);
    border: 1px solid rgba(12, 149, 30, 0.3);
    color: #06d62b;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

/* ===============================================
   CARDS
   =============================================== */

.card {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

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

.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--admin-text-primary);
    margin: 0;
}

.card-body {
    padding: 1rem 1.25rem;
}

/* ===============================================
   DASHBOARD GRID
   =============================================== */

.dashboard-grid {
    display: grid;
    gap: 1rem;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.stat-card {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    color: white;
    width: 20px;
    height: 20px;
}

.stat-details {
    flex: 1;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--admin-text-primary);
    margin: 0 0 0.15rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--admin-text-secondary);
    margin: 0;
}

/* ===============================================
   QUICK LINKS
   =============================================== */

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.quick-link-card {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 1rem;
    text-decoration: none;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.quick-link-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.75rem;
    background: rgba(12, 149, 30, 0.08);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-link-icon svg {
    color: var(--admin-primary);
    width: 22px;
    height: 22px;
}

.quick-link-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--admin-text-primary);
    margin: 0 0 0.35rem;
}

.quick-link-card p {
    font-size: 0.8rem;
    color: var(--admin-text-secondary);
    margin: 0;
}

/* ===============================================
   TABLES
   =============================================== */

.table-responsive {
    overflow-x: auto;
    margin: -1rem -1.25rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--admin-bg-light);
}

.data-table th {
    padding: 0.65rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--admin-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--admin-border);
}

.data-table td {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--admin-border);
    color: var(--admin-text-primary);
    font-size: 0.85rem;
}

.data-table tbody tr {}

.table-img {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
}

/* ===============================================
   BADGES
   =============================================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-success {
    background: rgba(12, 149, 30, 0.15);
    color: #06d62b;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.badge-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--admin-text-secondary);
}

/* ===============================================
   BUTTONS
   =============================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

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

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

.btn-secondary {
    background: transparent;
    color: var(--admin-text-primary);
    border-color: var(--admin-border);
}

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

.btn-info {
    background: var(--admin-info);
    color: white;
    border-color: var(--admin-info);
}

.btn-sm {
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 0.65rem 1.25rem;
    font-size: 0.9rem;
}

.btn-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ===============================================
   ACTION BUTTONS
   =============================================== */

.action-buttons {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.action-buttons .btn {
    padding: 0.35rem;
}

/* ===============================================
   FORMS
   =============================================== */

.form-grid {
    display: grid;
    gap: 1rem;
}

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

.form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--admin-text-primary);
}

.form-label.required::after {
    content: " *";
    color: var(--admin-danger);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: #ffffff;
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    color: var(--admin-text-primary);
    font-size: 0.85rem;
    font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--admin-primary);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-file {
    display: none;
}

.file-upload-area {
    border: 2px dashed var(--admin-border);
    border-radius: 6px;
    padding: 1.25rem;
    text-align: center;
    cursor: pointer;
}

.file-upload-icon {
    width: 36px;
    height: 36px;
    margin: 0 auto 0.75rem;
    color: var(--admin-text-secondary);
}

.file-upload-text {
    font-size: 0.8rem;
    color: var(--admin-text-primary);
    margin-bottom: 0.35rem;
}

.file-upload-hint {
    font-size: 0.75rem;
    color: var(--admin-text-secondary);
}

.file-preview {
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.file-preview-img {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    object-fit: cover;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--admin-primary);
    cursor: pointer;
}

.checkbox-label {
    font-size: 0.8rem;
    color: var(--admin-text-primary);
    cursor: pointer;
    user-select: none;
}

/* ===============================================
   EMPTY STATE
   =============================================== */

.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--admin-text-secondary);
}

.empty-state svg {
    margin: 0 auto 1rem;
    opacity: 0.3;
    width: 48px;
    height: 48px;
}

.empty-state h3 {
    font-size: 1rem;
    color: var(--admin-text-primary);
    margin: 0 0 0.35rem;
}

.empty-state p {
    margin: 0 0 1rem;
    font-size: 0.85rem;
}

/* ===============================================
   FORM ACTIONS
   =============================================== */

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

/* ===============================================
   IMAGE PREVIEW
   =============================================== */

.current-image {
    margin-top: 0.75rem;
}

.current-image-label {
    display: block;
    font-size: 0.75rem;
    color: var(--admin-text-secondary);
    margin-bottom: 0.35rem;
}

.current-image-wrapper {
    width: 150px;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--admin-border);
}

.current-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===============================================
   RESPONSIVE
   =============================================== */

/* Filter Grid */
.filter-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    align-items: end;
}

.filter-actions .btn-group {
    display: flex;
    gap: 0.5rem;
}

/* Header Actions */
.header-actions-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.sync-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Card Header Responsive */
.card-header {
    flex-wrap: wrap;
    gap: 0.75rem;
}

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

/* Sync Info */
.sync-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--admin-text-secondary);
    padding: 0.5rem 0.75rem;
    background: var(--admin-bg-light);
    border-radius: 6px;
    border: 1px solid var(--admin-border);
}

/* Product Info Cell */
.product-info {
    min-width: 0;
}

.product-info strong {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* Text Utilities */
.text-muted {
    color: var(--admin-text-secondary);
}

.text-success {
    color: var(--admin-success);
}

.text-danger {
    color: var(--admin-danger);
}

/* Bulk Actions in Card */
.bulk-form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ===============================================
   RESPONSIVE BREAKPOINTS
   =============================================== */

/* Desktop Large (1200px+) - Default sudah di atas */

/* Desktop Medium (1024px - 1199px) */
@media (max-width: 1199px) {
    .admin-layout {
        font-size: 12px;
    }

    .stats-container {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.875rem;
    }

    .stat-card {
        padding: 0.875rem;
    }

    .stat-value {
        font-size: 1.35rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
    }

    .stat-icon svg {
        width: 18px;
        height: 18px;
    }

    .filter-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.875rem;
    }

    .quick-links-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .admin-content {
        padding: 1rem;
    }

    .card-body {
        padding: 1rem;
    }
}

/* Tablet & Surface Pro (900px - 1023px) */
@media (max-width: 1023px) and (min-width: 900px) {
    .stats-container {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.625rem;
    }

    .stat-card {
        padding: 0.625rem;
        gap: 0.5rem;
    }

    .stat-value {
        font-size: 1.1rem;
    }

    .stat-label {
        font-size: 0.65rem;
        line-height: 1.2;
    }

    .stat-icon {
        width: 36px;
        height: 36px;
    }

    .stat-icon svg {
        width: 16px;
        height: 16px;
    }

    .filter-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.625rem;
    }

    .form-group {
        margin-bottom: 0.5rem;
    }

    .form-label {
        font-size: 0.75rem;
        margin-bottom: 0.375rem;
    }

    .form-input,
    .form-select {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }

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

    .card-body,
    .card-header {
        padding: 0.75rem;
    }

    .page-title {
        font-size: 1.1rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.5rem 0.625rem;
        font-size: 0.75rem;
    }
}

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) {
    :root {
        --admin-sidebar-width: 200px;
        --admin-font-size: 12px;
    }

    .admin-layout {
        font-size: 12px;
    }

    .stats-container {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.75rem;
    }

    .stat-card {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .stat-value {
        font-size: 1.2rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .stat-icon {
        width: 38px;
        height: 38px;
    }

    .stat-icon svg {
        width: 18px;
        height: 18px;
    }

    .filter-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .quick-links-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .admin-content {
        padding: 0.875rem;
    }

    .page-title {
        font-size: 1.2rem;
    }

    .card-body,
    .card-header {
        padding: 0.875rem 1rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.625rem 0.75rem;
        font-size: 0.85rem;
    }

    .product-info strong {
        max-width: 150px;
    }

    .btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.875rem;
    }

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

/* Mobile (max 768px) */
@media (max-width: 768px) {

    /* Sidebar hidden by default on mobile */
    .admin-sidebar {
        left: -280px;
        width: 280px;
    }

    /* Show sidebar when open */
    .admin-sidebar.open {
        left: 0;
    }

    /* Show close button on mobile */
    .sidebar-close {
        display: block;
    }

    /* Show overlay when sidebar open */
    .sidebar-overlay.active {
        display: block;
    }

    /* CRITICAL: Main content full width */
    .admin-main {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
    }

    /* Show hamburger */
    .sidebar-toggle {
        display: flex;
    }

    /* Header compact */
    .admin-header {
        padding: 0.5rem;
    }

    .header-content {
        gap: 0.5rem;
    }

    .page-title {
        font-size: 0.9rem;
    }

    /* Content */
    .admin-content {
        padding: 0.5rem;
        width: 100%;
        max-width: 100%;
    }

    /* STATS - 4 kolom compact */
    .stats-container {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 0.25rem !important;
        width: 100% !important;
    }

    .stat-card {
        padding: 0.25rem !important;
        flex-direction: column !important;
        text-align: center !important;
        gap: 0.125rem !important;
        border-radius: 6px !important;
    }

    .stat-icon {
        width: 24px !important;
        height: 24px !important;
        border-radius: 4px !important;
        margin: 0 auto 0.125rem !important;
    }

    .stat-icon svg {
        width: 12px !important;
        height: 12px !important;
    }

    .stat-value {
        font-size: 0.8rem !important;
        line-height: 1 !important;
        margin: 0 !important;
    }

    .stat-label {
        font-size: 0.45rem !important;
        line-height: 1 !important;
        margin: 0 !important;
    }

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

    /* Sync Info */
    .sync-info {
        font-size: 0.65rem !important;
        padding: 0.35rem 0.5rem !important;
        margin-bottom: 0.5rem;
    }

    /* FILTER - 2 kolom */
    .filter-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.35rem !important;
        width: 100% !important;
    }

    .filter-actions {
        grid-column: span 2;
    }

    .filter-actions .btn-group {
        display: flex;
        gap: 0.25rem;
    }

    .filter-actions .btn-group .btn {
        flex: 1;
    }

    /* Form elements */
    .form-group {
        margin-bottom: 0.35rem;
    }

    .form-label {
        font-size: 0.65rem;
        margin-bottom: 0.2rem;
    }

    .form-input,
    .form-select {
        font-size: 0.75rem;
        padding: 0.35rem 0.5rem;
    }

    /* Card */
    .card {
        margin-bottom: 0.5rem;
        border-radius: 8px;
    }

    .card-header {
        padding: 0.5rem;
        gap: 0.35rem;
        flex-direction: column;
    }

    .card-body {
        padding: 0.5rem;
    }

    .card-title {
        font-size: 0.8rem;
    }

    /* Table */
    .table-responsive {
        margin: -0.5rem;
        overflow-x: auto;
    }

    .data-table {
        min-width: 500px;
    }

    .data-table th,
    .data-table td {
        padding: 0.35rem;
        font-size: 0.65rem;
    }

    .product-info strong {
        max-width: 70px;
        font-size: 0.65rem;
    }

    /* Buttons */
    .btn {
        font-size: 0.65rem;
        padding: 0.3rem 0.5rem;
    }

    .btn-sm {
        font-size: 0.6rem;
        padding: 0.2rem 0.35rem;
    }

    .badge {
        font-size: 0.5rem;
        padding: 0.1rem 0.25rem;
    }

    /* Header Actions */
    .header-actions {
        position: static;
        padding: 0;
    }

    .header-actions-group {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .sync-form {
        display: flex;
        gap: 0.25rem;
    }

    .sync-form .form-select-sm {
        font-size: 0.7rem;
        padding: 0.3rem;
    }

    /* Quick Links */
    .quick-links-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.35rem;
    }

    /* Empty State */
    .empty-state {
        padding: 1rem;
    }

    .empty-state svg {
        width: 32px;
        height: 32px;
    }

    .empty-state h3 {
        font-size: 0.8rem;
    }

    .empty-state p {
        font-size: 0.7rem;
    }

    /* Bulk actions */
    .bulk-actions {
        padding: 0.35rem;
        gap: 0.35rem;
        flex-wrap: wrap;
    }

    /* Info Grid */
    .info-grid,
    .price-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.35rem;
    }
}

/* Mobile Small (max 480px) */
@media (max-width: 480px) {
    .admin-content {
        padding: 0.35rem;
    }

    /* Stats even smaller */
    .stats-container {
        gap: 0.2rem !important;
    }

    .stat-card {
        padding: 0.2rem !important;
    }

    .stat-icon {
        width: 20px !important;
        height: 20px !important;
    }

    .stat-icon svg {
        width: 10px !important;
        height: 10px !important;
    }

    .stat-value {
        font-size: 0.7rem !important;
    }

    .stat-label {
        font-size: 0.4rem !important;
    }

    /* Filter 1 kolom */
    .filter-grid {
        grid-template-columns: 1fr !important;
    }

    .filter-actions {
        grid-column: span 1;
    }

    /* Form */
    .form-input,
    .form-select {
        font-size: 16px;
        /* prevent zoom iOS */
    }

    /* Table */
    .data-table th,
    .data-table td {
        padding: 0.25rem;
        font-size: 0.6rem;
    }
}

/* ===============================================
   UTILITY CLASSES
   =============================================== */

/* Hide on mobile */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

/* Hide on desktop */
@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}

/* Margin utilities */
.mb-4 {
    margin-bottom: 1rem;
}

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

/* ===============================================
   PAGE COMPONENTS
   =============================================== */

/* Admin Page Header */
.admin-page {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-header-left h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--admin-text-primary);
    margin: 0 0 0.25rem;
}

.page-header-left p {
    font-size: 0.875rem;
    color: var(--admin-text-secondary);
    margin: 0;
}

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

/* Form Card */
.form-card {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 1.5rem;
}

/* Info Section */
.info-section {
    margin-bottom: 2rem;
}

.info-section h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--admin-text-primary);
    margin: 0 0 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--admin-border);
}

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

.info-item {
    padding: 0.75rem;
    background: var(--admin-bg-light);
    border-radius: 8px;
    border: 1px solid var(--admin-border);
}

.info-item label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--admin-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.info-item span {
    font-size: 0.9rem;
    color: var(--admin-text-primary);
    font-weight: 500;
}

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

.price-item {
    padding: 1rem;
    background: var(--admin-bg-light);
    border-radius: 8px;
    border: 1px solid var(--admin-border);
}

.price-item.highlight {
    background: var(--admin-primary);
    border-color: var(--admin-primary);
    color: white;
}

.price-item label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.price-item span {
    font-size: 1.25rem;
    font-weight: 700;
}

.price-item.highlight label,
.price-item.highlight span,
.price-item.highlight small {
    color: white;
}

.price-item small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Form Section */
.form-section {
    margin-bottom: 2rem;
}

.form-section h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--admin-text-primary);
    margin: 0 0 1rem;
}

/* Filter Card */
.filter-card {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

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

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 150px;
    flex: 1;
}

.filter-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--admin-text-secondary);
}

/* Admin Table (non-data-table) */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead {
    background: var(--admin-bg-light);
}

.admin-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--admin-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--admin-border);
}

.admin-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--admin-border);
    color: var(--admin-text-primary);
    font-size: 0.85rem;
}

/* Code Styling */
code {
    background: rgba(0, 0, 0, 0.05);
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, 'Andale Mono', monospace;
    font-size: 0.85em;
}

/* Pagination */
.pagination-wrapper {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}

/* ===============================================
   BRAND IMAGES PAGE
   =============================================== */

.brand-search-card {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.brand-search-input {
    width: 100%;
    max-width: 400px;
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    background: var(--admin-bg-light);
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    color: var(--admin-text-primary);
    font-size: 0.85rem;
    font-family: inherit;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 0.65rem center;
    background-size: 16px;
}

.brand-search-input:focus {
    border-color: var(--admin-primary);
    background-color: #ffffff;
}

.brand-search-input::placeholder {
    color: var(--admin-text-secondary);
}

/* Brand Grid */
.brand-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.brand-image-card {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.brand-image-preview {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--admin-bg-light);
    overflow: hidden;
    position: relative;
}

.brand-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.brand-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: var(--admin-text-secondary);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 2px;
    user-select: none;
}

.brand-image-info {
    padding: 12px 14px 6px;
    flex: 1;
}

.brand-image-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--admin-text-primary);
    margin: 0 0 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.brand-image-meta {
    font-size: 0.72rem;
    color: var(--admin-text-secondary);
    margin: 0;
    line-height: 1.3;
}

.brand-image-actions {
    padding: 8px 14px 12px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.brand-image-actions .btn-sm {
    padding: 5px 10px;
    font-size: 0.72rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: all 0.15s ease;
}

.upload-label {
    margin: 0;
    background: transparent;
    border: 1px solid var(--admin-border);
    color: var(--admin-text-primary);
}

.btn-danger-outline {
    background: transparent;
    border: 1px solid var(--admin-border);
    color: var(--admin-danger);
}

/* Page Components Responsive */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .page-header-left h1 {
        font-size: 1.25rem;
    }

    .page-header-actions {
        flex-direction: column;
    }

    .page-header-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .form-card {
        padding: 1rem;
    }

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

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

    .price-item span {
        font-size: 1rem;
    }

    .filter-form {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    .admin-table th,
    .admin-table td {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .page-header-left h1 {
        font-size: 1.1rem;
    }

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

    .info-section h3,
    .form-section h3 {
        font-size: 0.9rem;
    }
}

/* ===============================================
   BRAND IMAGES - RESPONSIVE
   =============================================== */

/* Tablet (max 1199px) */
@media (max-width: 1199px) {
    .brand-images-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 14px;
    }
}

/* Tablet Small (max 1023px) */
@media (max-width: 1023px) {
    .brand-images-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 12px;
    }

    .brand-image-preview {
        height: 130px;
    }

    .brand-image-name {
        font-size: 0.8rem;
    }
}

/* Mobile (max 768px) */
@media (max-width: 768px) {
    .brand-images-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .brand-search-card {
        padding: 8px 10px;
        margin-bottom: 0.5rem;
        border-radius: 8px;
    }

    .brand-search-input {
        max-width: 100%;
        font-size: 0.8rem;
        padding: 0.4rem 0.65rem 0.4rem 2rem;
        background-size: 14px;
        background-position: 0.5rem center;
    }

    .brand-image-card {
        border-radius: 8px;
    }

    .brand-image-preview {
        height: 100px;
    }

    .brand-image-preview img {
        object-fit: cover;
    }

    .brand-image-placeholder {
        font-size: 18px;
    }

    .brand-image-info {
        padding: 6px 8px 3px;
    }

    .brand-image-name {
        font-size: 0.72rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .brand-image-meta {
        font-size: 0.6rem;
    }

    .brand-image-actions {
        padding: 4px 8px 8px;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px;
    }

    .brand-image-actions .btn-sm {
        flex: 1;
        justify-content: center;
        font-size: 0.6rem;
        padding: 4px 6px;
        min-width: 0;
    }

    .brand-image-actions .btn-sm span {
        display: none;
    }

    .brand-image-actions .btn-sm svg {
        width: 12px;
        height: 12px;
    }

    .upload-label {
        gap: 0;
    }
}

/* Mobile Small (max 480px) */
@media (max-width: 480px) {
    .brand-images-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .brand-search-card {
        padding: 6px 8px;
        border-radius: 6px;
    }

    .brand-search-input {
        font-size: 16px;
        /* prevent iOS zoom */
        padding: 0.35rem 0.5rem 0.35rem 1.8rem;
    }

    .brand-image-card {
        border-radius: 6px;
    }

    .brand-image-preview {
        height: 80px;
    }

    .brand-image-placeholder {
        font-size: 16px;
    }

    .brand-image-info {
        padding: 4px 6px 2px;
    }

    .brand-image-name {
        font-size: 0.65rem;
    }

    .brand-image-meta {
        font-size: 0.5rem;
    }

    .brand-image-actions {
        padding: 3px 6px 6px;
        gap: 3px;
    }

    .brand-image-actions .btn-sm {
        font-size: 0.55rem;
        padding: 3px 5px;
    }
}