/* ===== Fentec Mobility — Industrial Luxury Design System ===== */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&display=swap');

/* ===== Design Tokens ===== */
:root {
    /* — Brand: Dominant Orange Story — */
    --color-primary: #ff6b35;
    --color-primary-dark: #e0551f;
    --color-primary-light: #ff8c42;
    --color-primary-glow: #ffab73;
    --color-primary-bg: rgba(255, 107, 53, 0.08);
    --color-primary-shadow: rgba(255, 107, 53, 0.3);
    --gradient-primary: linear-gradient(135deg, #ff6b35 0%, #ff8c42 50%, #ffab73 100%);
    --gradient-primary-reverse: linear-gradient(135deg, #ff8c42 0%, #ff6b35 100%);
    --gradient-header: linear-gradient(160deg, #ff6b35 0%, #ff8c42 60%, #e0551f 100%);

    /* — Neutral: Charcoal System — */
    --color-charcoal: #1a1a2e;
    --color-charcoal-light: #2d2d44;
    --color-surface: #f5f5f7;
    --color-surface-elevated: #ffffff;

    /* — Semantic — */
    --color-success: #10b981;
    --color-success-light: #d1fae5;
    --color-success-dark: #065f46;
    --color-danger: #ef4444;
    --color-danger-light: #fee2e2;
    --color-danger-dark: #991b1b;
    --color-warning: #f59e0b;
    --color-warning-light: #fef3c7;
    --color-warning-dark: #92400e;
    --color-info: #0ea5e9;
    --color-info-light: #e0f2fe;
    --color-info-dark: #075985;

    /* — Typography — */
    --color-text: #1a1a2e;
    --color-text-light: #555568;
    --color-text-muted: #9ca3af;
    --font-family: 'Cairo', sans-serif;
    --font-display: 900;
    --font-heading: 700;
    --font-body: 500;
    --font-caption: 400;

    /* — Layout — */
    --color-bg: #f5f5f7;
    --color-bg-white: #ffffff;
    --color-border: #e5e7eb;
    --color-border-light: #f3f4f6;

    /* — Radii — */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-pill: 50px;
    --radius-circle: 50%;

    /* — Depth (narrative shadows) — */
    --shadow-subtle: 0 1px 3px rgba(26, 26, 46, 0.04);
    --shadow-sm: 0 2px 8px rgba(26, 26, 46, 0.06);
    --shadow-md: 0 4px 16px rgba(26, 26, 46, 0.08);
    --shadow-lg: 0 8px 32px rgba(26, 26, 46, 0.1);
    --shadow-xl: 0 16px 48px rgba(26, 26, 46, 0.14);
    --shadow-primary: 0 4px 24px rgba(255, 107, 53, 0.2);
    --shadow-primary-hover: 0 8px 32px rgba(255, 107, 53, 0.35);

    /* — Spacing Rhythm (8px base) — */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* — Transitions — */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 0.15s;
    --duration-normal: 0.3s;
    --duration-slow: 0.5s;
}

/* ===== Global Reset ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    font-weight: var(--font-body);
    background: var(--color-bg);
    min-height: 100vh;
    color: var(--color-text);
    direction: rtl;
    text-align: right;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* — Noise Grain Overlay (subtle texture) — */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
}

/* ===== Container ===== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: var(--space-lg);
}

/* ===== Header ===== */
.header {
    background: var(--gradient-header);
    color: white;
    padding: var(--space-xl) var(--space-lg);
    text-align: center;
    box-shadow: var(--shadow-primary);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-lg);
    position: relative;
    overflow: hidden;
}

/* Header decorative accent line */
.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
}

.logo {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: var(--font-display);
    color: white;
    margin-left: var(--space-lg);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header h1 {
    color: white;
    font-size: 2.2rem;
    font-weight: var(--font-display);
    margin-bottom: var(--space-xs);
    letter-spacing: -0.02em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.header p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem;
    font-weight: var(--font-caption);
}

/* ===== Buttons ===== */
.btn {
    padding: 10px 22px;
    border: none;
    border-radius: var(--radius-pill);
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-primary);
    letter-spacing: 0.3px;
}

.btn-primary:hover {
    box-shadow: var(--shadow-primary-hover);
}

.btn-secondary {
    background: var(--color-charcoal-light);
    color: white;
}

.btn-warning {
    background: var(--color-primary);
    color: white;
}

.btn-success {
    background: var(--color-charcoal);
    color: white;
    box-shadow: 0 4px 12px rgba(26, 26, 46, 0.2);
}

