/* Product Management System - Admin Styles */

:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #6b7280;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;

    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --text-color: #1f2937;
    --text-muted: #6b7280;

    --sidebar-width: 250px;
    --header-height: 60px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    --radius: 8px;
    --radius-sm: 4px;
}

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

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

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

a:hover {
    text-decoration: underline;
}

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

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 40px;
}

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

.login-header h1 {
    font-size: 24px;
    color: var(--text-color);
    margin-bottom: 5px;
}

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

.login-logo {
    max-width: 150px;
    height: auto;
    margin-bottom: 15px;
}

.back-home-btn {
    display: block;
    text-align: center;
    margin-top: 20px;
    padding: 10px;
    color: var(--text-muted);
    font-size: 14px;
    transition: color 0.2s;
}

.back-home-btn:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.login-form .form-group {
    margin-bottom: 20px;
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group input[type="url"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
}

.form-group select {
    padding-right: 32px;
    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='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.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(79, 70, 229, 0.1);
}

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

.form-group small {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 12px;
}

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

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}

.btn:hover {
    text-decoration: none;
}

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

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

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

.btn-secondary:hover {
    background-color: #5b6370;
}

.btn-rentals {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.btn-rentals:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
}

.btn-pos {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.btn-pos:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: white;
}

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

.btn-success:hover {
    background-color: #059669;
}

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

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

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

.btn-outline:hover {
    background-color: var(--bg-color);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    padding: 8px;
    min-width: 36px;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.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;
}

/* Admin Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: #6c757d;
    color: #e5e7eb;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #5a6268;
}

.sidebar-header h1 {
    font-size: 20px;
    color: white;
}

.sidebar-header span {
    font-size: 12px;
    color: #9ca3af;
}

.sidebar-clock {
    margin-top: 8px;
    font-size: 13px;
    color: #9ca3af;
    font-family: monospace;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    padding: 16px 0;
}

.nav-item {
    display: block;
    padding: 12px 20px;
    color: #d1d5db;
    transition: all 0.15s;
}

.nav-item:hover {
    background-color: #5a6268;
    color: white;
    text-decoration: none;
}

.nav-item.active {
    background-color: #8ecae6;
    color: #1f2937;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    vertical-align: middle;
}

.nav-divider {
    height: 1px;
    background-color: #5a6268;
    margin: 16px 0;
}

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

/* Header */
.header {
    height: var(--header-height);
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background 0.2s;
}

.user-menu:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Page Content */
.page-content {
    padding: 24px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 24px;
    font-weight: 600;
}

