/*
 * MODERN ADMIN DASHBOARD - 2025
 * Clean, efficient, elegant design
 */

/* ========================================
   RESET & BASE
   ======================================== */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f7fa;
    color: #2d3748;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ========================================
   TOP NAVIGATION
   ======================================== */

.admin-topnav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.admin-nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 700;
    color: #1a202c;
    letter-spacing: -0.5px;
}

.admin-nav-brand i {
    color: #ff6b35;
    font-size: 24px;
}

.admin-nav-search {
    position: relative;
    max-width: 500px;
    flex: 1;
    margin: 0 48px;
}

.admin-nav-search i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 14px;
}

.admin-nav-search input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    background: #f7fafc;
    transition: all 0.2s ease;
    color: #2d3748;
}

.admin-nav-search input:focus {
    outline: none;
    border-color: #ff6b35;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.admin-nav-search input::placeholder {
    color: #a0aec0;
}

.admin-nav-user {
    display: flex;
    align-items: center;
    gap: 20px;
}

.admin-notifications {
    position: relative;
    cursor: pointer;
    padding: 10px;
    border-radius: 10px;
    transition: background-color 0.2s ease;
}

.admin-notifications:hover {
    background: #f7fafc;
}

.admin-notifications i {
    font-size: 20px;
    color: #4a5568;
}

.notification-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #ff6b35;
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 12px;
    min-width: 18px;
    text-align: center;
    line-height: 1.4;
}

.admin-user-dropdown {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 10px;
    transition: background-color 0.2s ease;
    font-weight: 500;
    font-size: 14px;
    color: #2d3748;
}

.admin-user-dropdown:hover {
    background: #f7fafc;
}

.admin-user-dropdown i {
    font-size: 12px;
    color: #718096;
}

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

.admin-sidebar {
    position: fixed;
    top: 70px;
    left: 0;
    width: 260px;
    height: calc(100vh - 70px);
    background: #1a202c;
    padding: 24px 0;
    z-index: 999;
    overflow-y: auto;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

.admin-sidebar::-webkit-scrollbar {
    width: 6px;
}

.admin-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.admin-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 24px;
    color: #a0aec0;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    font-size: 14px;
    font-weight: 500;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    padding-left: 28px;
}

.menu-item.active {
    background: linear-gradient(90deg, rgba(255, 107, 53, 0.15) 0%, transparent 100%);
    color: #ffffff;
    border-left: 3px solid #ff6b35;
}

.menu-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.menu-badge {
    margin-left: auto;
    background: #ff6b35;
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    min-width: 20px;
    text-align: center;
    line-height: 1.2;
}

.menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 16px 24px;
}

/* ========================================
   MAIN CONTENT
   ======================================== */

.admin-main {
    margin-left: 260px;
    margin-top: 70px;
    padding: 32px;
    min-height: calc(100vh - 70px);
    background: #f5f7fa;
}

.admin-tab {
    display: none;
}

.admin-tab.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.admin-header {
    margin-bottom: 32px;
}

.admin-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 6px 0;
    letter-spacing: -0.5px;
}

.admin-header p {
    font-size: 15px;
    color: #718096;
    margin: 0;
}

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

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
}

.stat-icon.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.stat-icon.success {
    background: linear-gradient(135deg, #5cb85c 0%, #4cae4c 100%);
    color: white;
}

.stat-icon.warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
}

.stat-icon.danger {
    background: linear-gradient(135deg, #ff6b35 0%, #f05d5a 100%);
    color: white;
}

.stat-content {
    flex: 1;
}

.stat-content h3 {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: #1a202c;
    letter-spacing: -0.5px;
}

.stat-content p {
    font-size: 14px;
    margin: 0 0 8px 0;
    color: #718096;
    font-weight: 500;
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
}

.stat-change.positive {
    color: #38a169;
    background: #f0fff4;
}

.stat-change.negative {
    color: #e53e3e;
    background: #fff5f5;
}

.stat-change i {
    font-size: 12px;
}

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

.content-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
    padding: 32px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.content-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e0;
}

.card-header {
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.card-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-link {
    color: #ff6b35;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.2s ease;
}

.btn-link:hover {
    color: #f05d5a;
}

/* ========================================
   FILTER PILLS
   ======================================== */

.filter-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pill-btn {
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #4a5568;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pill-btn:hover {
    border-color: #cbd5e0;
    background: #f7fafc;
}

.pill-btn.active {
    background: #ff6b35;
    color: white;
    border-color: #ff6b35;
}

/* ========================================
   SEARCH BOX
   ======================================== */

.search-box {
    position: relative;
    min-width: 260px;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 14px;
}

.search-box input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    background: #f7fafc;
    transition: all 0.2s ease;
    color: #2d3748;
}

.search-box input:focus {
    outline: none;
    border-color: #ff6b35;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

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

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

.btn-primary {
    padding: 10px 20px;
    background: #ff6b35;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: #f05d5a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

/* Action Buttons Group */
.action-buttons-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Base Action Button - Minimal & Professional */
.btn-action {
    padding: 0;
    background: transparent;
    color: #94a3b8;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    position: relative;
}

.btn-action:hover {
    background: #f1f5f9;
    transform: scale(1.1);
}

.btn-action:active {
    transform: scale(0.95);
}

.btn-action i {
    font-size: 14px;
    transition: all 0.2s;
}

/* Tooltip for action buttons */
.btn-action::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    background: #1e293b;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-action::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #1e293b;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.btn-action:hover::after,
.btn-action:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* View Button */
.btn-action-view {
    color: #64748b;
}

.btn-action-view:hover {
    color: #3b82f6;
    background: #eff6ff;
}

/* Flag Button */
.btn-action-flag {
    color: #64748b;
}

.btn-action-flag:hover {
    color: #ef4444;
    background: #fef2f2;
}

/* Unflag Button */
.btn-action-unflag {
    color: #10b981;
}

.btn-action-unflag:hover {
    color: #059669;
    background: #f0fdf4;
}

/* Archive Button */
.btn-action-archive {
    color: #64748b;
}

.btn-action-archive:hover {
    color: #f59e0b;
    background: #fffbeb;
}

/* Restore Button */
.btn-action-restore {
    color: #64748b;
}

.btn-action-restore:hover {
    color: #8b5cf6;
    background: #faf5ff;
}

/* Legacy support for old class names */
.btn-action.success {
    color: #10b981;
}

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

.btn-action.danger {
    color: #ef4444;
}

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

.btn-action.primary {
    color: #3b82f6;
}

.btn-action.primary:hover {
    background: #eff6ff;
    color: #2563eb;
}

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

.table-responsive {
    overflow-x: auto;
}

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

.modern-table thead {
    background: #f7fafc;
}

.modern-table th {
    text-align: left;
    padding: 16px 20px;
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
}

.modern-table td {
    padding: 16px 20px;
    font-size: 14px;
    color: #2d3748;
    border-bottom: 1px solid #e2e8f0;
}

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

.modern-table tbody tr:hover {
    background: #f7fafc;
}

.modern-table tbody tr:last-child td {
    border-bottom: none;
}

/* Actions Column */
.modern-table td:last-child {
    text-align: center;
    white-space: nowrap;
}

.modern-table th:last-child {
    text-align: center;
}

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

/* ========================================
   TABLE CELLS
   ======================================== */

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

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.product-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-image {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a0aec0;
    flex-shrink: 0;
}

.product-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 2px;
}

.product-category {
    font-size: 13px;
    color: #a0aec0;
}

.seller-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 2px;
}

