/* Customer app pages (modules/app_ui.php): big-title header with round buttons, the orders list (orders_list.php)
   and the notifications page. Brand cards and tiles come from brand.css, the three steps from dashboard.css. */

/* —— Page header —— */
.ap-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.ap-title { display: grid; flex: 1 1 auto; gap: 4px; min-width: 0; }
.ap-title h1 { font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.5rem); font-weight: 800; letter-spacing: -.03em; }
html[dir="rtl"] .ap-title h1 { letter-spacing: 0; }
.ap-title p { color: var(--muted); font-size: 14.5px; }
.ap-head.has-back { margin-top: 2px; }
.ap-head.has-back .ap-title h1 { font-size: 1.35rem; }
.ap-btn { display: grid; flex: none; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--panel); color: var(--text-2);
  cursor: pointer; transition: background-color .2s, color .2s, transform .15s var(--ease); }
.ap-btn:hover { background: var(--panel-3); color: var(--text); }
.ap-btn:active { transform: scale(.94); }
.ap-sec { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 26px 0 12px; }
.ap-sec h2 { font-size: 1.25rem; font-weight: 800; }
.ap-sec small { color: var(--muted); font-size: 13.5px; font-weight: 600; }

/* —— Orders: status tiles —— */
.ot-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.ot { position: relative; display: grid; justify-items: start; gap: 2px; min-width: 0; padding: 14px 12px 12px; overflow: hidden; border: 1px solid transparent; border-radius: 20px;
  background: var(--panel); color: var(--text); text-align: start; cursor: pointer; transition: border-color .2s, background-color .2s, transform .15s var(--ease); }
