/* SG Ingresos · App Puesto — identidad SG APP: Bebas Neue + DM Sans, verde SG */
:root {
  --sg: #0F6B3E;          /* reemplazar por el verde exacto de SG APP */
  --sg-dark: #0A4F2D;
  --sg-tint: #E1F1E7;
  --sg-tint2: #EAF4EE;
  --ink: #14201A;
  --muted: #46564D;
  --line: #DCE3DE;
  --line2: #C4CFC7;
  --bg: #F3F5F2;
  --warn-bg: #FFEFCC; --warn: #7A4A00;
  --bad-bg: #FBE1E2; --bad: #93141C; --red: #B3202A;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: 'DM Sans', system-ui, sans-serif; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font-family: inherit; }
.h { font-family: 'Bebas Neue', 'Arial Narrow', sans-serif; letter-spacing: .5px; font-weight: 400; }
.app { max-width: 560px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; display: flex; flex-direction: column; }
.content { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.muted { color: var(--muted); font-size: 13px; margin: 0; }
.small { font-size: 12px; }
.strong { font-weight: 700; }
.grow { flex: 1; min-width: 0; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
[hidden] { display: none !important; }

/* splash / auth */
.splash { align-items: center; justify-content: center; background: var(--sg); color: #fff; min-height: 100vh; }
.logo { font-size: 52px; }
.auth { justify-content: center; gap: 24px; padding: 32px 22px; background: var(--sg); min-height: 100vh; min-height: 100dvh; }
.brand { display: flex; flex-direction: column; align-items: center; color: #fff; gap: 4px; text-align: center; }
.brand h1 { margin: 8px 0 0; font-size: 52px; line-height: 1; }
.brand p { margin: 0; color: #D5EBDD; font-weight: 500; }
.foot-note { text-align: center; color: #D5EBDD; font-size: 12px; margin: 0; }

/* header */
.top { background: var(--sg); color: #fff; padding: calc(12px + env(safe-area-inset-top)) 16px 10px; position: sticky; top: 0; z-index: 5; display: flex; flex-direction: column; gap: 8px; }
.toprow { display: flex; align-items: center; gap: 10px; }
.toptitle { flex: 1; min-width: 0; }
.t1 { font-size: 26px; line-height: 1; }
.t2 { font-size: 12px; color: #D5EBDD; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iconbtn { width: 44px; height: 44px; border-radius: 10px; border: 0; background: rgba(255,255,255,.14); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { height: 30px; padding: 0 12px; border-radius: 15px; border: 0; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; background: rgba(255,255,255,.14); color: #fff; }
.pill.ok { background: var(--sg-tint); color: #0B5A33; }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--red); color: #fff; }

/* cards & fields */
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.card.row { flex-direction: row; align-items: center; gap: 12px; }
.sect { font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-size: 22px; letter-spacing: .6px; color: var(--sg); margin: 0; }
.field { display: flex; flex-direction: column; }
.lbl { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin: 0 0 6px; }
.req { color: var(--red); }
.in { width: 100%; height: 50px; border: 1.5px solid var(--line2); border-radius: 10px; padding: 0 14px; font-size: 16px; font-weight: 500; color: var(--ink); background: #fff; }
textarea.in { height: auto; padding: 12px 14px; resize: vertical; }
select.in { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 22px, calc(100% - 15px) 22px; background-size: 5px 5px; background-repeat: no-repeat; }
.in:focus { outline: none; border-color: var(--sg); box-shadow: 0 0 0 3px rgba(15,107,62,.18); }
.in.big { height: 58px; font-size: 20px; font-weight: 600; letter-spacing: .5px; }
.in.xl { height: 64px; font-size: 22px; font-weight: 600; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.acomp { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; border-top: 1px solid #E6ECE8; }

/* chips, buttons */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 16px; border-radius: 22px; border: 1.5px solid var(--line2); background: #fff; font-size: 15px; font-weight: 600; color: var(--ink); cursor: pointer; }
.chip.on { background: var(--sg); border-color: var(--sg); color: #fff; }
.btn, .btn2, .btnred { min-height: 56px; border-radius: 12px; font-size: 17px; font-weight: 700; width: 100%; cursor: pointer; }
.btn { border: 0; background: var(--sg); color: #fff; }
.btn2 { border: 1.5px solid var(--sg); background: #fff; color: var(--sg); }
.btnred { border: 0; background: var(--red); color: #fff; }
.btn:disabled, .btnred:disabled { opacity: .6; }
.btnsm { min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1.5px solid var(--sg); background: #fff; color: var(--sg); font-size: 14px; font-weight: 700; cursor: pointer; }
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: #E3E9E5; border-radius: 14px; padding: 4px; }
.sg { min-height: 54px; border: 0; border-radius: 11px; background: transparent; font-family: 'Bebas Neue', sans-serif; font-size: 27px; letter-spacing: .8px; color: var(--muted); cursor: pointer; }
.sg.on { background: var(--sg); color: #fff; }
.sg.onout { background: var(--ink); color: #fff; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile { min-height: 104px; border-radius: 14px; border: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; padding: 14px; text-align: left; cursor: pointer; color: var(--ink); }
.tile.big { grid-column: span 2; background: var(--sg); border-color: var(--sg); color: #fff; }
.tile-title { font-size: 17px; font-weight: 700; }
.tile-sub { font-size: 12px; opacity: .8; text-transform: capitalize; }
.tile-row { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 12px; text-align: left; cursor: pointer; color: var(--ink); }
.tile-row > :nth-child(1) { grid-column: 1; grid-row: 1; }
.tile-row > :nth-child(2) { grid-column: 1; grid-row: 2; }
.tile-row > svg { grid-column: 2; grid-row: 1 / 3; align-self: center; color: var(--muted); }
.recent { display: flex; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid #E6ECE8; }
.avatar { width: 56px; height: 56px; border-radius: 28px; background: var(--sg-tint); color: var(--sg); display: flex; align-items: center; justify-content: center; font-size: 26px; flex-shrink: 0; }
.name { font-size: 28px; line-height: 1; }
.step { display: flex; align-items: center; gap: 14px; }
.stepb { width: 48px; height: 48px; border-radius: 10px; border: 1.5px solid var(--line2); background: #fff; font-size: 22px; font-weight: 700; color: var(--ink); cursor: pointer; }
.stepn { font-size: 22px; min-width: 24px; text-align: center; }

/* estados */
.st { display: inline-flex; align-items: center; min-height: 26px; padding: 2px 10px; border-radius: 13px; font-size: 12px; font-weight: 700; align-self: flex-start; }
.st.ok { background: var(--sg-tint); color: #0B5A33; }
.st.warn { background: var(--warn-bg); color: var(--warn); }
.st.bad { background: var(--bad-bg); color: var(--bad); }
.st.dark { background: var(--ink); color: #fff; }
.banner { border-radius: 10px; padding: 11px 13px; font-size: 14px; font-weight: 600; line-height: 1.35; }
.banner.warn { background: var(--warn-bg); color: var(--warn); }
.banner.bad { background: var(--bad-bg); color: var(--bad); }

/* documentos */
.docrow { display: flex; flex-direction: column; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid #E6ECE8; }
.docrow:last-child { border-bottom: 0; padding-bottom: 0; }
.docbtns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.docbtns .photo, .docb { min-height: 46px; height: auto; border-radius: 10px; border: 1.5px solid var(--line2); background: var(--bg); font-size: 13px; font-weight: 700; color: var(--ink); display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; padding: 4px; }
.docbtns .photo.done { border-color: var(--sg); background: var(--sg-tint); color: var(--sg); }
.wapanel { background: var(--sg-tint2); border: 1.5px dashed var(--sg); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.wapanel p { margin: 0; font-size: 14px; line-height: 1.35; }
.wapanel .photo { background: var(--sg); color: #fff; border: 0; }
.photo { min-height: 54px; border-radius: 10px; border: 1.5px dashed var(--sg); background: var(--sg-tint2); color: var(--sg); font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-align: center; padding: 6px 10px; }
.photo.done { border-style: solid; background: var(--sg-tint); }

/* formulario con botón fijo */
.form { padding-bottom: 0; }
.foot { position: sticky; bottom: 0; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); margin-top: auto; }

/* prohibido */
.prohibido { background: var(--red); color: #fff; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); gap: 18px; }
.pcenter { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.ptitle { font-size: 60px; line-height: 1; max-width: 100%; overflow-wrap: anywhere; }
.pname { font-size: 32px; line-height: 1; }
.psub { color: #FBE1E2; font-size: 15px; }
.pbox { background: rgba(0,0,0,.22); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 1.4; }
.pnote { margin: 0; text-align: center; font-size: 13px; color: #FBE1E2; }
.pbtns { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.pbtn1, .pbtn2 { min-height: 56px; border-radius: 12px; font-size: 17px; font-weight: 700; cursor: pointer; }
.pbtn1 { border: 0; background: #fff; color: var(--bad); }
.pbtn2 { border: 1.5px solid #fff; background: transparent; color: #fff; }

/* ok */
.okscreen { align-items: center; text-align: center; padding: 32px 20px calc(20px + env(safe-area-inset-bottom)); gap: 14px; }
.okicon { width: 96px; height: 96px; border-radius: 48px; background: var(--sg-tint); color: var(--sg); display: flex; align-items: center; justify-content: center; }
.oktitle { font-size: 40px; line-height: 1; color: var(--sg); }
.okname { font-size: 20px; font-weight: 700; }
.okbtns { display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: auto; }

/* toast */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 600; z-index: 20; transition: opacity .4s; max-width: calc(100% - 32px); }
.toast.bad { background: var(--red); }
.toast.out { opacity: 0; }

.linkred { background: none; border: 0; color: var(--red); font-size: 14px; font-weight: 700; text-decoration: underline; cursor: pointer; padding: 4px 0; align-self: flex-start; min-height: 36px; }
.card .row { display: flex; align-items: center; gap: 12px; }