.seller-email {
    font-size: 13px;
    color: #a0aec0;
}

.category-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f7fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #718096;
}

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

.badge {
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    letter-spacing: 0.3px;
}

.badge-success {
    background: #e6ffed;
    color: #22863a;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-danger {
    background: #ffe5e5;
    color: #c92a2a;
}

.badge-info {
    background: #e3f2fd;
    color: #1976d2;
}

.id-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
    font-family: 'Courier New', monospace;
}

.tag-badge {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* ========================================
   SUB TABS
   ======================================== */

.sub-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 2px solid #e2e8f0;
}

.sub-tab {
    padding: 12px 24px;
    background: transparent;
    color: #718096;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: -2px;
}

.sub-tab:hover {
    color: #2d3748;
    background: #f7fafc;
}

.sub-tab.active {
    color: #ff6b35;
    border-bottom-color: #ff6b35;
}

.sub-tab-content {
    display: none;
}

.sub-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ========================================
   LOADING STATE
   ======================================== */

.loading-state {
    padding: 60px 20px;
    text-align: center;
}

.loading-state i {
    font-size: 32px;
    color: #cbd5e0;
    margin-bottom: 12px;
}

.loading-state p {
    color: #a0aec0;
    font-size: 14px;
    margin: 0;
}

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

@media (max-width: 1200px) {
    .admin-nav-search {
        max-width: 300px;
        margin: 0 24px;
    }
}

@media (max-width: 968px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

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

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

    .admin-nav-search {
        display: none;
    }

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

    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-pills {
        width: 100%;
    }

    .card-actions {
        width: 100%;
        flex-direction: column;
    }

    .search-box {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .admin-topnav {
        padding: 0 16px;
    }

    .admin-main {
        padding: 16px;
    }

    .admin-header h1 {
        font-size: 24px;
    }

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

    .stat-card {
        padding: 20px;
    }

    .stat-icon {
        width: 52px;
        height: 52px;
        font-size: 22px;
    }

    .stat-content h3 {
        font-size: 26px;
    }

    .modern-table {
        font-size: 13px;
    }

    .modern-table th,
    .modern-table td {
        padding: 12px 16px;
    }

    .sub-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .sub-tab {
        white-space: nowrap;
        padding: 12px 16px;
    }
}

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

.mb-24 {
    margin-bottom: 24px;
}

.mt-24 {
    margin-top: 24px;
}

strong {
    font-weight: 600;
    color: #1a202c;
}

/* ========================================
   SCROLLBAR STYLING
   ======================================== */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* ========================================
   SELLER DETAIL MODAL STYLES
   ======================================== */

/* Modal Overlay */
.admin-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.admin-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

/* Modal Content */
.admin-modal-content {
    position: relative;
    width: 90vw;
    max-width: 1400px;
    max-height: 90vh;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Modal Header */
.admin-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(to right, #f7fafc, #ffffff);
}

.seller-modal-title {
    display: flex;
    align-items: center;
    gap: 20px;
}

.seller-avatar-large {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.seller-modal-title h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #1a202c;
}

.seller-modal-title p {
    margin: 4px 0 8px 0;
    font-size: 14px;
    color: #718096;
}

.modal-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.modal-close-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #f7fafc;
    color: #718096;
    font-size: 24px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-btn:hover {
    background: #e2e8f0;
    color: #2d3748;
}

/* Modal Tabs */
.modal-tabs {
    display: flex;
    gap: 4px;
    padding: 0 32px;
    border-bottom: 2px solid #e2e8f0;
    background: #f7fafc;
}

.modal-tab {
    padding: 16px 24px;
    border: none;
    background: transparent;
    color: #718096;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.modal-tab:hover {
    color: #2d3748;
    background: #edf2f7;
}

.modal-tab.active {
    color: #ff6b35 !important;
    border-bottom: 2px solid #ff6b35 !important;
    background: #ffffff !important;
    font-weight: 700 !important;
}

/* Modal Tab Content */
.modal-tab-content {
    display: none;
    padding: 32px;
    overflow-y: auto;
    flex: 1;
    min-height: 400px;
}

.modal-tab-content.active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

/* Info Section */
.info-section {
    background: #f7fafc;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 50px;
}

.info-section h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 700;
    color: #1a202c;
    display: block !important;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.info-label {
    font-weight: 600;
    color: #718096;
    font-size: 14px;
}

.info-value {
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
}

/* Stats Row */
.stats-row {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.stat-box {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
}

.stat-box i {
    font-size: 32px;
    opacity: 0.9;
}

.stat-box-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

.stat-box-label {
    font-size: 13px;
    opacity: 0.9;
    margin-top: 4px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #ff6b35;
    color: white;
}

.btn-primary:hover {
    background: #ff5722;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.btn-secondary {
    background: #718096;
    color: white;
}

.btn-secondary:hover {
    background: #4a5568;
}

.btn-success {
    background: #38a169;
    color: white;
}

.btn-success:hover {
    background: #2f855a;
}

.btn-danger {
    background: #e53e3e;
    color: white;
}

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

/* Tab Header */
.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

/* Period Selector */
.period-selector {
    display: flex;
    gap: 8px;
    background: #f7fafc;
    padding: 4px;
    border-radius: 10px;
}

.period-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: #718096;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.period-btn:hover {
    background: #edf2f7;
    color: #2d3748;
}

.period-btn.active {
    background: #ff6b35;
    color: white;
}

/* Settings Section */
.settings-section {
    background: #f7fafc;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
}

.settings-section h3 {
    margin: 0 0 24px 0;
    font-size: 20px;
    font-weight: 700;
    color: #1a202c;
}

.setting-item {
    margin-bottom: 20px;
}

.setting-item label {
    display: block;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    font-size: 14px;
}

.setting-item input[type="number"],
.setting-item input[type="text"],
.setting-item select,
.setting-item textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: all 0.2s ease;
}

.setting-item input:focus,
.setting-item select:focus,
.setting-item textarea:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.setting-item input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

/* Danger Zone */
.danger-zone {
    background: #fff5f5;
    border: 2px solid #feb2b2;
    border-radius: 12px;
    padding: 24px;
    margin-top: 32px;
}

.danger-zone h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 700;
    color: #c53030;
}

.danger-zone p {
    margin: 0 0 20px 0;
    color: #744210;
    font-size: 14px;
}

.danger-zone .btn {
    margin-right: 12px;
    margin-bottom: 12px;
}

/* Payment Method Card */
.payment-method-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payment-method-card .method-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.payment-method-card .method-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #f7fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a5568;
    font-size: 18px;
}

.payment-method-card .method-details h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
}

