/* Admin Styles - Consolidated CSS for Admin Panel
 * This file contains all CSS styles for the admin interface
 * Following rules: No inline CSS, unified styling, responsive design
 * Consolidated from: modern-admin.css, stats-cards.css, admin-layout.css, etc.
 */

/* CSS Variables (consolidated) */
:root {
    --admin-primary: #3b82f6;
    --admin-primary-light: #dbeafe;
    --admin-success: #10b981;
    --admin-warning: #f59e0b;
    --admin-danger: #ef4444;
    --admin-bg: #f8fafc;
    --admin-card-bg: #ffffff;
    --admin-border: #e2e8f0;
    --admin-text-primary: #1e293b;
    --admin-text-secondary: #64748b;
    --admin-sidebar-bg: #1e293b;
    --admin-sidebar-text: #f1f5f9;
    --admin-radius: 8px;
    --admin-shadow: 0 1px 3px rgb(0, 0, 0, 0.1);
    --admin-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Enhanced header styles */
    --admin-header-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --admin-header-text: #ffffff;
    --admin-header-shadow: 0 4px 20px rgb(0 0 0 / 0.1);

    /* sidebar */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 80px;

    /* stats cards */
    --stats-card-bg: var(--admin-card-bg);
    --stats-card-border: var(--admin-border);
    --stats-card-radius: 12px;
    --stats-card-padding: 1.5rem;
    --stats-text-primary: var(--admin-text-primary);
    --stats-text-secondary: var(--admin-text-secondary);
    --stats-primary: var(--admin-primary);
    --stats-primary-light: var(--admin-primary-light);
    --stats-success: var(--admin-success);
    --stats-warning: var(--admin-warning);
    --stats-danger: var(--admin-danger);
    --stats-info: #06b6d4;

    /* small utility aliases (map older tokens to new ones) */
    --radius-md: var(--admin-radius);
    --transition-base: var(--admin-transition);
    --text-primary: var(--admin-text-primary);
    --text-secondary: var(--admin-text-secondary);
    --bg-tertiary: rgb(0,0,0,0.02);
    --danger-color: var(--admin-danger);
    --primary-color: var(--admin-primary);
}

/* Global box-sizing and overflow guard to prevent horizontal scroll caused by layout calc() */
html {
    box-sizing: border-box;
}
*, *::before, *::after {
    box-sizing: inherit;
}
body {
    overflow-x: hidden;
}

/* ========================================
   Admin Order Details - Modern Professional Design
   ======================================== */

/* Main Container */
.admin-order-details-modern {
    background: var(--admin-bg);
    min-height: 100vh;
    padding: 2rem 1rem;
}

.admin-order-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

/* Header Section */
.admin-order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--admin-border);
    flex-wrap: wrap;
    gap: 1rem;
}

.header-left {
    flex: 1;
    min-width: 250px;
}

.admin-order-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 2rem;
    font-weight: 700;
    color: var(--admin-text-primary);
    margin: 0 0 0.5rem 0;
}

.admin-order-title svg {
    color: var(--admin-primary);
}

.order-id-badge {
    background: linear-gradient(135deg, var(--admin-primary) 0%, #2563eb 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.admin-order-subtitle {
    color: var(--admin-text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Admin Buttons */
.admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.admin-btn svg {
    width: 18px;
    height: 18px;
}

.admin-btn-primary {
    background: linear-gradient(135deg, var(--admin-primary) 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 12px rgb(59 130 246 / 0.3);
}

.admin-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgb(59 130 246 / 0.4);
}

.admin-btn-secondary {
    background: var(--admin-card-bg);
    color: var(--admin-text-primary);
    border: 1px solid var(--admin-border);
}

.admin-btn-secondary:hover {
    background: var(--admin-bg);
    border-color: var(--admin-primary);
}

.admin-btn-outline {
    background: transparent;
    color: var(--admin-primary);
    border: 1px solid var(--admin-primary);
}

.admin-btn-outline:hover {
    background: var(--admin-primary);
    color: white;
}

.admin-btn-block {
    width: 100%;
    justify-content: center;
}

.admin-btn-large {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.admin-btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.admin-btn-tiny {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
}

.admin-btn-success {
    background: var(--admin-success);
    color: white;
}

.admin-btn-success:hover {
    background: #059669;
}

.admin-btn-warning {
    background: var(--admin-warning);
    color: white;
}

.admin-btn-warning:hover {
    background: #d97706;
}

.admin-btn-danger {
    background: var(--admin-danger);
    color: white;
}

.admin-btn-danger:hover {
    background: #dc2626;
}

/* Grid Layout */
.admin-order-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
}

/* Modern Cards */
.admin-modern-card {
    background: var(--admin-card-bg);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.1);
    margin-bottom: 1.5rem;
    overflow: hidden;
    border: 1px solid var(--admin-border);
}

.admin-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--admin-border);
    background: linear-gradient(to right, rgb(59 130 246 / 0.05) 0%, transparent 100%);
}

.admin-card-header svg {
    color: var(--admin-primary);
    flex-shrink: 0;
}

.admin-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--admin-text-primary);
    margin: 0;
    flex: 1;
}

.admin-badge-count {
    background: var(--admin-primary-light);
    color: var(--admin-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.admin-card-body {
    padding: 1.5rem;
}

/* Summary Card Specific */
.admin-summary-card .admin-card-body {
    padding: 0;
}

.admin-info-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.admin-info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--admin-border);
}

.admin-info-row:last-child {
    border-bottom: none;
}

.admin-info-label {
    font-size: 0.85rem;
    color: var(--admin-text-secondary);
    font-weight: 500;
}

.admin-info-value {
    font-size: 0.9rem;
    color: var(--admin-text-primary);
    font-weight: 600;
    text-align: right;
}

.customer-name {
    font-weight: 600;
    color: var(--admin-text-primary);
}

.customer-email,
.customer-phone {
    font-size: 0.85rem;
    color: var(--admin-text-secondary);
    margin-top: 0.25rem;
}

/* Status Badges */
.admin-status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
}

.admin-status-badge.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.admin-status-badge.status-processing {
    background: #dbeafe;
    color: #1e40af;
}

.admin-status-badge.status-completed {
    background: #d1fae5;
    color: #065f46;
}

.admin-status-badge.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.admin-status-badge.status-on-hold {
    background: #e0e7ff;
    color: #3730a3;
}

.admin-status-badge.status-refunded {
    background: #fce7f3;
    color: #831843;
}

.admin-status-badge.status-warning {
    background: #fef3c7;
    color: #92400e;
}

.admin-payment-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--admin-primary-light);
    color: var(--admin-primary);
}

/* Total Section */
.admin-total-section {
    background: linear-gradient(135deg, rgb(59 130 246 / 0.1) 0%, rgb(37 99 235 / 0.05) 100%);
    padding: 1.5rem;
    margin: 0;
    text-align: center;
    border-top: 2px solid var(--admin-border);
}

