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

/* إصلاح مشكلة 100vh على متصفحات Android - استخدام dvh مع fallback */
@supports (height: 100dvh) {
    .login-page {
        min-height: 100dvh !important;
    }
    .admin-container,
    .delegate-container {
        height: 100dvh !important;
    }
}

body {
    font-family: 'Tajawal', sans-serif;
    background: #F5F0E8;
    color: #1C1917;
    overflow-x: hidden;
}

:root {
    --primary-dark: #071F17;
    --primary: #0B3D2E;
    --primary-mid: #1B5E3B;
    --primary-light: #2D8659;
    --accent: #C8963E;
    --accent-light: #D4A853;
    --bg: #F5F0E8;
    --card: #FFFFFF;
    --text: #1C1917;
    --text-muted: #78716C;
    --border: #E7E0D5;
    --success: #16A34A;
    --warning: #D97706;
    --danger: #DC2626;
    --info: #0284C7;
    --whatsapp: #25D366;
}

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(-45deg, #071F17, #0B3D2E, #1B5E3B, #0B3D2E);
    background-size: 400% 400%;
    animation: gm 12s ease infinite;
    position: relative;
    overflow: hidden;
}

@keyframes gm {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 48px 40px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
    animation: ca .6s ease-out;
}

@keyframes ca {
    from {
        opacity: 0;
        transform: translateY(30px) scale(.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-card .logo-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 8px 24px rgba(11, 61, 46, 0.3);
}

.login-card .logo-icon i {
    font-size: 32px;
    color: var(--accent);
}

.login-card h1 {
    text-align: center;
    color: var(--primary-dark);
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 6px;
}

.login-card p.subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 32px;
}

/* Form Fields */
.form-field {
    margin-bottom: 18px;
    position: relative;
}

.form-field label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
    margin-bottom: 6px;
}

.form-field .input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-field .input-wrapper i {
    position: absolute;
    right: 14px;
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
}

.form-field input,
.form-field select {
    width: 100%;
    padding: 12px 14px;
    padding-right: 40px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-family: 'Tajawal', sans-serif;
    font-size: 15px;
    transition: all .25s;
    background: #FAFAF7;
    color: var(--text);
}

.form-field input:focus,
.form-field select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(45, 134, 89, 0.12);
    background: #fff;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    border-radius: 12px;
    font-family: 'Tajawal', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all .25s;
    box-shadow: 0 4px 16px rgba(11, 61, 46, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(11, 61, 46, 0.4);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 10px;
    font-family: 'Tajawal', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all .2s;
    white-space: nowrap;
}

.btn:active {
    transform: scale(.97);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 8px;
}

.btn-gold {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    box-shadow: 0 2px 8px rgba(200, 150, 62, .3);
}

.btn-gold:hover {
    box-shadow: 0 4px 14px rgba(200, 150, 62, .4);
}

.btn-green {
    background: var(--success);
    color: white;
}

.btn-green:hover {
    background: #15803D;
}

.btn-blue {
    background: var(--info);
    color: white;
}

.btn-blue:hover {
    background: #0369A1;
}

.btn-red {
    background: var(--danger);
    color: white;
}

.btn-red:hover {
    background: #B91C1C;
}

.btn-whatsapp {
    background: var(--whatsapp);
    color: white;
    box-shadow: 0 2px 8px rgba(37, 211, 102, .3);
}

.btn-whatsapp:hover {
    background: #1DA851;
    box-shadow: 0 4px 14px rgba(37, 211, 102, .4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text-muted);
}

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

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 260px;
    height: 100vh;
    background: var(--primary-dark);
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: transform .35s cubic-bezier(.4, 0, .2, 1);
    overflow-y: auto;
}

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

.sidebar-brand .brand-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-brand .brand-icon i {
    color: var(--primary-dark);
    font-size: 18px;
}

.sidebar-brand h2 {
    color: white;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

.sidebar-brand small {
    color: rgba(255, 255, 255, .5);
    font-size: 11px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
    min-height: 0;
}

.nav-section-title {
    color: rgba(255, 255, 255, .35);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 12px 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    color: rgba(255, 255, 255, .65);
    cursor: pointer;
    transition: all .2s;
    margin-bottom: 2px;
    font-size: 14px;
    font-weight: 500;
}

/* Nested nav-item (e.g. طلبات الشهر inside إدارة الطلبات) */
.nav-item .nav-item {
    margin: 6px 0 2px 8px;
    padding: 10px 14px;
    width: calc(100% - 8px);
    font-size: 13px;
}


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

.nav-item.active {
    background: linear-gradient(135deg, var(--primary-mid), var(--primary-light));
    color: white;
    box-shadow: 0 4px 12px rgba(45, 134, 89, .3);
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 15px;
}

.nav-item .badges {
    margin-right: auto;
    margin-left: 0;
    display: flex;
    gap: 4px;
}

.nav-item .badge {
    background: var(--danger);
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 700;
}

.nav-item .badge-warn {
    background: var(--warning);
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 700;
}

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .05);
    margin-bottom: 10px;
}

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

.sidebar-user .user-info span {
    color: rgba(255, 255, 255, .9);
    font-size: 13px;
    font-weight: 600;
    display: block;
}

.sidebar-user .user-info small {
    color: rgba(255, 255, 255, .4);
    font-size: 11px;
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    color: rgba(255, 255, 255, .5);
    cursor: pointer;
    transition: all .2s;
    border: none;
    background: none;
    width: 100%;
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
}

.btn-logout:hover {
    background: rgba(220, 38, 38, .15);
    color: #FCA5A5;
}

/* Main Content */
.main-content {
    margin-right: 260px;
    min-height: 100vh;
    transition: margin .35s cubic-bezier(.4, 0, .2, 1);
}

.top-bar {
    background: rgba(245, 240, 232, .85);
    backdrop-filter: blur(12px);
    padding: 14px 28px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--border);
}

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--card);
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    color: var(--text);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}

.top-bar h1 {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary-dark);
}

.page-content {
    padding: 28px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--card);
    border-radius: 16px;
    padding: 22px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: all .3s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .08);
}

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 14px;
}