.payment-method-card .method-details p {
    margin: 0;
    font-size: 13px;
    color: #718096;
}

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

.pagination-controls button {
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    background: white;
    color: #718096;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.pagination-controls button:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
    color: #2d3748;
}

.pagination-controls button.active {
    background: #ff6b35;
    border-color: #ff6b35;
    color: white;
}

.pagination-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Text Utilities */
.text-center {
    text-align: center;
}

.text-muted {
    color: #718096;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .admin-modal-content {
        width: 95vw;
        max-height: 95vh;
    }

    .admin-modal-header {
        padding: 20px;
    }

    .seller-modal-title {
        gap: 12px;
    }

    .seller-avatar-large {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }

    .seller-modal-title h2 {
        font-size: 20px;
    }

    .modal-tabs {
        padding: 0 16px;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .modal-tab {
        padding: 12px 16px;
        font-size: 14px;
        white-space: nowrap;
    }

    .modal-tab-content {
        padding: 20px 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

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

    .stats-row {
        flex-direction: column;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .admin-modal-header {
        padding: 16px;
    }

    .seller-modal-title {
        flex-direction: column;
        align-items: flex-start;
    }

    .modal-close-btn {
        position: absolute;
        top: 16px;
        right: 16px;
    }
}

/* ========================================
   REVIEW MANAGEMENT STYLES
   ======================================== */

/* Star Rating in Edit Modal */
.star-rating-edit {
    display: flex;
    gap: 8px;
}

.star-btn {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #cbd5e0;
    transition: all 0.2s ease;
    padding: 0;
}

.star-btn:hover {
    transform: scale(1.1);
    color: #f39c12;
}

.star-btn:active {
    transform: scale(0.95);
}

/* Filter Section */
.filters-section {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-select {
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: white;
    color: #2d3748;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.filter-select:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

/* Bulk Actions Bar */
#bulk-actions-bar {
    background: #f7fafc;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #e2e8f0;
}

#selected-count {
    font-weight: 600;
    color: #2d3748;
    margin-right: 8px;
}

.btn-bulk-action {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-bulk-action:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-bulk-action:active {
    transform: translateY(0);
}

/* Review Row Specific Styles */
.review-checkbox {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

#select-all-reviews {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

/* Badge Styles for Review Status */
.badge-success {
    background: #38a16920;
    color: #38a169;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-warning {
    background: #f39c1220;
    color: #c87d09;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-danger {
    background: #e53e3e20;
    color: #e53e3e;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-info {
    background: #3182ce20;
    color: #3182ce;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Review Edit Modal Specific Styles */
#reviewEditModal .admin-modal-content {
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

#reviewEditModal .admin-modal-header {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 16px;
    margin-bottom: 0;
}

#reviewEditModal input[type="text"],
#reviewEditModal textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.2s ease;
}

#reviewEditModal input[type="text"]:focus,
#reviewEditModal textarea:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

#reviewEditModal label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
}

/* Responsive Review Management */
@media (max-width: 1200px) {
    .filters-section {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-select {
        width: 100%;
    }

    #bulk-actions-bar {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    /* Stack filters vertically */
    .filters-section .search-box {
        width: 100%;
        min-width: 100%;
    }

    /* Adjust bulk actions for mobile */
    .btn-bulk-action {
        padding: 6px 12px;
        font-size: 13px;
    }

    /* Simplify review table */
    .modern-table td:nth-child(3),
    .modern-table th:nth-child(3) {
        display: none; /* Hide product column on mobile */
    }
}

@media (max-width: 480px) {
    /* Mobile-friendly edit modal */
    #reviewEditModal .admin-modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .star-btn {
        font-size: 28px;
    }

    /* Hide user column on very small screens */
    .modern-table td:nth-child(4),
    .modern-table th:nth-child(4) {
        display: none;
    }
}

/* ========================================
   CATEGORY MANAGEMENT
   ======================================== */

.category-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-icon {
    color: #FF6B35;
    font-size: 20px;
}

/* ========================================
   FORM ELEMENTS
   ======================================== */

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2d3748;
    font-size: 14px;
}

.form-input,
.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #2d3748;
    background: #ffffff;
    transition: all 0.2s ease;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #FF6B35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-input::placeholder {
    color: #a0aec0;
}

.form-group small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #718096;
}

select.form-input {
    cursor: pointer;
    appearance: none;
    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='%23718096' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #FF6B35;
}

.admin-modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

.admin-modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 20px 24px;
    border-top: 1px solid #e2e8f0;
    background: #f7fafc;
}

/* ========================================
   RESPONSIVE - CATEGORIES
   ======================================== */

@media (max-width: 768px) {
    .category-cell {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .category-icon {
        font-size: 18px;
    }
}

/* ========================================
   VIEW WEBSITE BUTTON
   ======================================== */

.btn-view-website {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #FF6B35;
    color: #ffffff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-right: 16px;
}

.btn-view-website:hover {
    background: #e85a28;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.btn-view-website i {
    font-size: 13px;
}

@media (max-width: 768px) {
    .btn-view-website span {
        display: none;
    }

    .btn-view-website {
        padding: 10px 12px;
        margin-right: 12px;
    }
}

/* ===== USER DETAIL MODAL STYLES ===== */

/* User-specific avatar styling */
.user-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    font-weight: 700;
    text-transform: uppercase;
}

.user-avatar-large img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.user-modal-title {
    display: flex;
    gap: 20px;
    align-items: center;
}

/* Review cards */
.review-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

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

.review-product {
    display: flex;
    gap: 12px;
    align-items: center;
}

.review-product img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
}

.review-rating {
    color: #fbbf24;
    font-size: 16px;
}

.review-content h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
}

.review-content p {
    margin: 0 0 12px 0;
    color: #4a5568;
    line-height: 1.6;
}

.review-meta {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: #718096;
}

.badge-verified {
    color: #10b981;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.review-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.btn-approve {
    background: #10b981;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.btn-approve:hover {
    background: #059669;
}