.btn-danger {
    background: var(--color-danger);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.btn-edit {
    background: var(--color-charcoal);
    color: white;
}

.btn-info {
    background: var(--color-primary);
    color: white;
    box-shadow: var(--shadow-primary);
}

/* ===== Tables ===== */
.table-container {
    background: var(--color-bg-white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
}

.table-header {
    background: var(--gradient-header);
    color: white;
    padding: var(--space-lg);
}

.table-header h2 {
    font-size: 1.5rem;
    font-weight: var(--font-heading);
    display: flex;
    align-items: center;
    gap: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-bg-white);
}

th,
td {
    padding: 14px 12px;
    text-align: center;
    border-bottom: 1px solid var(--color-border-light);
    color: var(--color-text);
}

th {
    background: var(--color-surface);
    font-weight: var(--font-heading);
    color: var(--color-text-light);
    position: sticky;
    top: 0;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

tbody tr {
    transition: background var(--duration-fast) ease;
}

tbody tr:hover {
    background: var(--color-primary-bg);
}

/* ===== Status Badges ===== */
.status {
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-block;
}

.status-active {
    background: linear-gradient(135deg, var(--color-success) 0%, #34d399 100%);
    color: white;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.status-overdue {
    background: linear-gradient(135deg, var(--color-warning) 0%, #fbbf24 100%);
    color: var(--color-charcoal);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.85rem;
}

.status-ended {
    background: var(--color-charcoal-light);
    color: rgba(255, 255, 255, 0.85);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.85rem;
}

.status-unlimited {
    background: #d4edda;
    color: #155724;
}

/* ===== Forms ===== */
.form-container {
    background: var(--color-bg-white);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
}

.form-container h3 {
    color: var(--color-text);
    margin-bottom: var(--space-lg);
    font-size: 1.3rem;
    font-weight: var(--font-heading);
    text-align: center;
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: var(--space-sm);
}

.form-row {
    display: flex;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 250px;
}

.form-group label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: var(--font-body);
    transition: all var(--duration-normal) var(--ease-out);
    background: var(--color-bg-white);
    color: var(--color-text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-bg);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    margin-top: var(--space-xl);
}

/* أزرار الحالة والخطورة */
.status-btn {
    padding: 6px 12px;
    border-radius: 15px;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-block;
    text-align: center;
    min-width: 80px;
}

/* حالات الأعطال */
.status-جديد {
    background: #e3f2fd;
    color: #1565c0;
}

.status-قيد-الإصلاح {
    background: #fff3e0;
    color: #ef6c00;
}

.status-مكتمل {
    background: #e8f5e8;
    color: #2e7d32;
}

.status-مؤجل {
    background: #fce4ec;
    color: #c2185b;
}

/* درجات الخطورة */
.severity-منخفض {
    background: #e8f5e8;
    color: #2e7d32;
}

.severity-متوسط {
    background: #fff3e0;
    color: #ef6c00;
}

.severity-عالي {
    background: #ffebee;
    color: #d32f2f;
}

.severity-حرج {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* أزرار الإجراءات */
.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-buttons .btn {
    padding: 8px 16px;
    font-size: 0.9rem;
    min-width: 70px;
}

/* ===== Modals ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 46, 0.4);
    z-index: 1000;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--color-bg-white);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--color-border);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-border);
}

.modal-header h3 {
    color: var(--color-text);
    font-size: 1.3rem;
    font-weight: var(--font-heading);
}

.close-btn {
    background: var(--color-surface);
    border: none;
    border-radius: var(--radius-circle);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--color-text-muted);
    transition: all var(--duration-fast) ease;
}

.close-btn:hover {
    background: var(--color-primary);
    color: white;
}

/* تحسينات للجوال */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }

    .form-group {
        min-width: 100%;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .btn {
        width: 100%;
        margin-bottom: 5px;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
    }

    .table-container {
        overflow-x: auto;
    }

    table {
        min-width: 800px;
    }
}

.status-stopped {
    background: #fff3cd;
    color: #856404;
}

/* النماذج */
.form-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.8s ease-out;
}

.form-title {
    color: #333;
    margin-bottom: 30px;
    font-size: 2rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 15px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-family: 'Cairo', Arial, sans-serif;
    font-weight: 600;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

/* المودال */
.stop-delay-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: white;
    margin: 15% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    animation: slideUp 0.4s ease-out;
}

.modal-content h3 {
    color: #333;
    margin-bottom: 20px;
    font-weight: 900;
}

/* الحالة الفارغة */
.empty-state {
    text-align: center;
    padding: 60px;
    color: #666;
}

.empty-state h3 {
    margin-bottom: 15px;
    font-weight: 900;
    color: #333;
}

/* الإجراءات */
.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.actions .btn {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* ===== Action Toolbar ===== */
.action-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
    padding: 16px;
    margin-bottom: 20px;
    background: var(--color-bg-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

.action-toolbar .btn {
    white-space: nowrap;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .action-toolbar {
        gap: 8px;
        padding: 12px;
    }

    .action-toolbar .btn {
        flex: 1 1 calc(50% - 8px);
        min-width: 140px;
        text-align: center;
        justify-content: center;
        font-size: 0.8rem;
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .action-toolbar .btn {
        flex: 1 1 100%;
        min-width: unset;
    }
}

/* ===== Purposeful Animations (sparse & high-impact) ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.85;
    }
}

/* تصميم الهاتف المحمول - تحسينات شاملة */
@media (max-width: 768px) {
    .container {
        padding: 5px;
        margin: 0;
    }

    .header {
        padding: 15px 10px;
        text-align: center;
        margin-bottom: 15px;
        border-radius: 10px;
    }

    .header h1 {
        font-size: 1.6rem;
        margin-bottom: 5px;
    }

    .header p {
        font-size: 0.9rem;
    }

    /* تحسين النماذج للجوال */
    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .form-container {
        padding: 20px 15px;
        margin: 10px 0;
        border-radius: 15px;
    }

    /* تحسين الجدول للجوال */
    .table-container {
        margin: 10px 0;
        border-radius: 15px;
        overflow: hidden;
    }

    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100vw;
    }

    table {
        min-width: 900px;
        font-size: 0.8rem;
    }

    th,
    td {
        padding: 8px 4px;
        white-space: nowrap;
        vertical-align: middle;
    }

    th {
        font-size: 0.75rem;
        background: linear-gradient(135deg, #f8f9fa, #e9ecef);
        position: sticky;
        top: 0;
        z-index: 10;
    }

    /* تحسين الأزرار في الجدول */
    .actions {
        display: flex;
        flex-wrap: wrap;
        gap: 3px;
        justify-content: center;
        min-width: 200px;
    }

    .actions .btn {
        padding: 6px 8px;
        font-size: 0.7rem;
        min-width: 40px;
        min-height: 32px;
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        line-height: 1.2;
    }

    /* تحسين أزرار التنقل الرئيسية */
    .btn {
        padding: 12px 16px;
        font-size: 0.9rem;
        margin: 5px 2px;
        border-radius: 10px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    /* تحسين أزرار العمليات الجماعية */
    .bulk-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin: 10px 0;
        padding: 15px;
        background: #f8f9fa;
        border-radius: 10px;
    }

    .bulk-actions .btn {
        flex: 1;
        min-width: 120px;
        font-size: 0.8rem;
        padding: 10px 12px;
    }

    /* تحسين عرض الحالة */
    .status {
        padding: 4px 8px;
        font-size: 0.7rem;
        border-radius: 12px;
        white-space: nowrap;
    }

    /* تحسين عرض الأرقام والأوقات */
    .time-display {
        font-size: 0.75rem;
        line-height: 1.3;
    }

    .scooter-number {
        font-size: 0.8rem;
        font-weight: bold;
    }

    /* تحسين المجموع الكلي */
    .total-summary {
        padding: 0 5px;
        margin: 15px 0;
    }

    .total-card {
        padding: 15px;
        margin: 10px 0;
        flex-direction: column;
        text-align: center;
        min-width: auto;
    }

    .total-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    .total-amount {
        font-size: 1.6rem;
    }

    .total-label {
        font-size: 0.9rem;
    }
}

/* تحسينات للشاشات الصغيرة جداً */
@media (max-width: 480px) {
    .container {
        padding: 2px;
    }

    .header {
        padding: 12px 8px;
        margin-bottom: 10px;
    }

    .header h1 {
        font-size: 1.4rem;
    }

    .header p {
        font-size: 0.8rem;
    }

    /* جعل الأزرار الرئيسية تأخذ العرض الكامل */
    .btn {
        width: 100%;
        margin: 3px 0;
        padding: 12px;
        font-size: 0.85rem;
    }

    /* تحسين الجدول للشاشات الصغيرة جداً */
    .table-container {
        margin: 5px -2px;
        border-radius: 10px;
    }

    .table-responsive {
        font-size: 0.7rem;
    }

    table {
        min-width: 800px;
    }

    th,
    td {
        padding: 6px 3px;
        font-size: 0.65rem;
    }

    /* تحسين الأزرار في الجدول للشاشات الصغيرة */
    .actions .btn {
        padding: 4px 6px;
        font-size: 0.6rem;
        min-width: 35px;
        min-height: 28px;
    }

    /* تحسين العمليات الجماعية */
    .bulk-actions {
        flex-direction: column;
        gap: 5px;
        padding: 10px;
    }

    .bulk-actions .btn {
        width: 100%;
        min-width: auto;
    }

    /* تحسين النماذج */
    .form-container {
        padding: 15px 10px;
    }

    .form-group input,
    .form-group select {
        font-size: 16px;
        /* منع التكبير في iOS */
        padding: 12px;
    }

    /* تحسين المجموع الكلي */
    .total-card {
        padding: 12px;
        margin: 8px 0;
    }

    .total-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .total-amount {
        font-size: 1.4rem;
    }

    .total-label {
        font-size: 0.8rem;
    }
}

/* تحسينات إضافية */
.time-display {
    font-weight: 900;
    font-size: 1.1rem;
}

.delay-info {
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
}

.phone-input {
    direction: ltr !important;
    text-align: left;
}

/* تأثير الهوفر للصفوف */
tbody tr:hover {
    background: linear-gradient(90deg, rgba(255, 107, 53, 0.1), rgba(255, 140, 66, 0.05));
    transform: translateX(5px);
    animation: textShimmer 1s ease-in-out;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--color-surface);
}

::-webkit-scrollbar-thumb {
    background: var(--color-primary-light);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* ===== Total Summary Card ===== */
.total-summary {
    margin-top: var(--space-lg);
    display: flex;
    justify-content: center;
    padding: 0 var(--space-lg);
}

.total-card {
    background: var(--gradient-header);
    border-radius: var(--radius-xl);
    padding: var(--space-lg) var(--space-xl);
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    box-shadow: var(--shadow-primary);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    transition: all var(--duration-normal) var(--ease-spring);
    min-width: 300px;
}

.total-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-primary-hover);
}

.total-icon {
    font-size: 2.5rem;
    background: rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-circle);
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.total-content {
    flex: 1;
    color: white;
}

.total-label {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
    opacity: 0.9;
    letter-spacing: 0.3px;
}

.total-amount {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    direction: rtl;
}

/* تأثيرات إضافية للجوال */
@media (max-width: 768px) {
    .total-card {
        padding: 20px 25px;
        min-width: 250px;
        gap: 15px;
    }

    .total-icon {
        font-size: 2.5rem;
        width: 60px;
        height: 60px;
    }

    .total-amount {
        font-size: 1.8rem;
    }

    .total-label {
        font-size: 1rem;
    }
}

/* تأثير الوميض للمجموع */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

.total-amount {
    animation: pulse 2s infinite;
}

.logo-container {
    margin-left: 100px;
    margin-right: 100px;
}

.logo-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.logo-image:hover {
    transform: scale(1.1);
}

/* إذا كنت تريد الاحتفاظ بالشعار النصي كخيار احتياطي */
.logo {
    display: none;
    /* إخفاء الشعار النصي */
}

/* إعادة تعيين الأساسيات */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* الخطوط العربية */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&display=swap');

body {
    font-family: 'Cairo', Arial, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
    animation: backgroundPulse 4s ease-in-out infinite;
}

/* الحاوي الرئيسي */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* الرأس */
.header {
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    padding: 30px;
    text-align: center;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.3);
    color: white;
    animation: headerFloat 3s ease-in-out infinite;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* الشعار */
.logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ff6b6b, #feca57);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 900;
    color: white;
    margin-left: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* الأزرار */
.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    margin: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, #333333, #1a1a2e);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    color: white;
}

.btn-success {
    background: #333333;
    color: white;
}

.btn-danger {
    background: #ff6b35;
    color: white;
}

.btn-warning {
    background: #ff6b35;
    color: white;
}

/* حاوي الجداول */
.table-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 30px;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.table-header {
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    color: white;
    padding: 20px;
    text-align: center;
    animation: gradientShift 3s ease-in-out infinite;
}

.table-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* الجداول المتجاوبة */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

th,
td {
    padding: 15px;
    text-align: right;
    border-bottom: 1px solid #e9ecef;
}

th {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    font-weight: 700;
    color: #495057;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

tr:hover {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    transform: scale(1.01);
    transition: all 0.3s ease;
}

/* أرقام السكوترات */
.scooter-numbers {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    padding: 10px 15px;
    border-radius: 20px;
    border: 2px solid #2196f3;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #1976d2;
    font-size: 1rem;
    min-width: 120px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(33, 150, 243, 0.2);
    transition: all 0.3s ease;
}

.scooter-numbers:hover {
    background: linear-gradient(135deg, #bbdefb, #90caf9);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4);
}

/* بطاقات الإحصائيات */
.stats-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #333333, #1a1a2e);
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.stats-card h3 {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #333333, #1a1a2e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stats-card p {
    font-size: 1rem;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ألوان مخصصة للبطاقات */
.card-green {
    background: linear-gradient(135deg, #00b894, #00a085);
}

.card-purple {
    background: linear-gradient(135deg, #555555, #333333);
}

.card-blue {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
}

.card-orange {
    background: linear-gradient(135deg, #fd79a8, #e84393);
}

.card-yellow {
    background: linear-gradient(135deg, #fdcb6e, #e17055);
}

/* تأثيرات التحويم للصفوف */
tbody tr {
    transition: all 0.3s ease;
}

tbody tr:nth-child(even) {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
}

tbody tr:hover {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(255, 140, 66, 0.05));
    transform: translateX(5px) scale(1.01);
    animation: textShimmer 1s ease-in-out;
}

/* شارات المسؤولين */
.responsible-badge {
    background: linear-gradient(135deg, #333333, #1a1a2e);
    color: white;
    padding: 10px 15px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 3px 10px rgba(26, 26, 46, 0.3);
    transition: all 0.3s ease;
}

.responsible-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(26, 26, 46, 0.5);
}

/* النصوص الملونة */
.text-success {
    color: #00b894;
    font-weight: bold;
}

.text-primary {
    color: #333333;
    font-weight: bold;
}

.text-warning {
    color: #fdcb6e;
    font-weight: bold;
}

.text-danger {
    color: #fd79a8;
    font-weight: bold;
}

.text-info {
    color: #74b9ff;
    font-weight: bold;
}

/* تأثيرات الحركة */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* تحسينات شاملة للهواتف المحمولة */
@media (max-width: 768px) {
    .container {
        padding: 10px;
        max-width: 100%;
    }

    /* تحسين الرأس */
    .header {
        padding: 20px 15px;
        margin-bottom: 20px;
        border-radius: 15px;
    }

    .header h1 {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }

    .header p {
        font-size: 1rem;
    }

    .logo {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
        margin-left: 10px;
    }

    /* تحسين الأزرار */
    .btn {
        padding: 12px 16px;
        font-size: 0.85rem;
        margin: 2px;
        border-radius: 8px;
        min-height: 44px;
        /* حد أدنى للمس */
    }

    /* تحسين الجدول للهواتف */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 0.75rem;
    }

    table {
        min-width: 800px;
        /* عرض أدنى للجدول */
    }

    th,
    td {
        padding: 8px 6px;
        white-space: nowrap;
    }

    /* تحسين أرقام السكوتر */
    .scooter-numbers {
        font-size: 0.7rem;
        padding: 6px 10px;
        min-width: 80px;
    }

    /* تحسين بطاقات الإحصائيات */
    .stats-card {
        padding: 15px 12px;
        margin: 10px 5px;
    }

    .stats-card h3 {
        font-size: 1.8rem;
    }

    /* تحسين النماذج */
    .form-group {
        margin-bottom: 15px;
    }

    input,
    select,
    textarea {
        font-size: 16px;
        /* منع التكبير في iOS */
        padding: 12px;
        border-radius: 8px;
    }

    /* تحسين العمليات الجماعية */
    #bulkActionsPanel {
        padding: 15px 10px;
        margin: 10px 0;
    }

    /* تحسين المجموع الكلي */
    .total-card {
        padding: 15px 20px;
        margin: 15px 5px;
        min-width: auto;
        flex-direction: column;
        text-align: center;
    }

    .total-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    /* تحسين الحالة الفارغة */
    .empty-state {
        padding: 30px 15px;
    }

    .empty-state h3 {
        font-size: 1.5rem;
    }

    /* تحسين الأزرار في الجدول */
    .action-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        justify-content: center;
    }

    .action-buttons .btn {
        flex: 1;
        min-width: 60px;
        padding: 8px 10px;
        font-size: 0.7rem;
    }
}

/* تحسينات للشاشات الصغيرة جداً */
@media (max-width: 480px) {
    .container {
        padding: 5px;
    }

    .header {
        padding: 15px 10px;
        text-align: center;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .btn {
        padding: 10px 12px;
        font-size: 0.8rem;
        width: 100%;
        margin: 3px 0;
    }

    /* جعل الجدول قابل للتمرير أفقياً */
    .table-container {
        margin: 0 -5px;
        border-radius: 10px;
    }

    .table-responsive {
        font-size: 0.7rem;
    }

    th,
    td {
        padding: 6px 4px;
        font-size: 0.7rem;
    }

    /* تحسين النماذج للشاشات الصغيرة */
    .form-row {
        flex-direction: column;
    }

    .form-group {
        width: 100%;
    }

    /* تحسين الأزرار في الجدول للشاشات الصغيرة */
    .action-buttons .btn {
        font-size: 0.65rem;
        padding: 6px 8px;
        min-width: 50px;
    }

    /* تحسين المجموع الكلي */
    .total-summary {
        padding: 0 5px;
    }

    .total-card {
        padding: 12px 15px;
        margin: 10px 0;
    }

    .total-value {
        font-size: 1.3rem;
    }

    .total-label {
        font-size: 0.8rem;
    }

    /* تحسين عرض المجموع الكلي للشاشات الصغيرة */
    .total-content {
        flex-direction: column !important;
        gap: 10px !important;
        text-align: center;
    }

    .total-icon {
        width: 50px !important;
        height: 50px !important;
        font-size: 2rem !important;
    }

    .total-info .total-label {
        font-size: 1rem !important;
    }

    .total-info .total-amount {
        font-size: 1.5rem !important;
    }

    .total-stats {
        margin-left: 0 !important;
        font-size: 0.9rem !important;
    }
}

/* تأثيرات إضافية للجمال */
.table-container {
    position: relative;
}

.table-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.05), rgba(51, 51, 51, 0.05));
    border-radius: 15px;
    z-index: -1;
}

/* تحسين النصوص العربية */
.arabic-text {
    font-family: 'Cairo', Arial, sans-serif;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* تأثير الظل المتحرك */
.floating-shadow {
    animation: floatingShadow 3s ease-in-out infinite;
}

@keyframes floatingShadow {

    0%,
    100% {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    50% {
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    }
}

/* تحسينات إضافية للجوال - ضمان الوصولية */
@media (max-width: 768px) {

    /* تحسين شريط التنقل العلوي */
    .navigation-bar {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        margin: 10px 0;
        padding: 10px;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 10px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .navigation-bar .btn {
        flex: 1;
        min-width: 100px;
        text-align: center;
        font-size: 0.8rem;
        padding: 10px 8px;
    }

    /* تحسين أزرار العمليات */
    .action-buttons-container {
        background: #f8f9fa;
        padding: 10px;
        border-radius: 10px;
        margin: 10px 0;
    }

    .action-buttons-container .btn {
        margin: 2px;
        min-width: 80px;
        font-size: 0.75rem;
    }

    /* تحسين عرض البيانات في الجدول */
    .mobile-data-cell {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
    }

    .mobile-data-cell .main-text {
        font-weight: bold;
        font-size: 0.8rem;
    }

    .mobile-data-cell .sub-text {
        font-size: 0.65rem;
        color: #666;
    }

    /* تحسين أزرار الحالة */
    .status-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 3px;
        justify-content: center;
    }

    .status-buttons .btn {
        padding: 4px 8px;
        font-size: 0.65rem;
        border-radius: 8px;
        min-width: 60px;
    }

    /* تحسين عرض الوقت والتاريخ */
    .time-info {
        text-align: center;
        font-size: 0.7rem;
        line-height: 1.2;
    }

    .time-info .time {
        font-weight: bold;
        color: #333;
    }

    .time-info .date {
        color: #666;
        font-size: 0.6rem;
    }

    /* تحسين عرض معلومات السكوتر */
    .scooter-info {
        text-align: center;
        padding: 4px;
    }

    .scooter-info .number {
        font-weight: bold;
        font-size: 0.8rem;
        color: #ff6b35;
    }

    .scooter-info .type {
        font-size: 0.6rem;
        color: #666;
    }
}

/* تحسينات خاصة للشاشات الصغيرة جداً */
@media (max-width: 480px) {

    /* تحسين شريط التنقل للشاشات الصغيرة */
    .navigation-bar {
        flex-direction: column;
        gap: 3px;
    }

    .navigation-bar .btn {
        width: 100%;
        min-width: auto;
    }

    /* تحسين عرض البيانات */
    .mobile-data-cell .main-text {
        font-size: 0.75rem;
    }

    .mobile-data-cell .sub-text {
        font-size: 0.6rem;
    }

    /* تحسين أزرار الحالة للشاشات الصغيرة */
    .status-buttons .btn {
        padding: 3px 6px;
        font-size: 0.6rem;
        min-width: 50px;
    }

    /* تحسين عرض الوقت */
    .time-info {
        font-size: 0.65rem;
    }

    .time-info .date {
        font-size: 0.55rem;
    }

    /* تحسين معلومات السكوتر */
    .scooter-info .number {
        font-size: 0.75rem;
    }

    .scooter-info .type {
        font-size: 0.55rem;
    }
}

/* تحسين التمرير الأفقي للجدول */
.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #ff6b35;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #e55a2b;
}

/* تحسين اللمس للأجهزة المحمولة */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
        /* الحد الأدنى للمس */
        min-width: 44px;
    }

    .actions .btn {
        min-height: 36px;
        min-width: 36px;
    }

    /* تحسين المسافات للمس */
    .actions {
        gap: 6px;
    }

    .bulk-actions {
        gap: 10px;
    }
}

/* أنماط صفحة الأعطال */
.breakdown-form {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    animation: fadeInUp 0.5s ease-out;
}

.breakdown-form h3 {
    color: #333;
    margin-bottom: 20px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

.form-group textarea {
    height: 80px;
    resize: vertical;
}

.status-badge {
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    display: inline-block;
}

.status-جديد {
    background: #e3f2fd;
    color: #1976d2;
}

.status-قيد-الإصلاح {
    background: #fff3e0;
    color: #f57c00;
}

.status-مكتمل {
    background: #e8f5e8;
    color: #388e3c;
}

.status-مؤجل {
    background: #fce4ec;
    color: #c2185b;
}

.severity-badge {
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: bold;
    display: inline-block;
}

.severity-منخفض {
    background: #e8f5e8;
    color: #388e3c;
}

.severity-متوسط {
    background: #fff3e0;
    color: #f57c00;
}

.severity-عالي {
    background: #ffebee;
    color: #d32f2f;
}

.severity-حرج {
    background: #3f51b5;
    color: white;
}

.breakdown-table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.5s ease-out 0.2s both;
}

.breakdown-actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.breakdown-actions button {
    padding: 5px 10px;
    font-size: 12px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.edit-btn {
    background: #2196f3;
    color: white;
}

.edit-btn:hover {
    background: #1976d2;
    transform: translateY(-1px);
}

.delete-btn {
    background: #f44336;
    color: white;
}

.delete-btn:hover {
    background: #d32f2f;
    transform: translateY(-1px);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background-color: #ffffff;
    margin: 5% auto;
    padding: 40px;
    border-radius: 25px;
    width: 90%;
    max-width: 650px;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
    border: 2px solid #ff6b35;
    box-shadow: 0 20px 60px rgba(255, 107, 53, 0.15);
}

.close {
    color: #aaa;
    float: left;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #333;
}

/* تحسينات الأعطال للموبايل */
@media (max-width: 768px) {
    .breakdown-form {
        padding: 15px;
        margin: 10px;
    }

    .form-row {
        flex-direction: column;
    }

    .form-group {
        min-width: 100%;
    }

    .breakdown-table {
        font-size: 12px;
        margin: 10px;
    }

    .breakdown-actions {
        flex-direction: column;
    }

    .breakdown-actions button {
        width: 100%;
        margin-bottom: 2px;
        padding: 8px;
    }

    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 15px;
    }

    .status-badge,
    .severity-badge {
        font-size: 10px;
        padding: 2px 6px;
    }
}

/* تنسيق نافذة تعديل التأخير */
#editDelayModal .modal-content {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: none;
    animation: slideDown 0.3s ease-out;
}

#editDelayModal .modal-header {
    position: relative;
    text-align: center;
}

#editDelayModal .form-group input:focus {
    border-color: #007bff;
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.3);
}

