/* Buena Vista's website identity, adapted for the daily working surface. */
:root {
  --bg: #f5f5f2;
  --surface: #ffffff;
  --surface-2: #f2f3f0;
  --surface-3: #e8e9e4;
  --text: #0d0e12;
  --muted: #666963;
  --border: #d9dbd5;
  --primary: #0d0e12;
  --primary-hover: #25272b;
  --primary-soft: #e7f5e1;
  --accent: #00ff00;
  --accent-ink: #0d0e12;
  --sidebar: #0d0e12;
  --sidebar-text: #ffffff;
  --radius: 2px;
  --shadow: 0 18px 60px #0d0e121a;
  --mono: 'DM Mono', monospace;
}
html[data-theme="dark"] {
  --bg: #111215;
  --surface: #191a1e;
  --surface-2: #202226;
  --surface-3: #2a2c31;
  --text: #f7f7f3;
  --muted: #a7aaa3;
  --border: #35373d;
  --primary: #f7f7f3;
  --primary-hover: #ffffff;
  --primary-soft: #20321f;
  --sidebar: #0d0e12;
  --shadow: 0 18px 60px #0005;
}
body { font-family: 'Inter', Arial, sans-serif; -webkit-font-smoothing: antialiased; line-height: 1.45; }
::selection { background: var(--accent); color: var(--accent-ink); }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 3px;
}
.sidebar button:focus-visible { outline-color: var(--accent); }
.app-shell { grid-template-columns: 248px minmax(0, 1fr); }
.brand { height: 88px; flex: 0 0 88px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; padding: 0 23px; border-color: #ffffff1f; }
.brand-logo { width: 176px; height: auto; }
.brand-symbol { display: none; }
.brand .brand-product { margin: 0; color: #a8aca4; font: 10px var(--mono); letter-spacing: .15em; }
.nav { padding: 12px; gap: 2px; }
.nav-item { min-height: 38px; height: 38px; border-radius: 2px; font-size: 14px; color: #b8bbb5; padding: 0 13px; gap: 12px; }
.nav-item svg { width: 18px; stroke-width: 1.5; }
.nav-item:hover { background: #ffffff0c; color: #fff; }
.nav-item.active { background: var(--accent); color: var(--accent-ink); box-shadow: none; font-weight: 600; }
.sidebar-foot { flex: 0 0 auto; margin-top: 0; padding: 12px 20px; min-height: 42px; font: 12px var(--mono); color: #a8aca4; border-color: #ffffff1f; white-space: nowrap; }
.sidebar-foot > svg { width: 14px; height: 14px; flex: 0 0 auto; }
#asuncion-time { font-variant-numeric: tabular-nums; }
.account-controls { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; padding: 12px 20px; border-color: #ffffff1f; }
#account-name { flex: 1; min-width: 0; color: #d4d6d0; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-controls .button, .account-controls #change-password { display: flex; justify-content: flex-start; width: 100%; min-height: 34px; padding: 7px 4px; margin: 2px 0; border: 0; background: transparent; color: #b8bbb5; font-size: 11px; font-weight: 400; gap: 9px; }
.account-controls .button:hover { color: #fff; }
.account-controls .button svg { width: 15px; height: 15px; }
.workspace { grid-template-rows: 76px minmax(0, 1fr); }
.topbar { padding: 0 32px; }
.quick-search { height: 40px; width: min(560px, 55vw); border-radius: 2px; background: transparent; }
.quick-search:focus-within { border-color: var(--primary); }
.quick-search input { font-size: 12px; }
.quick-search kbd { font: 10px var(--mono); border-radius: 1px; }
.icon-button { width: 38px; height: 38px; border-radius: 2px; }
.icon-button:hover { background: var(--surface-2); }
.switch-track span { background: var(--text); }
.theme-switch input:checked + .switch-track { border-color: #00b800; }
.theme-switch input:checked + .switch-track span { background: var(--accent); }
.theme-switch input:focus-visible + .switch-track { outline: 2px solid var(--primary); outline-offset: 4px; }
.view { padding: 32px 36px 40px; }
.page-head { margin-bottom: 26px; gap: 24px; }
.page-head h1 { font-size: clamp(28px, 2.5vw, 38px); font-weight: 500; letter-spacing: -.055em; line-height: 1.1; }
.page-head p { font-size: 13px; margin-top: 10px; line-height: 1.6; }
.head-actions { padding-top: 3px; }
.button { min-height: 40px; border-radius: 2px; padding: 9px 14px; font-size: 12px; font-weight: 500; transition: background .15s, border-color .15s, color .15s; }
.button.primary { background: var(--text); border-color: var(--text); color: var(--surface); }
.button.primary:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.button.small { font-size: 11px; min-height: 32px; }
.field > label, .field-label { font-size: 12px; font-weight: 500; color: var(--text); margin-bottom: 7px; }
.field input, .field select, .field textarea, .control { border-radius: 2px; min-height: 40px; font-size: 13px; padding: 9px 11px; }
.field input:focus, .field select:focus, .field textarea:focus, .control:focus { border-color: var(--primary); box-shadow: 0 0 0 2px #00ff0033; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
.help { line-height: 1.6; }
.metrics { gap: 1px; background: var(--border); border: 1px solid var(--border); margin: 24px 0 30px; }
.metric { border: 0; border-radius: 0; min-height: 128px; padding: 20px; }
.metric:last-child { border-right: 0; }
.metric .metric-label { font: 11px/1.5 var(--mono); text-transform: uppercase; letter-spacing: .045em; }
.metric strong { font-size: clamp(23px, 2vw, 32px); font-weight: 500; letter-spacing: -.05em; font-variant-numeric: tabular-nums; margin-top: 16px; }
.metric .metric-icon { width: 28px; height: 28px; background: transparent; color: var(--text); border-radius: 0; }
.metric .metric-icon svg { stroke-width: 1.5; }
.metric.warning .metric-icon { color: var(--warning); }
.metric.danger .metric-icon { color: var(--danger); }
.metric.info .metric-icon { color: var(--info); }
.band { margin-top: 28px; }
.band-head { margin-bottom: 14px; }
.band-head h2 { font-size: 16px; font-weight: 500; letter-spacing: -.025em; }
.toolbar { padding: 16px; }
.search-control svg { top: 12px; }
.search-control input { padding-left: 34px; }
.data-table th { font: 11px/1.5 var(--mono); letter-spacing: .035em; padding: 13px 16px; }
.data-table td { padding: 14px 16px; font-size: 12px; }
.cell-main { font-weight: 500; }
.cell-sub { font-size: 11px; line-height: 1.5; }
.amount { font-variant-numeric: tabular-nums; font-weight: 600; }
.status { border-radius: 2px; font: 10px/1.4 var(--mono); letter-spacing: .03em; padding: 4px 7px; }
.status.ACEPTADO, .status.EMITIDO, .status.ACTIVO { color: #22600e; background: #e6f5df; }
html[data-theme="dark"] .status.ACEPTADO, html[data-theme="dark"] .status.EMITIDO, html[data-theme="dark"] .status.ACTIVO { color: #adf693; background: #23381e; }
.table-foot { padding: 12px 16px; }
.receipt-summary > div { padding: 16px; }
.receipt-summary span { font: 10px/1.5 var(--mono); letter-spacing: .025em; }
.receipt-summary strong { font-size: 18px; font-weight: 500; letter-spacing: -.03em; margin-top: 7px; font-variant-numeric: tabular-nums; }
.activity-row { padding: 15px 16px; }
.activity-icon { background: var(--surface-2); color: var(--text); border-radius: 2px; }
.activity-row strong { font-weight: 500; font-size: 12px; }
.activity-amount { font-weight: 500; font-variant-numeric: tabular-nums; }
.modal, .cloud-dialog { border-radius: 3px; }
.modal-head { padding: 20px 22px; }
.modal-head h2, .cloud-dialog h2 { font-size: 24px; font-weight: 500; letter-spacing: -.045em; }
.modal-body { padding: 22px; }
.modal-foot { padding: 14px 22px; }
.section-title { font-size: 13px; font-weight: 600; padding-bottom: 10px; }
.section-title span { font-size: 11px; font-weight: 400; }
.section-title { flex-wrap: wrap; gap: 12px; }
#catalog-select { min-width: 0; max-width: 100%; min-height: 34px; padding: 7px 10px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 2px; font-size: 12px; }
.segmented, .selected-client, .items-editor, .picker-results, .budget-total, .budget-links, .detail-highlight, .result-row { border-radius: 2px; }
.segmented input:checked + span { background: var(--text); color: var(--surface); box-shadow: none; }
.segmented input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 3px; }
.items-editor th, .detail-block span { font: 10px/1.5 var(--mono); }
.config-section h2 { padding: 17px 20px; font-size: 14px; font-weight: 500; }
.config-section .config-body { padding: 20px; }
.config-layout { gap: 20px; }
.config-section { margin-bottom: 20px; }
.result-row { padding: 16px; }
.result-row strong { font-weight: 500; }
.cloud-dialog { background: var(--surface); color: var(--text); border-color: var(--border); box-shadow: var(--shadow); }
.cloud-dialog::backdrop { background: #0d0e1280; }
.file-row { color: var(--text); background: var(--surface); border-color: var(--border); }
.file-row:hover { background: var(--surface-2); }
.file-row small { color: var(--muted); }
.toast { border-radius: 2px; border-left-color: #00bd00; padding: 14px 16px; }
.toast strong { font-weight: 600; }
.toast span { line-height: 1.6; }
.empty-state { padding: 60px 24px; }
.workspace { position:relative; }
.view.is-module-loading { isolation:isolate; }
.module-loading { position:absolute; inset:0; z-index:1; display:grid; place-items:center; background:var(--bg); color:var(--text); }
.module-loading-indicator { display:flex; flex-direction:column; align-items:center; gap:18px; padding:28px 32px; border:1px solid var(--border); border-radius:4px; background:var(--surface); animation:module-loading-reveal 160ms ease-out 120ms both; }
.module-loading-indicator strong { font-size:14px; font-weight:500; }
.module-loading-spinner { display:block; width:42px; height:42px; border:3px solid var(--border); border-top-color:var(--accent); border-radius:50%; animation:module-loading-spin 800ms linear infinite; }
@keyframes module-loading-spin { to { transform:rotate(360deg); } }
@keyframes module-loading-reveal { from { opacity:0; } to { opacity:1; } }
@media(prefers-reduced-motion:reduce) { .module-loading-indicator,.module-loading-spinner { animation:none!important; } }

/* Sign-in shares the same typography, hard edges and restrained green accents. */
.login-screen { height: 100dvh; min-height: 0; overflow: auto; grid-template-columns: 1fr 1fr; background: #fff; color: #0d0e12; }
.login-intro { background: #0d0e12; padding: clamp(30px, 5vw, 80px); justify-content: space-between; gap: 60px; color: #fff; }
.login-intro { position: relative; isolation: isolate; overflow: hidden; }
.login-intro > * { position: relative; z-index: 1; }
/* Two decorative layers drift independently, beneath all text and controls. */
.login-intro::before, .login-intro::after { content: ''; position: absolute; pointer-events: none; z-index: 0; }
.login-intro::before {
  inset: -20%;
  background: radial-gradient(ellipse at 75% 30%, #00ff0015, transparent 48%),
    radial-gradient(ellipse at 20% 75%, #70cbbb0a, transparent 46%);
  opacity: .65;
  animation: login-haze 28s ease-in-out infinite alternate;
}
.login-intro::after {
  inset: -8%;
  background:
    radial-gradient(circle at 12% 19%, #b6ffd5 0 1px, transparent 2px),
    radial-gradient(circle at 27% 32%, #00ff00 0 1px, transparent 2px),
    radial-gradient(circle at 46% 12%, #a4eac7 0 .7px, transparent 1.7px),
    radial-gradient(circle at 65% 24%, #00ff00 0 1.3px, transparent 3px),
    radial-gradient(circle at 83% 14%, #b6ffd5 0 .7px, transparent 1.7px),
    radial-gradient(circle at 92% 42%, #00ff00 0 1px, transparent 2px),
    radial-gradient(circle at 76% 54%, #a4eac7 0 1px, transparent 2px),
    radial-gradient(circle at 54% 39%, #b6ffd5 0 .7px, transparent 1.7px),
    radial-gradient(circle at 18% 51%, #00ff00 0 .8px, transparent 2px),
    radial-gradient(circle at 35% 64%, #b6ffd5 0 1px, transparent 2px),
    radial-gradient(circle at 8% 77%, #a4eac7 0 .7px, transparent 1.7px),
    radial-gradient(circle at 63% 72%, #00ff00 0 1.3px, transparent 3px),
    radial-gradient(circle at 87% 84%, #b6ffd5 0 1px, transparent 2px),
    radial-gradient(circle at 44% 91%, #a4eac7 0 .7px, transparent 1.7px);
  opacity: .14;
  animation: login-particles 34s ease-in-out infinite alternate;
}
@keyframes login-haze { from { transform: translate(-3%, 2%) scale(1); } to { transform: translate(5%, -4%) scale(1.08); } }
@keyframes login-particles { from { transform: translate(0, 1%); opacity: .1; } to { transform: translate(3%, -4%); opacity: .17; } }
@media (prefers-reduced-motion: reduce) { .login-intro::before, .login-intro::after { animation: none; } }
.login-logo { width: 208px; height: auto; }
.eyebrow { font: 11px/1.5 var(--mono); letter-spacing: .11em; text-transform: uppercase; }
.login-intro .eyebrow { color: #a8aca4; }
.login-intro h1 { font-size: clamp(38px, 4.6vw, 78px); font-weight: 400; line-height: 1.06; letter-spacing: -.065em; margin: 23px 0 28px; }
.login-intro h1 em { font-family: Georgia, serif; font-weight: 400; letter-spacing: -.06em; text-decoration: underline; text-decoration-color: #00ff00; text-decoration-thickness: .065em; text-underline-offset: .07em; }
.login-intro p { color: #a8aca4; font-size: 15px; line-height: 1.65; margin: 0; }
.login-modules { margin-top: 0; border-top: 1px solid #ffffff26; padding-top: 23px; gap: 12px 24px; }
.login-modules span { padding: 0; border: 0; border-radius: 0; font: 10px/1.5 var(--mono); text-transform: uppercase; color: #b8bbb5; letter-spacing: .06em; }
.login-form-panel { width: 100%; max-width: 570px; padding: 64px clamp(28px, 5vw, 76px); margin: auto; }
.login-form-panel > .eyebrow { color: #696b67; margin-bottom: 26px; }
.login-form-panel h2 { font-size: 34px; line-height: 1.15; letter-spacing: -.05em; font-weight: 500; margin: 0 0 12px; }
.login-form-panel > p { font-size: 13px; color: #696b67; line-height: 1.65; margin-top: 0; margin-bottom: 20px; }
.login-form-panel label { font-size: 12px; font-weight: 500; margin-top: 18px; }
.login-form-panel input { min-height: 48px; border: 1px solid #c8cbc3; border-radius: 2px; color: #0d0e12; font-size: 14px; }
.login-form-panel input:focus-visible { outline: 2px solid #0d0e12; outline-offset: 2px; }
.login-form-panel .button { background: #fff; color: #0d0e12; border-color: #d9dbd5; min-height: 48px; }
.login-form-panel .button.primary { background: #0d0e12; border-color: #0d0e12; color: #fff; }
.login-form-panel .button.primary:hover { background: #00ff00; border-color: #00ff00; color: #0d0e12; }
.login-form-panel .auth-links { margin-top: 18px; gap: 3px; }
.login-form-panel .auth-links button { color: #0d0e12; font-size: 12px; font-weight: 400; }
.login-form-panel .login-feedback { display:flex; align-items:flex-start; gap:12px; margin:4px 0 8px; padding:14px 16px; border:1px solid #d9dbd5; border-radius:3px; background:#f4f5f2; color:#454943; }
.login-form-panel .login-feedback[data-tone="error"] { background:#fff0f1; border-color:#e28b92; color:#a61f2a; }
.login-warning { flex:0 0 22px; margin-top:1px; }
.login-warning svg { display:block; width:22px; height:22px; fill:#a61f2a12; }
.login-form-panel .login-feedback #login-status { flex:1; min-width:0; min-height:0; font-size:13px; line-height:1.6; margin:0; color:inherit; overflow-wrap:anywhere; }
@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 78px minmax(0,1fr); }
  .brand { height: 76px; flex-basis: 76px; padding: 0; align-items: center; }
  .brand-logo, .brand .brand-product { display: none; }
  .brand-symbol { display: block; width: 32px; height: 32px; }
  .nav { padding: 17px 10px; }
  .nav-item { padding: 0; justify-content: center; }
  .nav-item.active { box-shadow: none; }
  .account-controls { padding: 12px; }
  #account-name, .account-controls .button span { display: none; }
  .account-controls { justify-content: center; }
  .account-controls .button, .account-controls #change-password { justify-content: center; min-height: 40px; }
  .account-controls .button svg { width: 18px; height: 18px; }
  .sidebar-foot { justify-content: center; padding: 16px 0; }
  .sidebar-foot > svg, .sidebar-foot .clock-city { display: none; }
  #asuncion-time { font-size: 10px; }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 0; }
  .config-layout { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .view { padding: 24px; }
  .topbar { padding: 0 24px; }
  .page-head { gap: 16px; }
  .login-intro { gap: 40px; padding: 36px; }
  .login-form-panel { padding: 36px; }
}
@media (max-width: 760px) {
  .app-shell { grid-template-columns: 60px minmax(0,1fr); }
  .workspace { grid-template-rows: 64px minmax(0,1fr); }
  .brand { height: 64px; flex-basis: 64px; }
  .brand-symbol { width: 30px; height: 30px; }
  .nav { padding: 12px 6px; gap: 4px; }
  .nav-item { min-height: 42px; height: 42px; }
  .account-controls { padding: 10px 6px; }
  .sidebar-foot { min-height: 40px; padding: 12px 0; }
  .topbar { padding: 0 12px; }
  .top-actions { gap: 8px; }
  .quick-search { flex: 1; width: auto; }
  .view { padding: 22px 16px 30px; scrollbar-gutter: auto; }
  .page-head h1 { font-size: 30px; }
  .page-head p { font-size: 12px; }
  .page-head { margin-bottom: 20px; }
  .head-actions { width: 100%; }
  .head-actions .button { flex: 1 1 auto; }
  .button { padding: 9px 11px; white-space: normal; }
  .metric { min-height: 108px; padding: 18px; border: 0; }
  .metric:last-child { border-bottom: 0; }
  .metric strong { font-size: 28px; margin-top: 10px; }
  .date-toolbar .field { flex: 1 1 110px; }
  .date-toolbar .button { flex: 1 1 auto; }
  .table-foot { flex-wrap: wrap; gap: 12px; }
  .data-table { min-width: 560px; }
  .receipt-table { min-width: 940px; }
  .receipt-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .receipt-summary > div { padding: 12px; }
  .receipt-summary strong { font-size: 16px; }
  .modal-head, .modal-body { padding: 16px; }
  .modal-head h2 { font-size: 22px; }
  .config-section .config-body { padding: 16px; }
  .number-row { flex-wrap: wrap; }
  .cloud-dialog { width: calc(100% - 24px); padding: 18px; }
  .cloud-dialog header { align-items: flex-start; gap: 12px; }
  .login-screen { grid-template-columns: 1fr; }
  .login-intro { padding: 28px; gap: 32px; }
  .login-logo { width: 176px; }
  .login-intro h1 { font-size: 42px; margin: 15px 0 8px; }
  .login-message > .eyebrow, .login-intro p, .login-modules { display: none; }
  .login-form-panel { padding: 36px 28px; max-width: 480px; }
  .login-form-panel h2 { font-size: 30px; }
}
@media (max-height: 700px) and (min-width: 761px) {
  .brand { height: 80px; flex-basis: 80px; }
  .brand .brand-product { display: none; }
  .nav { padding-top: 10px; padding-bottom: 10px; gap: 3px; }
  .nav-item { min-height: 36px; height: 36px; }
  .account-controls { padding-top: 10px; padding-bottom: 10px; }
  .sidebar-foot { min-height: 40px; padding-top: 12px; padding-bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