.btn-reject {
    background: #ef4444;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

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

/* Admin controls */
.admin-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.admin-section h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-control {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #e2e8f0;
}

.admin-control:last-child {
    border-bottom: none;
}

.control-info strong {
    display: block;
    font-size: 16px;
    margin-bottom: 4px;
}

.control-info p {
    margin: 0;
    font-size: 14px;
    color: #718096;
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e0;
    transition: 0.4s;
    border-radius: 34px;
}

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

input:checked + .toggle-slider {
    background-color: #10b981;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/* Admin select */
.admin-select {
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

/* Danger zone */
.danger-zone {
    border-color: #fecaca !important;
    background: #fef2f2 !important;
}

.danger-zone h3 {
    color: #dc2626 !important;
}

.danger-description {
    color: #991b1b;
    margin-bottom: 16px;
    line-height: 1.6;
}

.btn-danger {
    background: #dc2626;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}

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

.btn-admin {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.btn-activate {
    background: #27ae60;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-activate:hover {
    background: #219a52;
}

.btn-suspend {
    background: #e67e22;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-suspend:hover {
    background: #ca6f1e;
}

.help-text {
    margin: 8px 0 0 0;
    font-size: 13px;
    color: #718096;
}

/* Recent order items */
.recent-order-item {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
}

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

.order-details {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: #718096;
}

.order-status {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
}

/* Status badge colors */
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-processing { background: #dbeafe; color: #1e40af; }
.badge-shipped { background: #e0e7ff; color: #3730a3; }
.badge-delivered { background: #d1fae5; color: #065f46; }
.badge-completed { background: #d1fae5; color: #065f46; }
.badge-cancelled { background: #fee2e2; color: #991b1b; }
.badge-refunded { background: #fef3c7; color: #92400e; }
.badge-approved { background: #d1fae5; color: #065f46; }
.badge-rejected { background: #fee2e2; color: #991b1b; }

/* Product cards in favorites */
.product-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: 16px;
}

.product-info h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
}

.product-info h4 a {
    color: #2d3748;
    text-decoration: none;
}

.product-info h4 a:hover {
    color: #ff6b35;
}

.product-rating {
    color: #fbbf24;
    font-size: 14px;
    margin-bottom: 8px;
}

.product-price {
    font-size: 16px;
    font-weight: 700;
    color: #ff6b35;
    margin: 8px 0;
}

.product-seller {
    font-size: 12px;
    color: #718096;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

/* Address and payment cards */
.addresses-grid, .payments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.address-card, .payment-card {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
}

.address-card h4, .payment-card h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
}

.address-card p, .payment-card p {
    margin: 4px 0;
    font-size: 14px;
    color: #4a5568;
}

.address-badges {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

/* Info sections */
.info-section {
    margin-bottom: 32px;
}

.info-section h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
    align-items: center;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #4a5568;
    min-width: 150px;
}

.info-value {
    color: #2d3748;
    flex: 1;
}

/* Editable field styles */
.info-value input,
.info-value select,
.info-value textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.info-value input:focus,
.info-value select:focus,
.info-value textarea:focus {
    outline: none;
    border-color: #ff6b35;
}

.info-value textarea {
    resize: vertical;
    min-height: 80px;
}

/* Save button for sections */
.btn-save-section {
    background: #10b981;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-save-section:hover {
    background: #059669;
}

.btn-save-section:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
}

/* ---- Personal Info Form (Account tab) ---- */
.pi-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.pi-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 20px;
}

.pi-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.pi-field-full {
    grid-column: 1 / -1;
}

.pi-label {
    font-size: 12px;
    font-weight: 600;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.pi-input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    font-size: 14px;
    font-family: inherit;
    background: #fafbfc;
    color: #2d3748;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.pi-input:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
    background: #fff;
}

.pi-textarea {
    resize: vertical;
    min-height: 80px;
}

/* ---- Role buttons (Admin tab) ---- */
.role-btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.btn-role-customer,
.btn-role-seller,
.btn-role-admin {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 7px;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: opacity 0.2s, transform 0.1s;
}

.btn-role-customer { background: #e0f2fe; color: #0369a1; }
.btn-role-customer:hover { background: #bae6fd; }

.btn-role-seller { background: #dcfce7; color: #166534; }
.btn-role-seller:hover { background: #bbf7d0; }

.btn-role-admin { background: #fef2f2; color: #b91c1c; }
.btn-role-admin:hover { background: #fee2e2; }

.role-active-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 7px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 13px;
    font-weight: 600;
    color: #718096;
}

/* ---- Address card with edit/delete ---- */
.addr-admin-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.addr-card-body {
    flex: 1;
}

.addr-card-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

/* ---- Payment card with delete button ---- */
.pm-admin-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.pm-card-body {
    flex: 1;
}

.btn-pm-delete {
    background: transparent;
    border: 1px solid #fca5a5;
    color: #ef4444;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: background 0.15s;
    flex-shrink: 0;
    margin-left: 12px;
}

.btn-pm-delete:hover {
    background: #fef2f2;
}

/* ---- Review edit form ---- */
.review-edit-form {
    padding: 4px 0;
}

.review-edit-stars {
    display: flex;
    gap: 4px;
}

.re-star {
    font-size: 24px;
    color: #d1d5db;
    cursor: pointer;
    transition: color 0.1s;
    user-select: none;
}

.re-star.active { color: #fbbf24; }
.re-star:hover { color: #f59e0b; }

/* ---- Edit review button ---- */
.btn-edit-review {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    padding: 7px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s;
}

.btn-edit-review:hover {
    background: #dbeafe;
}

/* Analytics placeholder */
.analytics-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
}

.analytics-placeholder i {
    font-size: 64px;
    margin-bottom: 24px;
    opacity: 0.5;
}

.analytics-placeholder h3 {
    margin: 0 0 12px 0;
    font-size: 24px;
}

.analytics-placeholder p {
    font-size: 16px;
    margin: 0;
}

/* Modal body scrolling fix */
#userDetailModal .modal-body {
    max-height: calc(90vh - 200px);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Orders table in modal */
#userDetailModal .orders-section {
    overflow-x: auto;
}

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

#userDetailModal .data-table th {
    background: #f7fafc;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
}

#userDetailModal .data-table td {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
}

#userDetailModal .data-table tbody tr:hover {
    background: #f7fafc;
}

/* Reviews container */
#reviews-container {
    overflow-y: auto;
}

/* Empty states */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 16px;
    margin: 0;
}

/* Responsive adjustments for user modal */
@media (max-width: 768px) {
    .user-avatar-large {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }

    .addresses-grid, .payments-grid {
        grid-template-columns: 1fr;
    }

    .info-row {
        flex-direction: column;
        gap: 4px;
    }

    .admin-control {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .toggle-switch {
        align-self: flex-end;
    }
}

/* ==========================================
   ADD USER MODAL FORM STYLES
   ========================================== */

#addUserModal .modal-body {
    padding: 0;
    max-height: calc(90vh - 150px);
    overflow-y: auto;
    overflow-x: hidden;
}

#addUserModal form {
    padding: 24px;
}

.form-section {
    margin-bottom: 32px;
}

.form-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
    color: #1a202c;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.form-group .required {
    color: #ef4444;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="password"],
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-group small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #6b7280;
}

.form-group select {
    cursor: pointer;
    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='%23374151' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    appearance: none;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
    font-weight: 500;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #ff6b35;
}

.checkbox-group span {
    font-size: 14px;
    color: #374151;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 24px;
    border-top: 2px solid #e2e8f0;
    margin-top: 32px;
}

.form-actions .btn-secondary {
    padding: 10px 24px;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.form-actions .btn-secondary:hover {
    background: #e5e7eb;
}

.form-actions .btn-primary {
    padding: 10px 24px;
    background: #ff6b35;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.form-actions .btn-primary:hover {
    background: #e55a25;
}

.form-actions .btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

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

    #addUserModal .admin-modal-content {
        max-width: 95% !important;
        margin: 20px;
    }

    #addUserModal form {
        padding: 16px;
    }

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

    .form-actions button {
        width: 100%;
    }
}

/* ==========================================
   SETTINGS PAGE STYLES
   ========================================== */

#settings {
    padding: 32px;
}

#settings .admin-header {
    margin-bottom: 40px;
}

#settings .content-card {
    margin-bottom: 36px;
    padding: 40px;
}

#settings .content-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 24px 0;
    padding-bottom: 16px;
    border-bottom: 2px solid #f3f4f6;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.3px;
}

#settings .content-card h3 i {
    color: #ff6b35;
    font-size: 22px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fff5f0 0%, #ffe8dc 100%);
    border-radius: 8px;
}

