/* =========================================================================
   PEPPER INC. - ADMIN BACKOFFICE STYLES
   ========================================================================= */

:root {
    --admin-sidebar-width: 260px;
    --admin-bg: #09090b;
    --admin-surface: #18181b;
    --admin-border: #27272a;
    --admin-text: #f4f4f5;
    --admin-text-muted: #a1a1aa;
    --admin-primary: #22c55e;
    --admin-primary-hover: #16a34a;
    --admin-danger: #ef4444;
}

body.admin-page {
    margin: 0;
    padding: 0;
    background-color: var(--admin-bg);
    color: var(--admin-text);
    font-family: 'Inter', sans-serif;
    height: 100vh;
    overflow: hidden;
}

/* --- AUTH OVERLAY --- */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: radial-gradient(circle at center, rgba(34, 197, 94, 0.05) 0%, var(--admin-bg) 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    padding: 40px;
    border-radius: 24px;
    background: rgba(24, 24, 27, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid var(--admin-border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    width: 150px;
    margin-bottom: 16px;
}

.auth-header h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.5rem;
    margin: 0 0 8px 0;
    color: white;
}

.auth-header p {
    color: var(--admin-text-muted);
    font-size: 0.9rem;
    margin: 0;
}

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

.auth-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: var(--admin-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.auth-error {
    color: var(--admin-danger);
    font-size: 0.85rem;
    margin-top: 16px;
    text-align: center;
    min-height: 20px;
}

/* --- DASHBOARD LAYOUT --- */
.admin-dashboard {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: var(--admin-sidebar-width);
    background: var(--admin-surface);
    border-right: 1px solid var(--admin-border);
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    padding: 24px;
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-logo {
    width: 120px;
}

.badge-admin {
    background: rgba(34, 197, 94, 0.1);
    color: var(--admin-primary);
    border: 1px solid rgba(34, 197, 94, 0.2);
    font-size: 0.65rem;
    padding: 4px 8px;
    border-radius: 4px;
}

.sidebar-nav {
    flex: 1;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--admin-text-muted);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-item:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    color: var(--admin-primary);
    background: rgba(34, 197, 94, 0.1);
}

.sidebar-footer {
    padding: 24px 16px;
    border-top: 1px solid var(--admin-border);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--admin-text-muted);
    margin-bottom: 16px;
    padding: 0 8px;
}

.btn-logout {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--admin-border);
    color: var(--admin-text-muted);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-logout:hover {
    color: var(--admin-danger);
    border-color: var(--admin-danger);
    background: rgba(239, 68, 68, 0.1);
}

/* Main Content */
.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--admin-bg);
    overflow: hidden;
}

.admin-topbar {
    height: 60px;
    padding: 0 24px;
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(9, 9, 11, 0.8);
    backdrop-filter: blur(10px);
}

.admin-topbar h1 {
    margin: 0;
    font-size: 1.2rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: white;
}

.btn-sync {
    background: var(--admin-surface);
    color: white;
    border: 1px solid var(--admin-border);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.btn-sync:hover {
    border-color: var(--admin-primary);
    color: var(--admin-primary);
}

.btn-sync.loading i {
    animation: spin 1s linear infinite;
}

/* Views */
.views-container {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Para la vista de PO, queremos que ocupe todo el alto disponible sin scroll en el contenedor padre */
#view-orders.active {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.admin-view {
    display: none;
    animation: fadeIn 0.3s ease;
}

.admin-view.active {
    display: block;
}

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

.section-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.5rem;
    margin: 0;
    color: white;
}

/* Search Box */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 12px;
    color: var(--admin-text-muted);
}

.search-box input {
    padding-left: 36px;
}

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