#editDelayModal .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#editDelayModal .btn-primary:hover {
    background: #0056b3;
}

#editDelayModal .btn-secondary:hover {
    background: #5a6268;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* تحسينات للموبايل */
@media (max-width: 768px) {
    #editDelayModal .modal-content {
        margin: 5% auto;
        width: 95%;
        max-width: none;
    }

    #editDelayModal .modal-header {
        padding: 15px;
    }

    #editDelayModal .modal-body {
        padding: 20px;
    }

    #editDelayModal .form-actions {
        flex-direction: column;
    }

    #editDelayModal .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* ============================================================
   UNIFIED SHARED COMPONENTS
   Used by: activity_log, blacklist, daily_management,
            admin_management, fenpay, reports, view_day,
            select_wilaya
   ============================================================ */

/* ===== Stats Grid & Cards ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    padding: 25px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
    border-top: 4px solid var(--color-primary);
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-number,
.stat-value {
    font-size: 2.5rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin-top: 5px;
    font-weight: 600;
}

/* ===== Filters Section ===== */
.filters-section {
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-md);
}

.filters-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
}

.filter-group input,
.filter-group select {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font-family);
    transition: border-color 0.3s;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-bg);
}

/* ===== Report Filters ===== */
.report-filters {
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

/* ===== Alerts ===== */
.alert {
    padding: 15px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-weight: 600;
}

.alert-success {
    background: var(--color-success-light);
    color: var(--color-success-dark);
    border: 1px solid #c3e6cb;
}

.alert-danger,
.alert-error {
    background: var(--color-danger-light);
    color: var(--color-danger-dark);
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: var(--color-warning-light);
    color: var(--color-warning-dark);
    border: 1px solid #ffeeba;
}

.alert-info {
    background: var(--color-info-light);
    color: var(--color-info-dark);
    border: 1px solid #bee5eb;
}

.success-message {
    background: var(--color-success-light);
    color: var(--color-success-dark);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}

/* ===== Badges ===== */
.action-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.user-badge {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    padding: 5px 12px;
    border-radius: var(--radius-lg);
    font-size: 12px;
    font-weight: 600;
}

.role-badge {
    padding: 5px 10px;
    border-radius: var(--radius-lg);
    font-size: 12px;
    font-weight: bold;
}

.role-manager {
    background: var(--color-info-light);
    color: var(--color-info-dark);
}

.role-admin {
    background: var(--color-warning-light);
    color: var(--color-warning-dark);
}

.wilaya-badge {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 4px 10px;
    border-radius: var(--radius-md);
    font-size: 11px;
    font-weight: 600;
}

.status-badge {
    padding: 5px 10px;
    border-radius: var(--radius-lg);
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    display: inline-block;
}

/* ===== Operation Badges (FenPay) ===== */
.operation-badge {
    padding: 4px 12px;
    border-radius: var(--radius-lg);
    font-size: 0.8rem;
    font-weight: bold;
}

.operation-add {
    background: var(--color-success-light);
    color: var(--color-success-dark);
}

.operation-subtract {
    background: var(--color-danger-light);
    color: var(--color-danger-dark);
}

.operation-replace {
    background: var(--color-info-light);
    color: var(--color-info-dark);
}

.operation-reset {
    background: #e8e8e8;
    color: #1a1a2e;
}

/* ===== Trend Indicators (Reports) ===== */
.trend-indicator {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.9em;
    font-weight: bold;
}

.trend-up {
    background: var(--color-success-light);
    color: var(--color-success-dark);
}

.trend-down {
    background: var(--color-danger-light);
    color: var(--color-danger-dark);
}

.trend-stable {
    background: var(--color-warning-light);
    color: var(--color-warning-dark);
}

/* ===== Logs Table ===== */
.logs-table-container {
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 25px;
}

.logs-table {
    width: 100%;
    border-collapse: collapse;
}

.logs-table th {
    background: var(--color-bg);
    padding: 15px;
    text-align: right;
    font-weight: 700;
    color: var(--color-text);
    border-bottom: 2px solid var(--color-border-light);
    white-space: nowrap;
}

.logs-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.logs-table tr:hover {
    background: var(--color-bg);
}

/* ===== Data Table (Reports) ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: var(--color-bg-white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.data-table th {
    background: var(--gradient-primary);
    color: white;
    padding: 15px;
    text-align: center;
}

.data-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.data-table tr:hover {
    background: var(--color-bg);
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 20px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 10px 15px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.pagination a {
    background: var(--color-bg);
    color: var(--color-text);
}

.pagination a:hover {
    background: var(--color-primary);
    color: white;
}

.pagination .current {
    background: var(--gradient-primary);
    color: white;
}

.pagination .disabled {
    background: var(--color-border);
    color: #adb5bd;
    cursor: not-allowed;
}

/* ===== Day Cards (Daily Management) ===== */
.day-card {
    background: var(--color-bg-white);
    border-radius: 10px;
    padding: 20px;
    margin: 10px 0;
    box-shadow: var(--shadow-sm);
    border-right: 5px solid var(--color-primary);
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.day-info {
    flex: 1;
}

.day-actions {
    display: flex;
    gap: 10px;
}

.current-day-summary {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border-radius: var(--radius-lg);
    padding: 25px;
    margin: 20px 0;
    text-align: center;
}

.save-day-form {
    background: var(--color-bg);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

/* ===== Report Tabs ===== */
.report-tabs {
    display: flex;
    background: var(--color-bg);
    border-radius: 10px;
    padding: 5px;
    margin: 20px 0;
}

.tab {
    flex: 1;
    padding: 12px 20px;
    text-align: center;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--color-text-light);
}

.tab.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 2px 10px var(--color-primary-shadow);
}

.report-content {
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.chart-container {
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.export-actions {
    text-align: center;
    margin: 20px 0;
}

/* ===== Navigation Bar ===== */
.navigation-bar {
    background: var(--gradient-primary-reverse);
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px var(--color-primary-shadow);
}

.nav-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* ===== Activity Log Details ===== */
.details-toggle {
    cursor: pointer;
    color: var(--color-primary);
    font-size: 12px;
    text-decoration: underline;
}

.details-content {
    display: none;
    background: var(--color-bg);
    padding: 15px;
    border-radius: 10px;
    margin-top: 10px;
    font-size: 12px;
    border: 1px solid var(--color-border-light);
}

.details-content.show {
    display: block;
}

.value-box {
    padding: 10px;
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
}

.value-box:last-child {
    margin-bottom: 0;
}

.old-value {
    background: #fff5f5;
    border: 1px solid #ffcccc;
}

.new-value {
    background: #f0fff4;
    border: 1px solid #c6f6d5;
}

.value-box ul {
    list-style: none;
    margin: 5px 0;
    padding: 0;
}

.value-box ul li {
    padding: 3px 0;
    border-bottom: 1px dashed #ddd;
}

.value-box ul li:last-child {
    border-bottom: none;
}

.description-cell {
    max-width: 300px;
    word-wrap: break-word;
}

.target-info {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
}

.ip-info {
    font-size: 11px;
    color: var(--color-text-muted);
    font-family: monospace;
}

/* ===== Blacklist Specific ===== */
.blacklist-form {
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px var(--color-primary-bg);
    border: 2px solid rgba(255, 107, 53, 0.2);
}

.blacklist-table {
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 8px 25px var(--color-primary-bg);
    border: 2px solid rgba(255, 107, 53, 0.2);
    overflow-x: auto;
}

.blacklist-table table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.blacklist-table th {
    background: var(--gradient-primary);
    color: white;
    padding: 15px 8px;
    text-align: center;
    font-weight: bold;
    white-space: nowrap;
    font-size: 14px;
}

.blacklist-table td {
    padding: 12px 8px;
    text-align: center;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

.blacklist-table tr:hover {
    background-color: #fef7f0;
}

.reason-cell {
    max-width: 200px;
    word-wrap: break-word;
    text-align: right;
}

.action-btn {
    padding: 5px 8px;
    margin: 1px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-toggle {
    background: var(--color-info);
    color: white;
}

.btn-delete {
    background: var(--color-danger);
    color: white;
}

.action-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.blacklist-table::after {
    content: "← اسحب للمشاهدة →";
    display: block;
    text-align: center;
    padding: 10px;
    background: var(--color-bg);
    color: #6c757d;
    font-size: 12px;
    border-top: 1px solid var(--color-border-light);
}

@media (min-width: 769px) {
    .blacklist-table::after {
        display: none;
    }
}

/* ===== Admin Management ===== */
.admin-header {
    background: var(--gradient-primary);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-form {
    background: var(--color-bg-white);
    padding: 25px;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
}

.admins-table {
    background: var(--color-bg-white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ===== Select Wilaya ===== */
.wilaya-container {
    max-width: 600px;
    width: 90%;
    background: var(--color-bg-white);
    padding: 40px;
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.wilaya-header {
    margin-bottom: 40px;
}

.wilaya-header h1 {
    font-size: 32px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.wilaya-header p {
    font-size: 18px;
    color: var(--color-text-light);
}

.wilaya-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.wilaya-card {
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-lg);
    padding: 40px 20px;
    cursor: pointer;
    transition: all 0.3s;
    color: white;
    font-size: 24px;
    font-weight: bold;
    box-shadow: 0 5px 15px var(--color-primary-shadow);
}

.wilaya-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.5);
}

.wilaya-card .icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    padding: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.wilaya-card .icon img {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.wilaya-card.batna {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
}

.wilaya-card.constantine {
    background: linear-gradient(135deg, #ff8c42 0%, #ffab73 100%);
}

.logout-btn {
    margin-top: 20px;
    padding: 12px 30px;
    background: var(--color-danger);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
    display: inline-block;
}

.logout-btn:hover {
    background: #c82333;
}

/* ===== FenPay Specific ===== */
.fenpay-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.fenpay-header {
    background: var(--gradient-primary);
    color: white;
    padding: 30px;
    border-radius: var(--radius-lg);
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px var(--color-primary-shadow);
}

.fenpay-header h1 {
    font-size: 2.5rem;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.fenpay-header p {
    font-size: 1.2rem;
    margin: 10px 0 0;
    opacity: 0.9;
}

.search-section {
    background: var(--color-bg-white);
    padding: 25px;
    border-radius: var(--radius-lg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.search-box {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.search-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    font-family: var(--font-family);
    transition: border-color 0.3s;
}

.search-input:focus {
    border-color: var(--color-primary);
    outline: none;
}

.search-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-family: var(--font-family);
    transition: transform 0.2s;
}

.search-btn:hover {
    transform: translateY(-2px);
}

.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.user-card {
    background: var(--color-bg-white);
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all 0.3s;
    cursor: pointer;
}

.user-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.user-card.selected {
    border-color: var(--color-success);
    background: #f8fff9;
}

.user-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--color-text);
    margin-bottom: 5px;
}

.user-details {
    color: var(--color-text-light);
    font-size: 0.9rem;
}

.user-coins {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: var(--color-text);
    padding: 8px 15px;
    border-radius: var(--radius-pill);
    font-weight: bold;
    text-align: center;
    margin-top: 10px;
}

.points-form {
    background: var(--color-bg-white);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    display: none;
}

.points-form.active {
    display: block;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--color-text);
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-family: var(--font-family);
    transition: border-color 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.operation-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.operation-btn {
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: var(--color-bg-white);
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    font-weight: bold;
    font-family: var(--font-family);
}

.operation-btn:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.operation-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.submit-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    font-family: var(--font-family);
    cursor: pointer;
    width: 100%;
    transition: transform 0.2s;
}

.submit-btn:hover {
    transform: translateY(-2px);
}

.transactions-section {
    background: var(--color-bg-white);
    padding: 25px;
    border-radius: var(--radius-lg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.transactions-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    table-layout: fixed;
}

.transactions-table th,
.transactions-table td {
    padding: 8px 6px;
    text-align: right;
    border-bottom: 1px solid #e0e0e0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.transactions-table th {
    background: var(--color-bg);
    font-weight: bold;
    color: var(--color-text);
}

/* ===== View Day Specific ===== */
.day-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.rentals-table {
    background: var(--color-bg-white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin: 20px 0;
}

.rental-row {
    padding: 15px;
    border-bottom: 1px solid var(--color-border-light);
    display: grid;
    grid-template-columns: 2fr 2fr 1.5fr 1fr 1fr 1fr 1fr 1fr 1fr;
    gap: 10px;
    align-items: center;
}

.rental-row:nth-child(even) {
    background: var(--color-bg);
}

.rental-row:hover {
    background: var(--color-primary-bg);
}

.actions-section {
    background: var(--color-bg-white);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.notes-section {
    background: var(--color-warning-light);
    border: 1px solid #ffeaa7;
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
}

.print-section {
    display: none;
}

@media print {
    .no-print {
        display: none !important;
    }

    .print-section {
        display: block;
    }

    body {
        font-size: 12px;
    }

    .container {
        max-width: none;
        margin: 0;
        padding: 0;
    }
}

/* ===== Shared Components - Responsive ===== */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-number,
    .stat-value {
        font-size: 2rem;
    }

    .filters-grid {
        grid-template-columns: 1fr;
    }

    .logs-table-container {
        overflow-x: auto;
    }

    .logs-table {
        min-width: 800px;
    }

    .filter-row {
        grid-template-columns: 1fr;
    }

    .fenpay-container {
        padding: 10px;
    }

    .fenpay-header {
        padding: 20px;
        margin-bottom: 20px;
    }

    .fenpay-header h1 {
        font-size: 2rem;
    }

    .search-section {
        padding: 15px;
    }

    .search-box {
        flex-direction: column;
        gap: 10px;
    }

    .search-input {
        font-size: 16px;
        padding: 15px;
    }

    .search-btn {
        padding: 15px;
        width: 100%;
    }

    .users-grid {
        grid-template-columns: 1fr;
    }

    .operation-buttons {
        grid-template-columns: 1fr;
    }

    .operation-btn {
        padding: 15px;
    }

    .form-input {
        padding: 15px;
        font-size: 16px;
    }

    .submit-btn {
        padding: 15px;
        font-size: 16px;
    }

    .blacklist-form {
        padding: 15px;
    }

    .blacklist-table table {
        min-width: 600px;
    }

    .blacklist-table th,
    .blacklist-table td {
        padding: 8px 4px;
        font-size: 12px;
    }

    .reason-cell {
        max-width: 120px;
        font-size: 11px;
    }

    .action-btn {
        padding: 4px 6px;
        font-size: 10px;
    }

    .report-tabs {
        flex-wrap: wrap;
    }

    .tab {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-number,
    .stat-value {
        font-size: 1.5rem;
    }

    .fenpay-header h1 {
        font-size: 22px;
    }

    .operation-btn {
        padding: 18px;
        font-size: 16px;
    }

    .blacklist-table table {
        min-width: 500px;
    }

    .blacklist-table th,
    .blacklist-table td {
        padding: 6px 3px;
        font-size: 11px;
    }

    .reason-cell {
        max-width: 100px;
    }
}