/* Settings Grid */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.setting-item {
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.setting-item:hover {
    border-color: #cbd5e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.setting-item label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.setting-item p {
    font-size: 17px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    line-height: 1.4;
}

/* Settings Forms */
.settings-form {
    max-width: 700px;
}

.settings-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 28px;
}

.settings-form .form-group {
    margin-bottom: 32px;
}

.settings-form .form-group label {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
    letter-spacing: -0.2px;
}

.settings-form input[type="text"],
.settings-form input[type="email"],
.settings-form input[type="tel"],
.settings-form input[type="password"],
.settings-form select {
    width: 100%;
    padding: 16px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.3s;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.settings-form input:hover,
.settings-form select:hover {
    border-color: #d1d5db;
}

.settings-form input:focus,
.settings-form select:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.12), 0 2px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.settings-form small {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.settings-form select {
    cursor: pointer;
    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='%23374151' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    appearance: none;
}

.settings-form .btn-primary {
    padding: 14px 32px;
    background: linear-gradient(135deg, #ff6b35 0%, #f05d5a 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    margin-top: 8px;
    letter-spacing: 0.3px;
}

.settings-form .btn-primary:hover {
    background: linear-gradient(135deg, #e55a25 0%, #d94943 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
}

.settings-form .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.settings-form .btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

/* Responsive */
@media (max-width: 768px) {
    #settings {
        padding: 20px;
    }

    #settings .content-card {
        padding: 24px;
        margin-bottom: 24px;
    }

    #settings .content-card h3 {
        font-size: 18px;
    }

    #settings .content-card h3 i {
        width: 28px;
        height: 28px;
        font-size: 18px;
    }

    .settings-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

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

    .settings-form {
        max-width: 100%;
    }

    .settings-form .form-group {
        margin-bottom: 24px;
    }

    .settings-form .btn-primary {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   TAGS & BADGES SYSTEM
   ======================================== */

/* Tag Grid Layout */
.tags-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

/* Individual Tag Card */
.tag-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tag-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e0;
}

/* Tag Preview in Card */
.tag-card-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 8px;
    min-height: 80px;
}

.tag-card-preview .product-tag {
    font-size: 14px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-tag i {
    font-size: 14px;
}

/* Tag Card Info */
.tag-card-info h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a202c;
}

.tag-card-info p {
    margin: 4px 0 0 0;
    font-size: 14px;
    color: #718096;
    line-height: 1.5;
}

/* Tag Meta Badges */
.tag-card-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

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

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

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

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

/* Tag Card Actions */
.tag-card-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.btn-action {
    background: transparent;
    border: 1px solid #e2e8f0;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a5568;
    transition: all 0.2s;
}

.btn-action:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
    color: #ff6b35;
}

/* Tag Modal Specific Styles */
#tagModal .admin-modal-content {
    max-width: 800px;
}

#tagModal .modal-body {
    max-height: calc(90vh - 150px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 32px;
    scroll-behavior: smooth;
}

#tagModal .modal-body::-webkit-scrollbar {
    width: 8px;
}

#tagModal .modal-body::-webkit-scrollbar-track {
    background: #f7fafc;
    border-radius: 10px;
}

#tagModal .modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 10px;
}

#tagModal .modal-body::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Announcements modal */
#announcementModal .modal-body {
    max-height: calc(90vh - 150px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 32px;
    scroll-behavior: smooth;
}

#announcementModal .form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.5;
    resize: vertical;
    transition: all 0.2s;
    background: white;
}

#announcementModal .form-group textarea:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

#announcementModal .modal-body::-webkit-scrollbar {
    width: 8px;
}

#announcementModal .modal-body::-webkit-scrollbar-track {
    background: #f7fafc;
    border-radius: 10px;
}

#announcementModal .modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 10px;
}

#announcementModal .modal-body::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* ── Hero / Banner modal ─────────────────────────────────────────────────── */
#heroModal .modal-body {
    max-height: calc(90vh - 140px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 28px 32px;
}
/* number input isn't covered by the global input selector — style it to match */
#heroModal .form-group input[type="number"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: white;
    transition: all 0.2s;
}
#heroModal .form-group input[type="number"]:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

/* Image upload block */
#heroModal .hero-image-preview {
    width: 100%;
    height: 140px;
    border-radius: 10px;
    border: 2px dashed #cbd5e0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f7fafc;
    margin-bottom: 12px;
}
#heroModal .hero-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
#heroModal .hero-upload-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
#heroModal .hero-file-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
}
#heroModal .hero-file-label:hover { border-color: #ff6b35; color: #ff6b35; }
#heroModal .hero-file-label input[type="file"] { display: none; }
#heroModal .hero-clear-btn {
    background: none;
    border: none;
    color: #e53e3e;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 4px;
}
#heroModal .hero-upload-status { font-size: 13px; color: #718096; }

/* Active toggle row — aligned, not hacked with margins */
#heroModal .hero-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 4px;
}
#heroModal .hero-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #ff6b35;
    cursor: pointer;
}
#heroModal .hero-toggle label {
    margin: 0;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
}

/* Footer actions */
#heroModal .hero-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px solid #edf2f7;
}
#heroModal .hero-modal-actions .btn-primary,
#heroModal .hero-modal-actions .btn-secondary {
    padding: 10px 22px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

/* ── Category / Subcategory form modals (injected by adminCategories.js) ──── */
#catFormModal .modal-body,
#subFormModal .modal-body {
    max-height: calc(90vh - 140px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 28px 32px;
}
#catFormModal input[type="number"],
#subFormModal input[type="number"],
#catFormModal select,
#subFormModal select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: white;
    transition: all 0.2s;
}
#catFormModal input[type="number"]:focus,
#subFormModal input[type="number"]:focus,
#catFormModal select:focus,
#subFormModal select:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}
.cat-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 14px;
}
.cat-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #ff6b35;
    cursor: pointer;
}
.cat-toggle label { margin: 0; font-weight: 500; color: #374151; cursor: pointer; }
.cat-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px solid #edf2f7;
}
.cat-modal-actions .btn-primary,
.cat-modal-actions .btn-secondary {
    padding: 10px 22px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

/* Tag Preview Section */
.tag-preview-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px;
    border-radius: 16px;
    margin-bottom: 32px;
}

.tag-preview-section label {
    display: block;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    opacity: 0.9;
}

.tag-preview-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80px;
}

