/*
 | إضافات على style.css — لا تعدّل الأصل.
 | تقتصر على ما تحتاجه طبقة Laravel: رسائل النظام وأخطاء التحقق.
 | تتبع نفس متغيرات التصميم المعرّفة في style.css.
 */

/* ── رسائل النظام ──────────────────────────────────────── */
.flash {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    border-inline-start: 3px solid;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.7;
}

.flash i {
    margin-top: 3px;
    flex-shrink: 0;
}

.flash-success {
    background: #ECFDF5;
    border-color: var(--color-success);
    color: #065F46;
}

.flash-danger {
    background: #FEF2F2;
    border-color: var(--color-danger);
    color: #991B1B;
}

.flash-warning {
    background: #FFF7ED;
    border-color: var(--color-warning);
    color: #9A3412;
}

.flash-info {
    background: #EFF6FF;
    border-color: var(--color-info);
    color: #1E40AF;
}

/* ── أخطاء التحقق على مستوى الحقل ──────────────────────── */
.field-error {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--color-danger);
}

.input-invalid,
input.input-invalid,
select.input-invalid,
textarea.input-invalid {
    border-color: var(--color-danger) !important;
}

/*
 | قوائم منسدلة داخل .input-wrapper (المدينة في التسجيل).
 | التصميم الأصلي لم يحتوِ أي <select>، فقواعد style.css تخص
 | .input-wrapper input وحدها — والقائمة كانت تظهر بشكل المتصفح
 | الافتراضي (73×19 بخط Arial) وسط حقول 58 بكسل بخط Plus Jakarta Sans.
 | هذه القواعد تطابقها مع الحقول المجاورة بلا لمس style.css.
 */
.signup-page .input-wrapper select,
.login-page .input-wrapper select,
.reset-page .input-wrapper select {
    width: 100%;
    background: #fff;
    border: 1px solid #fff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #879394;
    outline: none;
    transition: all 0.3s ease;

    /* مع `normal` يحسب المتصفح ارتفاع القائمة بغير ما يحسبه للحقل،
       فيختلف الارتفاعان بحسب الخط واللغة (58 مقابل 54 في الإنجليزية).
       سطر صريح يجعل الحساب واحداً، والارتفاع يُضبط لكل صفحة أدناه. */
    line-height: 1.3125;

    /* إخفاء سهم المتصفح ورسم سهم خاص يحترم اتجاه الصفحة */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23879394' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 16px;
    cursor: pointer;
}

/* صفحة التسجيل: الأيقونة يميناً والسهم يساراً */
.signup-page .input-wrapper select {
    padding: 17px 48px 18px 44px;
    border-radius: 16px;
    font-size: 16px;
    background-position: left 16px center;
}

.signup-page .input-wrapper select:focus {
    border-color: #028E94;
    box-shadow: 0 0 0 3px rgba(2, 142, 148, 0.2);
}

/* صفحة الدخول: الأيقونة يساراً في التصميم، فالسهم يميناً */
.login-page .input-wrapper select {
    padding: 17px 44px 18px 48px;
    border-radius: 12px;
    font-size: 16px;
    background-position: right 16px center;
}

.login-page .input-wrapper select:focus {
    border-color: #6DD6DC;
    box-shadow: 0 0 0 3px rgba(109, 214, 220, 0.2);
}

.reset-page .input-wrapper select {
    padding: 15px 56px 15px 44px;
    border-radius: 16px;
    font-size: 18px;
    background-position: left 20px center;
}

.reset-page .input-wrapper select:focus {
    border-color: #6DD6DC;
    box-shadow: 0 0 0 3px rgba(109, 214, 220, 0.2);
}

/* الخيار المعطَّل (نص الإرشاد) أفتح من الخيارات الحقيقية */
.signup-page .input-wrapper select option[value=""],
.login-page .input-wrapper select option[value=""],
.reset-page .input-wrapper select option[value=""] {
    color: #A8B0B1;
}

/* الخيارات نفسها بلون النص الأساسي لا الرمادي الباهت */
.signup-page .input-wrapper select option,
.login-page .input-wrapper select option,
.reset-page .input-wrapper select option {
    color: #04294D;
}

@media (prefers-reduced-motion: reduce) {
    .signup-page .input-wrapper select,
    .login-page .input-wrapper select,
    .reset-page .input-wrapper select {
        transition: none;
    }
}