.admin-total-label {
    font-size: 0.9rem;
    color: var(--admin-text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.admin-total-amount {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--admin-primary) 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-currency {
    font-size: 1.2rem;
    margin-left: 0.25rem;
}

.admin-card-actions {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--admin-border);
}

/* Timeline */
.admin-timeline {
    position: relative;
}

.admin-timeline-item {
    position: relative;
    padding-left: 2rem;
    padding-bottom: 1.5rem;
}

.admin-timeline-item:last-child {
    padding-bottom: 0;
}

.admin-timeline-item::before {
    content: '';
    position: absolute;
    left: 0.4375rem;
    top: 1.5rem;
    bottom: 0;
    width: 2px;
    background: var(--admin-border);
}

.admin-timeline-item:last-child::before {
    display: none;
}

.admin-timeline-marker {
    position: absolute;
    left: 0;
    top: 0.25rem;
    width: 1rem;
    height: 1rem;
    background: var(--admin-primary);
    border-radius: 50%;
    border: 3px solid var(--admin-card-bg);
    box-shadow: 0 0 0 3px var(--admin-primary-light);
}

.admin-timeline-status {
    font-weight: 600;
    color: var(--admin-text-primary);
    margin-bottom: 0.25rem;
}

.admin-timeline-date {
    font-size: 0.85rem;
    color: var(--admin-text-secondary);
    margin-bottom: 0.5rem;
}

.admin-timeline-note {
    font-size: 0.9rem;
    color: var(--admin-text-primary);
    background: var(--admin-bg);
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-top: 0.5rem;
}

.admin-empty-state {
    text-align: center;
    color: var(--admin-text-secondary);
    font-size: 0.9rem;
    padding: 2rem 1rem;
}

/* Items List */
.admin-items-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-item-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.25rem;
    background: var(--admin-bg);
    border-radius: 0.75rem;
    border: 1px solid var(--admin-border);
    transition: all 0.2s ease;
}

.admin-item-card:hover {
    box-shadow: 0 4px 12px rgb(0 0 0 / 0.08);
    transform: translateY(-2px);
}

.admin-item-main {
    display: flex;
    gap: 1rem;
    flex: 1;
}

.admin-item-placeholder {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--admin-primary) 0%, #2563eb 100%);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.admin-item-details {
    flex: 1;
}

.admin-item-name {
    font-weight: 600;
    color: var(--admin-text-primary);
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.admin-item-variant {
    color: var(--admin-text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.admin-item-badges {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.admin-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.admin-badge-success {
    background: #d1fae5;
    color: #065f46;
}

.admin-badge-secondary {
    background: #f1f5f9;
    color: #475569;
}

.admin-badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.admin-badge-info {
    background: #cffafe;
    color: #155e75;
}

.admin-badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.admin-item-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.admin-item-qty {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.qty-label {
    font-size: 0.85rem;
    color: var(--admin-text-secondary);
}

.qty-value {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--admin-text-primary);
}

.admin-item-status {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.admin-item-price {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--admin-primary);
}

/* Two Columns Layout */
.admin-two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.admin-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--admin-text-primary);
    margin: 0 0 1rem 0;
}

.admin-customer-info,
.admin-address-text {
    font-size: 0.9rem;
    color: var(--admin-text-primary);
    line-height: 1.6;
}

.customer-name-bold {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.customer-email-text,
.customer-phone-text {
    color: var(--admin-text-secondary);
    font-size: 0.85rem;
}

.admin-address-text {
    white-space: pre-line;
    color: var(--admin-text-secondary);
}

.admin-notes-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--admin-border);
}

.admin-notes-title {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--admin-text-primary);
}

.admin-notes-text {
    color: var(--admin-text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Payment Items */
.admin-payment-item {
    padding: 1.25rem;
    background: var(--admin-bg);
    border-radius: 0.75rem;
    border: 1px solid var(--admin-border);
    margin-bottom: 1rem;
}

.admin-payment-item:last-child {
    margin-bottom: 0;
}

.admin-payment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.admin-payment-method {
    font-weight: 600;
    color: var(--admin-text-primary);
    font-size: 1rem;
}

.admin-payment-amount {
    color: var(--admin-text-secondary);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.admin-payment-status {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.admin-payment-status.status-completed {
    background: #d1fae5;
    color: #065f46;
}

.admin-payment-status.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.admin-payment-status.status-failed {
    background: #fee2e2;
    color: #991b1b;
}

.admin-payment-attachments {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--admin-border);
}

.admin-payment-attachments strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--admin-text-primary);
    font-size: 0.85rem;
}

.admin-attachment-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--admin-primary);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.5rem 0;
    transition: all 0.2s ease;
}

.admin-attachment-link:hover {
    text-decoration: underline;
    gap: 0.75rem;
}

.admin-attachment-link svg {
    color: var(--admin-primary);
}

.admin-payment-actions {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--admin-border);
    display: flex;
    gap: 0.5rem;
}

/* Manage Form */
.admin-manage-card {
    background: linear-gradient(to bottom, var(--admin-card-bg) 0%, rgb(59 130 246 / 0.02) 100%);
}

.admin-manage-form {
    width: 100%;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: 200px 1fr auto;
    gap: 1rem;
    align-items: end;
}

.admin-form-group {
    display: flex;
    flex-direction: column;
}

.admin-form-group-wide {
    grid-column: span 1;
}

.admin-form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--admin-text-primary);
    margin-bottom: 0.5rem;
}

.admin-form-select,
.admin-form-input {
    padding: 0.625rem 1rem;
    border: 1px solid var(--admin-border);
    border-radius: 0.5rem;
    font-size: 0.9rem;
    background: var(--admin-card-bg);
    color: var(--admin-text-primary);
    transition: all 0.2s ease;
}

.admin-form-select:focus,
.admin-form-input:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px var(--admin-primary-light);
}

.admin-form-actions {
    display: flex;
    justify-content: flex-end;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .admin-order-grid {
        grid-template-columns: 320px 1fr;
    }
}

