/* Shared component treatment for the approved Vínculo identity. */
:root {
  --control-radius: 12px;
  --field-radius: 8px;
  --surface-radius: 14px;
  --control-height: 44px;
  --control-border: var(--field-line);
}

.app-mode { line-height: 1.55; }
.app-mode ::selection, .access-screen ::selection { background: var(--brand); color: var(--paper); }
.app-mode :is(input,select,textarea), .auth-experience input, .access-screen input { accent-color: var(--action); caret-color: var(--action); }
.app-mode :is(input,select,textarea)::placeholder { color: var(--muted); opacity: 1; }

.app-mode .btn, .app-mode .btn.small {
  min-height: var(--control-height);
  border-radius: var(--control-radius);
  font-weight: 600;
  line-height: 1.4;
  transition: background var(--duration-short) var(--ease-out), border-color var(--duration-short) var(--ease-out), color var(--duration-short) var(--ease-out);
}
.app-mode .btn.secondary { background: var(--paper); border-color: var(--control-border); color: var(--action); }
.app-mode .btn.secondary:hover { background: var(--paper); border-color: var(--action); color: var(--brand); }
.app-mode .btn.ghost { background: transparent; border-color: transparent; color: var(--action); }
.app-mode .btn.ghost:hover { background: transparent; text-decoration: underline; text-underline-offset: 4px; }
.app-mode .btn.danger { border-color: var(--red); background: var(--red); color: var(--paper); }
.app-mode .logout-button { background: var(--paper); color: var(--red); border-color: var(--red); }
.app-mode .logout-button:hover { background: var(--paper); color: var(--red); text-decoration: underline; }
.app-mode .icon-btn { min-width: 44px; min-height: 44px; width: 44px; height: 44px; border-radius: var(--control-radius); border: 1px solid var(--control-border); background: var(--paper); color: var(--action); }
.app-mode .icon-btn:hover { background: var(--paper); border-color: var(--action); }
.app-mode .btn:disabled { opacity: .55; text-decoration: none; }

.app-mode .field { font-size: 14px; font-weight: 600; color: var(--ink); }
.app-mode :is(.field, .filter-period, .form-grid, .section-head) { min-width: 0; }
.app-mode :is(input, select, textarea) { max-width: 100%; min-width: 0; }
/* Native WebKit date controls must fit their grid track, including empty values. */
.app-mode input:is([type=date], [type=time], [type=month]) {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  text-align: left;
}
.app-mode input:is([type=date], [type=time], [type=month])::-webkit-date-and-time-value {
  min-height: 1.4em;
  text-align: left;
}
.app-mode input:is([type=date], [type=time], [type=month])::-webkit-datetime-edit { padding: 0; }
.app-mode .field :is(input,select,textarea), .app-mode .filter-input, .app-mode .filter-period input, .app-mode .calendar-month-picker input {
  background: var(--paper);
  border: 1px solid var(--control-border);
  border-radius: var(--field-radius);
  color: var(--ink);
  min-height: 48px;
  font-weight: 400;
}
.app-mode .field input[readonly] { background: var(--paper); color: var(--muted); }
.app-mode :is(.filter-input,.field input,.field select,.field textarea):focus { border-color: var(--action); }
.app-mode :is(.field-error,.auth-error) { color: var(--red); font-size: 14px; line-height: 1.6; }
.app-mode .badge { background: var(--paper); border: 1px solid currentColor; border-radius: 6px; font-size: 12px; font-weight: 600; line-height: 1.45; }
.app-mode .badge.blue, .app-mode .badge.green { color: var(--action); }
.app-mode .badge.amber { color: var(--amber); }
.app-mode .badge.red { color: var(--red); }

.app-mode .receipt-tabs {
  align-self: stretch;
  gap: 26px;
  padding: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.app-mode .receipt-tabs > button {
  position: relative;
  min-height: 48px;
  padding: 10px 0 14px;
  border-radius: 0;
  background: var(--paper);
  color: var(--muted);
  font-size: 14px;
}
.app-mode .receipt-tabs > button:hover { background: var(--paper); color: var(--action); }
.app-mode .receipt-tabs > button[aria-selected=true] { background: var(--paper); color: var(--brand); font-weight: 700; }
.app-mode .receipt-tabs > button[aria-selected=true]::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--action); }
.app-mode :is(.view-options,.payment-kind) { border: 1px solid var(--line); border-radius: var(--control-radius); padding: 4px; background: var(--paper); }
.app-mode .view-options button, .app-mode .payment-kind-option { border-radius: var(--field-radius); min-height: 44px; font-size: 13px; }
.app-mode .view-options button.active, .app-mode .payment-kind-option[aria-pressed=true] { background: var(--brand); color: var(--paper); }
.app-mode .overview-chart-tabs { border: 1px solid var(--line); border-radius: var(--control-radius); padding: 4px; background: var(--paper); }
.app-mode .overview-chart-tabs button { min-height: 44px; border-radius: var(--field-radius); }