.stat-card .stat-value {
    font-size: 30px;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-card .stat-decoration {
    position: absolute;
    top: -20px;
    left: -20px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    opacity: .06;
}

/* Content Card */
.content-card {
    background: var(--card);
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 24px;
    animation: fi .4s ease-out;
}

@keyframes fi {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.card-header h2 {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h2 i {
    color: var(--accent);
    font-size: 20px;
}

.card-body {
    padding: 24px;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

.data-table thead th {
    padding: 12px 14px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    background: #FAFAF7;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.data-table tbody tr {
    transition: background .15s;
    border-bottom: 1px solid #F0ECE4;
}

.data-table tbody tr:hover {
    background: #FAFAF7;
}

.data-table tbody td {
    padding: 14px;
    text-align: center;
    font-size: 13px;
    vertical-align: middle;
}

/* Badges */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

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

.badge-pending {
    background: #FEF3C7;
    color: #92400E;
}

.badge-pending::before {
    background: #D97706;
}

.badge-picked {
    background: #DBEAFE;
    color: #1E40AF;
}

.badge-picked::before {
    background: #2563EB;
}

.badge-ready {
    background: #D1FAE5;
    color: #065F46;
}

.badge-ready::before {
    background: #059669;
}

.badge-washing {
    background: #F3E5F5;
    color: #6A1B9A;
}

.badge-washing::before {
    background: #9C27B0;
}

.badge-completed {
    background: #D1FAE5;
    color: #065F46;
}

.badge-completed::before {
    background: #059669;
}

.badge-cancelled {
    background: #FEE2E2;
    color: #991B1B;
}

.badge-cancelled::before {
    background: #DC2626;
}

.badge-rejected {
    background: #FEE2E2;
    color: #991B1B;
}

.badge-rejected::before {
    background: #DC2626;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 10002;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 14px 20px;
    border-radius: 12px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
    max-width: 420px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .15);
    animation: ti .4s ease-out;
    position: relative;
    overflow: hidden;
}

.toast.removing {
    animation: to .3s ease-in forwards;
}

.toast-success {
    background: linear-gradient(135deg, #059669, #10B981);
}

.toast-error {
    background: linear-gradient(135deg, #DC2626, #EF4444);
}

.toast-warning {
    background: linear-gradient(135deg, #D97706, #F59E0B);
}

.toast-info {
    background: linear-gradient(135deg, #0284C7, #0EA5E9);
}

.toast .toast-progress {
    position: absolute;
    bottom: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, .4);
    border-radius: 0 0 12px 12px;
    animation: tp 3s linear forwards;
}

@keyframes ti {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes to {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-40px);
    }
}

@keyframes tp {
    from {
        width: 100%;
    }
    to {
        width: 0;
    }
}

/* Modals */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(4px);
    z-index: 200;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

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

.modal-box {
    background: var(--card);
    border-radius: 20px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, .2);
    animation: mi .35s ease-out;
}

@keyframes mi {
    from {
        opacity: 0;
        transform: scale(.92) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

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

.modal-header h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h3 i {
    color: var(--accent);
}

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

.modal-close:hover {
    background: #FEE2E2;
    color: var(--danger);
}

.modal-body {
    padding: 24px;
}

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

/* Alerts */
.alert-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1.5px solid;
}

.alert-warn {
    background: #FFFBEB;
    border-color: #F59E0B;
}

.alert-warn i {
    color: #D97706;
    font-size: 20px;
}

.alert-warn strong {
    color: #92400E;
}

.alert-warn span {
    color: #92400E;
    font-size: 13px;
}

/* Delegate Cards */
.delegate-order-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 14px;
    transition: all .25s;
}

.delegate-order-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
    transform: translateY(-2px);
}

.delegate-order-card .card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
}

.delegate-order-card .customer-name {
    font-size: 17px;
    font-weight: 800;
    color: var(--primary-dark);
}

.delegate-order-card .customer-phone {
    font-size: 13px;
    color: var(--text-muted);
    direction: ltr;
    display: inline-block;
    margin-top: 4px;
}

.delegate-order-card .card-details {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 14px;
}

.delegate-order-card .detail-item {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.delegate-order-card .detail-item i {
    color: var(--accent);
    font-size: 12px;
}

.delegate-order-card .card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Carpet Items */
.carpet-summary {
    background: #FAFAF7;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 14px;
}

.carpet-summary h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.carpet-summary .cs-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    padding: 3px 0;
    border-bottom: 1px dashed #E7E0D5;
}

.carpet-summary .cs-row:last-child {
    border: none;
}

.carpet-summary .cs-total {
    font-weight: 800;
    color: var(--primary-dark);
    font-size: 14px;
    padding-top: 6px;
    border-top: 2px solid var(--border);
    margin-top: 4px;
}

/* Filter Chips */
.filter-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.admin-date-filter-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--border);
}

/* بوب اب التقرير الشامل */
#adminReportModal .modal-box {
    border-radius: 16px;
    overflow: hidden;
    border: none;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);
}

#adminReportModal .stats-grid {
    background: var(--bg);
}

#adminReportModal .stat-card {
    transition: transform .2s;
}

#adminReportModal .stat-card:hover {
    transform: translateY(-3px);
}

.admin-date-filter-chips .filter-chip {
    font-size: 13px;
    padding: 7px 16px;
}

.admin-date-filter-chips .filter-chip i {
    margin-left: 4px;
}

.filter-chip {
    padding: 9px 20px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid var(--border);
    background: var(--card);
    color: var(--text-muted);
    transition: all .2s;
    font-family: 'Tajawal', sans-serif;
}

.filter-chip:hover {
    border-color: var(--primary-light);
    color: var(--primary-light);
}

.filter-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(11, 61, 46, .2);
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.total-box {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    font-size: 22px;
    font-weight: 900;
}

.delegate-layout {
    max-width: 800px;
    margin: 0 auto;
    padding: 16px;
}

.delegate-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-mid));
    color: white;
    padding: 20px;
    border-radius: 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.delegate-header .header-info h2 {
    font-size: 20px;
    font-weight: 800;
}

.delegate-header .header-info small {
    opacity: .7;
    font-size: 13px;
}

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

.empty-state i {
    font-size: 56px;
    color: var(--border);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
}

.link-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s;
}

.link-location {
    background: #D1FAE5;
    color: #065F46;
}

.link-location:hover {
    background: #A7F3D0;
}

/* Carpet Items Grid */
.ci-header {
    display: grid;
    grid-template-columns: 1.4fr .7fr .7fr .7fr .7fr .8fr 36px;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
    padding: 0 2px;
}

.ci-row {
    display: grid;
    grid-template-columns: 1.4fr .7fr .7fr .7fr .7fr .8fr 36px;
    gap: 6px;
    align-items: center;
    margin-bottom: 8px;
    animation: fi .3s ease-out;
}

.ci-row input {
    padding: 9px 8px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: 'Tajawal', sans-serif;
    font-size: 13px;
    text-align: center;
    background: #FAFAF7;
    transition: border-color .2s;
    width: 100%;
}