@media (max-width: 992px) {
    .admin-order-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-order-sidebar {
        order: 2;
    }
    
    .admin-order-main {
        order: 1;
    }
    
    .admin-two-cols {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .admin-order-details-modern {
        padding: 1rem 0.5rem;
    }
    
    .admin-order-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .header-actions {
        width: 100%;
    }
    
    .admin-btn {
        flex: 1;
        justify-content: center;
    }
    
    .admin-order-title {
        font-size: 1.5rem;
    }
    
    .order-id-badge {
        font-size: 1.25rem;
    }
    
    .admin-card-body {
        padding: 1rem;
    }
    
    .admin-item-card {
        flex-direction: column;
        gap: 1rem;
    }
    
    .admin-item-meta {
        align-items: flex-start;
        width: 100%;
    }
    
    .admin-form-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-form-actions {
        justify-content: stretch;
    }
    
    .admin-form-actions .admin-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .admin-order-title {
        font-size: 1.25rem;
        flex-wrap: wrap;
    }
    
    .order-id-badge {
        font-size: 1rem;
    }
    
    .admin-item-main {
        flex-direction: column;
    }
    
    .admin-item-placeholder {
        width: 100%;
        height: 80px;
    }
}

/* ========================================
   Admin Payments Page - Minimal Additions
   ======================================== */

.payment-id-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.payment-id-label svg {
    color: var(--admin-primary);
}

.payment-id-text {
    font-size: 0.85rem;
    color: var(--admin-text-secondary);
    font-weight: 600;
}

.admin-payment-details {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.payment-detail-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: var(--admin-text-secondary);
}

.payment-detail-item svg {
    color: var(--admin-text-secondary);
}

.payment-detail-separator {
    color: var(--admin-border);
    font-weight: 300;
}

.payment-order-link {
    color: var(--admin-primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.payment-order-link:hover {
    text-decoration: underline;
}

.payment-amount-display {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--admin-text-primary);
    margin-bottom: 0.5rem;
    text-align: right;
}

.admin-card-footer-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--admin-border);
    background: var(--admin-bg);
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination-info {
    font-size: 0.9rem;
    color: var(--admin-text-secondary);
}

.pagination-links {
    display: flex;
    gap: 0.25rem;
}

@media (max-width: 768px) {
    .admin-payment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .admin-payment-right {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .payment-amount-display {
        text-align: left;
        margin-bottom: 0;
    }
    
    .admin-card-footer-pagination {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}

/* Additional helper classes to avoid inline styles */
.admin-item-placeholder-primary {
    background: linear-gradient(135deg, var(--admin-primary) 0%, #2563eb 100%);
}

.admin-item-placeholder-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.admin-item-placeholder-cyan {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

.admin-item-placeholder-gray {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
}

.admin-item-name-secondary {
    color: var(--admin-text-secondary);
    font-weight: 400;
}

.admin-payment-amount-currency {
    font-size: 1rem;
    color: var(--admin-text-secondary);
}

.admin-status-flex {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.admin-actions-flex {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.admin-form-grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.admin-form-grid-limit {
    display: grid;
    grid-template-columns: auto 200px auto;
    gap: 1rem;
    align-items: end;
}

.admin-mt-half {
    margin-top: 0.5rem;
}

.admin-mb-1-5 {
    margin-bottom: 1.5rem;
}

.admin-status-unread {
    background: #dbeafe;
    color: #1e40af;
}

.admin-relative {
    position: relative;
}

.admin-rank-badge {
    position: absolute;
    top: -8px;
    left: -8px;
    background: var(--admin-primary);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgb(0, 0, 0 / 0.2);
}

.admin-rank-display {
    font-size: 2rem;
}

.admin-notification-icon {
    margin: 0 auto 1rem;
    opacity: 0.3;
}

.admin-product-link {
    color: var(--admin-primary);
    text-decoration: none;
    font-weight: 600;
}

.admin-product-link:hover {
    text-decoration: underline;
}

.admin-success-text {
    color: var(--admin-success);
}

.admin-flex-end {
    display: flex;
    align-items: flex-end;
}

.admin-placeholder-dynamic {
    position: relative;
}

/* Dark Mode Variables */
body.dark-mode {
    --admin-bg: #0f172a;
    --admin-card-bg: #1e293b;
    --admin-border: #334155;
    --admin-text-primary: #f1f5f9;
    --admin-text-secondary: #94a3b8;
}

/* Base Admin Layout */
.admin-layout,
.modern-admin-layout {
    font-family: var(--admin-font-family, 'Inter', sans-serif);
    background-color: var(--admin-bg);
    min-height: 100vh;
    font-size: 14px;
    color: var(--admin-text-primary);
}

/* Minimal Sidebar (extracted from modern-admin.css) */

/* Sidebar uses --sidebar-width and --sidebar-collapsed-width (declared in top :root) */

.modern-sidebar,
.admin-sidebar {
    background-color: var(--admin-sidebar-bg);
    color: var(--admin-sidebar-text);
    width: var(--sidebar-width);
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    transition: var(--admin-transition);
    z-index: 1000;

    /* make the sidebar a column flex container so header / content / footer stack properly
         and the content area can scroll independently (prevents footer from being unreachable) */
    display: flex;
    flex-direction: column;

    /* ensure the sidebar fills the viewport so flex children can size properly */
     height: 100vh;
    overflow: hidden;

    /* hide outer overflow;
    content area will scroll */;
}

.modern-sidebar.collapsed ~ .main-content,
.admin-sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* RTL: collapsed content margin shifts to the right */
[dir="rtl"] .modern-sidebar.collapsed ~ .main-content,
[dir="rtl"] .admin-sidebar.collapsed ~ .main-content {
    margin-left: 0;
    margin-right: var(--sidebar-collapsed-width);
}

/* RTL: place sidebar on the right on desktop */
[dir="rtl"] .modern-sidebar,
[dir="rtl"] .admin-sidebar {
    left: auto;
    right: 0;
}

/* RTL: content margin compensates sidebar on the right */
[dir="rtl"] .main-content {
    margin-left: 0;
    margin-right: var(--sidebar-width);
}

/* Hide sidebar on desktop when it has 'active' class (should only show on mobile) */
@media (min-width: 993px) {
    .modern-sidebar.active,
    .admin-sidebar.active {
        transform: none !important;
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        position: absolute !important;
        left: -9999px !important;
        z-index: -1 !important;
        width: 0 !important;
        height: 0 !important;
    }
    
    .sidebar-overlay.active {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        z-index: -1 !important;
    }
}

.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;

    /* grow as needed, use the page's scrollbar */
    transition: var(--admin-transition);

    /* occupy the remaining horizontal space after the fixed sidebar */
    width: calc(100% - var(--sidebar-width));
    max-width: calc(100% - var(--sidebar-width));
    padding: 1.25rem 2.0rem;

    /* inner gutters instead of empty page margins */
    overflow-x: hidden;

    /* avoid accidental horizontal overflow */;
}

/* Sidebar structure */
.sidebar-header {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid rgb(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--admin-sidebar-text);
}

.brand-text {
    font-size: 1.25rem;
    font-weight: 700;
    transition: var(--admin-transition);
}

.brand-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 6px;
    flex-shrink: 0;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--admin-sidebar-text);
    font-size: 18px;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
}

.sidebar-toggle:hover {
    background: rgb(255, 255, 255, 0.05);
}

.sidebar-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 1rem 0;
}

.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: rgb(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar-search {
    padding: 0 1rem 1rem 1rem;
}

.search-box {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--admin-text-secondary);
    font-size: 14px;
    z-index: 1;
}

.search-input {
    width: 100%;
    padding: 10px 12px 10px 36px;
    background: rgb(255, 255, 255, 0.03);
    border: 1px solid rgb(255, 255, 255, 0.04);
    border-radius: 8px;
    color: var(--admin-sidebar-text);
    font-size: 14px;
}

.sidebar-nav {
    padding: 0 1rem;
}

.nav-section {
    margin-bottom: 2rem;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--admin-text-secondary);
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    padding: 0 0.75rem;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.25rem;
    color: rgb(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    position: relative;
}

.nav-item:hover {
    color: var(--admin-sidebar-text);
    background: rgb(255, 255, 255, 0.03);
    transform: translateX(2px);
}

.nav-item.active {
    color: var(--admin-sidebar-text);
    background: var(--admin-primary);
    box-shadow: var(--admin-shadow);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: var(--admin-sidebar-text);
    border-radius: 0 2px 2px 0;
}
.nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 16px;
}

.nav-text {
    flex: 1;
    font-weight: 500;
}

.dropdown-arrow {
    margin-left: auto;
}

/* NOTE: general dropdown styles are defined later in the file under 'Dropdowns' - keep a single canonical definition */

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgb(255, 255, 255, 0.05);
    flex-shrink: 0;
}

/* Make dropdown menus inside the sidebar behave as in-flow submenu lists instead of floating panels
   but keep them collapsed by default. They open when the parent has the `show` class. */

/* Sidebar Dropdowns - Complete Fix */
.nav-dropdown,
.nav-dropdown.dropdown {
    position: relative;
    width: 100%;
}

/* Hidden state - no space, no gap */
.nav-dropdown .dropdown-menu {
    position: static !important;
    display: none !important;
    background: transparent;
    border: none;
    box-shadow: none;
    margin: 0;
    padding: 0;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: none;
    line-height: 1;
    transition: none;
}

/* Open state - smooth expansion */
.nav-dropdown.show .dropdown-menu,
.nav-dropdown .dropdown-menu.show,
.nav-dropdown.dropdown.show .dropdown-menu {
    display: block !important;
    max-height: 500px;
    opacity: 1;
    visibility: visible;
    padding: 0;
    margin: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

/* Dropdown items - no gaps */
.nav-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem 0.5rem 3rem;
    margin: 0;
    line-height: 1.2;
    color: var(--admin-sidebar-text);
    text-decoration: none;
    border-radius: 8px;
}

/* First item - no top margin */
.nav-dropdown .dropdown-item:first-child {
    margin-top: 0;
    padding-top: 0.5rem;
}

.nav-dropdown .dropdown-item:hover {
    background: rgb(255, 255, 255, 0.04);
    color: var(--admin-sidebar-text);
}

.nav-dropdown .dropdown-item.active {
    background: var(--admin-primary);
    color: var(--admin-sidebar-text);
}

/* Arrow rotation */
.nav-dropdown > .nav-item .dropdown-arrow {
    transition: transform 0.2s ease;
}

.nav-dropdown.show > .nav-item .dropdown-arrow {
    transform: rotate(180deg);
}
.logout-btn {
    width: 100%;
    justify-content: flex-start;
    color: #ffffff;
    background: var(--admin-danger);
    border: none;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--admin-transition);
    appearance: none;
    -webkit-appearance: none;
}

