/* Shared UI — tooltips (dashboard, admin, docs) */

.ui-tooltip {
  position: fixed;
  z-index: 10050;
  max-width: min(240px, calc(100vw - 16px));
  padding: 6px 10px;
  border-radius: 6px;
  background: #2f23a8;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 20px rgba(10, 37, 64, 0.22);
  pointer-events: none;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.ui-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* —— Monthly statement —— */
.stmt { font-size: 13px; }
.stmt .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stmt-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 2px solid var(--purple, #5b3fd6); }
.stmt-head > div { display: flex; flex-direction: column; gap: 2px; }
.stmt-issuer { font-size: 18px; color: var(--purple, #5b3fd6); }
.stmt-meta { text-align: right; }
.stmt-curs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.stmt-cur { border: 1px solid var(--border, #e3e8ee); border-radius: 10px; padding: 12px 14px; }
.stmt-cur h3 { margin: 0 0 8px; font-size: 14px; }
.stmt-sum { width: 100%; border-collapse: collapse; }
.stmt-sum td, .stmt-sum th { padding: 4px 0; border: 0; }
.stmt-sum th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding-top: 10px; opacity: .7; }
.stmt-strong td { font-weight: 600; border-top: 1px solid var(--border, #e3e8ee); }
.stmt-h { margin: 22px 0 8px; font-size: 14px; }
.stmt-lines { width: 100%; border-collapse: collapse; }
.stmt-lines th, .stmt-lines td { padding: 6px 8px; border-bottom: 1px solid var(--border, #e3e8ee); text-align: left; }
.stmt-void td { opacity: .55; }
.stmt-lines td:nth-child(-n+2) { white-space: nowrap; }
.stmt-foot { margin-top: 14px; font-size: 11.5px; }
#stmt-print { display: none; }
@media (max-width: 600px) { .stmt-meta { text-align: left; } }
@media print {
  body.printing-stmt > *:not(#stmt-print) { display: none !important; }
  body.printing-stmt { background: #fff !important; }
  body.printing-stmt #stmt-print { display: block; color: #1a2c44; }
  #stmt-print .table-scroll { overflow: visible; }
  #stmt-print .stmt-lines tr { break-inside: avoid; }
  @page { margin: 14mm; }
}

/* Finishing details: retain the existing brand palette and layout. */
:is(.btn, .text-link, .menu-row, .nav-link) {
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease;
}
:is(button, a, input, textarea, select):focus-visible {
  outline: 2px solid var(--purple, #635bff);
  outline-offset: 3px;
}
.btn { border-radius: 8px; }
.btn:not(:disabled):active { transform: translateY(1px); }
.btn:disabled { cursor: not-allowed; }
:is(.panel-card, .aside-card, .ov-card, .limit-card) { border-radius: 12px; }
.panel-card { box-shadow: 0 2px 8px rgba(10, 37, 64, .025); }
.ov-card { padding: 20px; }
.ov-card .ov-val { letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.ov-card .ov-top { line-height: 1.45; }
.table-scroll { border-radius: 10px; }
:is(.table-scroll, .mv-table) th { font-weight: 600; white-space: nowrap; }
:is(.table-scroll, .mv-table) td { font-variant-numeric: tabular-nums; }
.mv-row td { transition: background-color .14s ease; }
.mv-row td:first-child { white-space: nowrap; }
.mv-row td strong { white-space: nowrap; }
.status-pill { gap: 5px; font-weight: 600; }
.mv-leg { border-radius: 12px; padding: 18px; }
.mv-leg-head { padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.mv-timeline { gap: 18px; margin-block: 16px 24px; }
.mv-timeline li { padding-left: 6px; }
.mv-timeline li strong { font-weight: 550; line-height: 1.5; }
.modal-card { border-radius: 16px; }
@media (max-width: 600px) {
  .ov-card { padding: 16px; }
  .mv-leg { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  :is(.btn, .text-link, .menu-row, .nav-link, .mv-row td) { transition: none; }
  .btn:not(:disabled):active { transform: none; }
}

/* Dashboard composition — same palette, clearer reading order. */
.app .page { padding: 32px clamp(20px, 3vw, 44px) 72px; margin-inline: auto; width: 100%; }
.app .page-title-row { align-items: center; gap: 24px; margin-bottom: 24px; }
.app .page-title-row > div:first-child { min-width: 0; }
.app .page-title-row > :is(button, .toolbar) { flex-shrink: 0; }
.app .page-title-row h1 { font-size: clamp(26px, 2.5vw, 36px); letter-spacing: -.035em; line-height: 1.16; text-wrap: balance; }
.app .page-eyebrow { font-size: 11px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px; }
.app .page-sub { font-size: 14px; line-height: 1.7; max-width: 68ch; margin-top: 10px; }
.app .page-header-card { display: grid; gap: 4px; padding: 16px 20px; font-size: 13px; border-radius: 10px; }
.app .content-primary { gap: 20px; min-width: 0; }
.app .content-aside { min-width: 0; }
.app .overview-head { margin-bottom: 20px; gap: 16px; }
.app :is(.overview-head h2, .table-title) { font-size: 16px; letter-spacing: -.02em; }
.app .panel-card { padding: 24px; }
.app .overview-cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 12px; }
.app .ov-card { padding: 18px 16px; box-shadow: inset 0 2px 0 var(--purple); }
.app .ov-card .ov-val { font-size: clamp(20px, 1.8vw, 26px); overflow-wrap: anywhere; line-height: 1.25; }
.app .ov-card .metric-sub { margin-top: 8px; font-size: 12px; line-height: 1.5; }
.app .metric-pair { gap: 20px; margin-bottom: 24px; }
.app .metric-pair > .metric + .metric { padding-left: 20px; border-left: 1px solid var(--border); }
.app .metric-value { font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
.app .aside-card { padding: 20px; }
.app .aside-card h3 { font-size: 14px; letter-spacing: -.015em; }
.app .aside-block p { font-size: 13px; line-height: 1.65; }
.app .table-scroll { margin-top: 16px; border: 1px solid var(--border); }
.app .table-scroll thead { background: var(--bg); }
.app .table-scroll th { font-size: 11px; letter-spacing: .035em; padding: 12px 14px; }
.app .table-scroll td { font-size: 13px; padding: 15px 14px; }
.app .table-scroll tbody tr:last-child td { border-bottom: 0; }
.app .toolbar { gap: 10px; flex-wrap: wrap; align-items: center; }
.app .toolbar .field-inline { flex: 1 1 240px; min-width: 0; }
.app .toolbar .field-inline input { width: 100%; }
.app .pager { padding-top: 16px; }
.overview-panel > .page-title-row { padding-block: 8px 12px; }
.overview-shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0 0 28px; }
.overview-shortcut {
  display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 14px; row-gap: 4px;
  padding: 18px; border: 1px solid var(--border); border-radius: 12px;
  color: var(--text); background: var(--surface); text-align: left; cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.overview-shortcut[data-ui-icon]::before {
  grid-row: 1 / 3; align-self: center; width: 22px; height: 22px;
  margin: 0; color: var(--purple);
}
.overview-shortcut strong { grid-column: 2; font-size: 14px; font-weight: 600; line-height: 1.4; }
.overview-shortcut span { grid-column: 2; font-size: 12px; line-height: 1.5; color: var(--mute); }
.overview-shortcut:hover { border-color: var(--purple); box-shadow: 0 3px 12px rgba(10, 37, 64, .05); }
@media (min-width: 1101px) and (max-width: 1360px) {
  .overview-panel .content-grid { grid-template-columns: minmax(0, 1fr); }
  .overview-panel .content-aside { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; position: static; }
  .overview-panel .content-aside .aside-card { margin: 0; }
}
@media (max-width: 1100px) {
  .overview-shortcuts { gap: 10px; }
  .overview-shortcut { grid-template-columns: 24px minmax(0, 1fr); padding: 16px 12px; column-gap: 10px; }
}
@media (max-width: 640px) {
  .app .page { padding: 22px 16px 64px; }
  .app .page-title-row { align-items: flex-start; flex-wrap: wrap; gap: 16px; }
  .app .page-title-row > :is(button, .toolbar) { flex-shrink: 1; max-width: 100%; }
  .app .panel-card { padding: 18px 16px; }
  .app .metric-pair { gap: 12px; }
  .app .metric-pair > .metric + .metric { padding-left: 12px; }
  .app .metric-pair .metric-value { font-size: clamp(22px, 6vw, 30px); overflow-wrap: anywhere; }
  .app .overview-head { gap: 12px; margin-bottom: 16px; }
  .overview-shortcuts { grid-template-columns: 1fr; gap: 8px; margin-bottom: 22px; }
  .overview-shortcut { padding: 14px 16px; grid-template-columns: 28px minmax(0, 1fr); }
  .app .toolbar .field-inline { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { .overview-shortcut { transition: none; } }
