/* =============================================
   صالون الورد - التصميم الرئيسي
   ============================================= */

:root {
    --primary: #7B1FA2;
    --primary-light: #E1BEE7;
    --primary-dark: #4a1942;
    --accent: #E8A0BF;
    --accent-light: #FCE4EC;
    --rose: #F06292;
    --rose-light: #F8BBD0;
    --bg: #FAF5F7;
    --card: #FFFFFF;
    --text: #3D1F35;
    --text-muted: #9E7A8A;
    --text-light: #C9A0B8;
    --border: #F3E5F0;
    --success: #4CAF50;
    --success-bg: #E8F5E9;
    --warning: #FF9800;
    --warning-bg: #FFF3E0;
    --danger: #F44336;
    --danger-bg: #FFEBEE;
    --info: #2196F3;
    --info-bg: #E3F2FD;
    --sidebar-w: 250px;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 2px 16px rgba(140,60,100,0.06);
    --shadow-lg: 0 8px 32px rgba(140,60,100,0.12);
}

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

body {
    font-family: 'Tajawal', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* ---- التخطيط العام ---- */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ---- الشريط الجانبي ---- */
.sidebar {
    width: var(--sidebar-w);
    background: linear-gradient(180deg, #4a1942 0%, #6a1b5e 50%, #7B1FA2 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    z-index: 100;
    transition: transform 0.3s ease;
    box-shadow: -4px 0 24px rgba(74,25,66,0.2);
}

.sidebar.collapsed { transform: translateX(100%); }

.sidebar-header {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo-icon {
    font-size: 28px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(232,160,191,0.2);
    border-radius: 12px;
    flex-shrink: 0;
}

.logo-name {
    font-family: 'Noto Kufi Arabic', sans-serif;
    font-weight: 800;
    font-size: 18px;
    display: block;
}

.logo-sub {
    font-size: 11px;
    opacity: 0.6;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-radius: 12px;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

.nav-item:hover { background: rgba(232,160,191,0.15); color: #fff; }
.nav-item.active { background: rgba(232,160,191,0.25); color: #fff; }

.sidebar-footer {
    padding: 16px 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info { display: flex; align-items: center; gap: 10px; }

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
}

.user-name { font-size: 13px; font-weight: 700; display: block; }
.user-role { font-size: 11px; opacity: 0.6; display: block; }

.logout-btn {
    color: rgba(255,255,255,0.5);
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.logout-btn:hover { background: rgba(244,67,54,0.2); color: #F44336; }

/* ---- المحتوى الرئيسي ---- */
.main-content {
    flex: 1;
    margin-right: var(--sidebar-w);
    min-height: 100vh;
}

.top-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 28px;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 6px;
}

.page-title {
    font-family: 'Noto Kufi Arabic', sans-serif;
    font-size: 20px;
    color: var(--primary-dark);
    flex: 1;
}

.today-date {
    font-size: 13px;
    color: var(--text-muted);
    background: var(--accent-light);
    padding: 6px 14px;
    border-radius: 20px;
}

.page-content {
    padding: 28px;
}

/* ---- التنبيهات ---- */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 14px;
    transition: opacity 0.3s;
    animation: slideDown 0.3s ease;
}

.alert-success { background: var(--success-bg); color: #2E7D32; border: 1px solid #A5D6A7; }
.alert-error { background: var(--danger-bg); color: #C62828; border: 1px solid #EF9A9A; }
.alert-warning { background: var(--warning-bg); color: #E65100; border: 1px solid #FFCC80; }
.alert-info { background: var(--info-bg); color: #1565C0; border: 1px solid #90CAF9; }

.alert-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
}

/* ---- البطاقات الإحصائية ---- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 22px 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s;
}

.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

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

.stat-icon.pink { background: var(--accent-light); color: var(--accent); }
.stat-icon.purple { background: var(--primary-light); color: var(--primary); }
.stat-icon.rose { background: var(--rose-light); color: var(--rose); }
.stat-icon.green { background: var(--success-bg); color: var(--success); }

.stat-label { font-size: 13px; color: var(--text-muted); margin-bottom: 2px; }
.stat-value { font-size: 24px; font-weight: 800; color: var(--primary-dark); }

/* ---- البطاقات ---- */
.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.card-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-family: 'Noto Kufi Arabic', sans-serif;
    font-size: 16px;
    color: var(--primary-dark);
    font-weight: 700;
}

.card-body { padding: 22px; }
.card-body.no-pad { padding: 0; }

/* ---- الجداول ---- */
.table-wrap { overflow-x: auto; }

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

table th {
    padding: 13px 16px;
    text-align: right;
    font-weight: 700;
    font-size: 13px;
    color: #7A4568;
    background: #FDF5F8;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    vertical-align: middle;
}

table tr:hover td { background: #FEF8FA; }

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

/* ---- الحالات ---- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.badge-waiting { background: var(--warning-bg); color: #E65100; }
.badge-waiting::before { background: var(--warning); }
.badge-progress { background: var(--info-bg); color: #1565C0; }
.badge-progress::before { background: var(--info); }
.badge-completed { background: var(--success-bg); color: #2E7D32; }
.badge-completed::before { background: var(--success); }
.badge-cancelled { background: var(--danger-bg); color: #C62828; }
.badge-cancelled::before { background: var(--danger); }
.badge-present { background: var(--success-bg); color: #2E7D32; }
.badge-present::before { background: var(--success); }
.badge-absent { background: var(--danger-bg); color: #C62828; }
.badge-absent::before { background: var(--danger); }
.badge-late { background: var(--warning-bg); color: #E65100; }
.badge-late::before { background: var(--warning); }
.badge-leave { background: var(--info-bg); color: #1565C0; }
.badge-leave::before { background: var(--info); }

/* ---- الأزرار ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 700;
    font-family: 'Tajawal', sans-serif;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #BA68C8);
    color: #fff;
    box-shadow: 0 4px 16px rgba(186,104,200,0.3);
}

.btn-primary:hover { box-shadow: 0 6px 24px rgba(186,104,200,0.4); transform: translateY(-1px); }

.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--border);
}

.btn-outline:hover { border-color: var(--accent); background: var(--accent-light); }

.btn-sm { padding: 6px 14px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-group { display: flex; gap: 6px; }

/* ---- النماذج ---- */
.form-group { margin-bottom: 16px; }

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #7A4568;
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 11px 16px;
    border-radius: 12px;
    border: 2px solid var(--border);
    font-size: 14px;
    font-family: 'Tajawal', sans-serif;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(232,160,191,0.15);
}

.form-control::placeholder { color: var(--text-light); }

select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }

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

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

/* ---- المودال ---- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(80,30,60,0.35);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s;
}

.modal-overlay.active { display: flex; }

.modal {
    background: var(--card);
    border-radius: 20px;
    padding: 0;
    width: 92%;
    max-width: 520px;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 24px 80px rgba(140,60,100,0.2);
    animation: modalIn 0.3s ease;
}

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

.modal-title {
    font-family: 'Noto Kufi Arabic', sans-serif;
    font-size: 18px;
    color: var(--primary-dark);
    font-weight: 700;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--accent-light);
    border: none;
    color: #C2185B;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal-close:hover { background: var(--rose-light); }

.modal-body { padding: 24px 26px; }

.modal-footer {
    padding: 16px 26px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    justify-content: flex-start;
}

/* ---- قائمة الانتظار ---- */
.queue-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: var(--radius);
    background: #FDF5F8;
    border: 1px solid var(--border);
    margin-bottom: 10px;
    transition: all 0.2s;
}

.queue-card:hover { border-color: var(--accent); }

.queue-number {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    flex-shrink: 0;
}

.queue-number.waiting { background: var(--warning-bg); color: #E65100; }
.queue-number.in_progress { background: var(--info-bg); color: #1565C0; }
.queue-number.completed { background: var(--success-bg); color: #2E7D32; }

.queue-info { flex: 1; }
.queue-info .client-name { font-weight: 700; color: var(--primary-dark); font-size: 14px; }
.queue-info .service-name { font-size: 12px; color: var(--text-muted); }

/* ---- صفحة الدخول ---- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4a1942, #7B1FA2, #E8A0BF);
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: 24px;
    padding: 40px 36px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 24px 80px rgba(74,25,66,0.3);
    text-align: center;
}

.login-logo {
    font-size: 48px;
    margin-bottom: 8px;
}

.login-title {
    font-family: 'Noto Kufi Arabic', sans-serif;
    font-size: 26px;
    color: var(--primary-dark);
    margin-bottom: 4px;
}

.login-sub {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 28px;
}

/* ---- Grid ---- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }

/* ---- فلتر بحث ---- */
.search-bar {
    position: relative;
    margin-bottom: 20px;
}

.search-bar input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    padding-right: 44px;
}

.search-bar .search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-bar .form-control { width: auto; min-width: 160px; }

/* ---- خدمات الأقسام ---- */
.service-card {
    background: var(--card);
    border-radius: 16px;
    padding: 20px;
    border: 2px solid transparent;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transition: all 0.2s;
}

.service-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.service-card .service-cat {
    position: absolute;
    top: 0;
    left: 0;
    width: 50px;
    height: 50px;
    background: var(--accent);
    opacity: 0.1;
    border-radius: 0 0 50px 0;
}

.service-card .name { font-weight: 700; color: var(--primary-dark); font-size: 16px; margin-bottom: 10px; }
.service-card .meta { display: flex; justify-content: space-between; align-items: center; }
.service-card .duration { font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.service-card .price { font-weight: 800; color: var(--primary); font-size: 18px; }

/* ---- عميلة ---- */
.client-card {
    background: var(--card);
    border-radius: 18px;
    padding: 22px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.client-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.client-header { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }

.client-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #BA68C8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 20px;
    flex-shrink: 0;
}

.client-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.client-stat {
    text-align: center;
    padding: 10px 4px;
    border-radius: 10px;
    background: #FDF5F8;
}

.client-stat .label { font-size: 11px; color: var(--text-muted); margin-bottom: 2px; }
.client-stat .value { font-size: 13px; font-weight: 700; color: var(--primary-dark); }

.client-notes {
    margin-top: 12px;
    padding: 8px 12px;
    border-radius: 10px;
    background: #F9F0F5;
    font-size: 12px;
    color: #7A4568;
}

/* ---- الإحصائيات ---- */
.progress-bar {
    height: 10px;
    border-radius: 5px;
    background: var(--border);
    overflow: hidden;
    margin-top: 8px;
}

.progress-fill {
    height: 100%;
    border-radius: 5px;
    background: linear-gradient(90deg, var(--accent), #BA68C8);
    transition: width 0.8s ease;
}

.summary-card {
    background: linear-gradient(135deg, var(--accent-light), var(--primary-light));
    border-radius: 18px;
    padding: 28px;
    text-align: center;
    border: 2px solid var(--accent);
}

.summary-label { font-size: 14px; color: #7A4568; margin-bottom: 6px; }
.summary-value { font-size: 36px; font-weight: 900; color: var(--primary-dark); }

/* ---- فاتورة ---- */
.invoice-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border);
}

.invoice-total {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-top: 2px solid var(--primary-dark);
    font-weight: 800;
    font-size: 18px;
    color: var(--primary);
}

/* ---- أنيميشن ---- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }

/* ---- الطباعة ---- */
@media print {
    .sidebar, .top-bar, .btn, .modal-overlay { display: none !important; }
    .main-content { margin: 0 !important; }
    .page-content { padding: 10px !important; }
    .card { box-shadow: none !important; border: 1px solid #ddd !important; }
}

/* ---- موبايل ---- */

/* تابلت */
@media (max-width: 1024px) {
    .grid-2 { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* موبايل */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(100%);
        width: 270px;
        transition: transform 0.3s cubic-bezier(.4,0,.2,1);
    }
    .sidebar.show { transform: translateX(0); }
    .main-content { margin-right: 0; }
    .menu-toggle { display: flex; }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(74,25,66,0.4);
        backdrop-filter: blur(4px);
        z-index: 99;
    }
    .sidebar-overlay.show { display: block; }

    .top-bar { padding: 10px 14px; gap: 10px; }
    .page-title { font-size: 16px; }
    .today-date { font-size: 11px; padding: 4px 10px; }

    .page-content { padding: 12px; }

    .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; gap: 14px; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; gap: 10px; }

    .stat-card { padding: 14px; gap: 12px; }
    .stat-icon { width: 42px; height: 42px; border-radius: 12px; }
    .stat-value { font-size: 20px; }
    .stat-label { font-size: 12px; }

    .card { border-radius: 12px; margin-bottom: 14px; }
    .card-header { padding: 12px 14px; flex-wrap: wrap; gap: 8px; }
    .card-title { font-size: 14px; }
    .card-body { padding: 12px 14px; }
    .card-body.no-pad { padding: 0; }

    /* =============================================
       الجداول تتحول لبطاقات عمودية على الموبايل
       ============================================= */
    .table-wrap { overflow-x: visible; }

    table { display: block; width: 100%; }
    table thead { display: none; }
    table tbody { display: block; width: 100%; }

    table tr {
        display: flex;
        flex-wrap: wrap;
        padding: 14px;
        margin: 0;
        border-bottom: 1px solid var(--border);
        gap: 4px 12px;
        align-items: center;
        position: relative;
    }

    table tr:last-child { border-bottom: none; }

    table td {
        display: inline-flex;
        align-items: center;
        padding: 2px 0;
        border: none;
        font-size: 13px;
        white-space: normal;
        word-break: break-word;
    }

    table td:before {
        content: attr(data-label);
        font-weight: 700;
        font-size: 11px;
        color: var(--text-muted);
        margin-left: 6px;
    }

    table td:first-child {
        font-weight: 800;
        font-size: 15px;
        color: var(--primary);
        width: 100%;
        padding-bottom: 4px;
    }

    /* لون الحالة */
    table td .badge { font-size: 11px; }

    /* أزرار الإجراءات */
    table td .btn-group {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }
    table td .btn-icon { width: 32px; height: 32px; }

    /* الأزرار */
    .btn { padding: 9px 16px; font-size: 13px; border-radius: 10px; }
    .btn-sm { padding: 6px 12px; font-size: 12px; }
    .btn-group { flex-wrap: wrap; gap: 6px; }
    .btn-icon { width: 32px; height: 32px; }

    .filter-bar { flex-direction: column; align-items: stretch; gap: 10px; }
    .filter-bar .form-control { width: 100%; min-width: 0; }
    .filter-bar form { flex-direction: column; gap: 8px; }

    .search-bar { margin-bottom: 14px; }

    .form-control { padding: 10px 14px; font-size: 14px; border-radius: 10px; }

    .modal { width: 96%; max-width: none; border-radius: 16px; max-height: 90vh; overflow-y: auto; }
    .modal-header { padding: 14px 16px; }
    .modal-body { padding: 14px 16px; }
    .modal-footer { padding: 12px 16px; flex-wrap: wrap; gap: 8px; }
    .modal-title { font-size: 16px; }

    .queue-card { padding: 12px; gap: 10px; flex-wrap: wrap; }
    .queue-number { width: 38px; height: 38px; font-size: 14px; border-radius: 10px; }

    .client-card { padding: 14px; border-radius: 14px; }
    .client-header { gap: 10px; margin-bottom: 12px; }
    .client-avatar { width: 42px; height: 42px; font-size: 16px; }
    .client-stats { grid-template-columns: 1fr 1fr; gap: 6px; }
    .client-stat { padding: 8px 4px; border-radius: 8px; }
    .client-stat .label { font-size: 10px; }
    .client-stat .value { font-size: 12px; }

    .service-card { padding: 14px; border-radius: 12px; }
    .service-card .name { font-size: 14px; }
    .service-card .price { font-size: 16px; }

    .progress-bar { height: 8px; }

    .summary-card { padding: 20px; border-radius: 14px; }
    .summary-value { font-size: 28px; }

    .alert { margin: 10px 12px 0 !important; padding: 12px 14px; font-size: 13px; border-radius: 10px; }

    .badge { padding: 4px 10px; font-size: 11px; }

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

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

    /* إصلاح inline styles */
    [style*="grid-template-columns: 1fr 1fr 1fr"],
    [style*="grid-template-columns:1fr 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    [style*="display:flex;gap:20px"],
    [style*="display: flex; gap: 20px"] {
        flex-direction: column !important;
        gap: 10px !important;
    }

    [style*="display:grid;grid-template-columns:repeat(auto-fill"] {
        grid-template-columns: 1fr 1fr !important;
    }
}

/* شاشات صغيرة جداً */
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; gap: 8px; }

    .top-bar { flex-wrap: wrap; }
    .today-date { order: 3; width: 100%; text-align: center; margin-top: 4px; }

    .page-content { padding: 10px; }

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

    .modal { width: 98%; border-radius: 14px; max-height: 92vh; }

    [style*="display:grid;grid-template-columns:repeat(auto-fill"] {
        grid-template-columns: 1fr !important;
    }
}

/* منع الإزاحة الأفقية */
html, body {
    max-width: 100vw;
}

.app-layout {
    max-width: 100vw;
}

/* ---- سكرول بار ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #E8C0D4; border-radius: 3px; }