.logout-btn:hover {
    background: #c53030;

    /* slightly darker red */
    color: #ffffff;
}

.logout-btn:focus {
    outline: 3px solid rgb(239, 68, 68, 0.15);
    outline-offset: 0;
}

/* Top Header (extracted from modern-admin.css) */

/* uses existing admin variables for colors/spacing */
.top-header {
    height: var(--header-height, 56px);
    background: var(--admin-card-bg);
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 2px rgb(0,0,0,0.04);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--admin-text-primary);
    font-size: 18px;
    padding: 8px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--admin-transition);
}

.mobile-menu-toggle:hover {
    background: rgb(0,0,0,0.02);
}

/* Page Header - Removed old styles, using new admin-order-header instead */


/* Minimal Stats Cards (extracted from stats-cards.css) */

/* Stats card variables are declared in the top :root for consistency */

.stats-card {
    background: var(--stats-card-bg);
    border: 1px solid var(--stats-card-border);
    border-radius: var(--stats-card-radius);
    box-shadow: 0 1px 3px rgb(0, 0, 0, 0.08);
    transition: var(--admin-transition);
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.stats-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgb(0, 0, 0, 0.12);
    border-color: var(--stats-primary);
}

.stats-card-body {
    padding: var(--stats-card-padding);
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stats-card-content {
    flex: 1;
    z-index: 2;
}

.stats-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--stats-text-primary);
    margin-bottom: 0.5rem;
    display: block;
}
.stats-label {
    font-size: 0.875rem;
    color: var(--stats-text-secondary);
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}

.stats-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stats-card-footer {
    padding: 0.75rem var(--stats-card-padding);
    background: rgb(0, 0, 0, 0.02);
    border-top: 1px solid var(--stats-card-border);
}

.stats-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--stats-text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.stats-link:hover {
    color: var(--stats-primary);
}

/* color variants (small subset) */
.stats-card-primary {
    border-left:4px solid var(--stats-primary);
}
.stats-card-primary .stats-icon {
    background: linear-gradient(135deg, var(--stats-primary), #60a5fa);
}
.stats-card-success {
    border-left:4px solid var(--stats-success);
}
.stats-card-success .stats-icon {
    background: linear-gradient(135deg, var(--stats-success), #34d399);
}
.stats-card-warning {
    border-left: 4px solid var(--stats-warning);
}

.stats-card-warning .stats-icon {
    background: linear-gradient(135deg, var(--stats-warning), #fbbf24);
}

.stats-card-danger {
    border-left: 4px solid var(--stats-danger);
}

.stats-card-danger .stats-icon {
    background: linear-gradient(135deg, var(--stats-danger), #f87171);
}

.stats-card-info {
    border-left: 4px solid var(--stats-info);
}

.stats-card-info .stats-icon {
    background: linear-gradient(135deg, var(--stats-info), #34d7e6);
}


/* Cards */
.admin-card,
.card {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow);
    margin-bottom: 1.5rem;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--admin-border);
    background-color: transparent;
    font-weight: 600;
    color: var(--admin-text-primary);
}

.card-body {
    padding: 1.5rem;
}

/* Tables */
.admin-table,
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    color: var(--admin-text-primary);
}

.table thead th {
    background-color: var(--admin-bg);
    border-bottom: 2px solid var(--admin-border);
    padding: 0.75rem;
    font-weight: 600;
    color: var(--admin-text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table tbody td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--admin-border);
    vertical-align: middle;
}

.table tbody tr:hover {
    background-color: var(--admin-primary-light);
}

/* Buttons - Base styles (specific button styles in Admin Order Details section above) */
.admin-btn,
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--admin-radius);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--admin-transition);
    min-height: 2.5rem;
}

.btn-primary {
    background-color: var(--admin-primary);
    color: white;
}

/* Dashboard specific styles ------------------------------------------------- */

/* Chart containers */
.chart-container {
    position: relative;
    width: 100%;
}

.chart-container canvas {
    display: block;
    width: 100% !important;
    height: auto !important;
}
.h-400 {
    height: 400px !important;
}

.h-380 {
    height: 380px !important;
}

.pos-relative {
    position: relative;
}

.chart-fallback {
    color: var(--admin-text-secondary);
}

/* Chart controls */
.chart-controls-wrapper {
    gap: 0.5rem;
    align-items: center;
}

.chart-period-buttons .chart-period-btn {
    min-width: 44px;
    padding: .35rem .6rem;
    font-size: .8rem;
}

.chart-period-buttons .chart-period-btn.active {
    background: rgb(0, 0, 0, 0.04);
    border-color: var(--admin-border);
}

/* Loader / fallback states */
.envato-hidden {
    display: none !important;
}

.chart-loading,
.stats-loading,
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.chart-error,
.stats-error {
    color: var(--danger-color);
    padding: .75rem;
    border-radius: 6px;
    background: rgb(239, 68, 68, 0.06);
    border: 1px solid rgb(239, 68, 68, 0.08);
}


/* Top users */
.user-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.user-item {
    display: flex;
    gap: .75rem;
    align-items: center;
    padding: .6rem;
    border-bottom: 1px solid var(--admin-border);
}

.user-info {
    flex: 1;
}
.user-badge .badge {
    padding:.35rem .5rem;
    border-radius:6px;
    font-size:.75rem;
}