.stat-card {
    padding: 24px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(34, 197, 94, 0.1);
    color: var(--admin-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.stat-data h3 {
    margin: 0 0 4px 0;
    font-size: 0.85rem;
    color: var(--admin-text-muted);
    font-weight: 500;
}

.stat-data p {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Tables */
.table-container {
    background: var(--admin-surface);
    border-radius: 16px;
    border: 1px solid var(--admin-border);
    overflow: auto;
}

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

.admin-table th,
.admin-table td {
    padding: 16px 24px;
    text-align: left;
    border-bottom: 1px solid var(--admin-border);
    white-space: nowrap;
}

.admin-table th {
    background: rgba(0, 0, 0, 0.2);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--admin-text-muted);
    font-weight: 600;
    position: sticky;
    top: 0;
}

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

.admin-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

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

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-card {
    width: 100%;
    max-width: 600px;
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: 16px;
    overflow: hidden;
    animation: fadeIn 0.3s ease;
}

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

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: white;
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--admin-text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.2s;
}

.btn-close:hover {
    color: white;
}

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

/* UI Elements */
.badge-brand {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

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

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

/* Buttons */
.btn-icon {
    background: transparent;
    border: 1px solid var(--admin-border);
    color: var(--admin-text-muted);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-icon:hover {
    color: white;
    border-color: var(--admin-text-muted);
    background: rgba(255, 255, 255, 0.1);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--admin-border);
    color: var(--admin-text);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
}

.btn-outline:not(:disabled):hover {
    border-color: var(--admin-primary);
    color: var(--admin-primary);
}

.btn-outline:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Toasts */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s ease forwards;
}

.toast.success {
    border-left: 4px solid var(--admin-primary);
}

.toast.error {
    border-left: 4px solid var(--admin-danger);
}

/* =========================================================================
   PURCHASE ORDERS MODULE
   ========================================================================= */

.po-split-layout {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 20px;
    flex: 1;
    min-height: 0; /* Importante para que overflow: auto funcione en hijos de grid flex */
}

.glass-card {
    background: rgba(24, 24, 27, 0.4);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.po-catalog-panel {
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow: hidden;
    height: 100%;
}

.po-catalog-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 8px;
}

/* Mobile Tabs Styles */
.mobile-po-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 4px;
    border: 1px solid var(--admin-border);
}

.po-tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    color: var(--admin-text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.po-tab-btn.active {
    background: var(--admin-primary);
    color: var(--admin-bg);
}

.badge-count {
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
}

.po-item-card {
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.po-item-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(34, 197, 94, 0.3);
    transform: translateY(-2px);
}

.po-item-info {
    flex: 1;
    min-width: 0; /* Permite que el texto se trunque si es necesario */
    padding-right: 12px;
}

.po-item-info h4 {
    margin: 0 0 4px 0;
    color: white;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.po-item-info p {
    margin: 0;
    color: var(--admin-text-muted);
    font-size: 0.75rem;
}

.po-item-breakdown {
    display: flex;
    flex-wrap: wrap; /* Permitir que las burbujas bajen si no hay espacio */
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    margin-bottom: 6px;
    color: var(--admin-text-muted);
}

.po-item-breakdown span {
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 6px;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.po-item-price-container {
    text-align: right;
    min-width: 110px;
    flex-shrink: 0;
}

.po-item-price {
    font-weight: 700;
    color: var(--admin-primary);
}

.po-cart-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

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

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

.cart-item-details h5 {
    margin: 0 0 2px 0;
    color: white;
    font-size: 0.85rem;
    line-height: 1.2;
}

.cart-item-details p {
    margin: 0;
    color: var(--admin-text-muted);
    font-size: 0.7rem;
}

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

.qty-control {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    overflow: hidden;
}

.qty-btn {
    background: transparent;
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    cursor: pointer;
}

.qty-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.qty-input {
    width: 30px;
    text-align: center;
    background: transparent;
    border: none;
    color: white;
    font-weight: 600;
    -moz-appearance: textfield;
    appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-summary {
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid var(--admin-border);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    color: var(--admin-text-muted);
    font-size: 0.85rem;
}

.total-row {
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--admin-border);
}

/* =========================================================================
   PRINT STYLES FOR PURCHASE ORDERS
   ========================================================================= */

.print-only {
    display: none;
}

@media print {

    /* Hide ALL screen elements */
    body.admin-page>*:not(.print-only),
    #authOverlay,
    #adminDashboard,
    .toast-container,
    .modal-overlay {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
        height: auto;
        overflow: visible;
        font-family: 'Helvetica', 'Arial', sans-serif;
    }

    .print-only {
        display: block !important;
        width: 100%;
        max-width: 800px;
        margin: 0 auto;
        padding: 40px;
    }

    .print-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 2px solid #22c55e;
        padding-bottom: 20px;
        margin-bottom: 30px;
    }

    .print-company-details {
        text-align: right;
    }

    .print-company-details h2 {
        margin: 0 0 10px 0;
        color: #1f2937;
        font-size: 1.5rem;
    }

    .print-company-details p {
        margin: 0;
        color: #4b5563;
        font-size: 0.9rem;
    }

    .print-customer {
        margin-bottom: 30px;
    }

    .print-customer h3 {
        margin: 0 0 5px 0;
        color: #6b7280;
        font-size: 0.9rem;
        text-transform: uppercase;
    }

    .print-table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 30px;
    }

    .print-table th {
        background-color: #f3f4f6;
        color: #374151;
        font-weight: 600;
        text-align: left;
        padding: 10px;
        border-bottom: 2px solid #d1d5db;
        font-size: 0.85rem;
    }

    .print-table td {
        padding: 12px 10px;
        border-bottom: 1px solid #e5e7eb;
        font-size: 0.9rem;
    }

    .print-totals {
        display: flex;
        justify-content: flex-end;
    }

    .print-totals-box {
        width: 300px;
    }

    .print-row {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        border-bottom: 1px solid #e5e7eb;
    }

    .print-grand-total {
        font-weight: bold;
        font-size: 1.2rem;
        border-bottom: none;
        border-top: 2px solid #1f2937;
        margin-top: 5px;
        padding-top: 10px;
    }

    .print-footer {
        margin-top: 50px;
        text-align: center;
        color: #9ca3af;
        font-size: 0.85rem;
        border-top: 1px solid #e5e7eb;
        padding-top: 20px;
    }

    @page {
        margin: 1cm;
    }
}

/* =========================================================================
   RESPONSIVE DESIGN (MOBILE)
   ========================================================================= */

@media (max-width: 992px) {
    .po-split-layout {
        grid-template-columns: 1fr;
        height: auto;
        flex: 1;
        overflow: hidden;
    }

    .po-catalog-panel, .po-cart-panel {
        height: 100%;
        display: none; /* Se controla con las pestañas */
    }

    /* Mostrar panel activo según la pestaña */
    .po-split-layout:not(.show-cart) .po-catalog-panel {
        display: flex;
    }

    .po-split-layout.show-cart .po-cart-panel {
        display: flex;
    }

    .po-catalog-panel {
        padding: 16px;
    }

    .po-cart-panel {
        min-height: 0;
    }
}

@media (max-width: 768px) {
    .admin-dashboard {
        flex-direction: column;
        height: 100vh;
        overflow: hidden;
    }

    .admin-sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        bottom: 0;
        z-index: 2000;
        transition: left 0.3s ease;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .admin-sidebar.show {
        left: 0;
    }

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

    .hide-mobile {
        display: none !important;
    }

    .admin-topbar {
        padding: 0 16px;
    }

    .admin-topbar h1 {
        font-size: 1.1rem;
    }

    .btn-sync {
        font-size: 0.9rem;
        padding: 8px 12px;
    }

    .views-container {
        padding: 16px;
    }

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

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

    .search-box,
    .search-box input {
        width: 100% !important;
    }

    .modal-card {
        width: 95%;
        margin: 10px;
    }

    .po-item-info h4 {
        max-width: 200px;
    }

    .auth-card {
        margin: 20px;
        padding: 30px 20px;
    }
}

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

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* =========================================================================
   SYNC REPORT MODAL
   ========================================================================= */

.sync-report-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.sr-stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    padding: 14px 16px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.sr-stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--admin-primary);
}