.ot:active { transform: scale(.97); }
.ot-ic { position: absolute; top: 10px; inset-inline-end: 10px; color: var(--muted); }
.ot strong { margin-top: 18px; font: 700 26px/1 var(--font); }
.ot > span:last-child { max-width: 100%; overflow: hidden; color: var(--muted); font-size: 12.5px; font-weight: 700; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.ot-pending .ot-ic { color: var(--warn); }
.ot-processing .ot-ic { color: #7dd3fc; }
.ot-completed .ot-ic { color: var(--ok); }
.ot.is-on { border-color: var(--text); background: var(--panel-2); }
.ot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* —— Orders: cards grouped by month —— */
.oc-list { display: grid; gap: 10px; }
.oc-month { margin: 16px 2px 2px; color: var(--muted); font-size: 14px; font-weight: 700; }
.oc-month:first-child { margin-top: 8px; }
.oc { position: relative; isolation: isolate; display: grid; gap: 14px; padding: 16px; overflow: hidden; border-radius: 24px; background: var(--panel); color: var(--text);
  transition: transform .2s var(--ease), background-color .2s; }
.oc:hover { transform: translateY(-2px); }
.oc:not(.is-live):hover { background: var(--panel-2); }
.oc.is-live { background: var(--brand, var(--panel-2)); color: var(--brand-ink, var(--text)); box-shadow: 0 18px 40px -26px var(--brand, transparent); }
.oc > .ba { position: absolute; z-index: -1; opacity: .16; }
.oc > .ba-mark { top: -30px; inset-inline-start: -30px; width: 150px; height: 150px; }
.oc > .ba-tile, .oc > .ba-mono { display: none; }
.oc-row { display: flex; align-items: center; gap: 12px; }
.oc.is-live .oc-tile { background: rgb(255 255 255 / .22); }
.oc.is-live.is-ink-dark .oc-tile { background: rgb(0 0 0 / .12); }
.oc-main { display: grid; flex: 1 1 auto; min-width: 0; line-height: 1.35; }
.oc-main strong { overflow: hidden; font-size: 16px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
html[dir="rtl"] .oc-main strong { text-align: right; }
.oc-main small { font-size: 12.5px; font-weight: 600; opacity: .7; }
.oc-side { display: grid; flex: none; justify-items: end; gap: 6px; }
.oc-side b { font: 700 18px var(--font); white-space: nowrap; }
.oc-side b.is-void { color: var(--muted); text-decoration: line-through; }
.oc-chip { height: 24px; padding: 0 10px; border-radius: 999px; background: var(--panel-3); font-size: 12px; }
.oc.is-live .oc-chip { background: rgb(0 0 0 / .2); color: inherit; }
.oc.is-live.is-ink-dark .oc-chip { background: rgb(0 0 0 / .1); }
.oc-steps { grid-area: auto; margin: 0; color: inherit; }
.oc.is-live .live-steps i { background: rgb(0 0 0 / .18); }
.oc.is-live .live-steps li { color: inherit; }
.oc.is-live .live-steps .is-done i::after, .oc.is-live .live-steps .is-now i::after { background: currentColor; }
.oc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13.5px; font-weight: 800; }
.oc:not(.is-live) .oc-foot { padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font: 600 13px var(--font); }
.oc-link { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-family: var(--font-ar); font-weight: 800; }
html:not(:lang(ar)) .oc-link { font-family: var(--font); }
.oc.is-cancelled { opacity: .72; }
.oc-list + .pager, .oc-list + nav { margin-top: 16px; }
@media (min-width: 900px) {
  .oc-list { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .oc-month { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  .ot { padding: 12px 10px 10px; border-radius: 18px; }
  .ot strong { font-size: 22px; }
}

/* —— Notifications page (modules/notifications.php): All / Unread tabs, rows grouped by day —— */
.nt-tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.nt-tab { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 999px; background: var(--panel); color: var(--text-2); font-size: 14px; font-weight: 700;
  transition: background-color .15s, color .15s; }
.nt-tab:hover { background: var(--panel-3); color: var(--text); }
.nt-tab.is-on { background: var(--text); color: var(--bg); font-weight: 800; }
.nt-tab b { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 800 12px var(--font); }
.nt-group { display: grid; gap: 10px; margin-top: 20px; }
.nt-group h2 { padding-inline-start: 4px; color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.nt-list.notif-list { gap: 0; padding: 6px 16px; overflow: visible; border-radius: 24px; background: var(--panel); }
.nt-list .notif-item + .notif-item { border-top: 1px solid var(--line); }
.nt-list .notif-row { align-items: center; gap: 14px; padding: 14px 4px; border-radius: 10px; background: none;
  transition: background-color .15s; }
.nt-list a.notif-row:hover { background: var(--panel-3); color: var(--text); }
.nt-list .notif-item.is-unread .notif-row { background: none; }
.nt-list .notif-item.is-unread a.notif-row:hover { background: rgb(var(--accent-rgb) / .08); }
.nt-list .notif-ic { width: 44px; height: 44px; border-radius: 14px; }
.nt-list .notif-ic .ic { width: 20px; height: 20px; }
.nt-list .notif-text { color: var(--text); font-size: 14.5px; font-weight: 700; line-height: 1.5; }
.nt-list .notif-body { flex: 1 1 auto; gap: 5px; }
.nt-list .notif-body small { font-size: .78rem; }
.nt-list .notif-item.is-unread .notif-body small::before { display: none; }
.nt-list .notif-item.is-unread .notif-row::after { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgb(var(--accent-rgb) / .15); }
.nt-group:has(.is-unread) .nt-list { background: linear-gradient(135deg, rgb(var(--accent-rgb) / .06), var(--panel) 60%); }
.nt-more { margin-top: 16px; border-radius: 16px; font-weight: 700; }

/* —— Settings hub (modules/settings_hub.php) —— */
.sh-profile { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 24px; background: var(--panel); }
.sh-profile .avatar { width: 56px; height: 56px; overflow: hidden; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font: 800 22px var(--font); }
.sh-profile .avatar img { width: 100%; height: 100%; object-fit: cover; }
.sh-who { display: grid; flex: 1 1 auto; min-width: 0; line-height: 1.3; }
.sh-who strong { font-size: 17px; font-weight: 800; }
.sh-who small { overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.sh-nudge { display: flex; align-items: center; gap: 14px; margin-top: 10px; padding: 16px 18px; border: 1px solid rgb(245 197 66 / .2); border-radius: 22px;
  background: linear-gradient(135deg, rgb(245 197 66 / .14), var(--panel) 75%); }
.sh-nudge > span:nth-child(2) { display: grid; flex: 1 1 auto; min-width: 0; line-height: 1.35; }
.sh-nudge strong { font-size: 15.5px; font-weight: 800; }
.sh-nudge small { color: var(--muted); font-size: 13px; }
.sh-nudge-ic { display: grid; flex: none; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--warn); color: #1c1400; }
.sh-nudge-go { flex: none; padding: 9px 16px; border-radius: 14px; background: var(--text); color: var(--bg); font-size: 14px; font-weight: 800; }
.sh-group { display: grid; gap: 10px; margin-top: 22px; }
.sh-group h2 { color: var(--muted); font-size: 14px; font-weight: 700; }
.sh-list { display: grid; margin: 0; padding: 0 16px; list-style: none; border-radius: 24px; background: var(--panel); }
.sh-list li + li { border-top: 1px solid var(--line); }
.sh-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 60px; padding: 8px 0; border: 0; background: none; color: var(--text); font: inherit; text-align: start; cursor: pointer; }
.sh-ic { display: grid; flex: none; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--panel-3); color: var(--text-2); }
.sh-label { flex: 1 1 auto; min-width: 0; font-size: 15.5px; font-weight: 800; }
.sh-side { flex: none; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.sh-chev { flex: none; color: var(--muted); }
.sh-chip { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-size: 12px; font-weight: 800; }
.sh-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
a.sh-row:hover .sh-label, a.sh-profile:hover strong { color: var(--accent); }
.sh-prefs .dd-btn, .sh-prefs .theme-toggle { min-height: 36px; height: 36px; border-color: var(--line-2); background: var(--panel-2); }
.sh-prefs .dd-menu { inset-inline: auto 0; }
.sh-out { margin-top: 22px; padding: 0 16px; border-radius: 24px; background: var(--panel); }
.sh-logout, .sh-logout .sh-ic { color: var(--danger); }
.sh-logout .sh-ic { background: var(--danger-soft); }
@media (min-width: 1000px) {
  .sh-profile, .sh-nudge, .sh-group, .sh-out { max-width: 760px; }
}