/* Progress items (system overview) */
.progress-item {
    padding:.5rem 0;
}
.progress-label {
    font-weight:600;
    color:var(--text-primary);
}
.progress-value {
    font-weight:700;
}
.progress {
    height:10px;
    background: rgb(0,0,0,0.04);
    border-radius:999px;
    overflow:hidden;
}
.progress-bar {
    height:100%;
    display:block;
}
.w-100p {
    width:100%;
}
.w-0p {
    width:0%;
}
.w-50p {
    width:50%;
}

/* Small helpers used by stats cards */
.stats-trend {
    display:flex;
    align-items:center;
    gap:.5rem;
    color:var(--text-secondary);
    font-size:.85rem;
}

/* Responsive tweaks for smaller screens */
@media (max-width: 992px) {
    .main-content { width:100% !important;
    margin-left:0 !important;
    padding: .75rem 1rem;
}
    .chart-controls-wrapper {
    flex-wrap:wrap;
    gap:.5rem;
}
    .page-header {
    padding: .75rem 0;
}
}

/* End dashboard specific styles ------------------------------------------- */

/* Small additions: improve small-screen numbers */

@media (max-width: 576px) {
    .stats-number { font-size: 1.5rem;
}
    .h-400 {
    height: 260px !important;
}
    .h-380 {
    height: 240px !important;
}
    .chart-container canvas {
    height: 100% !important;
}
}

.btn-primary:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
}

.btn-success {
    background-color: var(--admin-success);
    color: white;
}

.btn-warning {
    background-color: var(--admin-warning);
    color: white;
}

.btn-danger {
    background-color: var(--admin-danger);
    color: white;
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
}

.btn-outline-primary {
    border: 1px solid var(--admin-primary);
    background-color: transparent;
    color: var(--admin-primary);
}

.btn-outline-primary:hover {
    background-color: var(--admin-primary);
    color: white;
}

/* Forms */
.form-control,
.form-select {
    padding: 0.75rem;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    font-size: 0.875rem;
    color: var(--admin-text-primary);
    background-color: var(--admin-card-bg);
    transition: var(--admin-transition);
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgb(59, 130, 246, 0.1);
}

.form-label {
    font-weight: 500;
    color: var(--admin-text-primary);
    margin-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--admin-radius);
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

.alert-success {
    background-color: var(--admin-success);
    color: white;
}

.alert-warning {
    background-color: var(--admin-warning);
    color: white;
}

.alert-danger {
    background-color: var(--admin-danger);
    color: white;
}

.alert-info {
    background-color: #06b6d4;
    color: white;
}

/* Badges */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.badge-primary {
    background-color: var(--admin-primary);
    color: white;
}

.badge-success {
    background-color: var(--admin-success);
    color: white;
}

.badge-warning {
    background-color: var(--admin-warning);
    color: white;
}

.badge-danger {
    background-color: var(--admin-danger);
    color: white;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 0.25rem;
    margin: 1rem 0;
}

.page-link {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--admin-border);
    color: var(--admin-text-primary);
    text-decoration: none;
    border-radius: var(--admin-radius);
    transition: var(--admin-transition);
}

.page-link:hover,
.page-item.active .page-link {
    background-color: var(--admin-primary);
    color: white;
    border-color: var(--admin-primary);
}

/* Dropdowns */
.dropdown-menu {
    background-color: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    box-shadow: 0 4px 12px rgb(0, 0, 0, 0.15);
    padding: 0.5rem 0;
    min-width: 160px;
}

/* Loading States */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid transparent;
    border-top: 2px solid currentcolor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg);
}
}

/* Utilities */
.text-center {
    text-align: center;
}
.text-left {
    text-align: left;
}
.text-right {
    text-align: right;
}

.mb-0 {
    margin-bottom: 0;
}
.mb-1 {
    margin-bottom: 0.25rem;
}
.mb-2 {
    margin-bottom: 0.5rem;
}
.mb-3 {
    margin-bottom: 1rem;
}
.mb-4 {
    margin-bottom: 1.5rem;
}

.d-flex {
    display: flex;
}
.d-block {
    display: block;
}
.d-none {
    display: none;
}

.align-items-center {
    align-items: center;
}
.justify-content-between {
    justify-content: space-between;
}
.justify-content-center {
    justify-content: center;
}

.w-100 {
    width: 100%;
}
.h-100 {
    height: 100%;
}

/* Responsive Design */
@media (max-width: 992px) {
    /* Collapse sidebar into a slide-over on smaller screens */
    .admin-sidebar,
    .modern-sidebar {
        transform: translateX(-100%);
    position: fixed;
    z-index: 1100;
    left: 0;
    top: 0;
    height: 100%;
    transition: var(--admin-transition);
}

    /* RTL: slide from right on mobile */
    [dir="rtl"] .admin-sidebar,
    [dir="rtl"] .modern-sidebar {
        transform: translateX(100%);
        right: 0;
        left: auto;
    }

    .admin-sidebar.active,
    .modern-sidebar.active {
    transform: translateX(0);
}

    /* RTL: active state also resets transform */
    [dir="rtl"] .admin-sidebar.active,
    [dir="rtl"] .modern-sidebar.active {
        transform: translateX(0);
    }

    /* make main content full width when sidebar is hidden */
    .main-content {
    margin-left: 0 !important;

    /* override desktop calc width and use full viewport minus any safe gutters */
        width: 100% !important;
    max-width: 100% !important;
    padding: 0.75rem 0.9rem !important;

    /* ensure content flows naturally (no forced full viewport height) */
        min-height: auto;
    overflow-x: hidden;
}

    /* show mobile toggle in header */
    .mobile-menu-toggle {
    display: inline-flex;
}

    /* overlay when sidebar opens */
    .sidebar-overlay {
    display: none;
    position: fixed;
    inset:0;
    background: rgb(0,0,0,0.45);
    z-index:1050;
}
    .admin-sidebar.active + .sidebar-overlay,
    .modern-sidebar.active + .sidebar-overlay,
    .sidebar-overlay.active {
    display:block;
}
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .admin-layout {
        background-color: #1a1a1a;
    color: #ffffff;
}
    
    .admin-card {
    background: #2d2d2d;
    color: #ffffff;
}
}


/* Header Items */
.header-item {
    position: relative;
}

.header-btn {
    background   : none;
    border       : none;
    padding      : 8px 12px;
    border-radius: var(--radius-md);
    cursor       : pointer;
    transition   : var(--transition-base);
    color        : var(--text-secondary);
    font-size    : 14px;
    display      : flex;
    align-items  : center;
    gap          : 0.5rem;
}

.header-btn:hover {
    background: var(--bg-tertiary);
    color     : var(--text-primary);
}

body.dark-mode .header-btn:hover {
    background: rgb(59, 130, 246, 0.15) !important;
    color: var(--primary-color) !important;
}

.notification-btn {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--danger-color);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* User Menu */
.user-menu-btn {
    display      : flex;
    align-items  : center;
    gap          : 0.75rem;
    padding      : 6px 12px;
    background   : none;
    border       : none;
    border-radius: var(--radius-md);
    cursor       : pointer;
    transition   : var(--transition-base);
}

.user-menu-btn:hover {
    background: var(--bg-tertiary);
}