.app-mode .receipts-summary { gap: 0; border: 1px solid var(--line); border-radius: var(--surface-radius); overflow: hidden; background: var(--paper); }
.app-mode .receipts-total { border: 0; border-radius: 0; padding: 23px 25px; }
.app-mode .receipts-total + .receipts-total { border-left: 1px solid var(--line); }
.app-mode .receipts-total.confirmed { background: var(--brand); color: var(--paper); }
.app-mode .receipts-total.confirmed > span { color: var(--paper); }
.app-mode .receipts-total > strong { font-variant-numeric: tabular-nums; }
.app-mode .receipts-outstanding, .app-mode .receipts-history { display: block; }
.app-mode .receipt-balance, .app-mode .receipt-payment { padding: 25px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: var(--paper); }
.app-mode .receipt-balance { display: grid; grid-template-columns: minmax(0,1fr) minmax(225px,.45fr); gap: 12px 30px; }
.app-mode .receipt-balance-top { grid-column: 1; }
.app-mode .receipt-balance-top h2, .app-mode .receipt-payment h2 { font-size: 17px; font-weight: 700; }
.app-mode .receipt-balance-top p, .app-mode .receipt-shift-meta { font-size: 13px; }
.app-mode .receipt-shift-meta { grid-column: 1; margin-top: 0; }
.app-mode .receipt-amounts { grid-column: 2; grid-row: 1 / 3; margin: 0; grid-template-columns: minmax(0,1fr); gap: 12px; text-align: right; }
.app-mode .receipt-amounts dd { font-size: 25px; }
.app-mode .receipt-amounts > div:nth-child(2) dd { font-size: 15px; }
.app-mode .receipt-balance-actions { grid-column: 1 / -1; margin-top: 5px; padding: 0; border: 0; justify-content: flex-end; gap: 14px; }
.app-mode .receipt-payment-top { align-items: flex-start; }
.app-mode .receipt-payment-top > strong { font-variant-numeric: tabular-nums; font-size: 23px; }
.app-mode .receipt-payment-details { margin-left: 48px; }

.app-mode .payer { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 25px 0; align-items: flex-start; }
.app-mode .payer-info h3 { font-size: 17px; font-weight: 700; }
.app-mode .payer-info p { font-size: 13px; }
.app-mode .account-grid .finance-panel { border-radius: var(--surface-radius); background: var(--paper); }
.app-mode .account-links strong { font-size: 14px; }
.app-mode .account-links small, .app-mode .account-section .safety-note, .app-mode .account-section .small-text { font-size: 13px; }
.app-mode .account-links > :is(a,button) { color: var(--ink); }
.app-mode .account-links > .delete-account-button { color: var(--red); }
.app-mode .audit-symbol { border: 1px solid var(--line); background: var(--paper); }
.app-mode .audit-item h3 { font-size: 15px; }
.app-mode .audit-item p { font-size: 13px; }
.app-mode .detail-line { padding: 14px 0; font-size: 14px; }
.app-mode .detail-line strong { font-variant-numeric: tabular-nums; }
.app-mode .dialog-head h2 { color: var(--ink); font-size: 22px; }
.app-mode :is(.payment-context,.shift-form-summary) { background: var(--paper); border-bottom: 1px solid var(--line); border-radius: 0; padding: 0 0 20px; }
.app-mode :is(.shift-form-footer,.payment-form-footer,.draft-discard) { background: var(--paper); }
.app-mode .day-agenda { border-radius: var(--surface-radius); background: var(--paper); }
.app-mode .day-agenda h2 { font-size: 20px; }
.app-mode .status-error { background: var(--paper); color: var(--red); border: 1px solid var(--red); border-radius: var(--control-radius); padding: 18px; }
.app-mode .status-error .btn { border-color: var(--red); color: var(--red); }
.boot .brand-logo { margin-bottom: 26px; width: 182px; }
.boot h1, .boot h2 { font-size: 24px; color: var(--ink); }
.boot p { color: var(--muted); font-size: 14px; margin-top: 12px; }

@media(max-width:900px) {
  .app-mode .field :is(input,select,textarea), .app-mode .filter-input, .app-mode .filter-period input { font-size: 16px; }
  .app-mode .receipt-balance { grid-template-columns: minmax(0,1fr) minmax(130px,.55fr); gap: 12px 18px; }
  .app-mode .receipt-amounts dd { font-size: 23px; }
  .app-mode .receipt-balance-top { flex-wrap: wrap; }
  .app-mode .receipt-balance-top .badge { flex-shrink: 0; }
  .app-mode .receipt-amounts > div:nth-child(2) dd { font-size: 14px; }
  .app-mode .receipt-balance-actions .btn { min-height: 46px; }
  .app-mode .receipt-tabs { gap: 25px; }
  .app-mode .receipts-total { padding: 17px 20px; }
  .app-mode .receipt-balance-top h2, .app-mode .receipt-payment h2 { font-size: 16px; }
}
@media(max-width:600px) {
  .app-mode .receipt-balance { grid-template-columns: minmax(0,1fr); padding: 24px 0; }
  .app-mode .receipt-amounts { grid-column: 1; grid-row: auto; grid-template-columns: 1fr 1fr; text-align: left; gap: 15px; margin-top: 5px; }
  .app-mode .receipt-balance-actions { justify-content: space-between; margin-top: 10px; }
  .app-mode .receipts-total + .receipts-total { border-left: 0; }
  .app-mode .receipt-payment-top > strong { margin-left: 0; width: 100%; font-size: 23px; }
  .app-mode .receipt-payment-details { margin-left: 0; }
  .app-mode .receipts-summary { padding: 4px; }
  .app-mode .receipts-total { padding: 7px 12px; border-radius: 8px; }
  .app-mode .receipts-total > strong { font-size: 20px; }
  .app-mode .receipts-total > strong.large-money { font-size: 19px; }
  .app-mode .receipt-amounts dd.large-money { font-size: 19px; }
  .app-mode .receipt-amounts > div:nth-child(2) dd.large-money { font-size: 14px; }
  .app-mode .receipt-tabs { gap: 12px; }
  .app-mode .receipt-tabs > button { min-height: 44px; font-size: 13px; padding-bottom: 10px; }
  .app-mode .receipt-balance { padding: 18px 0; gap: 9px; }
  .app-mode .receipt-balance-actions { margin-top: 6px; }
  .app-mode .payer { gap: 15px; }
}
@media(prefers-reduced-motion:reduce) {
  .app-mode *, .app-mode *::before, .app-mode *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
