/* Shared typography and shapes. Colors come from the original brand palette in styles.css. */
:root {
  --radius-lg: 18px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --radius-xl: 20px;
  --font-body: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Antic Didone", Georgia, serif;
  --font-editorial: "Antic Didone", Georgia, serif;
}

body { font-size: .875rem; line-height: 1.6; }
button, input, textarea, select { font-family: var(--font-body); }

/* Signed documents keep their own type and print layout. */
:where(.topbar, .welcome-hero, .module-card, .modal-header, .login-shell, .section-header, .action-choice-card, .reception-highlight-card) :is(h1, h2, h3, h4):not(.html-preview *, .document-shell *) {
  font-family: var(--font-editorial); font-weight: 400; letter-spacing: 0; line-height: 1.18;
}
.topbar h2 { font-size: clamp(1.45rem, 2vw, 1.9rem); }
.welcome-hero h3 { max-width: 28ch; font-size: clamp(1.6rem, 2.6vw, 2.35rem); line-height: 1.18; }
.section-header h3, .modal-header h3, .section-subheader h3 { font-size: 1.6rem; }
.login-hero h1 { font-size: clamp(2.6rem, 5vw, 4.4rem); letter-spacing: 0; line-height: 1.08; }
.context-sidebar .brand h1 { font-weight: 400; }
.context-sidebar .sidebar-user-card { border-radius: 12px; }
.context-sidebar .sidebar-user-card strong { font-weight: 600; }
.context-sidebar .finance-nav a { border-radius: 9px; font-size: .8rem; font-weight: 500; }
.context-sidebar .finance-nav a:is(:hover, [aria-current="page"]) { background: rgba(255, 250, 243, .14); color: #fffaf3; }
.eyebrow, .small-label, .brand-kicker { font-weight: 600; font-size: .67rem; letter-spacing: .15em; }
.intro-strip, .reception-intro, .login-hero-text { font-size: .85rem; font-weight: 400; line-height: 1.8; }

:is(.topbar, .welcome-hero, .module-card, .login-panel, .login-hero, .modal-panel) { border-radius: 20px; }
:is(.reception-highlight-card, .action-choice-card, .step-card, .readonly-item, .selected-client-box-large, .history-client-box, .journey-client-box) { border-radius: 14px; }
.primary-button, .ghost-button {
  font-family: var(--font-body); font-size: .78rem; letter-spacing: 0; border-radius: 9px;
}
.primary-button { font-weight: 600; }
.ghost-button { font-weight: 500; }
.row-action { border-radius: 8px; font-size: .72rem; }
button:disabled, a[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
:is(button, a, summary):focus-visible { outline: 2px solid var(--accent-gold); outline-offset: 3px; }
.field label { font-size: .76rem; font-weight: 500; }
.field :is(input, select, textarea), .search-input { font-family: var(--font-body); font-size: .82rem; border-radius: 9px; }
.reception-search-box { border-radius: 12px; }
.table-shell { border-radius: 18px; }
.table-head, .table-shell .table-head { border-radius: 10px; font-size: .66rem; letter-spacing: .1em; font-weight: 600; }
.table-record, .table-body > .table-row { border-radius: 12px; }
.table-cell strong { font-weight: 500; }
.table-cell-primary strong { font-family: var(--font-editorial); font-weight: 400; font-size: 1.2rem; }
.table-cell span { font-size: .76rem; }
.pagination-summary { font-size: .78rem; }
.pagination-button { border-radius: 8px; }
.status-badge, .module-chip, .meta-pill { font-size: .72rem; font-weight: 500; min-height: 1.9rem; }
.feedback-box, .empty-state, .soft-note { border-radius: 12px; font-size: .8rem; }
.finance-stat { border-radius: 17px; }
.finance-stat strong { font-family: var(--font-editorial); font-weight: 400; }
.finance-stat > span { font-weight: 400; }
.login-hero-badge { font-size: .65rem; font-weight: 500; letter-spacing: .06em; }
.login-brand strong { font-family: var(--font-editorial); font-weight: 400; }
.app-footer strong { font-weight: 500; }

@media (max-width: 650px) {
  .section-header h3, .modal-header h3, .section-subheader h3 { font-size: 1.35rem; }
  .welcome-hero h3 { font-size: 1.65rem; }
  .primary-button, .ghost-button { font-size: .72rem; }
}

/* Today's dashboard uses the existing brand palette and quieter decorative details. */
.today-hero { position: relative; overflow: hidden; }
.today-hero::after { content: ""; position: absolute; width: 180px; height: 180px; right: -80px; top: -95px; border: 22px solid var(--rose-soft); border-radius: 50%; pointer-events: none; }
.today-hero .section-header { position: relative; z-index: 1; }
.today-hero .section-actions { gap: .7rem; }
.today-hero .section-actions :is(a, button) { gap: .45rem; }
.today-date { display: inline-flex; align-items: center; gap: .5rem; margin: .8rem 0 0; padding: .35rem .75rem; border: 1px solid var(--border); border-radius: 99px; background: var(--bg-elevated); color: var(--muted-strong); font-size: .74rem; }
.today-date::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.today-page .finance-stat { position: relative; overflow: hidden; min-height: 174px; padding-top: 1.3rem; }
.today-page .finance-stat::after { content: ""; position: absolute; bottom: 0; left: 1.3rem; right: 1.3rem; height: 3px; background: var(--accent-soft); border-radius: 3px; }
.today-page .finance-stat:nth-child(2)::after { background: var(--rose-soft); }
.today-page .finance-stat:nth-child(3)::after { background: var(--success-soft); }
.today-page .finance-stat:nth-child(4)::after { background: var(--lilac-soft); }
.today-page .stat-icon { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); margin-bottom: .2rem; }
.today-page .finance-stat:nth-child(2) .stat-icon { background: var(--rose-soft); color: var(--rose-deep); }
.today-page .finance-stat:nth-child(3) .stat-icon { background: var(--success-soft); color: var(--text); }
.today-page .finance-stat:nth-child(4) .stat-icon { background: var(--lilac-soft); color: var(--text); }
.stat-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.today-sessions > .section-header { padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.today-sessions .finance-table th { font-size: .65rem; letter-spacing: .04em; }
.today-sessions .finance-table tbody tr { transition: background 150ms ease; }
.today-sessions .finance-table tbody tr:hover { background: var(--bg-elevated); }
.today-client { display: flex; align-items: center; gap: .65rem; min-width: 150px; }
.today-client strong { font-weight: 500; }
.today-avatar { display: inline-grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 50%; background: var(--accent-soft); color: var(--accent); font: 1rem var(--font-editorial); }
.today-session { display: inline-block; white-space: nowrap; padding: .35rem .55rem; border: 1px solid var(--border); border-radius: 8px; color: var(--muted-strong); background: var(--bg-elevated); font-size: .72rem; }
.today-time { white-space: nowrap; color: var(--muted); font-size: .72rem; }
.today-sessions .money-cell { color: var(--accent); }
.today-sessions .ghost-button { display: inline-flex; gap: .45rem; white-space: nowrap; }
.today-explainer { padding: .9rem 1rem; margin: 0; border-left: 3px solid var(--accent-gold); border-radius: 0 10px 10px 0; background: var(--bg-elevated); }
.today-page #todayStats, .accounting-page #accountingStats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.today-row-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.accounting-filters { padding: 1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-elevated); }
#accountingPeriodLabel:not(:empty) { display: inline-block; padding: .45rem .75rem; border-radius: 9px; background: var(--accent-soft); color: var(--muted-strong); }
.chart-scope { display: inline-block; font-size: .72rem; font-weight: 500; color: var(--accent); background: var(--accent-soft); border-radius: 8px; padding: .4rem .65rem; margin: 0 0 .6rem; }
.chart-guide { font-size: .74rem; line-height: 1.7; color: var(--muted); margin: 0 0 1rem; }
.income-chart-head { display: flex; justify-content: space-between; gap: 1rem; padding: .65rem 0; border-bottom: 1px solid var(--border); font-size: .66rem; font-weight: 600; color: var(--muted-strong); }
.income-days { max-height: 440px; overflow-y: auto; padding: 0 .65rem 0 0; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.income-days:focus-visible { outline: 2px solid var(--accent-gold); outline-offset: 3px; border-radius: 5px; }
.income-day { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.income-day:last-child { border-bottom: 0; }
.income-day-heading { display: flex; justify-content: space-between; align-items: start; gap: .75rem; }
.income-day-heading > div { display: grid; gap: .2rem; }
.income-day-heading strong { font-size: .78rem; font-weight: 500; color: var(--text); }
.income-day-heading small { color: var(--muted); font-size: .65rem; }
.income-day-heading .income-day-amount { white-space: nowrap; color: var(--accent); font-weight: 600; font-size: .9rem; }
.income-day-amount small, .clear-method strong small { font-size: .6rem; font-weight: 400; color: var(--muted); }
.income-day-track { height: 11px; background: var(--panel-muted); border-radius: 6px; margin-top: .65rem; overflow: hidden; }
.income-day-track span { display: block; height: 100%; background: var(--accent-gold); border-radius: inherit; }
.income-zero { display: inline-block; margin-top: .3rem; font-size: .62rem; color: var(--muted); }
.clear-method { padding: .9rem; margin: .75rem 0; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-elevated); }
.clear-method > small { display: block; margin-top: .4rem; }
.income-chart-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; padding: .6rem .25rem; background: var(--bg-elevated); }
.income-chart-scroll:focus-visible { outline: 2px solid var(--accent-gold); outline-offset: 3px; }
.income-chart-svg { display: block; width: 100%; height: 330px; font-family: var(--font-body); }
.income-grid { stroke: var(--border); stroke-width: 1; }
.income-axis-label { fill: var(--muted); font-size: 10px; }
.income-axis-title { fill: var(--muted-strong); font-size: 10px; font-weight: 500; }
.income-date-label { fill: var(--text); font-size: 10px; }
.income-bar { fill: var(--accent); }
.income-bar:hover { fill: var(--accent-gold); }
.income-bar-value { fill: var(--accent-deep); font-size: 12px; font-weight: 600; }
.chart-empty { padding: .75rem; border-radius: 10px; background: var(--panel-muted); color: var(--muted); font-size: .78rem; }
.income-chart-details { margin-top: .8rem; }
.income-chart-details summary { cursor: pointer; color: var(--accent); font-size: .75rem; }
.income-chart-details .income-day-heading { padding: .6rem; border-bottom: 1px solid var(--border); }
.clear-method .method-track { height: 12px; }
.history-modal-panel .modal-actions { flex-wrap: wrap; }
.history-modal-panel .modal-actions [aria-pressed="true"] { background: var(--accent); color: #fffaf3; border-color: var(--accent); }
.dossier-timeline .visit-actions { flex-wrap: wrap; }
.consent-observations-field { padding: 1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-elevated); }
.signing-observations-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.signing-observations-header strong { color: var(--text); font-weight: 500; }
.signing-observations-header p { font-size: .74rem; color: var(--muted); margin: .3rem 0 0; }
.signing-observations-list { display: grid; gap: .85rem; margin-top: 1rem; }
.signing-observation-row { padding: .85rem; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
.signing-observation-header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .5rem; }
.signing-observation-header button { min-height: 2rem; font-size: .7rem; padding: .4rem .6rem; }
.signing-observation-row textarea { min-height: 90px; resize: vertical; }
@media (max-width: 650px) { .signing-observations-header { align-items: stretch; flex-direction: column; } }
.unpaid-session-badge, .table-cell .unpaid-session-badge { display: inline-flex; align-items: center; gap: .35rem; margin-left: .5rem; padding: .25rem .5rem; border-radius: 20px; border: 1px solid #e8b8b0; background: #fceeea; color: #a1372c; font: 500 .65rem/1.4 var(--font-body); white-space: nowrap; vertical-align: middle; }
.unpaid-dot { width: 7px; height: 7px; background: #ce4335; border-radius: 50%; flex-shrink: 0; }
.dossier-badges .unpaid-session-badge, .visit-money .unpaid-session-badge { margin-left: 0; }
.session-payment-panel { width: min(560px, 100%); }
#sessionPaymentForm { display: grid; gap: 1rem; overflow-y: auto; }
#sessionPaymentForm .form-actions { display: flex; flex-wrap: wrap; gap: .7rem; }
#sessionPaymentForm .payment-preview { margin: 0; }
.dossier-timeline .register-session-payment { font-size: .68rem; padding: .6rem .7rem; }
.today-client .unpaid-session-badge { margin-left: 0; }
@media (max-width: 650px) {
  .today-page #todayStats, .accounting-page #accountingStats { grid-template-columns: 1fr; }
  .today-page .finance-stat { min-height: 160px; padding: 1rem; }
  .today-page .finance-stat strong { font-size: 1.6rem; }
  .today-page .finance-stat > span:not(.stat-icon) { font-size: .7rem; }
  .today-page .stat-icon { width: 30px; height: 30px; }
}
