/* Mi Arquisa · estilos (línea del prototipo: blanco y negro, Anton + Montserrat) */
@font-face{font-family:'Montserrat';font-weight:300;font-display:swap;src:url(/fonts/montserrat-300.woff2) format('woff2')}
@font-face{font-family:'Montserrat';font-weight:400;font-display:swap;src:url(/fonts/montserrat-400.woff2) format('woff2')}
@font-face{font-family:'Montserrat';font-weight:500;font-display:swap;src:url(/fonts/montserrat-500.woff2) format('woff2')}
@font-face{font-family:'Montserrat';font-weight:600;font-display:swap;src:url(/fonts/montserrat-600.woff2) format('woff2')}
@font-face{font-family:'Anton';font-weight:400;font-display:swap;src:url(/fonts/anton-400.woff2) format('woff2')}
:root {
  --ink: #141414; --ink-l: #f1f0ee;
  --txt: #2B2A28; --ink2: #5A5852; --mute: #8F8B83;
  --bg: #FAFAFA; --card: #fff; --line: #E7E4DE; --mist: #F5F4F1;
  --ok: #3E6B4A; --ok-l: #E6EFE8; --warn: #9A6A12; --warn-l: #F6EEDC; --bad: #B3261E; --bad-l: #FBE9E7;
  --r: 14px; --sh: none;
  font-family: 'Montserrat', system-ui, sans-serif; color: var(--txt); background: var(--bg);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--ink); }