body.dark-mode .user-menu-btn:hover {
    background: rgb(59, 130, 246, 0.15) !important;
}



.user-name {
    font-weight: 500;
    color      : var(--text-primary);
    font-size  : 14px;
}


.user-avatar {
    width          : 28px;
    height         : 28px;
    border-radius  : 50%;
    background     : linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display        : flex;
    align-items    : center;
    justify-content: center;
    color          : white;
    font-weight    : 700;
    font-size      : 1rem;
    margin-right   : 1rem;
    flex-shrink    : 0;
    border         : 3px solid white;
    box-shadow     : 0 4px 12px rgb(0, 0, 0, 0.15);
    transition     : all 0.3s ease;
}

.user-avatar:hover {
    transform : scale(1.1);
    box-shadow: 0 8px 20px rgb(0, 0, 0, 0.2);
}

/* Shared language tabs styling for admin create/edit forms */
.lang-tabs-wrapper {
    background:#fff;
}
.lang-tabs {
    border-bottom:0 !important;
}
.lang-tabs .nav-link {
    white-space:nowrap;
    border:1px solid var(--bs-border-color);
    border-radius:50rem;
    background:#f8f9fa;
    transition:.15s;
    font-weight:500;
}
.lang-tabs .nav-link:not(.active):hover {
    background:#eef2f5;
}
.lang-tabs .nav-link.active {
    background:var(--bs-primary);
    color:#fff;
    border-color:var(--bs-primary);
}

/* Allow variant color override via data attribute */
[data-lang-tabs-variant="success"] .lang-tabs .nav-link.active {
    background:var(--bs-success);
    border-color:var(--bs-success);
}
[data-lang-tabs-variant="success"] .lang-tabs .nav-link:not(.active):hover {
    background:#e6f7ef;
}
.lang-tabs::-webkit-scrollbar {
    height:6px;
}
.lang-tabs::-webkit-scrollbar-track {
    background:transparent;
}
.lang-tabs::-webkit-scrollbar-thumb {
    background:rgb(0,0,0,.25);
    border-radius:3px;
}

@media (max-width: 992px){
    .lang-tabs .nav-link { font-size:.7rem;
    padding:.35rem .75rem;
}
}

/* Vertical rhythm adjustments */
.tab-content .row.g-3 > [class*='col-'] .form-label {
    margin-bottom:.25rem;
}
.tab-content textarea.form-control-sm {
    min-height:70px;
}
.tab-content input.form-control-sm, .tab-content textarea.form-control-sm {
    margin-bottom:2px;
}

/* Optional highlight for AI-filled fields (used elsewhere) */
.ai-filled {
    animation:aiPulse 2.5s ease-in-out;
    background:#e8f7ff!important;
}

@keyframes aiPulse {
    0%{box-shadow:0 0 0 0 rgb(13,110,253,.4);
}50%{
    box-shadow:0 0 0 4px rgb(13,110,253,.15);
}100%{
    box-shadow:0 0 0 0 rgb(13,110,253,0);
} }


/* ===== Modern Card ( from dashboard.css & admin-refinements.css) ===== */
/* Old modern-card styles removed - using admin-modern-card for order pages */
.modern-card {
    background: var(--adm-surface, #ffffff);
    border-radius: 16px;
    box-shadow: 0 4px 16px rgb(0, 0, 0, 0.08);
    border: 1px solid var(--adm-border, #e5e7eb);
    transition: all 0.3s ease;
}

.modern-card .card-header {
    background: var(--adm-surface-alt, #f1f5f9);
    border-bottom: 1px solid var(--adm-border, #e5e7eb);
    padding: 1.25rem 1.5rem;
    border-radius: 16px 16px 0 0;
}

.modern-card .card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--adm-text, #1e293b);
    margin-bottom: 0;
}

.modern-card>.card-header {
    background   : var(--adm-surface);
    border-bottom: 1px solid var(--adm-border);
    padding      : .9rem 1.1rem;
}

.modern-card>.card-body {
    padding: 1.1rem 1.1rem;
}

.modern-card>.card-footer {
    background: var(--adm-surface-alt);
    border-top: 1px solid var(--adm-border);
    padding   : .75rem 1.1rem;
}

body.dark-mode .modern-card {
    box-shadow: 0 1px 2px rgb(0, 0, 0, .4);
}

/* ===== End modern-card ===== */

/* -------------------------------------------------------------------------
   User Balance page refinements
   - Small, non-invasive rules to improve spacing, typography and avatars
   - Kept here to follow the project's rule: no new CSS files
------------------------------------------------------------------------- */
.balance-overview {
    padding: 1rem 1.25rem;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:1rem;
}
.balance-overview .balance-amount {
    display:flex;
    flex-direction:column;
}
.balance-label {
    color: var(--text-secondary);
    font-weight:600;
    font-size:0.95rem;
}
.balance-value {
    font-size:2.25rem;
    font-weight:800;
    color:var(--text-primary);
    line-height:1;
}
.balance-value small {
    font-size:0.85rem;
    color:var(--text-secondary);
    margin-left:0.5rem;
}

.balance-actions .action-buttons .btn {
    min-width:130px;
}
.balance-actions .action-buttons .btn i {
    margin-right:0.5rem;
}

.history-placeholder .empty-state {
    padding:2rem;
    color:var(--text-secondary);
}

.user-profile {
    display:flex;
    gap:1rem;
    align-items:center;
}
.user-profile .user-avatar {
    width:64px;
    height:64px;
    border-radius:12px;
    background:var(--admin-primary-light);
    color:var(--admin-primary);
    font-weight:700;
    font-size:1.25rem;
    display:flex;
    align-items:center;
    justify-content:center;
}
.user-profile .user-info h4 {
    margin:0;
    font-size:1.05rem;
    font-weight:700;
}
.user-profile .user-info p {
    margin:0;
    color:var(--text-secondary);
    font-size:0.9rem;
}

.quick-actions .btn {
    text-align:left;
}

/* Make stats-number slightly larger on balance page cards for emphasis */
.card .stats-number {
    font-size:1.6rem;
}

@media (max-width: 768px) {
    .balance-overview { flex-direction:column;
    align-items:flex-start;
}
    .user-profile {
    align-items:flex-start;
}
}

/* Toast system for admin */
.toast-stack {
    position        : fixed;
    top             : 80px;
    inset-inline-end: 20px;
    display         : flex;
    flex-direction  : column;
    gap             : 8px;
    z-index         : 9999;
    max-width       : 280px;
    pointer-events  : none;
}

[dir='rtl'] .toast-stack {
    inset-inline-end  : auto;
    inset-inline-start: 20px;
}

.toast {
    background   : #111;
    color        : #ffe500;
    padding      : .7rem .85rem;
    border-radius: 10px;
    font-size    : .8rem;
    font-weight  : 500;
    box-shadow   : 0 6px 18px rgb(0, 0, 0, .3);
    opacity      : 0;
    transform    : translateY(-6px);
    transition   : .35s cubic-bezier(.4, .2, .3, 1);
    cursor       : pointer;
    user-select  : none;
    position     : relative;
    z-index      : 10000;
    pointer-events: auto;
}

.toast.in {
    opacity  : 1;
    transform: translateY(0);
}

.toast.out {
    opacity  : 0;
    transform: translateY(-6px);
}

.toast-success {
    background: #0a8a3f;
    color     : #fff;
}

.toast-error {
    background: #c62828;
    color     : #fff;
}

.toast-info {
    background: #0055d4;
    color     : #fff;
}

/* Enhanced Header Styles */
.admin-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-header-icon {
    width: 64px;
    height: 64px;
    background: rgb(255 255 255 / 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgb(255 255 255 / 0.2);
}

.admin-header-text {
    flex: 1;
}

.admin-header-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.admin-stat-item-mini {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgb(255 255 255 / 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgb(255 255 255 / 0.2);
    font-size: 0.875rem;
    font-weight: 500;
    color: rgb(255 255 255 / 0.9);
}

.admin-action-group {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.admin-btn-large {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgb(0 0 0 / 0.15);
    transition: all 0.3s ease;
}

.admin-btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgb(0 0 0 / 0.2);
}

/* Enhanced Stats Cards */
.admin-stat-card {
    background: var(--admin-card-bg);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgb(0 0 0 / 0.08);
    border: 1px solid var(--admin-border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.admin-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--admin-primary), var(--admin-primary-light));
    border-radius: 16px 16px 0 0;
}

.admin-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgb(0 0 0 / 0.12);
}

.admin-stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.admin-stat-icon-wrapper {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--admin-primary), var(--admin-primary-light));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.admin-stat-badge {
    width: 32px;
    height: 32px;
    background: rgb(16 185 129 / 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--admin-success);
}

.admin-stat-content {
    margin-bottom: 1rem;
}

.admin-stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--admin-text-primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.admin-stat-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--admin-text-primary);
    margin-bottom: 0.25rem;
}