.ci-row input:focus {
    outline: none;
    border-color: var(--primary-light);
    background: #fff;
}

.ci-val {
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    padding: 9px 4px;
    background: #F0FDF4;
    border-radius: 8px;
    color: var(--primary-dark);
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ci-remove {
    width: 32px;
    height: 32px;
    border: none;
    background: #FEE2E2;
    color: var(--danger);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    font-size: 13px;
}

.ci-remove:hover {
    background: #FCA5A5;
}

.view-section {
    display: none;
}

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

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .4);
    z-index: 99;
}

.sidebar-overlay.active {
    display: block;
}

.gps-active {
    animation: pulseGreen 1.5s infinite;
    background: #28a745;
    color: white;
}

@keyframes pulseGreen {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.payment-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.payment-method {
    flex: 1;
    background: #FAFAF7;
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    border: 2px solid var(--border);
    transition: all .2s;
}

.payment-method input {
    width: 100%;
    padding: 8px;
    margin-top: 8px;
    border-radius: 8px;
    border: 1px solid var(--border);
    text-align: center;
    font-weight: bold;
}

.payment-method label {
    font-weight: 700;
    color: var(--primary-dark);
    display: block;
    margin-bottom: 5px;
}

.payment-summary {
    background: #FAFAF7;
    border-radius: 12px;
    padding: 15px;
    margin-top: 15px;
    text-align: center;
}

.payment-summary .total-paid {
    font-size: 18px;
    font-weight: 800;
    color: var(--success);
}

.payment-summary .remaining {
    font-size: 16px;
    font-weight: 700;
    color: var(--danger);
}

.discount-box {
    background: #FEF3C7;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 15px;
    text-align: center;
    border: 2px solid var(--warning);
}

.discount-box label {
    font-weight: 700;
    color: #92400E;
    display: block;
    margin-bottom: 8px;
}

.discount-box input {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 2px solid var(--warning);
    text-align: center;
    font-weight: bold;
    font-size: 16px;
    background: #FFF8EB;
}

.original-amount {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 5px;
}

.customer-suggestion {
    position: absolute;
    z-index: 1000;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 100%;
    max-height: 150px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
}

.customer-suggestion div {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.customer-suggestion div:hover {
    background: #F0FDF4;
}

.price-presets {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.price-preset-btn {
    background: #FAFAF7;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all .2s;
}

.price-preset-btn:hover {
    background: var(--primary-light);
    color: white;
    border-color: var(--primary-light);
}

.inv-settings-section {
    margin-bottom: 20px;
    padding: 16px;
    background: #FAFAF7;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.inv-settings-section h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.inv-settings-section h4 i {
    color: var(--accent);
    font-size: 14px;
}

.bank-account-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 10px;
    position: relative;
}

.bank-account-card .bank-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.bank-account-card .bank-fields input {
    width: 100%;
    padding: 10px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: 'Tajawal', sans-serif;
    font-size: 13px;
    background: white;
}

.bank-account-card .bank-fields input:focus {
    outline: none;
    border-color: var(--primary-light);
}

.bank-account-card .bank-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: #F0FDF4;
    border-radius: 8px;
    margin-bottom: 10px;
}

.bank-account-card .bank-preview img {
    max-height: 60px;
    max-width: 150px;
    border-radius: 6px;
    border: 1px solid #ddd;
    object-fit: contain;
}

.bank-account-card .bank-preview .no-img {
    font-size: 12px;
    color: var(--text-muted);
    padding: 8px 12px;
    background: #f5f5f5;
    border-radius: 6px;
}

.bank-remove-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 28px;
    height: 28px;
    border: none;
    background: #FEE2E2;
    color: var(--danger);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all .2s;
}

.bank-remove-btn:hover {
    background: #FCA5A5;
}

.logo-preview-box {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: #F0FDF4;
    border-radius: 8px;
}

.logo-preview-box img {
    max-height: 80px;
    max-width: 120px;
    border-radius: 8px;
    border: 2px solid var(--border);
    object-fit: contain;
}

