/* ===== ROOT BRAND COLORS ===== */
:root {
  --purple: #7b2cbf;
  --purple-light: #9d4edd;
  --purple-dark: #5a189a;
  --orange: #f77f00;
  --orange-light: #ff9e00;
  --orange-dark: #e76f00;
  --yellow: #fcbf49;
  --yellow-light: #ffd166;
  --yellow-dark: #f4a261;
  --gradient: linear-gradient(135deg, #7b2cbf, #f77f00);
  --gradient-yellow: linear-gradient(135deg, #fcbf49, #f77f00);
  --gradient-purple: linear-gradient(135deg, #7b2cbf, #9d4edd);
  --gradient-orange: linear-gradient(135deg, #f77f00, #ff9e00);
  --dark: #222;
  --light: #ffffff;
  --gray: #6b7280;
  --light-gray: #f3f4f6;
  --medium-gray: #e5e7eb;
  --dark-gray: #374151;
  --success-green: #10b981;
  --warning-red: #ef4444;
  --info-blue: #3b82f6;
  --card-shadow: 0 6px 20px rgba(123, 44, 191, 0.1);
  --card-shadow-hover: 0 12px 25px rgba(123, 44, 191, 0.15);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--dark);
    overflow-x: hidden;
}

/* ===== ADMIN CONTAINER ===== */
.admin-container {
    display: flex;
    min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.admin-sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--purple-dark) 0%, var(--purple) 100%);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 100;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 30px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 24px;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-yellow);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 4px;
}

.sidebar-header p {
    font-size: 0.8rem;
    opacity: 0.8;
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 16px 24px 16px;
    border-radius: var(--radius-lg);
}

.admin-avatar {
    width: 48px;
    height: 48px;
    background: var(--gradient-yellow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.admin-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.admin-info p {
    font-size: 0.75rem;
    opacity: 0.8;
}

.sidebar-nav {
    flex: 1;
    padding: 0 16px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    margin-bottom: 4px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item i {
    width: 20px;
    font-size: 1.1rem;
}

.nav-item span:not(.badge) {
    flex: 1;
}

.nav-item .badge {
    background: var(--orange);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.nav-item.active {
    background: var(--gradient-orange);
    box-shadow: 0 4px 12px rgba(247, 127, 0, 0.3);
}

.nav-item.logout {
    margin-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0;
    padding-top: 20px;
}

.nav-item.logout:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* ===== MAIN CONTENT ===== */
.admin-main {
    flex: 1;
    margin-left: 280px;
    padding: 20px;
}

/* Top Bar */
.top-bar {
    background: white;
    border-radius: var(--radius-xl);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    box-shadow: var(--card-shadow);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--purple);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--light-gray);
    border-radius: var(--radius-lg);
    padding: 8px 16px;
    gap: 8px;
}

.search-box i {
    color: var(--gray);
}

.search-box input {
    border: none;
    background: none;
    outline: none;
    font-size: 0.9rem;
    width: 200px;
}

.notifications {
    position: relative;
    cursor: pointer;
}

.notifications i {
    font-size: 1.2rem;
    color: var(--gray);
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--orange);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
}

/* Content Sections */
.content-sections {
    position: relative;
}

.content-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.stat-icon.primary {
    background: linear-gradient(135deg, var(--purple-light), var(--purple));
    color: white;
}

.stat-icon.warning {
    background: linear-gradient(135deg, var(--orange-light), var(--orange));
    color: white;
}

.stat-icon.success {
    background: linear-gradient(135deg, var(--success-green), #059669);
    color: white;
}

.stat-icon.danger {
    background: linear-gradient(135deg, var(--warning-red), #dc2626);
    color: white;
}

.stat-content h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark);
}

.stat-content p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--card-shadow);
}

.chart-card h3 {
    margin-bottom: 20px;
    color: var(--dark);
}

.chart-card canvas {
    max-height: 300px;
}

/* Recent Activity */
.recent-activity {
    background: white;
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--card-shadow);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.refresh-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--purple);
    font-size: 1.1rem;
    transition: transform 0.3s;
}

.refresh-btn:hover {
    transform: rotate(180deg);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-md);
    transition: background 0.3s;
}

.activity-item:hover {
    background: var(--light-gray);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.activity-icon.user {
    background: #e0e7ff;
    color: var(--purple);
}

.activity-icon.verification {
    background: #fed7aa;
    color: var(--orange);
}

.activity-icon.listing {
    background: #dcfce7;
    color: var(--success-green);
}

.activity-icon.order {
    background: #dbeafe;
    color: var(--info-blue);
}

.activity-icon.report {
    background: #fee2e2;
    color: var(--warning-red);
}

.activity-content {
    flex: 1;
}

.activity-content p {
    margin-bottom: 4px;
}

.activity-content small {
    font-size: 0.75rem;
    color: var(--gray);
}

/* ===== VERIFICATIONS ===== */
.verifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.verification-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s;
}

.verification-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
}

.verification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.verification-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 48px;
    height: 48px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
}

.user-info h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.user-info p {
    font-size: 0.8rem;
    color: var(--gray);
}

.verification-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.verification-status.pending {
    background: #fed7aa;
    color: var(--orange-dark);
}

.verification-status.approved {
    background: #c6f6d5;
    color: #22543d;
}

.verification-status.rejected {
    background: #fed7d7;
    color: #742a2a;
}

.verification-docs {
    display: flex;
    gap: 8px;
    margin: 16px 0;
}