h1, h2, h3 { margin: 0; color: var(--ink); }
h1 { font-family: Anton, sans-serif; font-weight: 400; font-size: 34px; line-height: 1.05; text-transform: uppercase; }
h2 { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
h3 { font-size: 15px; font-weight: 500; }
.muted { color: var(--ink2); } .small { font-size: 12px; } .hide { display: none !important; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grid { display: grid; gap: 16px; }
.grid > * { min-width: 0; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.stack > * + * { margin-top: 16px; }

/* botones y campos */
.btn { text-decoration: none; border: 1px solid var(--ink); background: #fff; color: var(--ink); border-radius: 999px; padding: 10px 16px; cursor: pointer; font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.btn:hover { background: var(--mist); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: #333; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink2); }
.btn.ghost:hover { background: var(--mist); }
.btn.danger { color: var(--bad); }
.btn.ghost.danger:hover { background: var(--bad-l); }
.btn.sm { padding: 7px 12px; font-size: 9.5px; }
.btn.block { width: 100%; justify-content: center; padding: 14px; }
.btn:disabled { opacity: .5; cursor: default; }
label.f { display: block; }
label.f > span { display: block; font-size: 12px; font-weight: 500; color: var(--ink2); margin-bottom: 4px; }
.in { width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 12px; outline: none; }
.in:focus { border-color: var(--ink); }
textarea.in { min-height: 84px; resize: vertical; }
.check { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.check input { accent-color: var(--ink); width: 16px; height: 16px; }

/* tarjetas */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--sh); }
.card.flat { box-shadow: none; }
.kpi .v { font-family: Anton, sans-serif; font-size: 34px; line-height: 1.1; color: var(--ink); margin-top: 6px; }
.kpi .l { font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.kpi.alert .v { color: var(--bad); }
.pill { display: inline-block; padding: 4px 9px; border-radius: 999px; font-size: 9.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; background: var(--mist); color: var(--mute); white-space: nowrap; }
.pill.ok { background: var(--ok-l); color: var(--ok); }
.pill.warn { background: var(--warn-l); color: var(--warn); }
.pill.bad { background: var(--bad-l); color: var(--bad); }
.pill.dark { background: var(--ink); color: #fff; }
.empty { text-align: center; color: var(--mute); padding: 28px 12px; }

/* tablas */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: var(--mist); }
.scroll-x { overflow-x: auto; }

/* lista */
.list > .it { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list > .it:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.av { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-family: Anton, sans-serif; font-size: 15px; flex: none; }

/* pestañas */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 12px 14px; cursor: pointer; color: var(--mute); font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-color: var(--ink); }

/* etapas */
.stages { display: flex; gap: 4px; }
.stages i { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.stages i.on { background: var(--ink); }
.stage-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.stage-pick button { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 10px; text-align: left; cursor: pointer; }
.stage-pick button.on { border-color: var(--ink); background: var(--ink); color: #fff; font-weight: 600; }
.stage-pick button.on small { color: #bbb; }
.stage-pick button:disabled { cursor: default; }
.stage-pick small { display: block; font-size: 11px; color: var(--mute); font-weight: 400; }

/* armazón del Estudio */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.side { background: #fff; border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.brand { padding: 4px 10px 24px; }
.brand img { height: 26px; width: auto; display: block; }
.brand span { display: block; margin-top: 10px; font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.side a.nav { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; color: var(--ink2); text-decoration: none; font-size: 13px; font-weight: 500; position: relative; }
.side a.nav:hover { background: var(--mist); color: var(--ink); }
.side a.nav.on { background: var(--mist); color: var(--ink); font-weight: 600; }
.side a.nav.on:before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--ink); }
.side a.nav .badge { margin-left: auto; background: var(--ink); color: #fff; font-size: 11px; border-radius: 99px; padding: 0 7px; }
.side .me { margin-top: auto; border-top: 1px solid var(--line); padding: 14px 10px 0; }
.ico { width: 18px; height: 18px; flex: none; }
main.page { padding: 30px 40px 80px; max-width: 1240px; width: 100%; }
.crumbs { font-size: 12px; color: var(--mute); margin-bottom: 14px; }
.crumbs a { color: var(--mute); text-decoration: none; } .crumbs a:hover { color: var(--ink); }
/* proyectos con imagen (línea del prototipo) */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.pcard { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: block; color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.pcard:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,.08); }
.pcard .im { aspect-ratio: 16/10; background: var(--mist) center/cover no-repeat; position: relative; }
.pcard .im .pill { position: absolute; top: 10px; left: 10px; background: rgba(255,255,255,.94); color: var(--ink); }
.pcard .bd { padding: 14px 16px 16px; }
.pcard .bd b { display: block; font-size: 15px; font-weight: 600; color: var(--ink); }
.pcard .bd .stages { margin-top: 12px; }
.empty-im { background-image: url(/img/favicon-32.png) !important; background-size: 28px !important; background-position: center !important; background-repeat: no-repeat !important; background-color: var(--mist) !important; }
.banner { height: 220px; border-radius: 18px; background: #222 center/cover no-repeat; position: relative; overflow: hidden; margin-bottom: 22px; }
.banner:after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.62), rgba(0,0,0,.05)); }
.banner.empty-im:after { background: none; }
.banner > div { position: absolute; left: 28px; bottom: 24px; right: 28px; z-index: 1; color: #fff; }
.banner.empty-im > div { color: var(--ink); }
.banner span { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; opacity: .9; }
.banner h1 { color: inherit; font-size: 44px; margin-top: 6px; }
.banner em { position: absolute; top: 16px; right: 16px; z-index: 1; font-style: normal; font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; background: rgba(255,255,255,.92); color: var(--ink); padding: 5px 10px; border-radius: 999px; }
.gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 12px; }
.gal figure { margin: 0; }
.gal img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; display: block; background: var(--mist); }
.gal figcaption { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 8px; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.head .crumb { font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); margin-bottom: 8px; }
.head .crumb a { color: var(--mute); text-decoration: none; } .head .crumb a:hover { color: var(--ink); }

.pcard { cursor: pointer; transition: border-color .15s; }
.pcard:hover { border-color: var(--ink); }
.pcard .code { font-family: ui-monospace, monospace; font-size: 12px; color: var(--ink2); }

/* entrada */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; background: #fff; }
.auth .art { position: relative; overflow: hidden; background: #222; }
.auth .art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.auth .art:after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,0) 35%); }
.lang-pill { position: absolute; top: 20px; right: 20px; z-index: 1; display: flex; background: rgba(255,255,255,.9); border-radius: 999px; padding: 3px; }
.lang-pill button { border: 0; background: none; font-size: 11px; font-weight: 600; padding: 5px 12px; border-radius: 999px; color: var(--ink2); cursor: pointer; }
.lang-pill button.on { background: var(--ink); color: #fff; }
.auth .form { display: grid; place-items: center; padding: 40px 32px; }
.auth .box { width: 100%; max-width: 380px; }
.auth .box .logo { height: 26px; width: auto; display: block; margin-bottom: 30px; }
.auth .box h1 { font-size: 40px; margin-bottom: 10px; }
.auth .box .lead { color: var(--mute); font-size: 13px; margin: 0 0 28px; }
.auth .box h2 { margin-bottom: 6px; }
.codein { letter-spacing: .5em; text-align: center; font-size: 22px; font-weight: 600; }
.legal { font-size: 11px; color: var(--mute); margin-top: 20px; }
.msg { padding: 10px 12px; border-radius: 10px; font-size: 13px; }
.msg.err { background: var(--bad-l); color: var(--bad); }
.msg.ok { background: var(--ok-l); color: var(--ok); }
.msg.info { background: var(--mist); color: var(--ink2); }

/* ventana */
.modal-bg { position: fixed; inset: 0; background: rgba(43,42,40,.35); display: grid; place-items: center; padding: 16px; z-index: 50; animation: fade .15s; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow: auto; padding: 24px; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.modal.wide { max-width: 720px; }
.modal h2 { margin-bottom: 16px; }
.modal .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }
@keyframes fade { from { opacity: 0 } }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 10px; z-index: 60; font-size: 13px; animation: fade .2s; }
.loading { padding: 60px; text-align: center; color: var(--mute); }

/* estado de cuenta imprimible */
.statement { font-family: 'Montserrat', sans-serif; }
.statement .sh { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid var(--ink); padding-bottom: 14px; margin-bottom: 18px; }
.statement .sh img { height: 30px; }
#print-area { display: none; }
@media print {
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block !important; padding: 0; }
  @page { margin: 18mm; }
}

/* teléfono */
.mobile-bar { display: none; }
@media (max-width: 820px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  main.page { padding: 20px 16px 96px; }
  .banner { height: 180px; }
  .banner h1 { font-size: 30px; }
  .pgrid { grid-template-columns: 1fr; }
  .mobile-bar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line); z-index: 40; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .mobile-bar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 9.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--mute); text-decoration: none; padding: 4px; position: relative; }
  .mobile-bar a.on { color: var(--ink); }
  .mobile-bar .badge { position: absolute; top: 0; right: 22%; background: var(--ink); color: #fff; font-size: 10px; border-radius: 99px; padding: 0 5px; }
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth .art { height: 30vh; min-height: 180px; max-height: 260px; }
  .auth .art:after { background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,0) 40%, rgba(255,255,255,0) 70%, #fff); }
  .auth .form { place-items: start center; padding: 4px 24px 28px; }
  .auth .box .logo { height: 22px; margin-bottom: 20px; }
  .auth .box h1 { font-size: 30px; }
  .hide-m { display: none; }
  .g4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card { padding: 16px; }
  .kpi .v { font-size: 20px; }
  h1 { font-size: 28px; }
}