.logo-preview-box .no-img {
    font-size: 12px;
    color: var(--text-muted);
    padding: 8px 16px;
    background: #f5f5f5;
    border-radius: 6px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-right: 0;
    }
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .page-content {
        padding: 16px;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .stats-grid[style*="repeat(5"] {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    .card-body {
        padding: 16px;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .delegate-layout {
        padding: 10px;
    }
    .bank-account-card .bank-fields {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .login-card {
        padding: 32px 24px;
    }
}

/* إصلاحات إضافية للموبايل - تسجيل الدخول */
@media (max-width: 768px) and (hover: none) and (pointer: coarse) {
    .login-page {
        min-height: 100vh;
        min-height: 100dvh;
        align-items: flex-start !important;
        padding: 20px 0;
        overflow-y: auto;
    }
    .login-card {
        max-width: 95%;
        margin: 0 auto;
    }
    .login-card .logo-icon {
        width: 56px;
        height: 56px;
        margin-bottom: 16px;
    }
    .login-card h1 {
        font-size: 22px;
        margin-bottom: 4px;
    }
    .login-card p.subtitle {
        font-size: 13px;
        margin-bottom: 20px;
    }
    .form-field {
        margin-bottom: 14px;
    }
    .btn-primary {
        min-height: 48px;
        font-size: 16px;
    }
    /* منع المتصفح من تكبير الصفحة عند التركيز على الحقول */
    input[type="text"],
    input[type="password"],
    input[type="number"],
    input[type="tel"],
    input[type="date"],
    input[type="search"],
    select,
    textarea {
        font-size: 16px !important;
    }
}
/* إضافات لإعدادات المغسلة */
#laundryLogoPreview img {
    max-height: 80px;
    max-width: 120px;
    border-radius: 10px;
    border: 1px solid var(--border);
    object-fit: contain;
}

/* Transfer Delivery Badge Styles */
.delegate-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
.badge-pickup {
    background: #DBEAFE;
    color: #1E40AF;
}
.badge-delivery {
    background: #D1FAE5;
    color: #065F46;
}

/* Image Upload */
.image-upload-box { width:100%; min-height:120px; border:2px dashed var(--border); border-radius:12px; display:flex; align-items:center; justify-content:center; cursor:pointer; transition:all 0.2s; background:#FAFAF7; overflow:hidden; }
.image-upload-box:hover { border-color:var(--primary); background:#F0FDF4; }
.image-preview-placeholder { text-align:center; padding:20px; }
.image-preview-placeholder p { margin-top:8px; font-size:14px; font-weight:600; color:var(--fg); }
.image-upload-box img { max-width:100%; max-height:200px; object-fit:contain; border-radius:8px; }
.order-thumb { width:45px; height:45px; object-fit:cover; border-radius:8px; cursor:pointer; border:2px solid var(--border); transition:all 0.2s; }
.order-thumb:hover { transform:scale(1.1); border-color:var(--accent); }
.delegate-order-image { width:100%; height:180px; max-height:180px; object-fit:cover; border-radius:10px; margin-top:10px; cursor:pointer; border:2px solid var(--border); background:#f3f4f6; }
.delegate-order-image:hover { border-color:var(--accent); }
.image-lightbox { position:fixed; inset:0; background:rgba(0,0,0,0.95); z-index:9999; display:flex; align-items:center; justify-content:center; cursor:pointer; backdrop-filter:blur(10px); }
.image-lightbox img { max-width:96vw; max-height:94vh; object-fit:contain; border-radius:14px; box-shadow:0 0 40px rgba(0,0,0,0.8); }

/* ========== App Banners (moved from inline) ========== */
.app-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: linear-gradient(135deg, #0B3D2E, #134d3a);
    color: white;
    padding: 14px 20px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-family: 'Tajawal', sans-serif;
    direction: rtl;
}
.app-banner img { width: 44px; height: 44px; border-radius: 10px; }
.app-banner-content { display: flex; align-items: center; gap: 12px; flex: 1; }
.app-banner-text { flex: 1; }
.app-banner-title { font-weight: 700; font-size: 15px; }
.app-banner-desc { font-size: 12px; opacity: 0.85; }
.app-banner-actions { display: flex; gap: 10px; flex-shrink: 0; }
.app-banner-btn-primary {
    padding: 10px 24px;
    background: linear-gradient(135deg, #C8963E, #D4A853);
    color: #0B3D2E;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    white-space: nowrap;
}
.app-banner-btn-close {
    padding: 10px 16px;
    background: rgba(255,255,255,0.15);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
}
.notif-banner { bottom: 70px; background: linear-gradient(135deg, #2563EB, #1d4ed8); }
.notif-icon-wrap {
    width: 44px; height: 44px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0;
}
.notif-btn-enable {
    padding: 10px 24px;
    background: white;
    color: #2563EB;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    white-space: nowrap;
}

/* ========== إعدادات الموقع التعريفي ========== */
.landing-settings-section {
    background: #FAFAF7;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 20px;
}
.landing-settings-section h3 {
    font-size: 15px;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}
.landing-settings-section h3 i {
    color: var(--accent);
    font-size: 16px;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.landing-settings-section .form-grid {
    margin-bottom: 0;
}
.landing-settings-section input,
.landing-settings-section textarea,
.landing-settings-section select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
    transition: all .25s;
    background: #fff;
    color: var(--text);
}
.landing-settings-section input:focus,
.landing-settings-section textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(45, 134, 89, 0.12);
}

/* بطاقات الخدمات */
.ls-service-item {
    background: white;
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 14px;
    transition: all .2s;
    position: relative;
}
.ls-service-item:hover {
    border-color: var(--primary-light);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .06);
}
.ls-service-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.ls-service-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
}

/* بطاقات المميزات */
.ls-feature-item {
    background: white;
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 14px;
    transition: all .2s;
}
.ls-feature-item:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .06);
}

/* بطاقات التقييمات */
.ls-testimonial-item {
    background: white;
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 14px;
    transition: all .2s;
    position: relative;
}
.ls-testimonial-item:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .06);
}
.ls-testimonial-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.ls-t-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
}

/* Responsive لقسم الإعدادات */
@media (max-width: 768px) {
    .landing-settings-section {
        padding: 16px;
        margin-bottom: 16px;
    }
    .landing-settings-section h3 {
        font-size: 14px;
    }
}

