/* assets/css/ubs-app-theme.css — one look for every customer screen (30 Nov 2026)
 *
 * Loaded last on every customer page (includes/offline.php). Each screen was
 * built on its own, so headers, back buttons, cards, buttons, fields, chips,
 * sheets and empty states were all slightly different sizes and shapes. This
 * file gives them one shape and one rhythm. Colours come from each page's own
 * variables (--panel, --line, --text …) so light and dark both keep working;
 * only the brand call-to-action colour is fixed here.
 */

:root {
  --app-r-card: 20px;
  --app-r-ctl: 14px;
  --app-brand: linear-gradient(135deg, #E60023 0%, #B8001C 100%);
  --app-brand-flat: #D9001F;
  --app-shadow: 0 1px 2px rgba(16,24,40,.04), 0 10px 28px -16px rgba(16,24,40,.18);
  --app-ease: cubic-bezier(.2,.8,.2,1);
}

html { -webkit-tap-highlight-color: transparent; }
body:not(.ubs-admin-body) {
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}

/* ---------- screen header: back · title, same everywhere ---------- */
body:not(.ubs-admin-body) :is(.top, .page-head, .topbar, .titlebar) { min-height: 48px; gap: 12px !important; }
body:not(.ubs-admin-body) :is(.top, .page-head, .topbar, .titlebar) :is(h1, .title, .page-title) {
  font-size: 20px !important; font-weight: 650 !important; letter-spacing: -.02em !important; line-height: 1.2 !important; margin: 0 !important;
}
body:not(.ubs-admin-body) a.back, body:not(.ubs-admin-body) button.back, body:not(.ubs-admin-body) .back-btn {
  width: 42px !important; height: 42px !important; flex: 0 0 42px !important; border-radius: var(--app-r-ctl) !important;
  display: grid !important; place-items: center !important; padding: 0 !important;
  background: var(--panel, var(--card, #fff)) !important; border: 1px solid var(--line, rgba(16,24,40,.08)) !important;
  box-shadow: 0 1px 2px rgba(16,24,40,.05) !important; transition: transform .12s var(--app-ease), background .15s;
}
body:not(.ubs-admin-body) :is(a.back, button.back, .back-btn) svg { width: 20px !important; height: 20px !important; }

/* ---------- section titles: one style ---------- */
body:not(.ubs-admin-body) :is(.section-title, .sec-title, .section-head h2, .section-head > strong, .svc-sec > h2) {
  font-size: 16px !important; font-weight: 650 !important; letter-spacing: -.01em !important; text-transform: none !important;
  color: var(--text, var(--txt, #0B1220)) !important; opacity: 1 !important;
}

/* ---------- cards / panels / sheets ---------- */
body:not(.ubs-admin-body) main :is(.card, .panel, .box):not(.ubs-card-face):not([class*="cc-"]),
body:not(.ubs-admin-body) .app > :is(.card, .panel, .box) {
  border-radius: var(--app-r-card) !important; border: 1px solid var(--line, rgba(16,24,40,.06)) !important;
  box-shadow: var(--app-shadow) !important;
}

/* ---------- buttons ---------- */
body:not(.ubs-admin-body) :is(.primary-btn, .btn.primary, .btn.red, .btn-primary, .btn.pri, .cta, button.primary) {
  min-height: 52px; border-radius: 16px !important; border: 0 !important;
  background: var(--app-brand) !important; color: #fff !important;
  font: 650 15.5px/1.1 Inter, system-ui, sans-serif !important; letter-spacing: -.005em !important;
  box-shadow: 0 10px 22px -12px rgba(217,0,31,.7) !important;
  transition: transform .12s var(--app-ease), box-shadow .2s, opacity .2s !important;
}
body:not(.ubs-admin-body) :is(.primary-btn, .btn.primary, .btn.red, .btn-primary, .btn.pri, .cta, button.primary):disabled {
  opacity: .45 !important; box-shadow: none !important;
}
body:not(.ubs-admin-body) :is(.btn, .secondary, .btn-secondary):not(.primary):not(.red):not(.pri):not(.btn-primary) {
  min-height: 48px; border-radius: 16px !important; font: 600 15px/1.1 Inter, system-ui, sans-serif !important;
}
/* press feedback: every tappable thing gives way a little */
@media (hover:none) {
  body:not(.ubs-admin-body) :is(a, button, .tile, .quick-item, .svc-item, [role=button]):active { transform: scale(.97); }
}
body:not(.ubs-admin-body) :is(.tile, .quick-item, .svc-item, .btn, .primary-btn, a.back) { transition: transform .12s var(--app-ease); }

/* ---------- fields ---------- */
body:not(.ubs-admin-body) main :is(input[type=text], input[type=tel], input[type=number], input[type=email], input[type=search], input:not([type]), select, textarea):not(.mpin-input):not([class*="otp"]):not([maxlength="1"]) {
  font-size: 16px; border-radius: var(--app-r-ctl);
}
body:not(.ubs-admin-body) main :is(input, select, textarea):focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(217,0,31,.12) !important; border-color: rgba(217,0,31,.55) !important; }

/* ---------- chips / pills / tabs ---------- */
body:not(.ubs-admin-body) :is(.pill, .chip, .tab, .badge) { border-radius: 999px !important; }
body:not(.ubs-admin-body) :is(.pills, .chips, .tabs) { scrollbar-width: none; }
body:not(.ubs-admin-body) :is(.pills, .chips, .tabs)::-webkit-scrollbar { display: none; }

/* ---------- empty states ---------- */
body:not(.ubs-admin-body) .empty { text-align: center; }
body:not(.ubs-admin-body) .empty :is(strong, h3, .t) { font-size: 15px !important; font-weight: 650 !important; }

/* ---------- bottom sheets & dialogs ---------- */
body:not(.ubs-admin-body) :is(.sheet, .sheet-wrap > div) { border-radius: 28px 28px 0 0 !important; }
body:not(.ubs-admin-body) :is(.sheet-bg, .sheet-backdrop) { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
body:not(.ubs-admin-body) :is(.sheet-handle, .sheet-grab) { width: 44px !important; height: 5px !important; border-radius: 999px !important; }

/* ---------- app-wide toast (ubs-app-theme.js) ---------- */
.app-toast {
  position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0;
  z-index: 2147482500; max-width: min(420px, calc(100vw - 32px)); padding: 12px 16px; border-radius: 16px;
  background: #0B1220; color: #fff; font: 550 14px/1.4 Inter, system-ui, sans-serif; box-shadow: 0 16px 40px -16px rgba(11,18,32,.6);
  transition: transform .25s var(--app-ease), opacity .2s; pointer-events: none; text-align: center;
}
.app-toast.on { transform: translate(-50%, 0); opacity: 1; }
.app-toast.err { background: #B42318; }
.app-toast.ok { background: #067647; }

/* ---------- app dialog (replaces the browser's alert/confirm look) ---------- */
.app-dlg { position: fixed; inset: 0; z-index: 2147482600; display: grid; align-items: end; justify-items: center;
  background: rgba(11,18,32,.42); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: appFade .18s ease; }
.app-dlg__card { width: min(480px, 100%); background: var(--panel, #fff); color: var(--text, #0B1220); border-radius: 28px 28px 0 0;
  padding: 10px 22px calc(22px + env(safe-area-inset-bottom)); box-shadow: 0 -20px 50px -20px rgba(11,18,32,.4); animation: appUp .24s var(--app-ease); }
.app-dlg__grab { width: 44px; height: 5px; border-radius: 999px; background: rgba(16,24,40,.15); margin: 0 auto 16px; }
.app-dlg__icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 12px; font-size: 24px; background: #FEF3F2; }
.app-dlg__icon.ok { background: #ECFDF3; } .app-dlg__icon.info { background: #F2F4F7; }
.app-dlg h3 { margin: 0 0 6px; font: 700 19px/1.25 Inter, system-ui, sans-serif; letter-spacing: -.02em; }
.app-dlg p { margin: 0 0 18px; font: 450 14.5px/1.5 Inter, system-ui, sans-serif; color: var(--muted, #475467); }
.app-dlg__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.app-dlg__row.one { grid-template-columns: 1fr; }
.app-dlg button { min-height: 52px; border-radius: 16px; font: 650 15px Inter, system-ui, sans-serif; cursor: pointer; border: 1px solid var(--line, #E4E7EC); background: var(--panel, #fff); color: inherit; }
.app-dlg button.go { background: var(--app-brand); color: #fff; border: 0; }
@media (min-width: 600px) { .app-dlg { align-items: center; } .app-dlg__card { border-radius: 24px; } }
@keyframes appFade { from { opacity: 0 } to { opacity: 1 } }
@keyframes appUp { from { transform: translateY(40px) } to { transform: none } }

/* ---------- screens arrive softly (no flash of white between pages) ---------- */
@media (prefers-reduced-motion: no-preference) {
  body:not(.ubs-admin-body) main { animation: appIn .22s var(--app-ease) both; }
  @keyframes appIn { from { opacity: 0; transform: translateY(6px) } to { opacity: 1; transform: none } }
}

/* ---------- one typeface for money ----------
   Amounts were in a typewriter font on some screens and Inter on others.
   Banking apps use one face everywhere; tabular figures keep columns lined up. */
:root { --mono: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; --ubm-num: Inter, system-ui, sans-serif; --ubs-num-font: Inter, system-ui, sans-serif; }
html:root:not(.ubs-admin) { --ubs-font-mono: Inter, system-ui, sans-serif; }
body:not(.ubs-admin-body) { font-variant-numeric: tabular-nums; }

/* 30 Nov 2026 — 3D empty-state art (assets/img/ubs/empty). */
.ubs-empty-art{display:block;margin:4px auto 8px;width:140px;height:auto;max-width:60%;object-fit:contain}