.tag-preview {
    font-size: 18px;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 24px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

/* Color Picker Group */
.color-picker-group {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.color-picker-group input[type="color"] {
    width: 60px;
    height: 48px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    background: #ffffff;
    padding: 4px;
}

.color-picker-group input[type="color"]:hover {
    border-color: #ff6b35;
}

.color-picker-group input[type="text"] {
    flex: 1;
    height: 48px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 0 16px;
    font-size: 14px;
    font-family: 'Monaco', 'Courier New', monospace;
    text-transform: uppercase;
    font-weight: 600;
    color: #2d3748;
}

.color-picker-group input[type="text"]:focus {
    outline: none;
    border-color: #ff6b35;
}

/* Color Presets */
.color-presets {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.color-presets button {
    width: 44px;
    height: 44px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: relative;
}

.color-presets button:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.color-presets button:active {
    transform: scale(1.05);
}

/* Form Groups in Tag Modal */
#tagForm .form-group {
    margin-bottom: 28px;
}

#tagForm .form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#tagForm input[type="text"],
#tagForm textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    color: #2d3748;
    transition: all 0.2s;
}

#tagForm input[type="text"]:focus,
#tagForm textarea:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

#tagForm textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.6;
}

/* Checkboxes in Tag Form */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 12px 0;
}

.checkbox-group input[type="checkbox"] {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: #ff6b35;
}

.checkbox-group label {
    font-size: 15px;
    color: #4a5568;
    cursor: pointer;
    user-select: none;
}

/* Form Actions in Tag Modal */
#tagModal .form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid #e2e8f0;
}

#tagModal .form-actions button {
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#tagModal .btn-secondary {
    background: #f7fafc;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

#tagModal .btn-secondary:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

/* Section Headers in Tag Form */
#tagModal .form-section-header {
    font-size: 16px;
    font-weight: 700;
    color: #2d3748;
    margin: 32px 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}

#tagModal .form-section-header:first-child {
    margin-top: 0;
}

/* Add breathing room to color picker sections */
#tagModal .color-section {
    margin-bottom: 32px;
}

#tagModal .color-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

/* Tag Applications Table */
.applications-table {
    width: 100%;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

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

.applications-table thead {
    background: #f7fafc;
}

.applications-table th {
    text-align: left;
    padding: 16px 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #4a5568;
    border-bottom: 2px solid #e2e8f0;
}

.applications-table td {
    padding: 16px 20px;
    font-size: 14px;
    color: #2d3748;
    border-bottom: 1px solid #e2e8f0;
}

.applications-table tbody tr:hover {
    background: #f7fafc;
}

.applications-table tbody tr:last-child td {
    border-bottom: none;
}

/* Application Action Buttons */
.applications-table .btn-action[style*="color: #10b981"] {
    color: #10b981 !important;
}

.applications-table .btn-action[style*="color: #10b981"]:hover {
    background: #d1fae5;
    border-color: #10b981;
}

.applications-table .btn-action[style*="color: #ef4444"] {
    color: #ef4444 !important;
}

.applications-table .btn-action[style*="color: #ef4444"]:hover {
    background: #fee2e2;
    border-color: #ef4444;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
    color: #cbd5e0;
}

.empty-state p {
    font-size: 16px;
    margin: 8px 0 20px 0;
    color: #a0aec0;
}

.empty-state .btn-primary {
    margin-top: 16px;
}

/* Filter Pills for Applications */
.filter-pills {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    background: #ffffff;
    color: #4a5568;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: #cbd5e0;
    background: #f7fafc;
}

.filter-btn.active {
    border-color: #ff6b35;
    background: #ff6b35;
    color: #ffffff;
}

/* Responsive Tag Grid */
@media (max-width: 1200px) {
    .tags-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

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

    .color-presets {
        justify-content: center;
    }

    .tag-card-actions {
        justify-content: center;
    }

    .filter-pills {
        justify-content: center;
    }

    .applications-table {
        overflow-x: auto;
    }

    #tagModal .admin-modal-content {
        max-width: 95%;
        margin: 20px;
    }

    #tagModal .modal-body {
        padding: 24px 20px;
    }

    .tag-preview-section {
        padding: 28px 20px;
        margin-bottom: 24px;
    }

    #tagModal .form-actions {
        flex-direction: column;
        gap: 10px;
    }

    #tagModal .form-actions button {
        width: 100%;
        justify-content: center;
    }

    .color-picker-group {
        flex-direction: column;
        align-items: stretch;
    }

    .color-picker-group input[type="color"] {
        width: 100%;
    }
}

/* Tag Search Input */
.tag-search-container {
    margin-bottom: 24px;
}

.tag-search-container input {
    width: 100%;
    max-width: 400px;
    padding: 12px 16px 12px 44px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.2s;
}

.tag-search-container input:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

/* ========================================
   SELLER APPLICATION MODAL
   ======================================== */

#sellerApplicationModal .modal-body {
    scroll-behavior: smooth;
}

#sellerApplicationModal .modal-body::-webkit-scrollbar {
    width: 8px;
}

#sellerApplicationModal .modal-body::-webkit-scrollbar-track {
    background: #f7fafc;
    border-radius: 10px;
}

#sellerApplicationModal .modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 10px;
}

#sellerApplicationModal .modal-body::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

.application-section {
    background: #f7fafc;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.application-section:last-of-type {
    margin-bottom: 0;
}

.application-section h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 700;
    color: #1a202c;
    display: flex;
    align-items: center;
    gap: 10px;
}

.application-section h3 i {
    color: #ff6b35;
}

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

.info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.info-item label {
    font-size: 13px;
    font-weight: 600;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item span,
.info-item p {
    font-size: 15px;
    color: #2d3748;
    font-weight: 500;
}

.info-item p {
    margin: 0;
    line-height: 1.6;
}

#app-social-media div {
    margin-bottom: 8px;
    font-size: 14px;
    color: #4a5568;
}

#app-social-media strong {
    color: #2d3748;
    text-transform: capitalize;
}

.application-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid #e2e8f0;
}

.btn-approve {
    background: #10b981;
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-approve:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-reject {
    background: #ef4444;
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-reject:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    #sellerApplicationModal .admin-modal-content {
        max-width: 95%;
        margin: 20px;
    }

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

    .application-actions {
        flex-direction: column;
    }

    .btn-approve,
    .btn-reject {
        width: 100%;
        justify-content: center;
    }
}


/* ============================================
   ADMIN ORDER MODAL STYLES
   ============================================ */

/* Admin Controls Card */
.admin-controls-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white;
    border: none !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3) !important;
}