/*
 | تباين النصوص على البطاقات الداكنة.
 | صفحات المصادقة في التصميم الأصلي كانت مستقلة بخلفية داكنة،
 | وعناوين الحقول فيها ورثت لون النص الافتراضي الداكن بعد دمجها
 | في تخطيط الموقع. هذه القواعد تعيد التباين المطلوب.
 */
.login-card .form-label,
.login-card .form-label label,
.login-card label,
.otp-card label,
.reset-card .form-label,
.reset-card label {
    color: rgba(255, 255, 255, 0.85);
}

.login-card .form-label a,
.reset-card .form-label a {
    color: var(--brand-primary-light);
}

.login-card .field-error,
.otp-card .field-error,
.reset-card .field-error {
    color: #FCA5A5;
}

.login-card .form-hint,
.reset-card .form-hint {
    color: rgba(255, 255, 255, 0.6);
}

/* ── رابط تخطي إلى المحتوى — يظهر عند التنقل بلوحة المفاتيح فقط ── */
.skip-link {
    position: absolute;
    inset-inline-start: 12px;
    top: -60px;
    z-index: 9999;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    background: var(--brand-primary);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 12px;
}

/* ── إخفاء بصري مع إبقاء العنصر لقارئ الشاشة ───────────── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── اختيار نوع الحساب — إضافة على تصميم التسجيل ────────── */
.role-choice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.role-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.role-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 10px;
    border: 2px solid var(--surface-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    min-height: 44px;
}

.role-box i {
    font-size: 20px;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.role-option input:checked + .role-box {
    border-color: var(--brand-primary);
    background: rgba(8, 148, 151, 0.06);
    color: var(--brand-primary-dark);
}

.role-option input:checked + .role-box i {
    color: var(--brand-primary);
}

.role-option input:focus-visible + .role-box {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

/* ── تلميح أسفل الحقل ──────────────────────────────────── */
.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ── موافقة الشروط ─────────────────────────────────────── */
.terms-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1.7;
}

.terms-check input {
    margin-top: 4px;
    flex-shrink: 0;
}

.terms-check a {
    color: var(--brand-primary);
    text-decoration: underline;
}

/* ── صفحة إنشاء الحساب: ألوان فاتحة فوق الخلفية الداكنة ── */
.signup-page .form-hint,
.signup-page .terms-check {
    color: rgba(255, 255, 255, 0.75);
}

.signup-page .terms-check a {
    color: #6DD6DC;
}

.signup-page .role-box {
    border-color: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.9);
}

.signup-page .role-box i {
    color: rgba(255, 255, 255, 0.55);
}

.signup-page .role-option input:checked + .role-box {
    border-color: #6DD6DC;
    background: rgba(109, 214, 220, 0.08);
    color: #6DD6DC;
}

.signup-page .role-option input:checked + .role-box i {
    color: #6DD6DC;
}

/* ── عنصر تقييم في ملف منفذ الخدمة ─────────────────────── */
.review-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--surface-border);
}

.review-item:last-child {
    border-bottom: none;
}

.review-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.review-head strong {
    color: var(--text-primary);
    font-size: 15px;
}

.review-stars {
    color: #EAB308;
    font-size: 13px;
}

.review-date {
    margin-inline-start: auto;
    font-size: 12px;
    color: var(--text-muted);
}

.review-body {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.8;
}

.review-reply {
    margin-top: 10px;
    padding: 12px 14px;
    background: var(--surface-light);
    border-radius: var(--radius-sm);
    border-inline-start: 3px solid var(--brand-primary);
}

.review-reply strong {
    display: block;
    font-size: 13px;
    color: var(--brand-primary-dark);
    margin-bottom: 4px;
}

.review-reply p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ملف PDF في معرض الأعمال */
.wg-file {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 100%;
    min-height: 140px;
    background: var(--surface-light);
    color: var(--text-secondary);
    font-size: 13px;
    text-align: center;
    padding: 12px;
}

.wg-file i {
    font-size: 32px;
    color: var(--brand-primary);
}

/* ── حالة فارغة للقوائم المرتبطة بقاعدة البيانات ────────── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 42px;
    color: var(--surface-border);
    margin-bottom: 12px;
    display: block;
}

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

/* ── شريط انتحال الهوية ────────────────────────────────── */
.imp-bar {
    position: sticky;
    top: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 20px;
    background: #B91C1C;
    color: #fff;
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
    font-weight: 700;
}