.doc-thumbnail {
    width: 60px;
    height: 60px;
    background: var(--light-gray);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s;
}

.doc-thumbnail:hover {
    transform: scale(1.05);
}

.doc-thumbnail i {
    font-size: 1.5rem;
    color: var(--purple);
}

.verification-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--medium-gray);
}

/* ===== TABLES ===== */
.table-container {
    overflow-x: auto;
    background: white;
    border-radius: var(--radius-xl);
    padding: 20px;
    box-shadow: var(--card-shadow);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: linear-gradient(135deg, var(--purple-light), var(--purple));
    color: white;
}

.data-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid var(--medium-gray);
}

.data-table tr:hover {
    background: var(--light-gray);
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar-sm {
    width: 32px;
    height: 32px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.8rem;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.verified {
    background: #c6f6d5;
    color: #22543d;
}

.status-badge.unverified {
    background: #fed7d7;
    color: #742a2a;
}

.status-badge.pending {
    background: #fed7aa;
    color: var(--orange-dark);
}

.status-badge.processing {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge.delivered {
    background: #c6f6d5;
    color: #22543d;
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s;
}

.action-btn.view {
    background: var(--purple-light);
    color: white;
}

.action-btn.view:hover {
    background: var(--purple);
}

.action-btn.ban {
    background: var(--warning-red);
    color: white;
}

.action-btn.ban:hover {
    background: #dc2626;
}

.action-btn.delete {
    background: var(--warning-red);
    color: white;
}

/* ===== SELLER CARDS (Escrow) ===== */
.sellers-breakdown {
    background: var(--light-gray);
    padding: 20px;
    border-radius: var(--radius-lg);
}

.seller-cards {
    display: grid;
    gap: 20px;
    margin-top: 16px;
}

.seller-card-admin {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--card-shadow);
    border-left: 4px solid var(--purple);
}

.seller-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.seller-card-header h5 {
    font-size: 1.1rem;
    color: var(--purple);
}

.payout-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.payout-status.paid {
    background: #c6f6d5;
    color: #22543d;
}

.payout-status.pending {
    background: #fed7aa;
    color: var(--orange-dark);
}

.seller-contact {
    background: var(--light-gray);
    padding: 12px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.seller-contact p {
    margin: 4px 0;
    font-size: 0.85rem;
}

.seller-items {
    margin-bottom: 16px;
}

.seller-items ul {
    margin: 8px 0 0 20px;
}

.seller-items li {
    margin: 4px 0;
    font-size: 0.85rem;
}

.seller-total {
    text-align: right;
    font-size: 1rem;
    padding: 12px;
    background: var(--gradient-purple);
    color: white;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.seller-actions {
    display: flex;
    gap: 12px;
}

.seller-actions button {
    flex: 1;
}

.payment-info {
    text-align: center;
    padding: 12px;
    background: #c6f6d5;
    border-radius: var(--radius-md);
    color: #22543d;
}

/* Seller Summary */
.seller-summary-header {
    background: var(--gradient);
    padding: 24px;
    border-radius: var(--radius-xl);
    color: white;
    margin-bottom: 24px;
}

.seller-summary-header h3 {
    margin-bottom: 8px;
}

.seller-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.seller-summary-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s;
}

.seller-summary-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
}

.summary-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--medium-gray);
}

.summary-card-header i {
    font-size: 1.5rem;
    color: var(--orange);
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--purple);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--gray);
}

.summary-contact {
    background: var(--light-gray);
    padding: 12px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    font-size: 0.8rem;
}

/* ===== REPORTS ===== */
.reports-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.report-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--card-shadow);
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.report-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.report-status.pending {
    background: #fed7aa;
    color: var(--orange-dark);
}

.report-status.resolved {
    background: #c6f6d5;
    color: #22543d;
}

/* ===== LISTINGS ===== */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.listing-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s;
}

.listing-card:hover {
    transform: translateY(-2px);
}

.listing-image {
    height: 180px;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
}

.listing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.listing-image i {
    font-size: 3rem;
    color: var(--gray);
}

.listing-info {
    padding: 16px;
}

.listing-info h4 {
    margin-bottom: 8px;
}

.listing-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--orange);
    margin-bottom: 8px;
}

/* ===== MODALS ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px 24px;
    background: var(--gradient);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header .close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid var(--medium-gray);
}

/* ===== BUTTONS ===== */
.btn-primary {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(123, 44, 191, 0.3);
}

.btn-secondary {
    background: var(--light-gray);
    color: var(--dark);
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: var(--medium-gray);
}

.btn-danger {
    background: var(--warning-red);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s;
}

.btn-danger:hover {
    background: #dc2626;
}

.filter-select, .search-input {
    padding: 8px 12px;
    border: 1px solid var(--medium-gray);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    outline: none;
}

.filter-select:focus, .search-input:focus {
    border-color: var(--purple);
}

/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    padding: 12px 20px;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s ease;
}

.toast.success {
    border-left: 4px solid var(--success-green);
}

.toast.error {
    border-left: 4px solid var(--warning-red);
}

.toast.warning {
    border-left: 4px solid var(--orange);
}

.toast.info {
    border-left: 4px solid var(--info-blue);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== EMPTY STATES ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    
    .admin-sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .verifications-grid,
    .seller-summary-grid,
    .listings-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .seller-actions {
        flex-direction: column;
    }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--purple-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--purple);
}