/* ========== Vertical Carpet Size Cards ========== */
.carpet-sizes-vertical {
    display: block;
}
.carpet-sizes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}
.carpet-size-card {
    background: #FAFAF7;
    border: 1.5px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    transition: all .25s;
    cursor: grab;
}
.carpet-size-card:active {
    cursor: grabbing;
}
.carpet-size-card:hover {
    border-color: var(--primary-light);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .06);
    transform: translateY(-2px);
}
.carpet-size-card.carpet-size-dragging {
    opacity: 0.4;
    transform: scale(0.95);
    box-shadow: 0 8px 30px rgba(0,0,0,.15);
}
.carpet-size-card.carpet-size-drag-over {
    border-color: var(--primary);
    border-style: dashed;
    border-width: 2.5px;
    background: rgba(200,150,62,.06);
    transform: translateY(-2px);
}
.carpet-size-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-mid));
    color: white;
}
.carpet-size-drag-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(255,255,255,.15);
    border-radius: 8px;
    font-size: 14px;
    flex-shrink: 0;
    cursor: grab;
    opacity: 0.7;
    transition: opacity .2s;
}
.carpet-size-drag-handle:hover {
    opacity: 1;
    background: rgba(255,255,255,.3);
}
.carpet-size-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(255,255,255,.2);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
}
.carpet-size-desc {
    font-size: 15px;
    font-weight: 700;
}
.carpet-size-card-body {
    padding: 20px 16px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.carpet-size-display {
    font-size: 32px;
    font-weight: 900;
    color: var(--text);
    direction: ltr;
    letter-spacing: 1px;
    line-height: 1.2;
}
.carpet-size-x {
    color: var(--primary);
    font-weight: 700;
    margin: 0 4px;
    font-size: 24px;
}
.carpet-size-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}
.carpet-size-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.carpet-size-meta-item i {
    font-size: 11px;
    color: var(--primary);
}
.carpet-size-meta-divider {
    color: var(--border);
}
.carpet-size-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-top: 1.5px dashed var(--border);
    background: #FFFDF7;
}
.carpet-size-total {
    font-size: 15px;
    font-weight: 800;
    color: var(--accent);
}
.carpet-size-actions {
    display: flex;
    gap: 6px;
}
@media (max-width: 768px) {
    .carpet-sizes-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== تفاصيل العميل v3 ===== */
.cust-detail-modal-box { max-width: 850px !important; max-height: 90vh !important; }
.cust-detail-body { padding: 0 !important; overflow-y: auto; max-height: calc(90vh - 60px); }

/* === Hero Image === */
.cust-hero-wrap { position: relative; border-radius: 14px 14px 0 0; overflow: hidden; margin: -20px -20px 0 -20px; }
.cust-hero-img {
    height: 160px; background-size: cover; background-position: center;
    background-repeat: no-repeat; position: relative;
}
.cust-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.7) 0%, rgba(0,0,0,.2) 50%, transparent 100%);
    display: flex; align-items: flex-end; padding: 16px 18px; gap: 12px;
}
.cust-hero-noimg { min-height: 90px; }
.cust-hero-noimg-bg {
    background: linear-gradient(135deg, var(--primary), var(--primaryMid));
    padding: 18px 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.cust-hero-noimg .cust-avatar-lg { background: rgba(255,255,255,.2); }
.cust-avatar-lg {
    width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.25);
    display: flex; align-items: center; justify-content: center; font-size: 22px;
    flex-shrink: 0; border: 2px solid rgba(255,255,255,.4); color: white;
}
.cust-hero-info { flex: 1; min-width: 0; }
.cust-name-lg { font-size: 18px; font-weight: 800; color: white; letter-spacing: .3px; }
.cust-badge-lg {
    font-size: 10px; font-weight: 700; padding: 3px 12px; border-radius: 20px;
    color: white; text-transform: uppercase;
}
.cust-hero-sub { font-size: 12px; color: rgba(255,255,255,.8); margin-top: 4px; }
.cust-hero-sub i { margin-left: 3px; font-size: 11px; }
.cust-hero-actions { display: flex; gap: 8px; flex-shrink: 0; }
.cust-hero-btn {
    width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; font-size: 15px; color: white; text-decoration: none;
    transition: transform .2s; border: none; cursor: pointer;
}
.cust-hero-btn:hover { transform: scale(1.1); }
.cust-hero-call { background: #2563EB; }
.cust-hero-wa { background: #25D366; }

/* === إحصائيات العميل === */
.cust-stats-compact {
    display: grid; grid-template-columns: repeat(6, 1fr); gap: 0;
    border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin: 14px 0 0;
}
.cust-stat-item {
    display: flex; flex-direction: column; align-items: center; padding: 14px 6px; background: var(--card);
}
.cust-stat-item:not(:last-child) { border-left: 1px solid var(--border); }
.cust-stat-num { font-size: 20px; font-weight: 800; line-height: 1.2; }
.cust-stat-lbl { font-size: 10px; color: var(--text-muted); margin-top: 2px; font-weight: 600; }

/* === عنوان الطلبات === */
.cust-orders-title {
    font-size: 14px; font-weight: 700; color: var(--text-secondary);
    margin: 16px 0 10px; padding: 10px 14px; border-bottom: 2px solid var(--border);
    background: var(--bg); border-radius: 8px;
}

/* === قائمة الطلبات === */
.cust-orders-list { display: flex; flex-direction: column; gap: 12px; padding-bottom: 10px; }
.cust-order-card {
    border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px;
    background: var(--card); transition: box-shadow .2s;
}
.cust-order-card:hover { box-shadow: 0 3px 12px rgba(0,0,0,.08); }
.cust-card-warning { border-left: 5px solid #D97706; background: #FFFBEB; }
.cust-card-done { border-left: 5px solid #059669; background: #F0FDF4; }
.cust-card-cancel { border-left: 5px solid #DC2626; background: #FEF2F2; }
.cust-card-dataready { border-left: 5px solid #2563EB; background: #EFF6FF; }
.cust-card-ready { border-left: 5px solid #059669; background: #ECFDF5; }
.cust-card-picked { border-left: 5px solid #7C3AED; background: #F5F3FF; }

/* === صف أول: رقم + فاتورة + حالة + أزرار === */
.cust-order-row1 {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px;
}
.cust-order-idx { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.cust-order-btns { display: flex; gap: 4px; margin-right: auto; }

/* === رقم الفاتورة ذهبي === */
.cust-inv-gold {
    font-size: 16px; font-weight: 900; color: #B45309; padding: 2px 12px;
    background: linear-gradient(135deg, #FEF3C7, #FDE68A); border-radius: 8px;
    border: 2px solid #F59E0B; letter-spacing: .5px;
}
.cust-inv-gold i { font-size: 13px; margin-left: 4px; color: #D97706; }

/* === رقم الفاتورة كبير جداً === */
.cust-inv-hero {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 12px; background: linear-gradient(135deg, #FFFBEB, #FEF3C7);
    border: 2px solid #F59E0B; border-radius: 10px; margin-bottom: 10px;
}
.cust-inv-hero-label { font-size: 12px; color: #92400E; font-weight: 600; }
.cust-inv-hero-label i { margin-left: 4px; }
.cust-inv-hero-num {
    font-size: 32px; font-weight: 900; color: #B45309;
    letter-spacing: 1px; line-height: 1;
}

/* === شريحة السعر الرئيسية === */
.cust-price-hero {
    display: flex; align-items: center; justify-content: center; gap: 0;
    background: linear-gradient(135deg, #F8FAFC, #F1F5F9); border: 1px solid var(--border);
    border-radius: 10px; overflow: hidden; margin-bottom: 10px;
}
.cust-price-hero-block {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    padding: 10px 6px;
}
.cust-price-hero-sep { width: 1px; height: 30px; background: var(--border); }
.cust-price-hero-val { font-size: 22px; font-weight: 900; color: var(--primary); line-height: 1.2; }
.cust-price-hero-unit { font-size: 10px; color: var(--text-muted); font-weight: 600; margin-top: 2px; }

/* === شريحة الشيبس الملونة === */
.cust-chip-section { margin-bottom: 6px; }
.cust-chip-section.cust-chip-blue { background: #EFF6FF; border-radius: 8px; padding: 8px 10px; border: 1px solid #BFDBFE; }
.cust-chip-section.cust-chip-green { background: #F0FDF4; border-radius: 8px; padding: 8px 10px; border: 1px solid #BBF7D0; }
.cust-chip-title { font-size: 11px; font-weight: 700; color: var(--text-secondary); margin-bottom: 6px; }
.cust-chip-title i { margin-left: 4px; }
.cust-chips-row { display: flex; flex-wrap: wrap; gap: 6px; }
.cust-chip {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; border-radius: 8px; font-size: 11px; font-weight: 600;
    border: 1px solid #E5E7EB; background: white; color: var(--text);
    text-decoration: none; transition: all .15s;
}
.cust-chip:hover { transform: translateY(-1px); box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.cust-chip i { font-size: 10px; }
.cust-chip-cash { background: #ECFDF5; color: #065F46; border-color: #A7F3D0; }
.cust-chip-bank { background: #EFF6FF; color: #1E40AF; border-color: #93C5FD; }
.cust-chip-card { background: #FDF4FF; color: #7C3AED; border-color: #D8B4FE; }
.cust-chip-discount { background: #FEF2F2; color: #991B1B; border-color: #FECACA; }
.cust-chip-phone { background: #DBEAFE; color: #1E40AF; border-color: #93C5FD; cursor: pointer; }
.cust-chip-phone:hover { background: #BFDBFE; }
.cust-chip-loc { background: #D1FAE5; color: #065F46; border-color: #6EE7B7; cursor: pointer; }
.cust-chip-loc:hover { background: #A7F3D0; }
.cust-chip-delivery { background: #F5F3FF; color: #6D28D9; border-color: #C4B5FD; }
.cust-chip-done { background: #D1FAE5; color: #065F46; border-color: #6EE7B7; }
.cust-chip-purple { background: #EDE9FE; color: #6D28D9; border-color: #C4B5FD; }
.cust-chip-gray { background: #F3F4F6; color: #4B5563; border-color: #D1D5DB; }

/* === صف تغيير الحالة === */
.cust-order-status-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.cust-quick-status {
    font-family: Tajawal, sans-serif; font-size: 12px; padding: 5px 10px;
    border: 1px solid var(--border); border-radius: 8px; background: var(--bg);
    color: var(--text); cursor: pointer; max-width: 200px; flex: 1;
}
.cust-quick-status-btns { display: flex; gap: 4px; }
.cust-status-icon-btn {
    width: 30px; height: 30px; border-radius: 8px; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 12px;
    transition: all .15s;
}
.cust-status-icon-btn:hover { transform: scale(1.15); box-shadow: 0 2px 8px rgba(0,0,0,.2); }

/* === التجاوب === */
@media (max-width: 600px) {
    .cust-stats-compact { grid-template-columns: repeat(3, 1fr); }
    .cust-stat-item:nth-child(3) { border-left: none; }
    .cust-hero-wrap { margin-top: -16px; margin-left: -16px; margin-right: -16px; }
    .cust-hero-img { height: 130px; }
    .cust-inv-hero-num { font-size: 26px; }
    .cust-inv-gold { font-size: 14px; }
    .cust-price-hero-val { font-size: 18px; }
    .cust-chip-section { padding: 6px 8px !important; }
    .cust-chips-row { gap: 4px; }
}

/* ===== صفحة تتبع الطلبات للعملاء ===== */
.public-tracking-page {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg); z-index: 10002; overflow-y: auto;
    font-family: 'Tajawal', sans-serif;
}
.ptrack-container {
    max-width: 520px; margin: 0 auto; padding: 20px 16px 40px;
}
.ptrack-header {
    text-align: center; padding: 30px 0 20px;
}
.ptrack-brand {
    display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 6px;
}
.ptrack-logo {
    width: 48px; height: 48px; border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primaryMid));
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 22px; box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.ptrack-brand h1 {
    font-size: 22px; font-weight: 800; color: var(--text); margin: 0;
}
.ptrack-subtitle {
    font-size: 14px; color: var(--text-muted); margin: 0;
}
.ptrack-search-box {
    display: flex; gap: 8px; margin-bottom: 20px;
}
.ptrack-input-wrap {
    flex: 1; position: relative;
}
.ptrack-input-wrap i {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); font-size: 14px;
}
.ptrack-input-wrap input {
    width: 100%; padding: 14px 40px 14px 14px; border: 2px solid var(--border);
    border-radius: 12px; font-size: 15px; font-family: 'Tajawal', sans-serif;
    background: var(--card); color: var(--text); box-sizing: border-box;
}
.ptrack-input-wrap input:focus { border-color: var(--primary); outline: none; }
.ptrack-search-btn {
    padding: 14px 20px; border-radius: 12px; font-size: 15px; font-weight: 700;
    white-space: nowrap; flex-shrink: 0;
}
/* نتائج التتبع */
.ptrack-orders-count {
    font-size: 13px; color: var(--text-muted); font-weight: 600;
    padding: 10px 0; margin-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.ptrack-order-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: 14px; padding: 16px; margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.ptrack-order-top {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 10px; margin-bottom: 12px;
}
.ptrack-order-info { flex: 1; }
.ptrack-customer-name { font-size: 16px; font-weight: 700; color: var(--text); }
.ptrack-order-id { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.ptrack-status-badge {
    font-size: 11px; font-weight: 700; color: white;
    padding: 5px 12px; border-radius: 20px; white-space: nowrap;
    display: flex; align-items: center; gap: 5px;
}
.ptrack-order-details {
    display: flex; flex-wrap: wrap; gap: 6px 16px;
}
.ptrack-detail {
    font-size: 12px; color: var(--text-secondary);
}
.ptrack-detail strong { color: var(--text); }
.ptrack-detail i { color: var(--text-muted); margin-left: 4px; font-size: 11px; }
/* حالة التحميل والفارغ */
.ptrack-loading {
    text-align: center; padding: 40px 0; color: var(--text-muted);
}
.ptrack-loading p { margin-top: 12px; font-size: 14px; }
.ptrack-spinner {
    width: 36px; height: 36px; border: 3px solid var(--border);
    border-top-color: var(--primary); border-radius: 50%;
    margin: 0 auto; animation: ptrack-spin .8s linear infinite;
}
@keyframes ptrack-spin { to { transform: rotate(360deg); } }
.ptrack-empty {
    text-align: center; padding: 40px 0; color: var(--text-muted);
}
.ptrack-empty i { font-size: 40px; margin-bottom: 12px; opacity: .4; display: block; }
.ptrack-empty p { font-size: 14px; }
/* رابط الدخول */
.ptrack-footer {
    text-align: center; padding: 30px 0 10px; font-size: 12px;
}
.ptrack-footer a {
    color: var(--text-muted); text-decoration: none;
    border-bottom: 1px dashed var(--border);
    padding-bottom: 2px;
}
.ptrack-footer a:hover { color: var(--primary); }

/* ========== كروت اختيار المقاسات ========== */
.size-cards-section {
    margin-bottom: 16px;
}
.size-cards-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--fg);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.size-cards-title i {
    color: var(--accent);
}
.size-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 6px;
    margin-bottom: 16px;
}
.size-card {
    position: relative;
    background: white;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 8px 4px 6px;
    text-align: center;
    cursor: pointer;
    transition: all .25s cubic-bezier(.4,0,.2,1);
    user-select: none;
    overflow: hidden;
    min-height: 62px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.size-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--border);
    border-radius: 16px 16px 0 0;
    transition: background .25s;
}
.size-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(200,150,62,.2);
}
.size-card:hover::before {
    background: var(--accent);
}
.size-card.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, #F0FDF4, #DCFCE7);
    box-shadow: 0 4px 16px rgba(5,150,105,.2);
}
.size-card.selected::before {
    background: var(--primary);
}
.size-card.selected .size-card-check {
    opacity: 1;
    transform: scale(1);
}
.size-card-check {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    opacity: 0;
    transform: scale(0.5);
    transition: all .25s cubic-bezier(.4,0,.2,1);
}
.size-card-dims {
    font-size: 16px;
    font-weight: 900;
    color: var(--fg);
    line-height: 1.1;
    direction: ltr;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.size-card.selected .size-card-dims {
    color: var(--primary-dark);
    text-shadow: 0 1px 3px rgba(11,61,46,.12);
}
.size-card-desc {
    font-size: 9px;
    color: var(--text-muted);
    margin-top: 2px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.size-card-price {
    font-size: 8px;
    color: var(--accent);
    font-weight: 700;
    margin-top: 2px;
    direction: ltr;
}
.size-card-qty {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 800;
    opacity: 0;
    transform: scale(0.5);
    transition: all .25s cubic-bezier(.4,0,.2,1);
}
.size-card.selected .size-card-qty {
    opacity: 1;
    transform: scale(1);
}
.size-card-tap-hint {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 8px;
    opacity: .6;
}

/* ========== تم إزالة أنماط التوقيع من يوزر المندوب (v35) ========== */

/* ========== أزرار القبول/الرفض للمندوب ========== */
.delegate-action-accept {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #059669, #10B981);
    color: white;
    font-family: 'Tajawal', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all .25s;
    box-shadow: 0 4px 12px rgba(5,150,105,.3);
}
.delegate-action-accept:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(5,150,105,.4);
}
.delegate-action-accept:active {
    transform: scale(.98);
}
.delegate-action-reject {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 2px solid #FCA5A5;
    background: #FEF2F2;
    color: #DC2626;
    font-family: 'Tajawal', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all .25s;
}
.delegate-action-reject:hover {
    background: #FEE2E2;
    border-color: #DC2626;
}

/* ========== بوابة الدفع الإلكتروني ========== */
.payment-gateway-modal {
    text-align: center;
}
.payment-methods-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 20px 0;
}
.payment-method-card {
    position: relative;
    border: 2.5px solid var(--border);
    border-radius: 16px;
    padding: 22px 12px;
    text-align: center;
    cursor: pointer;
    transition: all .25s;
    background: white;
}
.payment-method-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,.08);
}
.payment-method-card.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, #F0FDF4, #DCFCE7);
}
.payment-method-card .pm-icon {
    font-size: 36px;
    margin-bottom: 10px;
    display: block;
}
.payment-method-card .pm-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--fg);
}
.payment-method-card .pm-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}
.payment-amount-display {
    padding: 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 16px;
    color: white;
    margin: 16px 0;
}
.payment-amount-display .pad-label {
    font-size: 13px;
    opacity: .8;
}
.payment-amount-display .pad-amount {
    font-size: 32px;
    font-weight: 800;
    direction: ltr;
}
.payment-amount-display .pad-order {
    font-size: 12px;
    opacity: .7;
    margin-top: 4px;
}
.payment-pay-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, var(--accent), #D4A853);
    color: white;
    font-family: 'Tajawal', sans-serif;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
    transition: all .25s;
    box-shadow: 0 4px 16px rgba(200,150,62,.3);
}
.payment-pay-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(200,150,62,.4);
}
.payment-pay-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
}
.payment-status {
    padding: 16px;
    border-radius: 12px;
    margin-top: 12px;
    font-weight: 700;
    font-size: 14px;
    display: none;
}
.payment-status.success {
    display: block;
    background: #F0FDF4;
    border: 1px solid #86EFAC;
    color: #065F46;
}
.payment-status.error {
    display: block;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #DC2626;
}
.payment-status.pending {
    display: block;
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    color: #92400E;
}

/* ========== Orders Card List ========== */
.orders-card-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.order-card {
    background: var(--card);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.15s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.order-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    border-color: var(--accent);
}
.order-card.card-warning { background: #FFFBEB; border-right: 4px solid #D97706; }
.order-card.card-no { background: #FEF2F2; border-right: 4px solid #DC2626; }
.order-card.card-dataready { background: #EFF6FF; border-right: 4px solid #2563EB; }
.order-card.card-ready { background: #ECFDF5; border-right: 4px solid #059669; }
.order-card.card-picked { background: #F5F3FF; border-right: 4px solid #7C3AED; }

/* Header Row - Image + Customer + Status */
.oc-row {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    gap: 12px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* Image */
.oc-img {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid var(--border);
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
}
.oc-img:hover { border-color: var(--accent); transform: scale(1.05); }

/* Customer name (no phone inside anymore) */
.oc-cust {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.oc-customer-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--accent);
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: rgba(200,150,62,0.3);
    text-underline-offset: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    display: block;
}
.oc-customer-name:hover { text-decoration-color: var(--accent); }

/* Phone number row (separate from header) */
.oc-phone-row {
    padding: 0 14px 6px 14px;
}
.oc-customer-phone {
    font-size: 14px;
    font-weight: 700;
    color: #000;
    direction: ltr;
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

/* Status area */
.oc-status-area {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    max-width: 40%;
}

/* Info chips row - two sub-rows */
.oc-chips {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px 8px;
    padding: 8px 14px;
}
.oc-chip {
    font-size: 12px;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.oc-chip i { font-size: 10px; opacity: 0.6; }
.oc-chip b { color: var(--text); font-weight: 600; }
.oc-chip .oc-price { color: var(--success); font-weight: 700; font-size: 13px; }

/* Footer - Actions + Notes */
.oc-footer {
    display: flex;
    flex-direction: column;
    padding: 8px 14px;
    gap: 6px;
    border-top: 1px solid rgba(0,0,0,0.05);
}
.oc-actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    align-items: center;
}
.oc-actions .btn-sm {
    min-width: 32px;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.15s;
}
.oc-actions .btn-sm:hover {
    transform: translateY(-1px);
}
.oc-note-chip {
    font-size: 12px;
    color: #92400E;
    background: #FEF3C7;
    padding: 5px 10px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s;
    align-self: flex-start;
}
.oc-note-chip:hover { background: #FDE68A; }
.oc-note-chip i { flex-shrink: 0; }

/* ========== Mobile Responsive for Order Cards ========== */
@media (max-width: 768px) {
    .orders-card-list { gap: 8px; }
    .order-card { border-radius: 10px; }
    .order-card.card-warning,
    .order-card.card-no,
    .order-card.card-dataready,
    .order-card.card-ready,
    .order-card.card-picked { border-right-width: 3px; }
    
    .oc-row {
        padding: 8px 10px;
        gap: 8px;
    }
    .oc-img { width: 36px; height: 36px; border-radius: 8px; }
    .oc-customer-name { font-size: 13px; }
    .oc-phone-row { padding: 0 10px 5px 10px; }
    .oc-customer-phone { font-size: 13px; }
    .oc-status-area { max-width: 45%; }
    
    .oc-chips {
        grid-template-columns: 1fr 1fr;
        gap: 2px 6px;
        padding: 6px 10px;
    }
    .oc-chip { font-size: 11px; gap: 3px; }
    .oc-chip i { font-size: 9px; }
    .oc-chip .oc-price { font-size: 12px; }
    
    .oc-footer { padding: 6px 10px; gap: 5px; }
    .oc-actions { gap: 4px; }
    .oc-actions .btn-sm { min-width: 30px; min-height: 30px; font-size: 12px; }
    .oc-note-chip { font-size: 11px; padding: 4px 8px; }
}

@media (max-width: 480px) {
    .orders-card-list { gap: 6px; }
    .order-card { border-radius: 10px; }
    
    .oc-row {
        padding: 7px 10px;
        gap: 8px;
    }
    .oc-img { width: 34px; height: 34px; border-radius: 8px; }
    .oc-customer-name { font-size: 12px; }
    .oc-phone-row { padding: 0 10px 5px 10px; }
    .oc-customer-phone { font-size: 13px; font-weight: 700; color: #000; }
    .oc-status-area { max-width: none; }
    
    .oc-chips {
        grid-template-columns: 1fr 1fr;
        gap: 2px 4px;
        padding: 5px 10px;
    }
    .oc-chip { font-size: 10px; gap: 2px; }
    .oc-chip i { font-size: 8px; }
    .oc-chip .oc-price { font-size: 11px; }
    
    .oc-footer { padding: 5px 10px; gap: 4px; }
    .oc-actions { gap: 3px; }
    .oc-actions .btn-sm { min-width: 28px; min-height: 28px; padding: 3px 5px; font-size: 11px; }
    .oc-note-chip { font-size: 10px; padding: 3px 7px; max-width: calc(100vw - 80px); }
}

/* ========== Customer Notes Section ========== */
.cust-notes-section {
    margin-top: 10px;
    padding: 10px 12px;
    background: #FFFBEB;
    border-radius: 10px;
    border: 1px solid #FDE68A;
}
.cust-notes-title {
    font-size: 13px;
    font-weight: 700;
    color: #92400E;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.cust-notes-list {
    max-height: 120px;
    overflow-y: auto;
}
.cust-note-item {
    background: #FEF3C7;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 6px;
    border: 1px solid #FDE68A;
}
.cust-note-content {
    font-size: 13px;
    color: #78350F;
    line-height: 1.5;
    word-break: break-word;
}
.cust-note-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
    font-size: 11px;
    color: #92400E;
}

/* Toast notification animation */
.toast-enter { animation: toastIn .4s ease-out; }
@keyframes toastIn { from { opacity:0; transform:translateY(-20px) scale(.95); } to { opacity:1; transform:translateY(0) scale(1); } }

/* ====== v212: قسم البطاطين والإجمالي ====== */
.v212-section-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 800;
    color: var(--primary-dark);
    margin: 18px 0 12px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #F0FDF4, #DCFCE7);
    border-radius: 12px;
    border: 2px solid #BBF7D0;
}
.v212-section-divider i {
    font-size: 18px;
    color: var(--accent);
}

/* Blanket Items Grid */
.bi-header {
    display: grid;
    grid-template-columns: 2fr 1fr 36px;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
    padding: 0 2px;
}
.bi-row {
    display: grid;
    grid-template-columns: 2fr 1fr 36px;
    gap: 6px;
    align-items: center;
    margin-bottom: 8px;
    animation: fi .3s ease-out;
}
.bi-row input {
    padding: 9px 8px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: 'Tajawal', sans-serif;
    font-size: 13px;
    text-align: center;
    background: #FAFAF7;
    transition: border-color .2s;
    width: 100%;
}
.bi-row input:focus {
    outline: none;
    border-color: var(--primary-light);
    background: #fff;
}

/* Blanket type cards */
.blanket-type-card {
    position: relative;
    padding: 12px 10px;
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all .2s;
    text-align: center;
    background: var(--card);
}
.blanket-type-card:hover {
    border-color: #DC2626;
    box-shadow: 0 2px 8px rgba(220,38,38,0.15);
}
.blanket-type-card.selected {
    border-color: #DC2626;
    background: linear-gradient(135deg, #FEF2F2, #FEE2E2);
}
.blanket-type-card .bt-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--primary-dark);
}
.blanket-type-card .bt-qty {
    position: absolute;
    top: -6px;
    left: -6px;
    background: #DC2626;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 11px;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
}
.blanket-type-card.selected .bt-qty {
    display: flex;
}
.blanket-type-card .bt-last-price {
    font-size: 11px;
    color: #6B7280;
    margin-top: 4px;
    text-align: center;
}
.blanket-type-card .bt-last-price.hint {
    color: #9CA3AF;
    font-style: italic;
}
.blanket-type-card.selected .bt-last-price {
    color: #B91C1C;
    font-weight: 600;
}

/* Grand Total Box */
.v212-grand-total {
    margin-top: 20px;
    padding: 16px;
    background: linear-gradient(135deg, #F0FDF4, #DCFCE7);
    border: 2px solid #86EFAC;
    border-radius: 14px;
}
.v212-grand-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 4px;
    font-size: 14px;
    color: var(--primary-dark);
}
.v212-grand-total-row span {
    display: flex;
    align-items: center;
    gap: 8px;
}
.v212-grand-total-row span i {
    font-size: 14px;
    color: var(--accent);
}
.v212-grand-total-row strong {
    font-weight: 800;
}
.v212-grand-total-divider {
    border-top: 2px dashed #86EFAC;
    margin: 8px 0;
}
.v212-final-total {
    font-size: 17px !important;
    color: var(--primary-dark) !important;
}
.v212-final-total strong {
    font-size: 20px;
    color: #DC2626;
}