.sr-icon {
    font-size: 1.3rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    flex-shrink: 0;
}

.sr-icon--primary { color: var(--admin-primary); background: rgba(34, 197, 94, 0.1); }
.sr-icon--green   { color: #10B981; background: rgba(16, 185, 129, 0.1); }
.sr-icon--yellow  { color: #F59E0B; background: rgba(245, 158, 11, 0.1); }
.sr-icon--red     { color: #EF4444; background: rgba(239, 68, 68, 0.1); }

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

.sr-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    line-height: 1.2;
}

/* Detail Sections */
.sr-section {
    margin-bottom: 20px;
    animation: fadeInUp 0.3s ease forwards;
}

.sr-section-title {
    font-size: 0.95rem;
    margin: 0 0 8px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sr-section-title--green  { color: #10B981; }
.sr-section-title--red    { color: #EF4444; }
.sr-section-title--orange { color: #F59E0B; }

.sr-section-desc {
    font-size: 0.82rem;
    color: var(--admin-text-muted);
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.sr-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sr-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--admin-text);
    transition: background 0.15s ease;
}

.sr-list li:hover {
    background: rgba(255, 255, 255, 0.05);
}

.sr-list .sr-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    flex-shrink: 0;
    min-width: 80px;
    text-align: center;
}

.sr-code--green  { background: rgba(16, 185, 129, 0.15); color: #10B981; }
.sr-code--red    { background: rgba(239, 68, 68, 0.15); color: #EF4444; }
.sr-code--orange { background: rgba(245, 158, 11, 0.15); color: #F59E0B; }

.sr-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--admin-text-muted);
}

.sr-empty-state i {
    display: block;
    margin-bottom: 12px;
}

.sr-empty-state p {
    margin: 0;
    font-size: 0.95rem;
}

/* Scrollbar for report details */
.sync-report-details::-webkit-scrollbar {
    width: 6px;
}

.sync-report-details::-webkit-scrollbar-track {
    background: transparent;
}

.sync-report-details::-webkit-scrollbar-thumb {
    background: var(--admin-border);
    border-radius: 3px;
}

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

/* Clickable Log Rows */
.log-clickable {
    transition: background 0.2s ease;
}

.log-clickable:hover {
    background: rgba(34, 197, 94, 0.08) !important;
}

.log-clickable td:last-child::after {
    content: ' 📋';
    font-size: 0.8rem;
}