.admin-controls-card .section-header {
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.admin-controls-card .section-header h3 {
    color: white;
}

.admin-controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.admin-controls-grid .control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-controls-grid label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.admin-select,
.admin-input {
    padding: 12px 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

.admin-select:hover,
.admin-input:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.admin-select:focus,
.admin-input:focus {
    outline: none;
    border-color: white;
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.admin-select option {
    background: #1f2937;
    color: white;
    padding: 8px;
}

.admin-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.admin-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-save-order {
    padding: 14px 28px;
    background: white;
    color: #667eea;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-save-order:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    background: #f8f9fa;
}

.btn-save-order:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Admin Notes Textarea */
.admin-notes-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #d1d5db;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    min-height: 100px;
    transition: all 0.3s ease;
    background: #f9fafb;
    color: #1f2937;
    cursor: text;
    box-sizing: border-box;
}

.admin-notes-input:hover {
    border-color: #9ca3af;
    background: white;
}

.admin-notes-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.admin-notes-input::placeholder {
    color: #9ca3af;
    font-style: italic;
}

/* Customer Type Badge */
.customer-type {
    margin-top: 8px;
}

.customer-type .badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

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

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Platform Fee Styling */
.profit-row.platform-fee {
    background: linear-gradient(135deg, #667eea15 0%, #764ba220 100%);
    padding: 14px 16px;
    border-radius: 10px;
    font-weight: 600;
    border: 2px solid #667eea30;
    margin: 4px 0;
}

.profit-row.platform-fee:hover {
    padding-left: 16px;
    background: linear-gradient(135deg, #667eea20 0%, #764ba230 100%);
}

.profit-row.platform-fee span:first-child {
    color: #667eea;
    font-weight: 700;
}

.profit-row.platform-fee span:last-child {
    color: #667eea;
    font-weight: 800;
    font-size: 17px;
}

.profit-row.seller-payout {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    padding: 14px 16px;
    border-radius: 10px;
    font-weight: 600;
    border: 2px solid #86efac;
    margin: 4px 0;
}

.profit-row.seller-payout:hover {
    padding-left: 16px;
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
}

.profit-row.seller-payout span:first-child {
    color: #16a34a;
    font-weight: 700;
}

.profit-row.seller-payout span:last-child {
    color: #16a34a;
    font-weight: 800;
    font-size: 17px;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-controls-grid {
        grid-template-columns: 1fr;
    }

    .admin-actions {
        flex-direction: column;
    }

    .btn-save-order {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   ADMIN ORDER MODAL BASE STYLES
   ============================================ */

#adminOrderModal.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10500;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 0;
}

#adminOrderModal.modal[style*="display: flex"],
#adminOrderModal.modal[style*="display:flex"] {
    display: flex !important;
    align-items: flex-start;
    justify-content: center;
}

.modern-order-modal {
    background: white;
    width: 90%;
    max-width: 920px;
    max-height: calc(100vh - 40px);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
    animation: modalSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    margin: 20px auto;
}

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

/* Modal Header */
.modern-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 32px;
    border-bottom: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    flex-shrink: 0;
}

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

.modern-order-header h2 {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.order-status-badge {
    padding: 8px 16px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.25);
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.order-status-badge.status-delivered {
    background: #10b981;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.order-status-badge.status-shipped {
    background: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.order-status-badge.status-cancelled {
    background: #ef4444;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.order-status-badge.status-processing {
    background: #f59e0b;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.modal-close-btn {
    background: rgba(255, 255, 255, 0.25);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 20px;
    flex-shrink: 0;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: rotate(90deg) scale(1.1);
}

.modal-close-btn:active {
    transform: rotate(90deg) scale(0.95);
}

/* Modal Body */
.modern-order-body {
    overflow-y: auto;
    overflow-x: hidden;
    padding: 28px 32px;
    flex: 1;
    background: #fafbfc;
}

/* Custom Scrollbar */
.modern-order-body::-webkit-scrollbar {
    width: 10px;
}

.modern-order-body::-webkit-scrollbar-track {
    background: #f1f3f5;
}

.modern-order-body::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 10px;
    border: 2px solid #f1f3f5;
}

.modern-order-body::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Info Card */
#adminOrderModal .info-card {
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

#adminOrderModal .info-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #d1d5db;
}

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

#adminOrderModal .info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 0;
    background: transparent;
    border: none;
    border-radius: 0;
    justify-content: flex-start;
}

#adminOrderModal .info-label {
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: unset;
}

#adminOrderModal .info-label i {
    color: #9ca3af;
    font-size: 10px;
}

#adminOrderModal .info-value {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
    flex: unset;
}

.payment-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

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

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

/* Section Card */
.section-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.section-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-color: #d1d5db;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f3f4f6;
}

.section-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-header h3 i {
    color: #667eea;
    font-size: 18px;
}

/* Order Timeline */
.order-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.timeline-item {
    display: flex;
    gap: 16px;
    position: relative;
    padding-bottom: 24px;
    opacity: 0.4;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item.active {
    opacity: 1;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 24px;
    bottom: 0;
    width: 2px;
    background: #e5e7eb;
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-item.active::before {
    background: #667eea;
}

.timeline-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e5e7eb;
    border: 3px solid white;
    box-shadow: 0 0 0 2px #e5e7eb;
    flex-shrink: 0;
}

.timeline-item.active .timeline-dot {
    background: #667eea;
    box-shadow: 0 0 0 2px #667eea;
}

.timeline-content {
    flex: 1;
}

.timeline-status {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.timeline-date {
    font-size: 13px;
    color: #6b7280;
}

/* Products List */
.products-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.product-item {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

.product-item:hover {
    border-color: #cbd5e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.product-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid #e5e7eb;
    flex-shrink: 0;
    background: white;
}

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

.product-name {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 6px;
    line-height: 1.4;
}

.product-meta {
    font-size: 13px;
    color: #6b7280;
    display: flex;
    gap: 8px;
    align-items: center;
}

.product-price {
    font-size: 17px;
    font-weight: 800;
    color: #667eea;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Two Column Grid */
.two-column-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* Customer Info */
.customer-info,
.address-info {
    font-size: 14px;
    line-height: 1.9;
}

.customer-name {
    font-size: 18px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f3f4f6;
}

.customer-contact {
    color: #6b7280;
    margin-bottom: 8px;
    padding: 4px 0;
    font-weight: 500;
}

.customer-contact:hover {
    color: #4b5563;
}

.address-info div {
    color: #4b5563;
    margin-bottom: 6px;
    font-weight: 500;
    line-height: 1.6;
}

/* Price Breakdown */
.price-breakdown {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    padding: 8px 0;
    transition: all 0.2s ease;
}

.price-row:hover {
    padding-left: 8px;
}

.price-row span:first-child {
    color: #6b7280;
    font-weight: 500;
}

.price-row span:last-child {
    font-weight: 700;
    color: #1f2937;
}

.price-row.total-row {
    padding-top: 16px;
    margin-top: 8px;
    border-top: 3px solid #e5e7eb;
    font-size: 18px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    padding: 16px 12px;
    border-radius: 8px;
    margin-left: -12px;
    margin-right: -12px;
    padding-left: 12px;
    padding-right: 12px;
}

.price-row.total-row span {
    font-weight: 800;
    color: #111827;
}

.discount-text {
    color: #10b981 !important;
    font-weight: 600 !important;
}

.discount-amount {
    color: #10b981 !important;
    font-weight: 700 !important;
}

/* Profit Breakdown */
.profit-breakdown {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.profit-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    padding: 10px 0;
    transition: all 0.2s ease;
}

.profit-row:hover {
    padding-left: 8px;
}

.profit-row span:first-child {
    color: #6b7280;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profit-row span:first-child i {
    font-size: 16px;
}

.profit-row span:last-child {
    font-weight: 700;
    color: #1f2937;
    font-size: 16px;
}

/* Shipping Details */
#adminOrderModal .shipping-details .info-row {
    margin-top: 16px;
}

.shipping-details a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.shipping-details a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .modern-order-modal {
        width: 95%;
        max-width: 100%;
        max-height: calc(100vh - 20px);
        margin: 10px auto;
    }

    .modern-order-header {
        padding: 20px 16px;
    }

    .modern-order-header h2 {
        font-size: 20px;
    }

    .modern-order-body {
        padding: 20px 16px;
    }

    #adminOrderModal .info-row,
    #adminOrderModal .two-column-grid {
        grid-template-columns: 1fr;
    }

    .product-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .product-item img {
        width: 100%;
        max-width: 150px;
        height: 150px;
    }

    .section-card {
        padding: 16px;
    }

    .section-header h3 {
        font-size: 15px;
    }

    .price-row.total-row {
        font-size: 16px;
    }
}


/* ============================================
   ANALYTICS DASHBOARD STYLES
   ============================================ */

/* Analytics Header */
.admin-header p {
    color: #64748b;
    font-size: 14px;
    margin-top: 8px;
}

/* Overview KPI Cards */
.analytics-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.analytics-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
}