.page-header-actions {
    display: flex;
    gap: 12px;
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

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

.card-header h2 {
    font-size: 16px;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    background-color: #f9fafb;
}

/* Dashboard Stats - Light Blue Tint */
.stats-row {
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.stat-box {
    background: rgba(142, 202, 230, 0.25);
    border: 1px solid rgba(142, 202, 230, 0.3);
    border-radius: 6px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 88px;
}

.stat-icon {
    color: #1f2937;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 26px;
    font-weight: 700;
    color: #1f2937;
}

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

/* Quick Actions */
.quick-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.quick-actions-left {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.quick-actions-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.woo-sync-info {
    text-align: right;
}

.woo-sync-label {
    font-size: 12px;
    color: #9ca3af;
    display: block;
}

.woo-sync-date {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.btn-woo {
    background: linear-gradient(135deg, #96588a 0%, #7b4b73 100%);
    color: white;
    border: none;
}

.btn-woo:hover {
    background: linear-gradient(135deg, #7b4b73 0%, #674060 100%);
}

@media (max-width: 768px) {
    .quick-actions-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .quick-actions-right {
        width: 100%;
        justify-content: space-between;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid var(--border-color);
    }

    .woo-sync-info {
        text-align: left;
    }
}

/* Glass Stats */
.glass-stats-container {
    margin-bottom: 24px;
}

.glass-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.glass-stat-card {
    background: rgba(142, 202, 230, 0.25);
    border: 1px solid rgba(142, 202, 230, 0.3);
    border-radius: 6px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
    min-height: 88px;
}

.glass-stat-icon {
    color: #1f2937;
    flex-shrink: 0;
}

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

.glass-stat-content {
    flex: 1;
}

.glass-stat-value {
    font-size: 26px;
    font-weight: 700;
    color: #1f2937;
}

.glass-stat-label {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

@media (max-width: 768px) {
    .glass-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Expandable Sales Rows */
.expandable-row {
    cursor: pointer;
}

.expandable-row:hover {
    background-color: #f0f9ff !important;
}

.expandable-row.expanded {
    background-color: #eff6ff !important;
}

.qty-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.qty-expand-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.qty-expand-btn .expand-arrow {
    transition: transform 0.2s;
    color: var(--text-muted);
}

.expanded-row {
    background-color: #f8fafc !important;
}

.expanded-row:hover {
    background-color: #f8fafc !important;
}

.expanded-content {
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 8px;
    margin: 8px 0;
}

.expanded-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.expanded-header strong {
    color: var(--text-color);
}

.expanded-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.expanded-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.item-number {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 13px;
}

.item-price {
    font-weight: 500;
    color: var(--text-color);
}

.remove-item-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--danger-color) !important;
    border-color: var(--danger-color) !important;
    font-size: 12px;
    padding: 4px 10px;
}

.remove-item-btn:hover {
    background-color: var(--danger-color) !important;
    color: white !important;
}

.expanded-footer {
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.qty-update-form {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qty-update-form label {
    font-weight: 500;
    color: var(--text-color);
    font-size: 13px;
}

.qty-input {
    width: 80px;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}

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

/* Accordion */
.accordion {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    overflow: hidden;
}

.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.accordion-header:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.accordion-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.accordion-title h2 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.accordion-arrow {
    transition: transform 0.3s ease;
    color: var(--text-muted);
}

.accordion.collapsed .accordion-arrow {
    transform: rotate(-90deg);
}

.accordion-hint {
    font-size: 12px;
    color: var(--text-muted);
}

.accordion-content {
    padding: 20px;
    transition: all 0.3s ease;
}

.accordion.collapsed .accordion-content {
    display: none;
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.chart-card {
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.chart-card .card-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.chart-card .card-header h2 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
}

.chart-card .card-body {
    padding: 20px;
    height: 350px;
}

/* Period Selector */
.period-selector {
    display: flex;
    gap: 4px;
    background: rgba(0, 0, 0, 0.05);
    padding: 4px;
    border-radius: 8px;
}

.period-btn {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.period-btn:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.5);
}

.period-btn.active {
    background: #8ecae6;
    color: #1f2937;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

@media (max-width: 600px) {
    .chart-card .card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .period-selector {
        width: 100%;
        justify-content: space-between;
    }

    .period-btn {
        flex: 1;
        text-align: center;
    }
}

/* Tables */
.table-container {
    overflow-x: auto;
}

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

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

table th {
    background-color: #f9fafb;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
}

table tbody tr:hover {
    background-color: #f9fafb;
}

table .actions {
    display: flex;
    gap: 8px;
}

/* Product List */
.product-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background-color: var(--bg-color);
}

.product-name {
    font-weight: 500;
}

.product-sku {
    font-size: 12px;
    color: var(--text-muted);
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

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

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

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

.badge-secondary {
    background-color: #e5e7eb;
    color: #4b5563;
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.tab {
    padding: 12px 20px;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.15s;
}

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

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

.tab-content {
    display: none;
}

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

/* Image Upload */
.image-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
}

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

.image-upload-area input[type="file"] {
    display: none;
}

.image-upload-area svg {
    width: 48px;
    height: 48px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.image-upload-area p {
    color: var(--text-muted);
}

/* Image Gallery */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.image-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: grab;
    border: 2px solid transparent;
}

.image-item.featured {
    border-color: var(--primary-color);
}

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

.image-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.15s;
}

.image-item:hover .image-item-overlay {
    opacity: 1;
}

.image-item-overlay button {
    padding: 6px;
    background: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.image-item .featured-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: var(--primary-color);
    color: white;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 600;
}

/* Variations Table */
.variations-table {
    width: 100%;
    margin-top: 16px;
}

.variations-table th,
.variations-table td {
    padding: 8px 12px;
}

.variations-table input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

/* Attributes Section */
.attribute-row {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px;
    background: #f9fafb;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}

.attribute-values {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.attribute-value-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.attribute-value-tag button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0;
    display: flex;
}

.attribute-value-tag button:hover {
    color: var(--danger-color);
}

/* Categories */
.category-tree {
    list-style: none;
}

.category-tree li {
    padding: 8px 0;
}

.category-tree .children {
    margin-left: 24px;
    border-left: 1px solid var(--border-color);
    padding-left: 16px;
}

.category-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Search & Filter */
.filter-bar {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: #6b7280;
    font-size: 14px;
}

.search-box input:focus {
    outline: none;
    border-color: #8ecae6;
    box-shadow: 0 0 0 3px rgba(142, 202, 230, 0.2);
}

.search-box input::placeholder {
    color: #9ca3af;
}

.search-box svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 20px;
    height: 20px;
}

.filter-select {
    min-width: 150px;
    padding: 10px 32px 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    color: #6b7280;
    background-color: var(--card-bg);
    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='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.filter-select:focus {
    outline: none;
    border-color: #8ecae6;
    box-shadow: 0 0 0 3px rgba(142, 202, 230, 0.2);
}

.filter-select:hover {
    border-color: #9ca3af;
}

/* Sortable Table Headers */
.sortable-header {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: color 0.15s;
}

.sortable-header:hover {
    color: #8ecae6;
    text-decoration: none;
}

/* Action Buttons Row */
.actions-row {
    display: flex;
    gap: 6px;
    align-items: stretch;
}

.actions-row .btn {
    height: 32px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.actions-row form {
    display: inline-flex;
}

.btn-info {
    background-color: #8ecae6;
    color: #1f2937;
    border: 1px solid #8ecae6;
}

.btn-info:hover {
    background-color: #71b8d9;
    border-color: #71b8d9;
}

.btn-delete {
    color: var(--danger-color);
    border-color: var(--danger-color);
}

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

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal.modal-large {
    max-width: 700px;
}

.modal.modal-quickview {
    max-width: 450px;
}

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

.modal-header h3 {
    font-size: 18px;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

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

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

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

/* Quick View Styles */
.quick-view-compact {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.quick-view-header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.quick-view-thumb {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.quick-view-thumb-placeholder {
    width: 100px;
    height: 100px;
    background: #f3f4f6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.quick-view-title {
    flex: 1;
    min-width: 0;
}

.quick-view-title h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.quick-view-sku {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
}

.quick-view-price {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
}

.quick-view-info {
    background: #f9fafb;
    border-radius: 8px;
    padding: 12px 16px;
}

.quick-view-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

.quick-view-row:last-child {
    border-bottom: none;
    padding-bottom: 4px;
}

.quick-view-row:last-child .quick-view-value {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.quick-view-row:last-child .quick-view-value .badge {
    margin-bottom: 4px;
}

.quick-view-label {
    font-size: 13px;
    color: #6b7280;
}

.quick-view-value {
    font-size: 13px;
    font-weight: 500;
}

.loading-spinner {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

@media (max-width: 500px) {
    .quick-view-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-color);
}

.pagination a:hover {
    background-color: var(--bg-color);
    text-decoration: none;
}

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

.pagination .disabled {
    color: var(--text-muted);
    cursor: not-allowed;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header h3 {
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-muted);
}

.modal-body {
    padding: 20px;
}

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

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

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

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
        z-index: 1010;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,.4);
        z-index: 1005;
    }

    .sidebar-overlay.open {
        display: block;
    }

    .mobile-menu-toggle {
        display: inline-flex !important;
    }

    .main-content {
        margin-left: 0;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

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

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

/* Editor Styles */
.editor-toolbar {
    display: flex;
    gap: 4px;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    background: #f9fafb;
}

.editor-toolbar button {
    padding: 6px 10px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.editor-toolbar button:hover {
    background: var(--bg-color);
}

.editor-content {
    min-height: 200px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.editor-content:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Utility Classes */
.text-muted {
    color: var(--text-muted);
}

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

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

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

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }

.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

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

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 8px;
}

.gap-4 {
    gap: 16px;
}

/* Checkbox Pill Style */
.checkbox-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    color: #6b7280;
    transition: all 0.2s ease;
    user-select: none;
}

.checkbox-pill:hover {
    background: #e5e7eb;
}

.checkbox-pill input[type="checkbox"] {
    display: none;
}

.checkbox-pill input[type="checkbox"]:checked + span {
    color: #4f46e5;
    font-weight: 500;
}

.checkbox-pill:has(input:checked) {
    background: #eef2ff;
    border-color: #4f46e5;
    color: #4f46e5;
}

.checkbox-pill span::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #d1d5db;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: middle;
    transition: all 0.2s ease;
}

.checkbox-pill input[type="checkbox"]:checked + span::before {
    background: #4f46e5;
    border-color: #4f46e5;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    background-size: 10px;
    background-position: center;
    background-repeat: no-repeat;
}

/* Bulk Actions (inline in filter bar) */
.bulk-actions-inline {
    display: flex;
    align-items: center;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px solid var(--border-color);
}

.bulk-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--danger-color);
    color: white;
    font-weight: 600;
    font-size: 12px;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 12px;
}
