:root {
  --ink: #17201d;
  --ink-soft: #26322e;
  --forest: #13211f;
  --forest-raised: #1c2d29;
  --sage: #627b6f;
  --sage-pale: #dfe6df;
  --stone: #77766e;
  --paper: #f3f0e9;
  --paper-deep: #e9e5dc;
  --ivory: #fbfaf6;
  --white: #fff;
  --line: #d8d3c8;
  --line-dark: rgba(255,255,255,.13);
  --brass: #b89158;
  --brass-light: #d4b77f;
  --red: #9f4d45;
  --green: #3d705d;
  --shadow: 0 22px 60px rgba(31,36,31,.08);
  --serif: "Newsreader", Iowan Old Style, Baskerville, "Times New Roman", serif;
  --sans: "Manrope", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--paper); font-size: 15px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

.app-shell { display: grid; grid-template-columns: 276px minmax(0,1fr); min-height: 100vh; }
.app-shell[hidden], .auth-screen[hidden] { display: none; }
main { min-width: 0; }

/* Navegación: la misma arquitectura visual para HUB y aplicaciones. */
.sidebar { position: sticky; top: 0; z-index: 20; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; padding: 30px 20px 22px; color: #e9ece6; background: var(--forest); border-right: 1px solid rgba(255,255,255,.05); }
.sidebar::after { content: ""; position: fixed; left: 0; bottom: 0; width: 276px; height: 36vh; pointer-events: none; background: radial-gradient(circle at 5% 100%, rgba(184,145,88,.13), transparent 66%); }
.sidebar-brand-row { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; padding: 0 9px; }
.brand > span:last-child { display: grid; line-height: 1; }
.brand b { font-family: var(--serif); font-size: 1.55rem; font-weight: 500; letter-spacing: -.025em; }
.brand small { margin-top: 4px; color: #98a59f; font-size: .53rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.brand-mark, .nodus-mark { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(212,183,127,.55); border-radius: 50%; color: var(--brass-light); background: transparent; font-family: var(--serif); font-size: 1.12rem; font-weight: 500; }
.sidebar-close { display: none; border: 0; background: none; color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.workspace { position: relative; z-index: 1; margin: 42px 11px 13px; color: #84928b; font-size: .59rem; font-weight: 700; letter-spacing: .17em; }
nav { position: relative; z-index: 1; display: grid; gap: 2px; }
.nav-section { margin: 25px 13px 7px; color: #6f7f78; font-size: .58rem; font-weight: 700; letter-spacing: .17em; }
.nav-link { position: relative; display: flex; align-items: center; gap: 12px; min-height: 43px; padding: 10px 13px; border-radius: 2px; color: #b7c1bc; text-decoration: none; font-size: .82rem; font-weight: 500; transition: color .18s ease, background .18s ease, transform .18s ease; }
.nav-link::before { content: ""; position: absolute; left: 0; width: 2px; height: 0; background: var(--brass); transition: height .18s ease; }
.nav-link > span { width: 19px; color: #7f9188; font-size: 1rem; text-align: center; }
.nav-link:hover { color: #fff; background: rgba(255,255,255,.045); transform: translateX(2px); }
.nav-link.active { color: #fff; background: rgba(255,255,255,.07); }
.nav-link.active::before { height: 21px; }
.nav-link.active > span { color: var(--brass-light); }
.sidebar-foot { position: relative; z-index: 1; margin-top: auto; padding: 18px 11px 2px; border-top: 1px solid var(--line-dark); color: #8f9d96; font-size: .69rem; line-height: 1.8; }
.sidebar-foot [data-state=saved] { color: #a8c9b9; }
.sidebar-foot [data-state=error] { color: #e1a39d; }
.text-button { padding: 0; border: 0; background: none; color: #d9dedb; cursor: pointer; text-decoration: none; }
.text-button:hover { color: var(--brass-light); }
.sidebar-backdrop { display: none; }

.topbar { position: sticky; top: 0; z-index: 12; min-height: 78px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(24px,4.2vw,64px); border-bottom: 1px solid rgba(202,197,186,.78); background: rgba(243,240,233,.88); backdrop-filter: blur(18px); }
.topbar-context { display: flex; align-items: center; gap: 15px; }
.topbar-context > div { display: grid; gap: 3px; }
.topbar-context small { color: var(--stone); font-size: .56rem; font-weight: 700; letter-spacing: .16em; }
.topbar-context strong { color: var(--ink); font-size: .82rem; font-weight: 600; }
.menu-button { display: none; width: 38px; height: 38px; border: 1px solid var(--line); background: rgba(255,255,255,.55); cursor: pointer; }
.menu-button span { display: block; width: 15px; height: 1px; margin: 4px auto; background: var(--ink); }
.user-menu { display: flex; align-items: center; gap: 10px; }
.user-menu > span:nth-child(2) { display: grid; gap: 2px; }
.user-menu b { color: var(--ink); font-size: .75rem; font-weight: 700; }
.user-menu small { color: var(--stone); font-size: .64rem; }
.user-avatar { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid #c9c4b8; border-radius: 50%; background: var(--ivory); color: var(--forest); font-family: var(--serif); font-size: 1.02rem; }
.logout-button { margin-left: 7px; padding: 7px 0 7px 10px; border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--stone); font-size: .7rem; cursor: pointer; }
.logout-button:hover { color: var(--ink); }

/* Páginas y tipografía */
.view { display: none; max-width: 1680px; padding: clamp(38px,5vw,76px) clamp(24px,5.3vw,82px) 76px; }
.view.active { display: block; animation: view-in .36s ease both; }
@keyframes view-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 34px; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 9px; color: var(--sage); font-size: .62rem; font-weight: 700; letter-spacing: .18em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 7px; font-family: var(--serif); font-size: clamp(2.25rem,3.4vw,3.6rem); font-weight: 400; line-height: .98; letter-spacing: -.035em; }
h2 { margin-bottom: 6px; font-size: 1rem; font-weight: 700; letter-spacing: -.02em; }
.muted, .panel p, .empty-state p { margin-bottom: 0; color: var(--stone); line-height: 1.6; }

.button-group { display: flex; align-items: center; gap: 10px; }
.primary-button, .secondary-button { min-height: 44px; padding: 11px 17px; border: 1px solid transparent; border-radius: 2px; font: inherit; font-size: .76rem; font-weight: 700; cursor: pointer; white-space: nowrap; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.primary-button { border-color: var(--forest); background: var(--forest); color: #fff; box-shadow: 0 8px 20px rgba(19,33,31,.12); }
.primary-button:hover { background: #243630; transform: translateY(-1px); box-shadow: 0 11px 24px rgba(19,33,31,.18); }
.primary-button:disabled { opacity: .55; cursor: wait; transform: none; }
.secondary-button { border-color: #d1ccc1; background: rgba(255,255,255,.55); color: var(--ink); }
.secondary-button:hover { border-color: #a9a397; background: var(--ivory); }

/* HUB editorial */
.hub-view { max-width: 1680px; }
.hub-hero { position: relative; min-height: 390px; display: grid; grid-template-columns: minmax(0,1fr) 220px; align-items: end; gap: 50px; overflow: hidden; margin-bottom: 58px; padding: clamp(40px,5vw,74px); color: #f5f3ed; background: var(--forest); box-shadow: var(--shadow); }
.hub-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .62; background: linear-gradient(115deg, transparent 55%, rgba(184,145,88,.12)), repeating-linear-gradient(90deg, transparent 0, transparent calc(25% - 1px), rgba(255,255,255,.05) 25%); }
.hub-hero::after { content: "N"; position: absolute; right: 8%; top: -32%; color: transparent; -webkit-text-stroke: 1px rgba(212,183,127,.18); font-family: var(--serif); font-size: 29rem; line-height: 1; pointer-events: none; }
.hub-hero-copy, .hub-date { position: relative; z-index: 1; }
.hub-hero .eyebrow { color: var(--brass-light); }
.hub-hero h1 { max-width: 780px; margin: 0 0 22px; font-size: clamp(3.5rem,6.5vw,7.2rem); line-height: .83; letter-spacing: -.055em; }
.hub-hero h1 em { color: var(--brass-light); font-weight: 400; }
.hub-hero-copy > p:last-child { max-width: 550px; margin: 0; color: #b8c2bd; font-size: 1rem; line-height: 1.7; }
.hub-date { align-self: end; padding: 22px 0 4px 28px; border-left: 1px solid rgba(212,183,127,.4); }
.hub-date span, .hub-date small { display: block; color: #8f9e97; font-size: .58rem; font-weight: 700; letter-spacing: .15em; }
.hub-date strong { display: block; margin: 10px 0 18px; color: #f1eee6; font-family: var(--serif); font-size: 1.45rem; font-weight: 400; line-height: 1.15; text-transform: capitalize; }
.hub-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.hub-section-head h2 { font-family: var(--serif); font-size: 2rem; font-weight: 400; }
.hub-section-head > span { padding-bottom: 6px; color: var(--stone); font-size: .68rem; }
.apps-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 18px; }
.app-card { position: relative; min-height: 310px; display: flex; gap: 28px; overflow: hidden; padding: 32px; border: 1px solid var(--line); border-radius: 2px; background: var(--ivory); color: var(--ink); text-decoration: none; transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease; }
.app-card.featured::after { content: ""; position: absolute; right: -80px; bottom: -130px; width: 310px; height: 310px; border: 1px solid rgba(184,145,88,.25); border-radius: 50%; }
.app-card.featured:hover { z-index: 1; border-color: #b6ad9d; transform: translateY(-4px); box-shadow: var(--shadow); }
.app-number { flex: 0 0 48px; color: var(--brass); font-family: var(--serif); font-size: 1.25rem; }
.app-copy { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; width: 100%; }
.app-status, .auth-chip { display: inline-block; padding: 5px 8px; border: 1px solid #b8c7bd; border-radius: 99px; background: transparent; color: var(--green); font-size: .54rem; font-weight: 700; letter-spacing: .14em; }
.app-copy h2 { max-width: 430px; margin: 28px 0 12px; font-family: var(--serif); font-size: clamp(2rem,3vw,3.15rem); font-weight: 400; line-height: .95; }
.app-copy > p { max-width: 510px; color: var(--stone); font-size: .86rem; line-height: 1.65; }
.app-meta { display: flex; align-items: center; justify-content: space-between; gap: 15px; width: 100%; margin-top: auto; padding-top: 28px; border-top: 1px solid var(--line); color: var(--stone); font-size: .68rem; }
.app-meta b { color: var(--forest); }
.app-meta b span { display: inline-block; margin-left: 5px; transition: transform .18s ease; }
.app-card:hover .app-meta b span { transform: translate(3px,-3px); }
.app-card.coming { background: transparent; opacity: .76; }
.app-card.coming .app-status { border-color: var(--line); color: var(--stone); }
.hub-insight { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 21px 24px; border: 1px solid var(--line); border-radius: 2px; background: rgba(255,255,255,.4); }
.hub-insight > div { display: flex; align-items: center; gap: 15px; }
.hub-insight p { margin: 4px 0 0; color: var(--stone); font-size: .76rem; }
.hub-insight > span { color: var(--green); font-size: .67rem; font-weight: 700; }
.insight-icon { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid #bdcbc3; border-radius: 50%; color: var(--green); }

/* Paneles de aplicación */
.home-heading { margin-bottom: 26px; }
.stats-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-bottom: 20px; }
.home-stats { grid-template-columns: repeat(4,minmax(0,1fr)); }
.stat-card, .panel, .owner-card, .student-card, .property-card, .table-wrap, .report-panel { border: 1px solid var(--line); border-radius: 2px; background: var(--ivory); }
.stat-card { min-height: 128px; display: flex; align-items: center; gap: 17px; padding: 22px; }
.stat-card::after { content: ""; align-self: stretch; width: 1px; margin-left: auto; background: linear-gradient(transparent,var(--line),transparent); }
.stat-icon { width: 39px; height: 39px; display: grid; flex: 0 0 39px; place-items: center; border: 1px solid currentColor; border-radius: 50%; background: transparent !important; font-size: 1rem; }
.blue { color: #4e6d78; }
.yellow { color: #a27d39; }
.red { color: var(--red); }
.stat-card strong { font-family: var(--serif); font-size: 1.9rem; font-weight: 500; letter-spacing: -.04em; }
.stat-card p { margin: 4px 0 0; color: var(--stone); font-size: .72rem; line-height: 1.35; }
.home-grid, .two-columns { display: grid; grid-template-columns: 1.35fr .65fr; gap: 18px; }
.panel, .report-panel { padding: 27px; }
.panel-header { display: flex; justify-content: space-between; gap: 15px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.panel-header a { color: var(--forest); font-size: .74rem; font-weight: 700; }
.list-empty { padding: 27px 0 4px; color: var(--stone); font-size: .82rem; }
.quick-panel h2 { margin-bottom: 18px; }
.quick-actions { display: grid; gap: 7px; }
.quick-actions button, .quick-actions a { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 8px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--ink); text-align: left; text-decoration: none; cursor: pointer; }
.quick-actions button:hover, .quick-actions a:hover { background: #f3f0e8; }
.quick-actions span { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid #c4cfc8; border-radius: 50%; color: var(--forest); }
.quick-actions b, .quick-actions small { display: block; }
.quick-actions b { font-size: .78rem; }
.quick-actions small { margin-top: 3px; color: var(--stone); font-size: .67rem; }
.start-panel { position: relative; overflow: hidden; border-color: var(--forest); background: var(--forest); color: #fff; }
.start-panel p { max-width: 330px; margin: 12px 0 21px; color: #ced8d2; font-size: .83rem; line-height: 1.6; }
.spark { position: absolute; right: 27px; top: 19px; color: var(--brass); font-size: 2rem; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); gap: 14px; }
.owner-card, .student-card { min-height: 220px; padding: 22px; transition: transform .18s ease, box-shadow .18s ease; }
.owner-card:hover, .student-card:hover, .property-card:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(31,36,31,.06); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.avatar { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid #c7cfc9; border-radius: 50%; background: var(--paper); color: var(--forest); font-family: var(--serif); font-size: 1.1rem; }
.owner-card h2, .student-card h2 { margin: 22px 0 7px; font-family: var(--serif); font-size: 1.45rem; font-weight: 500; }
.detail { margin: 6px 0; color: var(--stone); font-size: .75rem; line-height: 1.5; }
.card-actions { display: flex; gap: 15px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.action-link { padding: 0; border: 0; border-bottom: 1px solid #a69e90; background: none; color: var(--forest); font: inherit; font-size: .72rem; cursor: pointer; }
.action-link:hover { border-color: var(--forest); }
.property-list { display: grid; gap: 14px; }
.property-card { overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
.property-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 23px 25px; }
.property-head h2 { margin-bottom: 7px; font-family: var(--serif); font-size: 1.4rem; font-weight: 500; }
.property-meta { color: var(--stone); font-size: .75rem; }
.room-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(170px,1fr)); border-top: 1px solid var(--line); background: #f8f6f0; }
.room { min-height: 112px; padding: 18px 22px; border-right: 1px solid var(--line); }
.room:last-child { border-right: 0; }
.room b { display: block; font-size: .8rem; }
.room span { display: block; margin-top: 5px; color: var(--stone); font-size: .7rem; }
.room .status { display: inline-block; margin-top: 10px; padding: 3px 8px; border: 1px solid #b8c9bf; border-radius: 99px; background: transparent; color: var(--green); font-size: .61rem; font-weight: 700; }
.room .status.free { border-color: #ccc8be; color: var(--stone); }

.filters { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.filter { padding: 7px 13px; border: 1px solid var(--line); border-radius: 99px; background: transparent; color: var(--stone); font: inherit; font-size: .72rem; cursor: pointer; }
.filter.active { border-color: var(--forest); background: var(--forest); color: #fff; }
.table-wrap { overflow: auto; }
table { width: 100%; min-width: 710px; border-collapse: collapse; }
th { padding: 16px 20px; border-bottom: 1px solid var(--line); color: var(--stone); font-size: .59rem; font-weight: 700; letter-spacing: .12em; text-align: left; }
td { padding: 17px 20px; border-bottom: 1px solid var(--line); font-size: .8rem; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f7f4ed; }
.receipt-name { font-weight: 700; }
.receipt-sub { margin-top: 4px; color: var(--stone); font-size: .68rem; }
.badge { display: inline-block; padding: 4px 8px; border: 1px solid currentColor; border-radius: 99px; background: transparent !important; font-size: .62rem; font-weight: 700; }
.badge.Pagado { color: var(--green); }
.badge.Pendiente { color: #946f2f; }
.badge.Borrador { color: var(--stone); }
.empty-state { grid-column: 1/-1; padding: 60px 20px; border: 1px dashed #c6c0b4; border-radius: 2px; background: rgba(255,255,255,.35); text-align: center; }
.empty-state span { display: block; margin-bottom: 12px; color: var(--brass); font-family: var(--serif); font-size: 2rem; }
.empty-state h2 { margin-bottom: 7px; font-family: var(--serif); font-size: 1.5rem; font-weight: 500; }

/* Formularios, recurrencias e informes dentro de la aplicación. */
dialog { width: min(680px,calc(100vw - 32px)); padding: 0; border: 0; border-radius: 2px; background: var(--ivory); box-shadow: 0 30px 90px rgba(13,23,20,.28); }
dialog::backdrop { background: rgba(13,23,20,.66); backdrop-filter: blur(4px); }
#data-form { padding: 31px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 27px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-family: var(--serif); font-size: 1.85rem; font-weight: 500; }
.icon-button, .close-button { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--forest); font-size: 1rem; cursor: pointer; }
.form-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field.full { grid-column: 1/-1; }
.field label { color: #455049; font-size: .71rem; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid #c9c4b9; border-radius: 2px; background: #fffefa; color: var(--ink); outline: none; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--sage); box-shadow: 0 0 0 3px rgba(98,123,111,.11); }
.field textarea { min-height: 82px; resize: vertical; }
.field small { color: var(--stone); font-size: .66rem; line-height: 1.5; }
.concept-row { display: grid; grid-template-columns: 1.5fr .7fr .48fr; gap: 8px; margin-bottom: 7px; }
.concept-row .remove-concept { border: 1px solid #d9b9b5; border-radius: 2px; background: transparent; color: var(--red); cursor: pointer; }
.add-concept { padding: 3px 0; border: 0; background: none; color: var(--forest); font-size: .72rem; font-weight: 700; text-decoration: underline; cursor: pointer; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 29px; padding-top: 21px; border-top: 1px solid var(--line); }
.receipt-total { grid-column: 1/-1; display: flex; justify-content: space-between; padding: 13px 15px; border-left: 2px solid var(--brass); background: var(--paper); font-weight: 700; }
.upcoming-item { display: flex; align-items: center; justify-content: space-between; padding: 15px 0; border-bottom: 1px solid var(--line); font-size: .78rem; }
.upcoming-item:last-child { border-bottom: 0; }
.upcoming-item small { display: block; margin-top: 4px; color: var(--stone); }
.recurrences-list { display: grid; gap: 8px; margin: 0 0 18px; }
.recurrence-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 17px; border: 1px solid var(--line); border-left: 2px solid var(--brass); border-radius: 2px; background: rgba(255,255,255,.45); font-size: .77rem; }
.recurrence-item b { display: block; margin-bottom: 3px; color: var(--forest); }
.recurrence-item span { color: var(--stone); }
.report-picker { min-width: 175px; }
.report-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.report-summary { grid-column: 1/-1; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.report-summary .stat-card { min-height: 100px; padding: 18px; }
.report-panel h2 { margin-bottom: 5px; font-family: var(--serif); font-size: 1.35rem; font-weight: 500; }
.report-line { display: flex; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: .78rem; }
.report-line:last-child { border-bottom: 0; }
.report-line small { display: block; margin-top: 4px; color: var(--stone); }
.report-empty { margin: 18px 0 0; color: var(--stone); font-size: .8rem; }
#informes .page-heading, #liquidaciones .page-heading { display: grid; grid-template-columns: minmax(260px,.8fr) minmax(0,1.8fr); align-items: end; }
#informes .page-heading > .button-group, #liquidaciones .page-heading > .button-group { display: grid; grid-template-columns: minmax(160px,220px) minmax(240px,1fr) auto; align-items: end; gap: 10px; min-width: 0; width: 100%; }
#informes .report-picker, #liquidaciones .report-picker { min-width: 0; }
#informes .report-picker input, #informes .report-picker select, #liquidaciones .report-picker input, #liquidaciones .report-picker select { height: 46px; min-width: 0; }
#informes .primary-button, #liquidaciones .primary-button { height: 46px; }

/* Acceso */
.auth-screen { min-height: 100vh; display: grid; grid-template-columns: 1.15fr .85fr; background: var(--ivory); }
.auth-visual { position: relative; min-height: 100vh; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 48px 6vw; background: var(--forest); color: #fff; }
.auth-visual::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(90deg,transparent 0,transparent calc(25% - 1px),rgba(255,255,255,.045) 25%); }
.auth-visual::after { content: "N"; position: absolute; right: -6%; bottom: -23%; color: transparent; -webkit-text-stroke: 1px rgba(212,183,127,.17); font-family: var(--serif); font-size: 35rem; line-height: 1; }
.auth-brand, .auth-promise { position: relative; z-index: 1; }
.auth-brand { display: flex; align-items: center; gap: 12px; font-family: var(--serif); font-size: 1.3rem; }
.auth-promise { max-width: 740px; padding-bottom: 7vh; }
.auth-promise .eyebrow { color: var(--brass-light); }
.auth-promise h1 { max-width: 770px; margin-bottom: 25px; font-size: clamp(3.5rem,6.3vw,7.2rem); line-height: .86; letter-spacing: -.055em; }
.auth-promise > p:last-child { max-width: 540px; color: #b8c4be; font-size: .98rem; line-height: 1.75; }
.auth-panel { display: grid; place-items: center; padding: 45px; background: var(--paper); }
.auth-card { width: min(400px,100%); padding: 41px; border: 1px solid var(--line); border-radius: 2px; background: var(--ivory); box-shadow: var(--shadow); }
.auth-card h2 { margin: 25px 0 8px; font-family: var(--serif); font-size: 2.5rem; font-weight: 400; }
.auth-card > p { margin-bottom: 29px; color: var(--stone); }
.auth-card label { display: grid; gap: 8px; margin: 17px 0; color: #445049; font-size: .71rem; font-weight: 700; }
.auth-card input { padding: 13px 2px; border: 0; border-bottom: 1px solid #c7c1b5; border-radius: 0; background: transparent; outline: none; }
.auth-card input:focus { border-color: var(--forest); }
.auth-card button { width: 100%; margin-top: 12px; padding: 13px; }
.auth-card small { display: block; margin-top: 22px; color: #888981; font-size: .66rem; text-align: center; }
.auth-message { min-height: 20px !important; margin: 13px 0 0 !important; color: var(--red) !important; font-size: .75rem; text-align: center; }

@media (max-width: 1180px) {
  .home-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .home-grid, .two-columns { grid-template-columns: 1fr; }
  .apps-grid { grid-template-columns: 1fr; }
  .app-card.coming { min-height: 220px; }
  #informes .page-heading, #liquidaciones .page-heading { grid-template-columns: 1fr; }
  #informes .page-heading > .button-group, #liquidaciones .page-heading > .button-group { max-width: 760px; }
}

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(86vw,330px); height: 100dvh; transform: translateX(-103%); transition: transform .26s cubic-bezier(.2,.8,.2,1); box-shadow: 25px 0 80px rgba(10,18,16,.28); }
  .sidebar::after { width: min(86vw,330px); }
  .app-shell.nav-open .sidebar { transform: translateX(0); }
  .sidebar-close { display: block; }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 19; display: block; border: 0; background: rgba(13,23,20,.54); opacity: 0; pointer-events: none; transition: opacity .22s ease; }
  .app-shell.nav-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }
  .topbar { min-height: 70px; padding: 0 20px; }
  .menu-button { display: block; }
  .view { padding: 35px 20px 58px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 20px; }
  .stats-grid, .report-grid, .report-summary { grid-template-columns: 1fr; }
  .report-summary { grid-column: auto; }
  .form-fields { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .auth-screen { grid-template-columns: 1fr; }
  .auth-visual { min-height: 46vh; padding: 31px 25px; }
  .auth-promise { padding: 70px 0 12px; }
  .auth-promise h1 { font-size: clamp(3.2rem,13vw,5.2rem); }
  .auth-panel { padding: 26px 18px 44px; }
  .hub-hero { min-height: 480px; grid-template-columns: 1fr; align-items: end; gap: 35px; padding: 38px 28px; }
  .hub-hero h1 { font-size: clamp(3.5rem,14vw,6rem); }
  .hub-date { padding: 20px 0 0; border-top: 1px solid rgba(212,183,127,.35); border-left: 0; }
  .user-menu > span:nth-child(2) { display: none; }
  #informes .page-heading > .button-group, #liquidaciones .page-heading > .button-group { grid-template-columns: 1fr; width: 100%; }
  #informes .primary-button, #liquidaciones .primary-button { width: 100%; }
}

@media (max-width: 620px) {
  h1 { font-size: 2.45rem; }
  .topbar-context small { display: none; }
  .logout-button { margin-left: 1px; }
  .page-heading > .primary-button, .page-heading > .secondary-button { width: 100%; }
  .button-group { width: 100%; flex-wrap: wrap; }
  .button-group > button { flex: 1; }
  .home-stats { grid-template-columns: 1fr; }
  .stat-card { min-height: 104px; }
  .hub-view { padding-left: 14px; padding-right: 14px; }
  .hub-hero { margin-bottom: 42px; }
  .hub-section-head { align-items: flex-start; flex-direction: column; gap: 5px; padding: 0 6px; }
  .app-card { min-height: 330px; gap: 18px; padding: 25px 22px; }
  .app-number { flex-basis: 34px; }
  .app-meta { align-items: flex-start; flex-direction: column; }
  .hub-insight { align-items: flex-start; }
  .hub-insight > span { display: none; }
  .card-grid { grid-template-columns: 1fr; }
  .property-head { padding: 20px; }
  .room-grid { grid-template-columns: 1fr; }
  .room { border-right: 0; border-bottom: 1px solid var(--line); }
  .room:last-child { border-bottom: 0; }
  .concept-row { grid-template-columns: 1fr .65fr 38px; }
  #data-form { padding: 24px 20px; }
  .form-actions > button { flex: 1; }
  .recurrence-item, .report-line, .upcoming-item { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media print {
  body { background: #fff; }
  .app-shell { display: block; }
  .sidebar, .topbar, .sidebar-backdrop, .no-print { display: none !important; }
  .view { display: none !important; }
  .receipt-print { display: block !important; }
}