.imp-bar-text { display: inline-flex; align-items: center; gap: 8px; }

.imp-bar-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 60px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.imp-bar-btn:hover { background: #fff; color: #B91C1C; }

/* ══════════════════════════════════════════════════════════
   صفحات الأخطاء — بديل قوالب Laravel الإنجليزية الافتراضية
   ══════════════════════════════════════════════════════════ */

.err-page {
    display: grid;
    place-items: center;
    min-height: 62vh;
    padding: 64px 20px;
}

.err-box {
    display: grid;
    justify-items: center;
    gap: 14px;
    max-width: 560px;
    text-align: center;
}

.err-code {
    font-size: 76px;
    font-weight: 800;
    line-height: 1;
    color: var(--brand-primary, #089497);
    font-variant-numeric: tabular-nums;
}

.err-title {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    color: var(--brand-secondary, #04294D);
}

.err-hint {
    margin: 0;
    font-size: 15px;
    line-height: 1.9;
    color: var(--text-muted, #6B7280);
}

.err-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
}

.err-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: var(--radius-md, 12px);
    font-size: 14.5px;
    font-weight: 700;
    text-decoration: none;
    transition: background .18s ease, transform .18s ease;
}

.err-btn-primary {
    background: var(--brand-primary, #089497);
    color: #fff;
}

.err-btn-primary:hover {
    background: var(--brand-primary-dark, #028E94);
    transform: translateY(-2px);
}

.err-btn-ghost {
    border: 1px solid var(--brand-primary, #089497);
    color: var(--brand-primary, #089497);
}

.err-btn-ghost:hover {
    background: rgba(8, 148, 151, .08);
}

.err-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #E5E7EB;
    width: 100%;
}

.err-links a {
    color: var(--text-muted, #6B7280);
    font-size: 13.5px;
    text-decoration: none;
}

.err-links a:hover {
    color: var(--brand-primary, #089497);
    text-decoration: underline;
}

@media (max-width: 480px) {
    .err-code { font-size: 58px; }
    .err-title { font-size: 20px; }
    .err-btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    .err-btn { transition: none; }
    .err-btn:hover { transform: none; }
}

/* ============================================ */
/* Compat: classes used by Blade views          */
/* ============================================ */

/* inline validation messages (auth forms) */
.text-danger {
    display: block;
    margin-top: 6px;
    color: #DC2626;
    font-size: 13px;
    font-weight: 500;
}

/* confirm action button (orders / disputes) */
.btn-confirm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    background: #10B981;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    transition: background .2s;
}

.btn-confirm:hover { background: #059669; color: #fff; }

@media (prefers-reduced-motion: reduce) {
    .btn-confirm { transition: none; }
}

/* ============================================ */
/* Accept / negotiate actions on an offer card  */
/* (request-offers.css styles the card itself;  */
/*  it has no owner actions, so add just these) */
/* ============================================ */

.rq-offer-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px dashed #E5E7EB;
}

.rq-offer-actions form { margin: 0; }

.rq-offer-actions .rq-cta-btn {
    width: auto;
    padding: 9px 22px;
    font-size: 13.5px;
}
/* ============================================ */
/* Signed-in header extras on the public site   */
/* (the static export is always a guest, so     */
/*  these have no counterpart there)            */
/* ============================================ */

.notification-bell {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface-alt, #F3F4F6);
    color: var(--brand-secondary, #04294D);
    text-decoration: none;
    transition: background .18s ease, color .18s ease;
}

.notification-bell:hover {
    background: var(--brand-primary, #089497);
    color: #fff;
}

.notif-badge {
    position: absolute;
    inset-block-start: -2px;
    inset-inline-end: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    border: 2px solid #fff;
    background: #DC2626;
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.notif-badge[hidden] { display: none; }

.btn-outline-wallet i { color: var(--brand-primary, #089497); }

.btn-outline-admin {
    border-color: var(--brand-secondary, #04294D);
    color: var(--brand-secondary, #04294D);
}

/* ============================================ */
/* Pagination on the public listings            */
/* ============================================ */

.pr-pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 26px;
}

.pr-page {
    display: grid;
    place-items: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid var(--surface-border, #E5E7EB);
    border-radius: 10px;
    background: #fff;
    color: var(--brand-secondary, #04294D);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.pr-page:hover:not([disabled]) {
    border-color: var(--brand-primary, #089497);
    color: var(--brand-primary, #089497);
}

.pr-page.active {
    background: var(--brand-primary, #089497);
    border-color: var(--brand-primary, #089497);
    color: #fff;
}

.pr-page[disabled] {
    opacity: .45;
    cursor: not-allowed;
}

/* ============================================ */
/* Empty state used by the public listings      */
/* (mirrors the dashboard's dash-empty)         */
/* ============================================ */

.dash-empty {
    padding: 48px 24px;
    text-align: center;
    color: var(--text-muted, #6B7280);
}

.dash-empty > i {
    font-size: 2.4rem;
    color: var(--brand-primary, #089497);
    opacity: .35;
    margin-bottom: 14px;
}

.dash-empty-title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
    color: var(--brand-secondary, #04294D);
}

.dash-empty-hint {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.75;
}

/* ============================================ */
/* Initial-letter avatar fallback — base rule.   */
/* listing.css defines it too, but pages that    */
/* don't load listing.css (home, dashboards'     */
/* public pages) still render .av-initial.       */
/* ============================================ */

.av-initial {
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 800;
    line-height: 1;
    user-select: none;
}

/* .cc-photo is a 92x92 rounded box; the initial fills it like the <img> does */
.craftsmen .cc-photo .cc-initial {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    font-size: 2rem;
}

/* ============================================ */
/* Working hours card on the provider profile   */
/* ============================================ */

.pd-hours {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pd-hour-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--surface-border, #E5E7EB);
    font-size: 13.5px;
    color: var(--text-secondary, #434655);
}

.pd-hour-row:last-child { border-bottom: 0; padding-bottom: 0; }

.pd-hour-time {
    font-weight: 700;
    color: var(--brand-secondary, #04294D);
    font-variant-numeric: tabular-nums;
    direction: ltr;
}

.pd-hour-closed {
    font-weight: 700;
    font-size: 12.5px;
    color: #B91C1C;
}

.pd-hour-row.is-closed span:first-child { color: var(--text-muted, #6B7280); }

/* ══════════════════════════════════════════════════════════════
   صفحات الحساب العامة على تخطيط layouts.app
   (/dashboard · /profile · /messages · /notifications · /wallet)
   هذه القوالب تُصدر كلاسات dashboard-* لم يعرّفها أي ملف، فكانت
   تظهر بلا تنسيق ويفيض محتواها خارج الصفحة.
   ══════════════════════════════════════════════════════════════ */

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 20px 64px;
}

.dashboard-header { margin-bottom: 26px; }

.dashboard-header h1 {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 800;
    color: var(--brand-secondary, #04294D);
}

.dashboard-header p {
    margin: 0;
    font-size: 14.5px;
    color: var(--text-muted, #6B7280);
}

/* ── شبكة الإحصائيات ────────────────────────────────── */

.stats-grid,
.wallet-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--surface-border, #E5E7EB);
    border-radius: var(--radius-md, 12px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}

.stat-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    flex: none;
    border-radius: 12px;
    background: rgba(8, 148, 151, .1);
    color: var(--brand-primary, #089497);
    font-size: 19px;
}

.stat-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.stat-info .stat-number {
    font-size: 22px;
    font-weight: 800;
    color: var(--brand-secondary, #04294D);
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.stat-info .stat-label {
    font-size: 13px;
    color: var(--text-muted, #6B7280);
}

/* ── بطاقات الجداول ─────────────────────────────────── */

.dashboard-tables {
    display: grid;
    gap: 22px;
}

.table-card {
    background: #fff;
    border: 1px solid var(--surface-border, #E5E7EB);
    border-radius: var(--radius-md, 12px);
    overflow: hidden;
}

.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--surface-border, #E5E7EB);
}

.table-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--brand-secondary, #04294D);
}

.btn-link {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--brand-primary, #089497);
    text-decoration: none;
}

.btn-link:hover { text-decoration: underline; }

/* الجدول نفسه — يمرّر أفقياً بدل أن يفيض عن الصفحة */
.table-wrapper { width: 100%; overflow-x: auto; }

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.dashboard-table th,
.dashboard-table td {
    padding: 13px 16px;
    text-align: start;
    white-space: nowrap;
}

.dashboard-table thead th {
    background: var(--surface-light, #F7F9FA);
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-secondary, #434655);
    border-bottom: 1px solid var(--surface-border, #E5E7EB);
}

.dashboard-table tbody tr + tr td { border-top: 1px solid var(--surface-border, #E5E7EB); }
.dashboard-table tbody tr:hover { background: var(--surface-light, #F7F9FA); }

.dashboard-table td[colspan] {
    text-align: center;
    padding: 34px 16px;
    color: var(--text-muted, #6B7280);
}

/* ── الملف الشخصي ───────────────────────────────────── */

.profile-card {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 24px;
    background: #fff;
    border: 1px solid var(--surface-border, #E5E7EB);
    border-radius: var(--radius-md, 12px);
    margin-bottom: 22px;
}

.avatar-img {
    width: 96px;
    height: 96px;
    flex: none;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--surface-light, #F7F9FA);
}

.profile-details { min-width: 0; }

.profile-details h2 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 800;
    color: var(--brand-secondary, #04294D);
}

.profile-email,
.profile-phone {
    display: block;
    margin: 0 0 3px;
    font-size: 14px;
    color: var(--text-muted, #6B7280);
    direction: ltr;
    text-align: start;
}

.profile-role {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(8, 148, 151, .1);
    color: var(--brand-primary, #089497);
    font-size: 12.5px;
    font-weight: 700;
}

/* ── الرسائل ────────────────────────────────────────── */

.messages-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.conversations-list,
.message-view {
    background: #fff;
    border: 1px solid var(--surface-border, #E5E7EB);
    border-radius: var(--radius-md, 12px);
    overflow: hidden;
}

.conversations-header {
    padding: 15px 18px;
    border-bottom: 1px solid var(--surface-border, #E5E7EB);
}

.conversations-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--brand-secondary, #04294D);
}

.conversations-body { max-height: 520px; overflow-y: auto; }

.message-placeholder {
    display: grid;
    place-items: center;
    gap: 10px;
    min-height: 320px;
    padding: 40px 24px;
    text-align: center;
    color: var(--text-muted, #6B7280);
}

.message-placeholder i {
    font-size: 2.4rem;
    color: var(--brand-primary, #089497);
    opacity: .3;
}

/* ── التنبيهات ──────────────────────────────────────── */

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
}

.notification-item + .notification-item { border-top: 1px solid var(--surface-border, #E5E7EB); }
.notification-item.is-unread { background: rgba(8, 148, 151, .04); }

.notification-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 10px;
    background: rgba(8, 148, 151, .1);
    color: var(--brand-primary, #089497);
}

.notification-content { flex: 1; min-width: 0; }

.notification-content strong {
    display: block;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--brand-secondary, #04294D);
}

.notification-content p {
    margin: 4px 0 0;
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--text-secondary, #434655);
}

.notification-actions { display: flex; align-items: center; gap: 8px; flex: none; }

.pagination-wrapper {
    display: flex;
    justify-content: center;
    padding: 18px;
}

/* ── المحفظة ────────────────────────────────────────── */

.wallet-page .wallet-header { margin-bottom: 22px; }
.text-warning { color: #B45309; font-weight: 700; }

@media (max-width: 860px) {
    .messages-layout { grid-template-columns: 1fr; }
    .dashboard-container { padding: 22px 16px 48px; }
}

/* ============================================================
   رسائل النجاح والخطأ (flash)
   كانت الكلاسات .alert / .alert-success / .alert-error مستخدمة في
   القوالب بلا أي تعريف في CSS، فتظهر كنص عادي بلا تنسيق.
   ============================================================ */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 18px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.8;
}
.alert i { margin-top: 3px; flex-shrink: 0; }

.alert-success {
    background: #DCFCE7;
    color: #166534;
    border-color: #BBF7D0;
}
.alert-error {
    background: #FEE2E2;
    color: #991B1B;
    border-color: #FECACA;
}
.alert-warning {
    background: #FEF3C7;
    color: #92400E;
    border-color: #FDE68A;
}
.alert-info {
    background: #DBEAFE;
    color: #1E40AF;
    border-color: #BFDBFE;
}

/* عند إخفائها تلقائياً بعد ثوانٍ (منطق موجود في layouts/app) */
.alert.is-hiding { opacity: 0; transition: opacity .4s ease; }