.admin-stat-description {
    font-size: 0.875rem;
    color: var(--admin-text-secondary);
}

.admin-stat-footer {
    border-top: 1px solid var(--admin-border);
    padding-top: 1rem;
}

.admin-stat-trend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.admin-stat-trend-up {
    color: var(--admin-success);
}

.admin-stat-trend-neutral {
    color: var(--admin-text-secondary);
}

/* Enhanced Grid Layout */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Enhanced Filter Styles */
.admin-card-subtitle {
    font-size: 0.875rem;
    color: var(--admin-text-secondary);
    margin-top: 0.25rem;
}

.admin-form-group-search {
    grid-column: 1 / -1;
}

.admin-input-group {
    position: relative;
}

.admin-form-input-search {
    padding-right: 3rem;
}

.admin-input-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--admin-text-secondary);
    pointer-events: none;
}

.admin-filter-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--admin-border);
}

.admin-filter-buttons {
    display: flex;
    gap: 1rem;
}

.admin-btn-filter {
    background: linear-gradient(135deg, var(--admin-primary), #2563eb);
    border: none;
    box-shadow: 0 4px 12px rgb(59 130 246 / 0.3);
}

.admin-btn-filter:hover {
    background: linear-gradient(135deg, #2563eb, var(--admin-primary));
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgb(59 130 246 / 0.4);
}

.admin-btn-clear {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    color: var(--admin-text-secondary);
}

.admin-btn-clear:hover {
    background: #f8fafc;
    border-color: var(--admin-primary);
    color: var(--admin-primary);
}

.admin-filter-info {
    display: flex;
    align-items: center;
    gap:  0.5rem;
}

.admin-filter-count {
    font-size: 0.875rem;
    color: var(--admin-text-secondary);
    background: rgb(59 130 246 / 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
}

/* Enhanced Form Grid */
.admin-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .admin-header-stats {
        gap: 0.75rem;
    }
    
    .admin-stat-item-mini {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .admin-action-group {
        flex-direction: column;
        width: 100%;
    }
    
    .admin-btn-large {
        width: 100%;
        justify-content: center;
    }
    
    .admin-stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .admin-filter-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .admin-filter-actions {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .admin-filter-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .admin-btn-filter,
    .admin-btn-clear {
        flex: 1;
    }
}

/* Enhanced Table Styles */
.admin-table {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.1);
}

.admin-table thead th {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-bottom: 2px solid var(--admin-border);
    font-weight: 600;
    color: var(--admin-text-primary);
    padding: 1rem;
    text-align: left;
}

.admin-table tbody td {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.admin-table tbody tr:hover {
    background-color: #f8fafc;
}

.admin-code {
    background: #f1f5f9;
    color: #475569;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    border: 1px solid #e2e8f0;
}

.admin-stock-value {
    font-weight: 600;
    color: var(--admin-text-primary);
    font-size: 1rem;
}

.admin-variations-table {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 0.5rem;
    border: 1px solid #e2e8f0;
}

.admin-variations-table .table {
    margin-bottom: 0;
    background: white;
    border-radius: 6px;
    overflow: hidden;
}

.admin-variations-table .table th {
    background: #f1f5f9;
    font-size: 0.875rem;
    padding: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.admin-variations-table .table td {
    padding: 0.75rem;
    font-size: 0.875rem;
    border-bottom: 1px solid #f1f5f9;
}

.admin-text-muted {
    color: var(--admin-text-secondary);
    font-style: italic;
}

/* Role Statistics Styles */
.admin-role-stats {
    padding: 1rem 0;
}

.admin-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--admin-text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--admin-border);
}

.admin-role-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-role-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.admin-role-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-role-count {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.admin-role-count strong {
    font-size: 1.25rem;
    color: var(--admin-text-primary);
}

.admin-role-percentage {
    font-size: 0.875rem;
    color: var(--admin-text-secondary);
    font-weight: 500;
}

.admin-role-progress {
    width: 100%;
}

.admin-progress-bar {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.admin-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--admin-primary), #2563eb);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Chart Container */
.chart-container {
    position: relative;
    width: 100%;
}

.chart-container.h-400 {
    height: 400px;
}

.chart-container.h-380 {
    height: 380px;
}

.toast-warning {
    background: #ff9800;
    color     : #111;
}

/* Admin Table Styles */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--admin-bg-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgb(0 0 0 / 0.1);
}

.admin-table thead {
    background: linear-gradient(135deg, var(--admin-primary), var(--admin-primary-light));
    color: white;
}

.admin-table thead th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
}

.admin-table tbody tr {
    border-bottom: 1px solid var(--admin-border);
    transition: all 0.2s ease;
}

.admin-table tbody tr:hover {
    background: var(--admin-bg-hover);
}

.admin-table tbody tr:last-child {
    border-bottom: none;
}

.admin-table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border: none;
}

.admin-code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.75rem;
    background: var(--admin-bg-secondary);
    color: var(--admin-text-primary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--admin-border);
}

.admin-stock-value {
    font-weight: 600;
    color: var(--admin-success);
    font-size: 0.875rem;
}

.admin-variations-table {
    margin-top: 0.5rem;
    width: 100%;
    border-collapse: collapse;
}

.admin-variations-table th,
.admin-variations-table td {
    padding: 0.5rem;
    font-size: 0.75rem;
    border: 1px solid var(--admin-border);
}

.admin-variations-table th {
    background: var(--admin-bg-light);
    font-weight: 600;
}

.admin-text-muted {
    color: var(--admin-text-muted);
    font-size: 0.875rem;
}

