/* trips.css - قسم الرحلات في شابه (الإصدار 8) */

/* أيقونات التبويبات الجديدة (بنفس أسلوب التبويبات الحالية) */
.tab[data-tab="videos"]::before { content: "🏠"; }
.tab[data-tab="media"]::before { content: "📷"; }
.tab[data-tab="trips"]::before { content: "⛺"; }

/* مبدّل صور / مقاطع داخل تبويب الوسائط */
.media-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 10px 12px 6px; padding: 4px; background: #f3f1ee; border-radius: 12px; }
.media-switch.hidden { display: none; }
.media-switch button { height: 44px; border: 0; border-radius: 9px; background: transparent; color: #4f473d; font-family: inherit; font-size: 15px; font-weight: 500; cursor: pointer; }
.media-switch button.active { background: #fff; color: #1f1a14; font-weight: 800; box-shadow: 0 1px 2px rgba(31, 26, 20, .14); }

#homeTripCard { display: flex; flex-direction: column; gap: 12px; padding: 12px 12px 4px; }
#homeTripCard:empty { display: none; }
#tripsTab { padding: 12px; text-align: right; }
.tr-tab { display: flex; flex-direction: column; gap: 16px; }

.tr-card, .tr-sheet, .tr-tab, .tr-next { color: #1f1a14; font-family: 'Tajawal', sans-serif; text-align: right; }
.tr-card { border: 1px solid #e9e4dc; border-radius: 16px; padding: 16px; background: #fff; display: flex; flex-direction: column; gap: 10px; }
.tr-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tr-title { margin: 0; font-size: 20px; font-weight: 800; line-height: 1.3; }
.tr-line { font-size: 15px; line-height: 1.5; }
.tr-muted { font-size: 13px; color: #6b6257; line-height: 1.6; }
.tr-center { text-align: center; }
.tr-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }

.tr-chip { flex: none; font-size: 13px; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: #f3f1ee; color: #4f473d; white-space: nowrap; }
.tr-chip-open, .tr-chip-running { background: #fff1d6; color: #7a4300; }
.tr-chip-paid { background: #e7f1fb; color: #0b4a8a; }

.tr-btn { min-height: 48px; padding: 0 16px; border: 1px solid #b9b2a7; border-radius: 12px; background: #fff; color: #1f1a14; font-family: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
.tr-btn.primary { border-color: #faa21b; background: #faa21b; color: #2b1a00; font-weight: 800; }
.tr-btn.dark { border-color: #2b1a00; background: #2b1a00; color: #fff; min-height: 44px; font-size: 15px; }
.tr-btn.small { min-height: 44px; font-size: 14px; padding: 0 12px; }
.tr-btn.danger { border-color: #9a2a1a; color: #9a2a1a; }
.tr-btn:disabled { opacity: .55; cursor: default; }

.tr-next { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 8px 14px; border: 1px solid #e9e4dc; border-radius: 14px; background: #fff; font-size: 15px; cursor: pointer; }
.tr-next strong { flex: 1; font-weight: 800; }

.tr-tabhead, .tr-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tr-h { margin: 0; font-size: 22px; font-weight: 800; }
.tr-h3 { margin: 0; font-size: 16px; font-weight: 800; padding: 6px 0; }
.tr-sec { display: flex; flex-direction: column; }
.tr-row { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 0; border: 0; border-top: 1px solid #e9e4dc; background: transparent; color: inherit; font-family: inherit; text-align: right; }
button.tr-row { cursor: pointer; }
.tr-row-name { flex: 1; font-size: 16px; font-weight: 700; }
.tr-row-date { font-size: 14px; color: #4f473d; }
.tr-empty { padding: 28px 12px; text-align: center; color: #6b6257; font-size: 15px; }

/* اللوحة: تحت نافذة الدخول (1100) وتحت الإشعارات */
.tr-overlay { position: fixed; inset: 0; z-index: 1050; background: #fff; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.tr-overlay.hidden { display: none; }
.tr-sheet { max-width: 600px; min-height: 100%; margin: 0 auto; display: flex; flex-direction: column; background: #fff; }
.tr-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 12px; background: #faa21b; color: #2b1a00; }
.tr-back { width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: #2b1a00; font-size: 30px; line-height: 1; font-family: inherit; cursor: pointer; }
.tr-head-title { font-size: 19px; font-weight: 800; line-height: 1.25; }
.tr-head-sub { font-size: 13px; font-weight: 500; }
.tr-body { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.tr-foot { position: sticky; bottom: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid #e9e4dc; }

.tr-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tr-field label, .tr-label { font-size: 14px; font-weight: 700; }
.tr-input { width: 100%; min-height: 48px; box-sizing: border-box; border: 1px solid #b9b2a7; border-radius: 12px; padding: 10px 14px; background: #fff; color: #1f1a14; font-family: inherit; font-size: 16px; }
.tr-group { margin: 0; padding: 10px 14px 12px; border: 1px solid #e9e4dc; border-radius: 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tr-group legend { padding: 0 6px; font-size: 14px; font-weight: 700; }
.tr-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.tr-step { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tr-step-label { font-size: 16px; }
.tr-step-ctl { display: flex; align-items: center; gap: 10px; }
.tr-step-btn { width: 44px; height: 44px; border: 1px solid #b9b2a7; border-radius: 12px; background: #fff; color: #1f1a14; font-family: inherit; font-size: 22px; font-weight: 700; cursor: pointer; }
.tr-step-value { width: 28px; text-align: center; font-size: 20px; font-weight: 800; }

.tr-fee { background: #fff1d6; border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.tr-fee-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.tr-fee-label { font-size: 15px; font-weight: 700; color: #5c3200; }
.tr-fee-amount { font-size: 26px; font-weight: 800; color: #2b1a00; }
.tr-fee-note { font-size: 13px; color: #5c3200; }

.tr-done { display: flex; align-items: center; gap: 12px; }
.tr-done-mark { flex: none; width: 44px; height: 44px; border-radius: 50%; background: #e7f1fb; color: #0b4a8a; font-size: 24px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.tr-dl { margin: 0; padding: 2px 16px; border: 1px solid #e9e4dc; border-radius: 14px; }
.tr-dl > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 0; border-top: 1px solid #e9e4dc; }
.tr-dl > div:first-child { border-top: 0; }
.tr-dl dt { font-size: 14px; color: #6b6257; }
.tr-dl dd { margin: 0; font-size: 15px; font-weight: 700; }
.tr-pay { background: #f6f5f3; border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.tr-pay-title { font-size: 15px; font-weight: 700; }
.tr-pay-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tr-pay-phone { font-size: 28px; font-weight: 800; letter-spacing: 1px; text-align: right; }

.tr-state { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tr-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tr-stat { background: #f6f5f3; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.tr-stat-value { font-size: 18px; font-weight: 800; }
.tr-stat-value small { font-size: 12px; font-weight: 500; color: #4f473d; }
.tr-camps { display: flex; gap: 8px; }
.tr-camp { flex: 1; display: flex; flex-direction: column; gap: 2px; border: 1px solid #e9e4dc; border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.tr-camp strong { font-size: 17px; }
.tr-list { list-style: none; margin: 0; padding: 0; }
.tr-reg { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid #e9e4dc; }
.tr-reg-main { flex: 1; min-width: 0; min-height: 48px; display: flex; flex-direction: column; gap: 2px; border: 0; background: transparent; color: inherit; font-family: inherit; text-align: right; cursor: pointer; }
.tr-paid { flex: none; min-width: 92px; height: 44px; padding: 0 12px; border: 1px solid #8a4b00; border-radius: 999px; background: #fff; color: #7a4300; font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.tr-paid.on { border-color: #0b4a8a; background: #0b4a8a; color: #fff; }

.tr-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: #f3f1ee; border-radius: 12px; }
.tr-seg button { height: 44px; border: 0; border-radius: 9px; background: transparent; color: #4f473d; font-family: inherit; font-size: 15px; font-weight: 500; cursor: pointer; }
.tr-seg button.on { background: #fff; color: #1f1a14; font-weight: 800; box-shadow: 0 1px 2px rgba(31, 26, 20, .14); }
.tr-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tr-pick { min-height: 44px; padding: 0 14px; border: 1px solid #b9b2a7; border-radius: 999px; background: #fff; color: #1f1a14; font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.tr-pick.on { border-color: #2b1a00; background: #2b1a00; color: #fff; }

/* ---------- المشتريات (الإصدار 9) ---------- */
.pu { display: flex; flex-direction: column; gap: 8px; }
.pu-sum { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; background: #f6f5f3; border-radius: 10px; font-size: 13px; }
.pu-sum strong { font-size: 15px; font-weight: 800; }
.pu-wait { padding: 10px 14px; border-radius: 12px; background: #fff1d6; color: #5c3200; font-size: 14px; font-weight: 700; }
.pu-group { display: flex; flex-direction: column; }
.pu-item { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 3px 0; border-top: 1px solid #e9e4dc; }
.pu-check { flex: none; width: 34px; height: 34px; border: 2px solid #6b6257; border-radius: 9px; background: #fff; color: #fff; font-family: inherit; font-size: 18px; font-weight: 800; cursor: pointer; }
.pu-item.done .pu-check { border-color: #0b4a8a; background: #0b4a8a; }
.pu-main { flex: 1; min-width: 0; min-height: 38px; display: flex; flex-direction: column; justify-content: center; gap: 0; border: 0; background: transparent; color: inherit; font-family: inherit; text-align: right; cursor: pointer; }
.pu-item.done .pu-main .tr-row-name { color: #4f473d; text-decoration: line-through; }
.pu-amount { flex: none; font-size: 13px; font-weight: 800; }
.pu-claim { flex: none; min-height: 34px; padding: 0 10px; border: 1px solid #b9b2a7; border-radius: 999px; background: #fff; color: #1f1a14; font-family: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.pu-claim.on { border-color: #8a4b00; background: #fff1d6; color: #5c3200; }
.pu-photo { flex: none; min-height: 44px; display: flex; align-items: center; font-size: 14px; font-weight: 700; color: #8a4b00; }
.pu-strong { font-size: 18px !important; font-weight: 800 !important; }
.pu-dialog { position: fixed; inset: 0; z-index: 1150; display: flex; align-items: flex-end; justify-content: center; background: rgba(31, 26, 20, .55); }
.pu-form { width: 100%; max-width: 600px; max-height: calc(100% - 12px); overflow-y: auto; box-sizing: border-box; padding: 18px 16px 0; background: #fff; border-radius: 18px 18px 0 0; display: flex; flex-direction: column; gap: 12px; color: #1f1a14; font-family: 'Tajawal', sans-serif; text-align: right; }
.pu-form-actions { position: sticky; bottom: 0; flex: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; padding: 8px 0 calc(14px + env(safe-area-inset-bottom)); background: #fff; }
.pu-pick { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 0; border: 0; border-top: 1px solid #e9e4dc; background: transparent; color: inherit; font-family: inherit; text-align: right; cursor: pointer; }
.pu-pick-box { flex: none; width: 24px; height: 24px; border: 2px solid #6b6257; border-radius: 7px; background: #fff; }
.pu-pick.on .pu-pick-box { border-color: #2b1a00; background: #2b1a00; box-shadow: inset 0 0 0 4px #fff; }
.pu-pick.have { opacity: .55; cursor: default; }

/* النسخة 10: الجدول الدائم والاستيراد */
.tr-row-done .tr-row-name, .tr-row-done .tr-row-date { color: #6b6257; font-weight: 500; }
.tr-season { display: inline-block; margin: 0 10px; font-size: 13px; font-weight: 500; color: #6b6257; }
.tr-import { display: flex; flex-direction: column; gap: 12px; }
.tr-text { margin: 0; font-size: 16px; line-height: 1.7; }
.tr-warn { padding: 10px 12px; border-radius: 12px; background: #fff1d6; color: #5c3200; font-size: 14px; line-height: 1.7; }
.tr-file { position: absolute; width: 1px; height: 1px; opacity: 0; }
.tr-file-label { display: flex; align-items: center; justify-content: center; }
.tr-file:focus-visible + .tr-file-label { outline: 3px solid #2b1a00; outline-offset: 2px; }
.tr-import-foot { display: contents; }
.tr-foot:has(> .tr-import-foot:empty) { display: none; }

/* النسخة 11: جدول الرحلات على هيئة جدول */
.tr-tablebox { border: 1px solid #e9e4dc; border-radius: 14px; overflow: hidden; background: #fff; }
.tr-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.tr-table th, .tr-table td { padding: 12px 10px; border-top: 1px solid #e9e4dc; text-align: right; vertical-align: middle; }
.tr-table thead th { border-top: 0; padding: 8px 10px; background: #f6f5f3; font-size: 13px; font-weight: 700; color: #4f473d; }
.tr-table tbody th { font-size: 16px; font-weight: 700; }
.tr-table .tr-td-date { white-space: nowrap; font-size: 14px; color: #4f473d; }
.tr-table .tr-td-state { width: 1%; white-space: nowrap; text-align: left; }
.tr-table .tr-chip { display: inline-block; }
.tr-trow.act { cursor: pointer; }
.tr-trow-open { background: #fff8ec; }
.tr-trow-open th { box-shadow: inset -4px 0 0 #faa21b; }
.tr-trow-open .tr-chip { background: #faa21b; color: #2b1a00; }
.tr-trow-running .tr-chip { background: #2b1a00; color: #fff; }
.tr-trow-scheduled .tr-chip { background: #fff; box-shadow: inset 0 0 0 1px #b9b2a7; }
.tr-trow-done th, .tr-trow-done td { color: #6b6257; font-weight: 500; }
.tr-trow-done .tr-chip { background: #eeece8; color: #4f473d; }
.tr-cell-btn { display: block; width: 100%; min-height: 28px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: right; cursor: pointer; }
.tr-cell-btn:focus-visible { outline: 3px solid #2b1a00; outline-offset: 3px; border-radius: 6px; }
.tr-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* النسخة 12: كلمة المرور واستعادة الدخول */
.account-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 12px 0 4px; font-family: 'Tajawal', sans-serif; }
.forgot-box { text-align: center; font-family: 'Tajawal', sans-serif; }
.forgot-link { min-height: 44px; padding: 0 12px; border: 0; background: transparent; color: #7a4300; font-family: inherit; font-size: 15px; font-weight: 700; text-decoration: underline; cursor: pointer; }
.forgot-hint { margin: 4px 0 0; padding: 10px 12px; border-radius: 12px; background: #fff1d6; color: #5c3200; font-size: 14px; line-height: 1.7; }
.ac-form { display: flex; flex-direction: column; gap: 14px; }
.ac-pass-row { display: flex; gap: 8px; }
.ac-pass-row .tr-input { flex: 1; min-width: 0; text-align: left; }
.ac-eye { flex: none; min-width: 64px; min-height: 48px; border: 1px solid #b9b2a7; border-radius: 12px; background: #fff; color: #1f1a14; font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.ac-code { padding: 16px 12px; border: 2px dashed #faa21b; border-radius: 14px; background: #fff8ec; color: #1f1a14; text-align: center; font-size: 30px; font-weight: 800; letter-spacing: 4px; font-variant-numeric: tabular-nums; user-select: all; -webkit-user-select: all; }

/* النسخة 13: بطاقة مختصرة، وأزرار الرحلة الحيّة داخل الجدول */
.tr-card.tr-compact { padding: 12px 14px; gap: 8px; }
.tr-compact .tr-title { font-size: 18px; }
.tr-sub { font-size: 14px; line-height: 1.5; color: #4f473d; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-quick { display: flex; gap: 8px; }
.tr-quick .tr-btn { flex: 1 1 0; min-width: 0; padding: 0 8px; white-space: nowrap; }
.tr-next { min-height: 44px; padding: 4px 14px; font-size: 14px; }
.tr-next strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-next span { flex: none; }
.tr-subrow td { border-top: 0; padding: 0 10px 12px; }
.tr-subrow-open { background: #fff8ec; }
.tr-subrow-open td { box-shadow: inset -4px 0 0 #faa21b; }
.tr-has-sub th, .tr-has-sub td { padding-bottom: 8px; }
.tr-details { display: flex; flex-direction: column; gap: 14px; font-size: 16px; line-height: 1.6; }
.tr-detail { display: flex; flex-direction: column; gap: 2px; }
.tr-area { min-height: 150px; padding: 12px 14px; line-height: 1.8; resize: vertical; }
.tr-chip-bad { background: #fde8e4; color: #8a1f10; }

/* النسخة 14: شريط الرئيسية الرفيع، والجدول الموحّد */
#homeTripCard { gap: 8px; padding: 10px 12px 2px; }
.tr-strip { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 4px 6px 4px 4px; border: 1px solid #f1d9ad; border-radius: 14px; background: #fff8ec; font-family: 'Tajawal', sans-serif; color: #1f1a14; }
.tr-strip-info { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 8px; border: 0; background: transparent; color: inherit; font: inherit; text-align: right; cursor: pointer; }
.tr-strip-info strong { font-size: 16px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-strip-state { flex: none; font-size: 13px; font-weight: 700; color: #7a4300; }
.tr-strip-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #faa21b; }
.tr-strip-running .tr-strip-dot { background: #2b1a00; }
.tr-strip-closed, .tr-strip-scheduled { background: #fff; border-color: #e9e4dc; }
.tr-strip-closed .tr-strip-dot, .tr-strip-scheduled .tr-strip-dot { background: #b9b2a7; }
.tr-strip .tr-btn { flex: none; min-width: 84px; }
.tr-strip-info:focus-visible { outline: 3px solid #2b1a00; outline-offset: 2px; border-radius: 10px; }
.tr-trow-open th { box-shadow: none; }
.tr-trow-open { background: transparent; }

/* النسخة 15: ميزانية شابه */
.tr-head-actions { display: flex; gap: 8px; align-items: center; }
.pu-budget { margin-bottom: 8px; }
.pu-in { color: #1b6b34; }
.pu-out { color: #9a2a1a; }
.pu-settle { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid #e9e4dc; border-radius: 14px; background: #faf8f5; }

/* النسخة 15: تحميل المزيد */
.more-control { display: flex; justify-content: center; padding: 16px 12px 28px; }
.more-btn { min-height: 48px; padding: 0 24px; border: 1px solid #b9b2a7; border-radius: 12px; background: #fff; color: #1f1a14; font-family: 'Tajawal', sans-serif; font-size: 16px; font-weight: 700; cursor: pointer; }
.more-btn:disabled { opacity: .6; cursor: default; }

/* النسخة 15: أيقونات التبويبات موحّدة (خطوط بسمك واحد بلون النص نفسه) */
.tab::before, .tab.active::before { content: ""; display: block; width: 24px; height: 24px; margin: 0 0 2px; font-size: 0; filter: none; background-color: currentColor; -webkit-mask: var(--tab-icon) center / contain no-repeat; mask: var(--tab-icon) center / contain no-repeat; }
.tab.active::before { width: 26px; height: 26px; }
.tab[data-tab="videos"] { --tab-icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M3 10.5 12 3l9 7.5V20a1 1 0 0 1-1 1h-5v-6H9v6H4a1 1 0 0 1-1-1z%22/%3E%3C/svg%3E"); }
.tab[data-tab="videos"]::before { content: ""; }
.tab[data-tab="media"] { --tab-icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Crect x=%223%22 y=%223%22 width=%2218%22 height=%2218%22 rx=%222%22/%3E%3Ccircle cx=%228.5%22 cy=%228.5%22 r=%221.5%22/%3E%3Cpath d=%22m21 15-5-5L5 21%22/%3E%3C/svg%3E"); }
.tab[data-tab="media"]::before { content: ""; }
.tab[data-tab="trips"] { --tab-icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M3 20 12 4l9 16z%22/%3E%3Cpath d=%22m9.5 20 2.5-6 2.5 6%22/%3E%3C/svg%3E"); }
.tab[data-tab="trips"]::before { content: ""; }
.tab[data-tab="events"] { --tab-icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%229.5%22 stroke-dasharray=%224.2 3%22/%3E%3Cpath d=%22M10 8.5l5 3.5-5 3.5z%22/%3E%3C/svg%3E"); }
.tab[data-tab="events"]::before { content: ""; }
.tab[data-tab="profile"] { --tab-icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%228%22 r=%224%22/%3E%3Cpath d=%22M4 21a8 8 0 0 1 16 0%22/%3E%3C/svg%3E"); }
.tab[data-tab="profile"]::before { content: ""; }
@media (max-width: 380px) { .tab::before { width: 22px; height: 22px; } .tab.active::before { width: 24px; height: 24px; } }

/* مشاركة الأحداث */
.event-actions { display: flex; align-items: center; gap: 8px; }
.event-share-btn, .event-share {
    width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(250,162,27,.35);
    background: rgba(250,162,27,.12); cursor: pointer; padding: 0; position: relative;
}
.event-share-btn::before, .event-share::before {
    content: ""; position: absolute; inset: 0; margin: auto; width: 17px; height: 17px; background: #faa21b;
    -webkit-mask: var(--share-icon) center / contain no-repeat; mask: var(--share-icon) center / contain no-repeat;
}
:root { --share-icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2218%22 cy=%225%22 r=%223%22/%3E%3Ccircle cx=%226%22 cy=%2212%22 r=%223%22/%3E%3Ccircle cx=%2218%22 cy=%2219%22 r=%223%22/%3E%3Cpath d=%22M8.6 13.5l6.8 4M15.4 6.5l-6.8 4%22/%3E%3C/svg%3E"); }
.event-share {
    position: absolute; top: 20px; right: 80px; width: 50px; height: 50px; z-index: 7;
    background: hsla(0,0%,100%,.1); border: 2px solid hsla(0,0%,100%,.3); backdrop-filter: blur(10px);
}
.event-share::before { background: #fff; width: 22px; height: 22px; }

/* شريط الرفع */
.upload-bar {
    position: fixed; left: 12px; right: 12px; z-index: 9998;
    bottom: calc(84px + env(safe-area-inset-bottom));
    background: #fff; border: 1px solid rgba(250,162,27,.5); border-radius: 14px;
    box-shadow: 0 6px 22px rgba(0,0,0,.18); padding: 10px 12px 9px; direction: rtl;
    font-family: Tajawal, sans-serif;
}
.upload-bar.hidden { display: none; }
.ub-row { display: flex; align-items: center; gap: 8px; }
.ub-text { flex: 1; font-size: 14px; font-weight: 700; color: #333; }
.ub-track { height: 6px; background: #f1e6d3; border-radius: 4px; overflow: hidden; margin-top: 7px; }
.ub-fill { height: 100%; width: 0; background: #faa21b; border-radius: 4px; transition: width .25s ease; }
.ub-hint { font-size: 11px; color: #777; margin-top: 5px; }
.ub-hint.hidden, .ub-retry.hidden, .ub-close.hidden { display: none; }
.ub-retry { background: #faa21b; color: #fff; border: 0; border-radius: 8px; padding: 5px 10px; font-size: 12px; font-weight: 700; font-family: inherit; cursor: pointer; }
.ub-close { background: transparent; border: 0; font-size: 22px; line-height: 1; color: #888; cursor: pointer; padding: 0 4px; }
.upload-bar.ub-done { border-color: #4caf50; }
.upload-bar.ub-done .ub-fill { background: #4caf50; }
.upload-bar.ub-fail { border-color: #d9534f; }
.upload-bar.ub-fail .ub-fill { background: #d9534f; }
.upload-bar.ub-fail .ub-text { color: #a94442; }
.upload-bar { pointer-events: none; }
.upload-bar button { pointer-events: auto; }

/* فريق الإدارة */
.ac-staff-row { align-items: center; gap: 8px; }
.ac-staff-row .tr-row-name { flex: 1; min-width: 0; }
.ac-role { width: auto; max-width: 140px; padding: 6px 8px; font-size: 13px; }

/* v19: كثافة أعلى في المشتريات */
.pu .tr-row-name { font-size: 14px; font-weight: 700; line-height: 1.35; }
.pu .tr-muted { font-size: 11.5px; line-height: 1.4; }
.pu .tr-h3 { font-size: 14px; padding: 4px 0 2px; }

/* v21: شاشة إدارة الرحلة مضغوطة */
.tr-manage .tr-body { padding: 10px 12px; gap: 8px; }
.tr-manage .tr-btn.small { min-height: 36px; font-size: 13px; }
.tr-manage .tr-stats { gap: 6px; }
.tr-manage .tr-stat { padding: 6px 8px; border-radius: 10px; }
.tr-manage .tr-stat .tr-muted { font-size: 11.5px; line-height: 1.3; white-space: nowrap; }
.tr-manage .tr-stat-value { font-size: 15px; }
.tr-manage .tr-stat-value small { font-size: 11px; }
.tr-manage .tr-camps { gap: 6px; }
.tr-manage .tr-camp { padding: 6px 10px; gap: 0; font-size: 12px; }
.tr-manage .tr-camp strong { font-size: 15px; }
.tr-manage .tr-camp .tr-muted { font-size: 11.5px; line-height: 1.4; }
.tr-manage .tr-h3 { font-size: 14px; padding: 2px 0 0; }
.tr-manage .tr-reg { padding: 5px 0; gap: 8px; }
.tr-manage .tr-reg-main { min-height: 0; gap: 0; }
.tr-manage .tr-row-name { font-size: 14.5px; line-height: 1.35; }
.tr-manage .tr-reg .tr-muted { font-size: 11.5px; line-height: 1.4; }
.tr-manage .tr-paid { min-width: 74px; height: 34px; padding: 0 8px; font-size: 12.5px; }
.tr-manage .tr-foot { grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); }
.tr-manage .tr-foot .tr-btn { min-height: 38px; padding: 0 4px; font-size: 13px; }

/* v24: حالة الدفع للعرض فقط لغير مسؤول المالية */
.tr-paid-ro { display: inline-flex; align-items: center; justify-content: center; cursor: default; opacity: .85; }

/* v25: زر الإشعارات */
#pushBtn.on { border-color: #0b4a8a; color: #0b4a8a; }

/* ---------- المشتريات: ما دفعه العضو (الإصدار 30) ---------- */
.pu-mine { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 10px 12px; background: #e7f1fb; border-radius: 10px; color: #0b2f57; font-size: 14px; font-weight: 700; }
.pu-mine strong { font-size: 17px; font-weight: 800; }
.pu-mine .tr-muted { flex-basis: 100%; color: #33506f; font-weight: 500; }

/* ---------- استبيان الرأي (الإصدار 30) ---------- */
.tr-rate { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; }
.tr-rate-label { font-size: 15px; font-weight: 700; }
.tr-stars { display: flex; flex-direction: row-reverse; gap: 2px; direction: ltr; }
.tr-star { width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: #cfc8bd; font-size: 30px; line-height: 1; cursor: pointer; }
.tr-star.on { color: #e08a00; }
.tr-star:focus-visible { outline: 2px solid #2b1a00; outline-offset: 2px; border-radius: 8px; }
.tr-rate-main .tr-star { font-size: 36px; }
.tr-seg3 { grid-template-columns: 1fr 1fr 1fr; }
.tr-bars { display: flex; flex-direction: column; gap: 6px; padding: 10px 14px; border: 1px solid #e9e4dc; border-radius: 14px; }
.tr-bar { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.tr-bar-label { flex: none; width: 34px; font-weight: 700; }
.tr-bar-track { flex: 1; height: 10px; border-radius: 999px; background: #f3f1ee; overflow: hidden; }
.tr-bar-fill { display: block; height: 100%; border-radius: 999px; background: #e08a00; }
.tr-bar-num { flex: none; min-width: 22px; text-align: left; font-weight: 700; }
.tr-stars-ro { color: #e08a00; letter-spacing: 1px; }
.tr-opinion .tr-text { font-size: 14px; line-height: 1.6; }
.tr-survey-row { padding: 10px 12px; border: 1px solid #e9e4dc; border-radius: 14px; }

/* ==========================================================
   النسخة 34: ستايل موحّد لكل التبويبات (المرجع: ستايل الرحلات)
   ألوان دافئة، بطاقات بإطار خفيف بلا ظلال، نص غامق على البرتقالي،
   أيقونات خطية بدل الإيموجي، ووضع فاتح دائماً.
   ========================================================== */
:root {
  color-scheme: light only;
  --sh-orange: #faa21b; --sh-orange-hover: #ec9612; --sh-on-orange: #2b1a00;
  --sh-ink: #1f1a14; --sh-ink-2: #4f473d; --sh-muted: #6b6257; --sh-faint: #8a8177;
  --sh-line: #e9e4dc; --sh-line-strong: #b9b2a7; --sh-soft: #f6f5f3; --sh-soft-2: #f3f1ee; --sh-paper: #faf8f5;
  --sh-cream: #fff8ec; --sh-cream-line: #f1d9ad; --sh-warn-bg: #fff1d6; --sh-warn-ink: #5c3200;
  --sh-danger: #9a2a1a; --sh-danger-solid: #b3261e; --sh-ok: #1b6b34;
  --ic-photo: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Crect x=%223%22 y=%223%22 width=%2218%22 height=%2218%22 rx=%222%22/%3E%3Ccircle cx=%228.5%22 cy=%228.5%22 r=%221.5%22/%3E%3Cpath d=%22m21 15-5-5L5 21%22/%3E%3C/svg%3E");
  --ic-video: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Crect x=%223%22 y=%225%22 width=%2218%22 height=%2214%22 rx=%222%22/%3E%3Cpath d=%22m10 9 5 3-5 3z%22/%3E%3C/svg%3E");
  --ic-event: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%229.5%22 stroke-dasharray=%224.2 3%22/%3E%3Cpath d=%22M10 8.5l5 3.5-5 3.5z%22/%3E%3C/svg%3E");
  --ic-user: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%228%22 r=%224%22/%3E%3Cpath d=%22M4 21a8 8 0 0 1 16 0%22/%3E%3C/svg%3E");
  --ic-users: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%229%22 cy=%228%22 r=%223.5%22/%3E%3Cpath d=%22M2.5 20a6.5 6.5 0 0 1 13 0%22/%3E%3Cpath d=%22M16 4.5a3.5 3.5 0 0 1 0 7%22/%3E%3Cpath d=%22M18 14.5a6 6 0 0 1 3.5 5.5%22/%3E%3C/svg%3E");
  --ic-lock: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Crect x=%224%22 y=%2211%22 width=%2216%22 height=%2210%22 rx=%222%22/%3E%3Cpath d=%22M8 11V7a4 4 0 0 1 8 0v4%22/%3E%3C/svg%3E");
  --ic-edit: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M4 20h4L19 9l-4-4L4 16z%22/%3E%3Cpath d=%22m13.5 6.5 4 4%22/%3E%3C/svg%3E");
  --ic-check: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%229%22/%3E%3Cpath d=%22m8 12 3 3 5-6%22/%3E%3C/svg%3E");
  --ic-trash: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M4 7h16%22/%3E%3Cpath d=%22M10 11v6%22/%3E%3Cpath d=%22M14 11v6%22/%3E%3Cpath d=%22M6 7l1 13h10l1-13%22/%3E%3Cpath d=%22M9 7V4h6v3%22/%3E%3C/svg%3E");
  --ic-send: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M20 12H5%22/%3E%3Cpath d=%22m11 6-6 6 6 6%22/%3E%3C/svg%3E");
}
html, body { background: var(--sh-soft-2); color: var(--sh-ink); }
.app-container { background: #fff; color: var(--sh-ink); }

/* أيقونات خطية بلون النص (نفس أسلوب أيقونات الشريط السفلي) */
.ic-photo { --ic: var(--ic-photo); }
.ic-video { --ic: var(--ic-video); }
.ic-event { --ic: var(--ic-event); }
.ic-user { --ic: var(--ic-user); }
.ic-users { --ic: var(--ic-users); }
.ic-lock { --ic: var(--ic-lock); }
.ic-edit { --ic: var(--ic-edit); }
.ic-check { --ic: var(--ic-check); }
.ic-trash { --ic: var(--ic-trash); }
.ic-send { --ic: var(--ic-send); }
[class*="ic-"].icon, [class*="ic-"].empty-icon, [class*="ic-"].welcome-icon, [class*="ic-"].stats-icon,
[class*="ic-"].upload-icon, [class*="ic-"].input-icon {
  display: block; font-size: 0; opacity: 1; background-color: currentColor;
  -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat;
}

/* الانتقال بين التبويبات: بلا انزلاق جانبي (كان يوسّع الصفحة فتتحرك يميناً ويساراً) */
.tab-content { transform: none !important; }

/* دائرة التحميل تدور فعلاً */
@keyframes sh-spin { to { transform: rotate(360deg); } }
.spinner, .spinner-small { border-color: var(--sh-soft-2) !important; border-top-color: var(--sh-orange) !important; animation: sh-spin .9s linear infinite !important; }
.spinner { width: 36px; height: 36px; border-width: 3px !important; margin: 0 auto 14px; }

/* مسافة واحدة من حافة الشاشة في كل التبويبات */
.content { padding: 12px 12px calc(96px + env(safe-area-inset-bottom)); }
@media (min-width: 481px) { .content { padding: 16px 16px calc(100px + env(safe-area-inset-bottom)); } }
#tripsTab { padding: 0; }
#homeTripCard { padding: 0 0 12px; }
.media-switch { margin: 0 0 12px; }
.instagram-grid, .vertical-reels-grid { margin-top: 0; gap: 4px; }
.image-card, .reel-thumbnail-card { border-radius: 8px; }
.events-feed { margin-top: 0; gap: 12px; }
.video-grid { gap: 10px !important; }

/* الشريط السفلي */
.tab { color: var(--sh-muted); }
.tab:hover { color: var(--sh-ink); }

/* التحميل والرسائل الفارغة بشكل واحد */
.content-loading, .images-loading, .loading, .reels-loading, .events-loading { padding: 40px 16px; color: var(--sh-muted); font-size: 15px; }
.loading-hint { margin-top: 6px; font-size: 13px; color: var(--sh-faint); }
.content-empty, .images-empty, .reels-empty, .events-empty, .tr-empty { padding: 32px 16px; text-align: center; color: var(--sh-muted); }
.content-empty .empty-icon, .images-empty .icon, .reels-empty .icon, .events-empty .icon { width: 44px; height: 44px; margin: 0 auto 12px; color: var(--sh-line-strong); }
.content-empty h4, .images-empty h3, .reels-empty h3, .events-empty h3 { margin: 0 0 6px; font-size: 17px; font-weight: 800; color: var(--sh-ink); }
.content-empty p, .images-empty p, .reels-empty p, .events-empty p { margin: 0 0 14px; font-size: 14px; line-height: 1.6; color: var(--sh-muted); }
.tr-empty { font-size: 15px; line-height: 1.6; }
.empty-hint { font-size: 14px; color: var(--sh-muted); }
.plus-chip { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin: 0 2px; border-radius: 50%; background: var(--sh-orange); color: var(--sh-on-orange); font-weight: 800; line-height: 1; vertical-align: middle; }
.error-message { margin: 0 0 12px; padding: 14px; border-radius: 12px; background: #fde8e4; color: #8a1f10; font-size: 15px; }
.offline-message h3 { color: var(--sh-ink); font-weight: 800; }
.offline-message p { color: var(--sh-muted); }

/* الأزرار: البرتقالي بنص غامق في كل مكان، والثانوي أبيض بإطار */
.modal-btn, .login-btn, .upload-btn, .refresh-btn, .retry-btn, .login-to-comment-btn, .toast-login-btn, .ub-retry, .view-all-btn, .toast-close-btn {
  font-family: 'Tajawal', sans-serif; box-shadow: none !important; transform: none !important; transition: background-color .15s ease, border-color .15s ease;
}
.modal-btn.primary, .login-btn, .upload-btn, .refresh-btn, .retry-btn, .login-to-comment-btn, .toast-login-btn, .ub-retry {
  background: var(--sh-orange); border: 1px solid var(--sh-orange); color: var(--sh-on-orange); font-weight: 800;
}
.modal-btn.primary:hover, .login-btn:hover, .upload-btn:hover, .refresh-btn:hover, .retry-btn:hover, .login-to-comment-btn:hover, .toast-login-btn:hover, .ub-retry:hover {
  background: var(--sh-orange-hover); border-color: var(--sh-orange-hover);
}
.modal-btn { min-height: 48px; padding: 0 16px; border-radius: 12px; font-size: 16px; }
.modal-btn.secondary { background: #fff; border: 1px solid var(--sh-line-strong); color: var(--sh-ink); font-weight: 700; }
.modal-btn.secondary:hover { background: var(--sh-soft); }
.modal-btn:disabled { opacity: .55; cursor: default; }
.login-btn { min-height: 48px; padding: 0 28px; border-radius: 12px; font-size: 16px; }
.upload-btn { min-height: 44px; padding: 0 20px; border-radius: 12px; font-size: 15px; }
.refresh-btn, .retry-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; margin: 12px auto 0; padding: 0 20px; border-radius: 12px; font-size: 15px; }
.login-to-comment-btn { min-height: 40px; padding: 0 18px; border-radius: 12px; font-size: 14px; }
.toast-login-btn { min-height: 36px; padding: 0 14px; border-radius: 10px; font-size: 13px; }
.view-all-btn, .toast-close-btn { background: #fff; border: 1px solid var(--sh-line-strong); color: var(--sh-ink); font-weight: 700; }
.view-all-btn { min-height: 36px; padding: 0 16px; border-radius: 999px; font-size: 13px; }
.view-all-btn:hover, .toast-close-btn:hover { background: var(--sh-soft); color: var(--sh-ink); }
.filter-btn.active { color: var(--sh-on-orange); box-shadow: none; }
.tr-btn.danger-solid { border-color: var(--sh-danger-solid); background: var(--sh-danger-solid); color: #fff; font-weight: 800; }
.fab { background: var(--sh-orange); color: var(--sh-on-orange); font-size: 30px; line-height: 1; box-shadow: 0 4px 14px rgba(43, 26, 0, .22); }
.fab:hover { transform: none; box-shadow: 0 4px 14px rgba(43, 26, 0, .22); }

/* الرسائل الصغيرة أعلى الشاشة */
.notification, [dir=rtl] .notification {
  top: calc(12px + env(safe-area-inset-top)); left: 50%; right: auto; transform: translateX(-50%);
  width: max-content; max-width: calc(100% - 24px); padding: 12px 16px; border-radius: 12px;
  background: var(--sh-ink); color: #fff; font-family: 'Tajawal', sans-serif; font-size: 15px; font-weight: 700; line-height: 1.5; text-align: center;
  box-shadow: 0 6px 20px rgba(31, 26, 20, .25);
}
.notification.info { background: var(--sh-ink); }
.notification.success { background: var(--sh-ok); }
.notification.error { background: var(--sh-danger); }

/* أشرطة: تحديث جديد، تثبيت التطبيق، عدم الاتصال (فوق الشريط السفلي لا عليه) */
.sh-banner {
  position: fixed; left: 12px; right: 12px; z-index: 9999; max-width: 420px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--sh-line); border-radius: 16px; background: #fff; color: var(--sh-ink);
  box-shadow: 0 8px 28px rgba(31, 26, 20, .18); font-family: 'Tajawal', sans-serif; direction: rtl; text-align: right;
}
.sh-banner-top { top: calc(12px + env(safe-area-inset-top)); }
.sh-banner-bottom { bottom: calc(84px + env(safe-area-inset-bottom)); }
.sh-banner-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; line-height: 1.5; color: var(--sh-muted); }
.sh-banner-text strong { font-size: 15px; font-weight: 800; color: var(--sh-ink); }
.sh-banner-actions { flex: none; display: flex; gap: 8px; }
.sh-banner .tr-btn.small { min-height: 40px; padding: 0 12px; }
.sh-banner-warn { justify-content: center; border-color: var(--sh-cream-line); background: var(--sh-warn-bg); color: var(--sh-warn-ink); font-size: 14px; font-weight: 700; text-align: center; }

/* نافذة التأكيد (بدل نافذة المتصفح) وتعليمات التثبيت */
.sh-dialog { position: fixed; inset: 0; z-index: 1300; display: flex; align-items: flex-end; justify-content: center; background: rgba(31, 26, 20, .55); }
.sh-dialog-card {
  width: 100%; max-width: 600px; max-height: 92vh; overflow-y: auto; box-sizing: border-box;
  padding: 20px 16px calc(18px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; background: #fff;
  display: flex; flex-direction: column; gap: 16px; color: var(--sh-ink); font-family: 'Tajawal', sans-serif; text-align: right; direction: rtl;
}
.sh-dialog-text { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.7; white-space: pre-line; }
.sh-dialog-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.sh-instructions h3 { margin: 0; font-size: 18px; font-weight: 800; }
.sh-instructions ol { margin: 0; padding: 0 20px 0 0; font-size: 15px; line-height: 1.9; color: var(--sh-ink-2); }

/* نوافذ الدخول والرفع */
.modern-modal { background: rgba(31, 26, 20, .55); backdrop-filter: none; -webkit-backdrop-filter: none; }
.modern-modal-content { border-radius: 18px; box-shadow: 0 16px 40px rgba(31, 26, 20, .25); }
.modal-header { padding: 20px 20px 16px; border-radius: 18px 18px 0 0; background: var(--sh-orange); color: var(--sh-on-orange); }
.modal-header h3 { margin: 0 0 4px; font-size: 20px; font-weight: 800; }
.modal-header p { font-size: 14px; font-weight: 500; opacity: 1; color: var(--sh-warn-ink); }
.modal-body { padding: 20px; }
.modal-footer { padding: 0 20px 20px; gap: 10px; }
.input-group { margin-bottom: 14px; }
.input-group input { min-height: 48px; padding: 10px 14px 10px 44px; border: 1px solid var(--sh-line-strong); border-radius: 12px; background: #fff; color: var(--sh-ink); font-size: 16px; }
.input-group input::placeholder { color: var(--sh-faint); }
.input-group input:focus { border-color: var(--sh-orange); background: #fff; box-shadow: 0 0 0 3px rgba(250, 162, 27, .22); }
.input-icon { left: 14px; width: 20px; height: 20px; color: var(--sh-faint); }
.upload-area { padding: 24px 16px; border: 2px dashed var(--sh-line-strong); border-radius: 14px; background: var(--sh-paper); }
.upload-area:hover { border-color: var(--sh-orange); background: var(--sh-cream); }
.upload-area.selected { border-style: solid; border-color: var(--sh-ok); background: #eef6f0; }
.upload-icon { width: 40px; height: 40px; margin: 0 auto 10px; color: var(--sh-faint); }
.upload-area.selected .upload-icon { color: var(--sh-ok); }
.upload-text { font-size: 16px; font-weight: 800; color: var(--sh-ink); }
.upload-hint { font-size: 13px; color: var(--sh-muted); word-break: break-all; }
.upload-size { margin-top: 4px; font-size: 12px; color: var(--sh-muted); }
.modal { z-index: 1200; background: rgba(31, 26, 20, .55); }
.modal-content.sh-warning { max-width: 360px; padding: 24px 18px 18px; border-radius: 18px; display: flex; flex-direction: column; gap: 16px; text-align: center; color: var(--sh-ink); font-family: 'Tajawal', sans-serif; box-shadow: 0 16px 40px rgba(31, 26, 20, .25); }
.sh-warning-text { font-size: 16px; font-weight: 700; line-height: 1.7; }

/* عارض الصور والأحداث فوق الشريط السفلي (مثل عارض المقاطع) */
.image-modal, .event-modal { z-index: 1060; }
.comments-modal { z-index: 1080; background: rgba(31, 26, 20, .55); }
.login-prompt-toast { z-index: 1200; }

/* أزرار العارضات: نفس الحجم والشكل في الصور والمقاطع والأحداث */
.image-close, .event-close, .reels-close, .reels-share, .event-share {
  position: absolute; top: calc(12px + env(safe-area-inset-top)) !important; width: 44px !important; height: 44px !important; padding: 0;
  border: 1px solid rgba(255, 255, 255, .35) !important; border-radius: 50%; background: rgba(0, 0, 0, .45) !important; color: #fff;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 10; transform: none !important;
}
.image-close, .event-close, .reels-close { right: 12px !important; left: auto !important; font-size: 28px; font-weight: 300; line-height: 1; }
.reels-share, .event-share { right: 64px !important; left: auto !important; font-size: 0; }
.reels-share::before, .event-share::before { content: ""; position: absolute; inset: 0; margin: auto; width: 20px; height: 20px; background: #fff; -webkit-mask: var(--share-icon) center / contain no-repeat; mask: var(--share-icon) center / contain no-repeat; }
.reels-counter { direction: ltr; top: calc(12px + env(safe-area-inset-top)); left: 12px; height: 32px; display: flex; align-items: center; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; background: rgba(0, 0, 0, .45); font-family: 'Tajawal', sans-serif; font-size: 13px; }
.image-info, .event-info { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(0, 0, 0, .8); font-family: 'Tajawal', sans-serif; font-size: 14px; }
.reels-info { bottom: calc(16px + env(safe-area-inset-bottom)); font-family: 'Tajawal', sans-serif; }
.sh-viewer-meta { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.reels-info .sh-viewer-meta { flex-wrap: nowrap; }
.sh-viewer-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.sh-viewer-time { font-size: 13px; color: rgba(255, 255, 255, .75); }
.sh-viewer-desc { margin-top: 8px; text-align: center; line-height: 1.6; white-space: pre-line; }

/* شارة اسم العضو (ألوان غامقة يُقرأ عليها النص الأبيض) */
.sh-badge { display: inline-block; max-width: 100%; padding: 3px 10px; border-radius: 999px; color: #fff; font-size: 12px; font-weight: 700; line-height: 1.6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.video-info-overlay .sh-badge { padding: 2px 8px; font-size: 11px; }
.photo-owner-tag { bottom: 4px; left: 4px; max-width: calc(100% - 8px); padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.video-user, .content-info-overlay { font-size: 11px; }

/* أزرار الحذف الحمراء بلون واحد */
.admin-delete-btn, .content-delete-btn { width: 28px; height: 28px; background: rgba(179, 38, 30, .92); color: #fff; font-size: 18px; line-height: 1; }
.admin-delete-btn:hover, .my-content-item:hover .content-delete-btn { background: var(--sh-danger-solid); transform: none; }
#bulkDeletePhotos, #bulkDeleteVideos, .bulk-delete-btn, .bulk-delete-btn-photos, .bulk-delete-btn-videos { background: var(--sh-danger-solid); box-shadow: 0 4px 14px rgba(43, 26, 0, .22); }
#bulkDeletePhotos:hover, #bulkDeleteVideos:hover, .bulk-delete-btn:hover { background: var(--sh-danger); }
.my-photo-checkbox:checked:after, .my-video-checkbox:checked:after { color: var(--sh-on-orange); }

/* الرئيسية: بطاقات الفيديو */
.video-card { border-radius: 14px; box-shadow: none; background: var(--sh-soft-2); }
.video-card:hover { transform: none; box-shadow: none; }
.video-title { font-weight: 800; }

/* الأحداث: بطاقة بإطار خفيف مثل بطاقات الرحلات */
.event-item { border: 1px solid var(--sh-line); border-radius: 16px; box-shadow: none; }
.event-item:hover { transform: none; box-shadow: none; }
.event-header { padding: 12px 14px; border-bottom: 1px solid var(--sh-line); }
.event-user-avatar, .comment-avatar { color: #fff; font-weight: 800; }
.event-username { font-size: 15px; font-weight: 800; color: var(--sh-ink); }
.event-time { font-size: 12px; color: var(--sh-muted); }
.event-share-btn, .event-delete-btn { position: relative; width: 36px; height: 36px; padding: 0; border: 1px solid var(--sh-line); border-radius: 50%; background: #fff; font-size: 0; }
.event-share-btn::before { width: 18px; height: 18px; background: var(--sh-ink-2); }
.event-delete-btn::before { content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; background: var(--sh-danger); -webkit-mask: var(--ic-trash) center / contain no-repeat; mask: var(--ic-trash) center / contain no-repeat; }
.event-delete-btn:hover { border-color: #f3c9c0; background: #fde8e4; }
.event-description { padding: 12px 14px; border-bottom: 1px solid var(--sh-line); color: var(--sh-ink); font-size: 15px; line-height: 1.6; white-space: pre-line; }
.event-comments-section { padding: 12px 14px; border-top: 0; background: var(--sh-paper); }
.comment-item, .modal-comment-item { padding: 10px 12px; border: 1px solid var(--sh-line); border-radius: 12px; background: #fff; box-shadow: none; }
.comment-item:hover { transform: none; box-shadow: none; }
.modal-comment-item:hover { background: #fff; }
.comment-username { font-size: 14px; font-weight: 800; color: var(--sh-ink); }
.comment-time { font-size: 12px; color: var(--sh-faint); }
.comment-text { font-size: 15px; line-height: 1.6; color: var(--sh-ink); }
.comment-delete-btn { min-width: 32px; min-height: 32px; color: var(--sh-danger); font-size: 20px; }
.no-comments { padding: 12px; font-size: 14px; color: var(--sh-muted); }
.no-comments-text { font-style: normal; }
.comment-icon, .toast-icon { display: none; }
.comment-input, .modal-comment-input { min-height: 44px; padding: 0 14px; border: 1px solid var(--sh-line-strong); border-radius: 999px; background: #fff; color: var(--sh-ink); font-size: 15px; }
.comment-input:hover, .comment-input:focus, .modal-comment-input:focus { border-color: var(--sh-orange); background: #fff; box-shadow: 0 0 0 3px rgba(250, 162, 27, .2); }
.comment-input-guest { background: #fff !important; color: var(--sh-muted) !important; }
.comment-input-guest::placeholder { color: var(--sh-faint) !important; font-style: normal; }
.comment-input-container:hover .comment-input-guest { background: #fff !important; }
.comment-send-btn, .modal-comment-send-btn { position: relative; width: 44px; height: 44px; background: var(--sh-orange); color: var(--sh-on-orange); font-size: 0; }
.comment-send-btn::before, .modal-comment-send-btn::before { content: ""; position: absolute; inset: 0; margin: auto; width: 20px; height: 20px; background: var(--sh-on-orange); -webkit-mask: var(--ic-send) center / contain no-repeat; mask: var(--ic-send) center / contain no-repeat; }
.comment-send-btn:hover, .modal-comment-send-btn:hover { background: var(--sh-orange-hover); transform: none; }
.comment-send-btn-guest, .comment-send-btn-guest:hover { background: var(--sh-soft-2) !important; }
.comment-send-btn-guest::before { background: var(--sh-faint); }
.comment-input-container:hover .comment-send-btn-guest { background: var(--sh-orange) !important; }
.comment-input-container:hover .comment-send-btn-guest::before { background: var(--sh-on-orange); }
.comments-modal-content { border-radius: 18px; box-shadow: 0 16px 40px rgba(31, 26, 20, .25); }
.comments-modal-header { padding: 14px 16px; border-bottom: 1px solid var(--sh-line); border-radius: 18px 18px 0 0; background: #fff; }
.comments-modal-header h3 { font-size: 17px; font-weight: 800; color: var(--sh-ink); }
.close-comments-modal { min-width: 44px; min-height: 44px; font-size: 26px; color: var(--sh-muted); }
.comments-modal-footer { border-top: 1px solid var(--sh-line); }
.login-prompt-toast { border: 1px solid var(--sh-line); border-radius: 16px; box-shadow: 0 8px 28px rgba(31, 26, 20, .18); font-family: 'Tajawal', sans-serif; }
.toast-title { font-weight: 800; color: var(--sh-ink); }
.toast-subtitle { color: var(--sh-muted); }

/* ملفي */
.profile-not-logged { padding: 24px 0; }
.profile-welcome { padding: 32px 20px; border: 1px solid var(--sh-line); border-radius: 16px; box-shadow: none; }
.welcome-icon { width: 56px; height: 56px; margin: 0 auto 14px; color: var(--sh-orange); }
.profile-welcome h3 { margin: 0 0 6px; font-size: 20px; font-weight: 800; color: var(--sh-ink); }
.profile-welcome p { margin: 0 0 20px; font-size: 15px; color: var(--sh-muted); }
.profile-header { margin-bottom: 12px; padding: 16px 14px 14px; border: 1px solid var(--sh-cream-line); border-radius: 16px; background: var(--sh-cream); color: var(--sh-ink); }
.avatar-circle { width: 56px; height: 56px; border: 0; background: var(--sh-orange); color: var(--sh-on-orange); font-size: 26px; font-weight: 800; }
.profile-info h2 { font-size: 20px; font-weight: 800; }
.profile-info p { font-size: 14px; color: var(--sh-muted); opacity: 1; }
.profile-stats { gap: 18px; }
.stat-number { font-size: 18px; font-weight: 800; color: var(--sh-ink); }
.stat-label { font-size: 12px; color: var(--sh-muted); opacity: 1; }
.logout-btn, [dir=rtl] .logout-btn { top: 12px; left: 12px; right: auto; min-height: 36px; padding: 0 12px; border: 1px solid var(--sh-line-strong); border-radius: 10px; background: #fff; color: var(--sh-ink); font-family: 'Tajawal', sans-serif; font-size: 13px; font-weight: 700; }
.logout-btn:hover { background: var(--sh-soft); }
.profile-tabs { gap: 4px; margin-bottom: 12px; padding: 4px; border-radius: 12px; background: var(--sh-soft-2); }
.profile-tab { height: 44px; padding: 0 6px; border-radius: 9px; color: var(--sh-ink-2); font-size: 14px; font-weight: 500; }
.profile-tab.active { background: #fff; color: var(--sh-ink); font-weight: 800; box-shadow: 0 1px 2px rgba(31, 26, 20, .14); }
.stats-overview h3 { margin: 4px 0 12px; text-align: right; font-size: 18px; font-weight: 800; color: var(--sh-ink); }
.stats-cards { gap: 8px; margin-bottom: 16px; }
.stats-card { padding: 14px 12px; border: 1px solid var(--sh-line); border-radius: 14px; box-shadow: none; }
.stats-card:hover { transform: none; }
.stats-icon { width: 26px; height: 26px; margin: 0 auto 6px; color: var(--sh-orange); }
.stats-number { margin-bottom: 2px; font-size: 22px; font-weight: 800; color: var(--sh-ink); }
.stats-label { font-size: 13px; color: var(--sh-muted); }
.storage-card { border: 1px solid var(--sh-cream-line); background: var(--sh-cream); color: var(--sh-ink); }
.table-container { max-height: none; margin-bottom: 12px; border: 1px solid var(--sh-line); border-radius: 14px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.users-table { min-width: 0; font-family: 'Tajawal', sans-serif; font-size: 14px; }
.users-table thead { background: var(--sh-soft); color: var(--sh-ink-2); }
.users-table th { padding: 10px 8px; border: 0; border-bottom: 1px solid var(--sh-line); font-size: 13px; font-weight: 700; }
.users-table td { padding: 10px 8px; border: 0; border-top: 1px solid var(--sh-line); color: var(--sh-ink); }
.users-table th:first-child, .users-table td:first-child { padding-right: 12px; }
.users-table tbody tr:nth-child(even) { background: #fff; }
.users-table tbody tr:hover, .users-table tbody tr.owner-row, .users-table tbody tr.owner-row:hover { background: var(--sh-cream); }
.owner-username, .owner-badge-simple, .owner-row .stat-cell, .owner-row .events-total { color: #7a4300; }
.events-active { color: var(--sh-ok); }

/* شريط الرفع بنفس الألوان */
.ub-text { color: var(--sh-ink); }
.ub-hint { color: var(--sh-muted); }
.ub-close { color: var(--sh-muted); }
.upload-bar.ub-done { border-color: var(--sh-ok); }
.upload-bar.ub-done .ub-fill { background: var(--sh-ok); }
.upload-bar.ub-fail { border-color: var(--sh-danger); }
.upload-bar.ub-fail .ub-fill { background: var(--sh-danger); }
.upload-bar.ub-fail .ub-text { color: var(--sh-danger); }

/* النسخة 36: ملاحظات المالك على ملفي والوسائط */
/* شعار أصغر قليلاً ليظهر محتوى أكثر */
.header { padding: max(14px, calc(env(safe-area-inset-top) + 8px)) 16px 12px; }
.header-content { gap: 8px; }
.app-logo { width: 100px; }
.header-text .subtitle { font-size: 13px; }
/* زر الحذف فوق الصور (للمدير): دائرة داكنة صغيرة بدل الأحمر، والأحمر يبقى في نافذة التأكيد */
.admin-delete-btn, .content-delete-btn { top: 6px; right: 6px; width: 26px; height: 26px; border: 1px solid rgba(255, 255, 255, .5); background: rgba(0, 0, 0, .45); color: #fff; font-size: 16px; box-shadow: none; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.admin-delete-btn:hover, .my-content-item:hover .content-delete-btn { background: var(--sh-danger-solid); border-color: var(--sh-danger-solid); }
@media (hover: none) { .admin-delete-btn { opacity: 1; } }
/* أزرار ملفي: عمودان بعرض متساوٍ */
.account-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.account-actions .tr-btn { width: 100%; min-width: 0; padding: 0 8px; }
/* زر الإشعارات بنفس شكل بقية الأزرار (اسمه يوضح حالته) */
#pushBtn.on { border-color: var(--sh-line-strong); color: var(--sh-ink); }
/* @الاسم تظهر بالترتيب الصحيح */
#userEmail { direction: ltr; unicode-bidi: isolate; }

/* النسخة 37 */
/* سهم الرجوع يشير لليمين: الرمز › ينعكس تلقائياً في النص العربي فنثبّت اتجاهه */
.tr-back { direction: ltr; unicode-bidi: isolate; }
/* خلفية عارض الصور والأحداث سوداء كاملة */
.image-modal, .event-modal { background: #000; }

/* النسخة 39: التأشير بلمسة، والسعر من زر مستقل */
.pu-price { flex: none; min-height: 36px; padding: 0 12px; border: 1px solid #faa21b; border-radius: 999px; background: #fff8ec; color: #7a4300; font-family: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.pu-noprice { padding: 0 4px; font-size: 13px; font-weight: 700; color: #7a4300; }