.analytics-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.analytics-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.analytics-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.analytics-icon.revenue {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.analytics-icon.orders {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.analytics-icon.users {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.analytics-icon.products {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.analytics-card h3 {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    margin: 0;
}

.analytics-value {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.analytics-change {
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.analytics-change.positive {
    color: #10b981;
}

.analytics-change.negative {
    color: #ef4444;
}

/* Charts Section */
.analytics-charts {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.chart-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #f1f5f9;
}

.chart-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 20px;
}

.chart-container {
    position: relative;
    height: 300px;
}

/* Detailed Stats Grid */
.analytics-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.detail-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #f1f5f9;
}

.detail-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-card h3 i {
    color: #667eea;
}

.detail-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.detail-item:hover {
    background: #f1f5f9;
}

.detail-label {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.detail-value {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

/* Top Performers Section */
.top-performers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.top-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #f1f5f9;
}

.top-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-card h3 i {
    color: #f59e0b;
}

.top-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.top-item:last-child {
    margin-bottom: 0;
}

.top-item:hover {
    background: #f1f5f9;
    transform: translateX(4px);
}

.top-item-rank {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.top-item:first-child .top-item-rank {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.top-item:nth-child(2) .top-item-rank {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
}

.top-item:nth-child(3) .top-item-rank {
    background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
}

.top-item-info {
    flex: 1;
}

.top-item-name {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.top-item-meta {
    font-size: 13px;
    color: #64748b;
}

/* Refresh Button */
#analytics-refresh-btn {
    background: white;
    border: 2px solid #e2e8f0;
    color: #667eea;
    padding: 10px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 600;
}

#analytics-refresh-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

#analytics-refresh-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading State */
.text-muted {
    color: #94a3b8;
    font-style: italic;
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .analytics-charts {
        grid-template-columns: 1fr;
    }
}

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

    .analytics-details {
        grid-template-columns: 1fr;
    }

    .top-performers {
        grid-template-columns: 1fr;
    }

    .analytics-value {
        font-size: 28px;
    }

    .chart-container {
        height: 250px;
    }
}


/* ============================================
   PRODUCT ANALYTICS MODAL STYLES
   ============================================ */

.analytics-stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
}

.analytics-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.stat-meta {
    font-size: 12px;
    color: #94a3b8;
}

.analytics-timeframe-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #f1f5f9;
}

.analytics-timeframe-card h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.analytics-timeframe-card h4 i {
    color: #667eea;
}

.timeframe-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.timeframe-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
}

.timeframe-stat span {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.timeframe-stat strong {
    font-size: 16px;
    color: #1e293b;
    font-weight: 600;
}

.analytics-conversion-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #f1f5f9;
}

.analytics-conversion-card h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.analytics-conversion-card h4 i {
    color: #f59e0b;
}

.conversion-stats {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.conversion-stat {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.conversion-label {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.conversion-value {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
}

.conversion-bar {
    width: 100%;
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
}

.conversion-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .analytics-stat-card {
        flex-direction: column;
        text-align: center;
    }

    .stat-value {
        font-size: 24px;
    }
}
.btn-pay-all {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(255,107,53,0.35);
    transition: all 0.2s;
}
.btn-pay-all:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,107,53,0.45); }
.btn-pay-all:active { transform: translateY(0); }
.btn-pay-all:disabled { background: #e2e8f0; color: #94a3b8; cursor: not-allowed; transform: none; box-shadow: none; }

/* Seller payout row */
.payout-seller-row {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.payout-seller-row:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.payout-seller-row[data-urgency="overdue"] { border-left: 4px solid #ef4444; }
.payout-seller-row[data-urgency="due"] { border-left: 4px solid #ff6b35; }
.payout-seller-row[data-urgency="upcoming"] { border-left: 4px solid #f59e0b; }
.payout-seller-row[data-urgency="in_hold"] { border-left: 4px solid #94a3b8; }

.payout-seller-card {
    display: grid;
    grid-template-columns: auto 1fr auto auto auto;
    align-items: center;
    gap: 20px;
    padding: 16px 20px;
    background: #fff;
}

.psr-urgency {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.urgency-overdue { background: #fee2e2; color: #dc2626; }
.urgency-due { background: #fff3ee; color: #ff6b35; }
.urgency-upcoming { background: #fef3c7; color: #b45309; }
.urgency-in_hold { background: #f1f5f9; color: #64748b; }

.psr-info strong { display: block; font-size: 14px; color: #1e293b; }
.psr-info span { font-size: 12px; color: #94a3b8; }

.psr-amounts { text-align: right; }
.psr-orders-count { font-size: 12px; color: #94a3b8; margin-bottom: 2px; }
.psr-gross { font-size: 12px; color: #64748b; }
.psr-net { font-size: 16px; font-weight: 700; color: #1e293b; }
.psr-commission { font-size: 11px; font-weight: 400; color: #94a3b8; }

.psr-bank { font-size: 12px; color: #475569; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.psr-bank i { color: #ff6b35; }
.psr-bank.no-bank { color: #ef4444; }
.psr-bank.no-bank i { color: #ef4444; }

.psr-actions { display: flex; gap: 8px; align-items: center; }

.btn-pay {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.btn-pay:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(34,197,94,0.35); }
.btn-pay:disabled { background: #e2e8f0; color: #94a3b8; cursor: not-allowed; transform: none; box-shadow: none; }

.psr-orders-detail {
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
    padding: 0;
}
.psr-orders-detail .modern-table { margin: 0; border-radius: 0; }

/* Mark complete button (in processing list) */
.btn-mark-complete {
    background: #eff6ff;
    color: #3b82f6;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-mark-complete:hover { background: #3b82f6; color: white; }

/* Payout history table */
.payout-history-row td { vertical-align: middle; }

/* Filter pills for payouts */
#payout-ready-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 900px) {
    .payout-seller-card {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .psr-amounts { text-align: left; }
    .psr-actions { justify-content: flex-end; }
}