/* Settings Page Specific Styling */
.admin-settings-form .admin-form-input {
    width: 100%;
    min-height: 40px;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.admin-settings-form .admin-form-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgb(102 126 234 / 0.1);
    outline: none;
}

.admin-settings-form .admin-form-group {
    margin-bottom: 1.5rem;
}

.admin-settings-form .admin-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.admin-settings-form .admin-form-grid .admin-form-group {
    margin-bottom: 0;
}

.admin-settings-form .admin-form-group:last-child {
    margin-bottom: 0;
}

.admin-settings-form textarea.admin-form-input {
    min-height: 100px;
    resize: vertical;
}

.admin-settings-form select.admin-form-input {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.admin-settings-form input[type="file"].admin-form-input {
    padding: 0.5rem;
    background-color: #f8f9fa;
}

.admin-settings-form .admin-text-muted {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.admin-settings-form .admin-text-danger {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #dc2626;
}

/* Responsive adjustments for settings form */
@media (max-width: 768px) {
    .admin-settings-form .admin-form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .admin-settings-form .admin-form-group {
        margin-bottom: 1rem;
    }
}

/* Fix for specific input types */
.admin-settings-form input[type="text"],
.admin-settings-form input[type="email"],
.admin-settings-form input[type="number"],
.admin-settings-form input[type="file"],
.admin-settings-form select,
.admin-settings-form textarea {
    width: 100% !important;
    min-height: 40px;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.admin-settings-form textarea {
    min-height: 100px;
    resize: vertical;
}

.admin-settings-form select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    appearance: none;
}

.admin-settings-form input[type="file"] {
    padding: 0.5rem;
    background-color: #f8f9fa;
    cursor: pointer;
}

.admin-settings-form input:focus,
.admin-settings-form select:focus,
.admin-settings-form textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgb(102 126 234 / 0.1);
    outline: none;
}

/* Form Pages Specific Styling */
.admin-modern-card .admin-card-body .admin-form-group {
    margin-bottom: 1.5rem;
}

.admin-modern-card .admin-card-body .admin-form-group:last-child {
    margin-bottom: 0;
}

.admin-modern-card .admin-card-body .admin-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.admin-modern-card .admin-card-body .admin-form-grid .admin-form-group {
    margin-bottom: 0;
}

.admin-modern-card .admin-card-body .admin-form-grid .admin-form-group:last-child {
    margin-bottom: 0;
}

/* Single column form */
.admin-modern-card .admin-card-body .admin-form-group-wide {
    grid-column: 1 / -1;
}

/* Form inputs styling */
.admin-modern-card .admin-card-body .admin-form-input {
    width: 100%;
    min-height: 40px;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.admin-modern-card .admin-card-body .admin-form-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgb(102 126 234 / 0.1);
    outline: none;
}

.admin-modern-card .admin-card-body textarea.admin-form-input {
    min-height: 100px;
    resize: vertical;
}

.admin-modern-card .admin-card-body select.admin-form-input {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    appearance: none;
}

.admin-modern-card .admin-card-body input[type="file"].admin-form-input {
    padding: 0.5rem;
    background-color: #f8f9fa;
    cursor: pointer;
}

/* Form labels */
.admin-modern-card .admin-card-body .admin-form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
}

/* Helper text */
.admin-modern-card .admin-card-body .admin-text-muted {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.4;
}

.admin-modern-card .admin-card-body .admin-text-danger {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #dc2626;
}

/* Checkboxes */
.admin-modern-card .admin-card-body .form-check {
    margin-bottom: 1rem;
}

.admin-modern-card .admin-card-body .form-check:last-child {
    margin-bottom: 0;
}

.admin-modern-card .admin-card-body .form-check-input {
    margin-right: 0.5rem;
}

.admin-modern-card .admin-card-body .form-check-label {
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

/* Card footer */
.admin-modern-card .admin-card-footer {
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 12px 12px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .admin-modern-card .admin-card-body .admin-form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .admin-modern-card .admin-card-body .admin-form-group {
        margin-bottom: 1rem;
    }
}

/* User Profile Styling */
.admin-user-profile {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 0;
}

.admin-user-avatar {
    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: 1.5rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgb(102 126 234 / 0.3);
}

.admin-user-info {
    flex: 1;
}

.admin-user-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 0.5rem 0;
}

.admin-user-email {
    color: #718096;
    font-size: 1rem;
    margin: 0 0 1rem 0;
}

.admin-user-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.admin-user-status,
.admin-user-role {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-user-actions {
    margin-top: 1rem;
}

/* User Stats Grid */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.admin-stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 12px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.admin-stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgb(0 0 0 / 0.1);
}

.admin-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.admin-stat-content {
    flex: 1;
}

.admin-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 0.25rem 0;
}

.admin-stat-label {
    font-size: 0.875rem;
    color: #718096;
    margin: 0;
}

/* Admin Login Page Styles */
.admin-login-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.admin-login-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.admin-login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.admin-login-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: rgb(255 255 255 / 0.1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgb(255 255 255 / 0.2);
}

.admin-login-title {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 2px 4px rgb(0 0 0 / 0.1);
}

.admin-login-subtitle {
    font-size: 1rem;
    color: rgb(255 255 255 / 0.8);
    margin: 0;
}

.admin-login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.admin-form-actions {
    margin-top: 1rem;
}

.admin-btn-full {
    width: 100%;
    justify-content: center;
}

.admin-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-checkbox {
    display: none;
}

.admin-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--admin-text-secondary);
    transition: var(--admin-transition);
}

.admin-checkbox-label:hover {
    color: var(--admin-text-primary);
}

.admin-checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid var(--admin-border);
    border-radius: 4px;
    background: white;
    position: relative;
    transition: var(--admin-transition);
    flex-shrink: 0;
}

.admin-checkbox:checked + .admin-checkbox-label .admin-checkbox-custom {
    background: var(--admin-primary);
    border-color: var(--admin-primary);
}

.admin-checkbox:checked + .admin-checkbox-label .admin-checkbox-custom::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.admin-checkbox-text {
    font-weight: 500;
}

.admin-form-error {
    color: var(--admin-danger);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: block;
}

/* Notification Styles */
.notification-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.notification-item:hover {
    background-color: #f8fafc;
}

.notification-item.unread {
    background-color: #e3f2fd;
    border-left: 3px solid #2196f3;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.notification-title {
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    margin: 0;
}

.notification-message {
    color: #6b7280;
    font-size: 0.75rem;
    margin: 0;
    line-height: 1.4;
}

.notification-time {
    color: #9ca3af;
    font-size: 0.7rem;
    margin: 0;
}

.notification-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* Dropdown menu adjustments for notifications */
.dropdown-menu {
    min-width: 320px;
    max-width: 400px;
    box-shadow: 0 10px 25px rgb(0 0 0 / 0.1);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
}

.dropdown-header {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
}

/* Mark as read button styling */
.btn-link {
    border: none;
    background: none;
    color: #6b7280;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-link:hover {
    color: #374151;
    background-color: #f3f4f6;
}

/* Language switch styles */
.language-switch-form {
    display: inline;
}

.language-switch-btn {
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    padding: 0.375rem 1.5rem;
}

/* Icon sizes */
.icon-large {
    font-size: 48px;
}

.icon-medium {
    font-size: 20px;
    color: white;
}

.icon-xlarge {
    font-size: 64px;
}

