:root {
  color-scheme: light;
  --ink: #25282c;
  --muted: #737981;
  --soft: #f3f4f5;
  --line: #dfe2e5;
  --graphite: #24262a;
  --red: #d20d18;
  --red-dark: #a90710;
  --green: #157347;
  --green-soft: #eaf7ef;
  --amber: #a86a00;
  --amber-soft: #fff7df;
  --shadow: 0 22px 60px rgba(22, 25, 29, .12);
}

* { box-sizing: border-box; }
html { min-width: 300px; scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; color: var(--ink); background: #f1f2f3; font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 10px 14px; color: #fff; background: #111; border-radius: 8px; transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.topbar { position: relative; z-index: 5; min-height: 78px; color: #fff; background: var(--graphite); border-bottom: 4px solid var(--red); }
.topbar-inner { width: min(1180px, calc(100% - 40px)); min-height: 74px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { min-width: 0; display: flex; align-items: center; gap: 13px; }
.brand-media, .login-company-logo { position: relative; overflow: hidden; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #4b4f55, #222428); border: 1px solid rgba(255,255,255,.2); font-weight: 900; letter-spacing: .04em; }
.brand-media { width: 58px; height: 43px; flex: 0 0 auto; border-radius: 9px; }
.brand-media img, .login-company-logo img { width: 100%; height: 100%; display: block; object-fit: contain; background: #fff; }
.brand-copy { min-width: 0; display: flex; flex-direction: column; }
.brand-copy strong { max-width: min(55vw, 520px); overflow: hidden; font-size: 17px; white-space: nowrap; text-overflow: ellipsis; }
.brand-copy small { margin-top: 3px; color: #c5c8cb; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.secure-label { display: flex; align-items: center; gap: 8px; color: #d8dadd; font-size: 12px; font-weight: 700; }
.secure-label i { width: 9px; height: 9px; background: #33bd70; border-radius: 50%; box-shadow: 0 0 0 4px rgba(51,189,112,.13); }
.login-view { min-height: calc(100vh - 126px); display: grid; place-items: center; padding: 64px 24px; background: radial-gradient(circle at 13% 16%, rgba(210,13,24,.08), transparent 29%), linear-gradient(135deg, #f8f8f9, #e9ebed); }
.login-layout { width: min(1060px, 100%); display: grid; grid-template-columns: minmax(0, 1fr) minmax(350px, 430px); align-items: center; gap: 92px; }
.eyebrow { margin: 0 0 14px; color: #666c73; font-size: 11px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow span { width: 24px; height: 3px; display: inline-block; margin: 0 8px 3px 0; background: var(--red); border-radius: 4px; }
.login-intro h1 { max-width: 650px; margin: 0; font-size: clamp(43px, 5.4vw, 70px); line-height: .98; letter-spacing: -.05em; }
.login-intro > p:last-of-type { max-width: 590px; margin: 23px 0 0; color: #676d74; font-size: 16px; line-height: 1.65; }
.feature-list { max-width: 560px; display: grid; gap: 13px; margin-top: 32px; }
.feature-list > div { display: flex; align-items: center; gap: 13px; }
.feature-list > div > span { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; color: #fff; background: var(--graphite); border-radius: 50%; font-size: 12px; font-weight: 900; }
.feature-list p { margin: 0; display: flex; flex-direction: column; }
.feature-list strong { font-size: 13px; }
.feature-list small { margin-top: 2px; color: #6c737a; font-size: 12px; }
.login-card { position: relative; padding: 36px 34px 31px; background: #fff; border: 1px solid rgba(0,0,0,.07); border-radius: 20px; box-shadow: var(--shadow); }
.login-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--red); border-radius: 20px 20px 0 0; }
.login-company-logo { width: 112px; height: 72px; margin-bottom: 21px; color: #555a60; background: #f4f5f6; border-color: #e4e6e8; border-radius: 12px; font-size: 23px; }
.login-heading p { margin: 0 0 4px; color: var(--red); font-size: 11px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.login-heading h2 { margin: 0; font-size: 28px; letter-spacing: -.025em; }
.login-heading > span { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
form { margin-top: 26px; }
.field { margin-top: 14px; }
.field label { display: block; margin: 0 0 7px; color: #4f555b; font-size: 11px; font-weight: 780; }
.input-wrap { min-height: 50px; display: flex; align-items: center; gap: 10px; padding: 0 13px; background: #f8f9f9; border: 1px solid #d9dde0; border-radius: 10px; transition: border-color .15s, box-shadow .15s; }
.input-wrap:focus-within { border-color: #a9afb4; box-shadow: 0 0 0 4px rgba(36,38,42,.07); }
.input-wrap > svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: #858b91; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.input-wrap input { min-width: 0; width: 100%; height: 46px; padding: 0; color: #24272b; background: transparent; border: 0; outline: 0; font-size: 16px; }
.password-toggle { padding: 7px; color: #60666d; background: none; border: 0; font-size: 11px; font-weight: 800; }
.primary-button, .secondary-button, .location-test { min-height: 44px; padding: 11px 16px; border-radius: 9px; font-weight: 800; }
.primary-button { color: #fff; background: linear-gradient(135deg, var(--red), var(--red-dark)); border: 0; box-shadow: 0 8px 20px rgba(180,8,18,.18); }
.primary-button:hover { filter: brightness(.95); }
.primary-button:disabled, .mark-button:disabled { cursor: not-allowed; opacity: .5; filter: grayscale(.25); }
.full { width: 100%; margin-top: 18px; display: flex; align-items: center; justify-content: center; gap: 12px; }
.message { min-height: 20px; margin-top: 11px; color: #176c3b; font-size: 12px; line-height: 1.45; }
.message.error { color: #aa0913; }
.message.busy { color: #7a5400; }
.help-note { display: flex; align-items: start; gap: 9px; margin-top: 20px; padding-top: 18px; color: #666d74; border-top: 1px solid #eaebec; font-size: 12px; line-height: 1.5; }
.help-note svg { width: 16px; height: 16px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; }
.app-view { min-height: calc(100vh - 126px); padding: 36px 20px 60px; background: #edeff0; }
.app-shell { width: min(1160px, 100%); margin: auto; }
.welcome-card { min-height: 132px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 25px 30px; color: #fff; background: linear-gradient(120deg, #24262a 0%, #31343a 70%, #3a2225 100%); border-radius: 18px; box-shadow: 0 15px 35px rgba(23,25,28,.16); }
.welcome-card .eyebrow { margin-bottom: 8px; color: #d5d7da; }
.welcome-card h1 { margin: 0; font-size: 31px; letter-spacing: -.03em; }
.welcome-card > div > p:last-child { margin: 6px 0 0; color: #d0d3d5; font-size: 13px; }
.session-actions { display: flex; align-items: center; gap: 19px; }
.live-clock { min-width: 110px; display: flex; flex-direction: column; text-align: right; }
.live-clock strong { font-size: 27px; letter-spacing: -.03em; }
.live-clock span { color: #c9cccf; font-size: 12px; }
.secondary-button { color: #fff; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.23); }
.secondary-button:hover { background: rgba(255,255,255,.14); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .75fr); gap: 18px; margin-top: 18px; }
.attendance-card, .assignment-card, .history-card { background: #fff; border: 1px solid #dfe2e5; border-radius: 16px; box-shadow: 0 8px 24px rgba(30,33,36,.055); }
.attendance-card { padding: 27px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.section-heading p { margin: 0 0 4px; color: var(--red); font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.section-heading h2 { margin: 0; font-size: 21px; }
.status-pill { padding: 7px 10px; color: #626970; background: #eff1f2; border-radius: 999px; font-size: 12px; font-weight: 800; }
.status-pill.progress { color: #765300; background: var(--amber-soft); }
.status-pill.complete { color: var(--green); background: var(--green-soft); }
.today-marks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 22px; }
.today-marks > div { min-height: 79px; display: flex; align-items: center; gap: 12px; padding: 14px; background: #f6f7f7; border: 1px solid #e5e7e8; border-radius: 12px; }
.mark-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; font-size: 19px; font-weight: 900; }
.mark-icon.entry { color: var(--green); background: var(--green-soft); }
.mark-icon.exit { color: var(--red); background: #fff0f1; }
.mark-icon.duration { color: #245b83; background: #eaf4fb; }
.today-marks p { margin: 0; display: flex; flex-direction: column; }
.today-marks small { color: #6c737a; font-size: 12px; }
.today-marks strong { margin-top: 2px; font-size: 20px; }
.location-box { min-height: 70px; display: flex; align-items: center; gap: 13px; margin-top: 14px; padding: 13px 15px; color: #66501f; background: var(--amber-soft); border: 1px solid #f1daa5; border-radius: 12px; }
.location-box.ok { color: #145c3b; background: var(--green-soft); border-color: #bae3ca; }
.location-box.error { color: #8d1119; background: #fff0f1; border-color: #f0c2c5; }
.location-icon { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; color: #fff; background: var(--amber); border-radius: 50%; font-size: 22px; }
.location-box.ok .location-icon { background: var(--green); }
.location-box.error .location-icon { background: var(--red); }
.location-box strong { font-size: 14px; }
.location-box p { margin: 3px 0 0; font-size: 12px; line-height: 1.45; }
.mark-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-top: 16px; }
.mark-button { min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 11px; color: #fff; border: 0; border-radius: 11px; box-shadow: 0 7px 18px rgba(0,0,0,.1); }
.mark-button.entry { background: linear-gradient(135deg, #188a56, #11673f); }
.mark-button.exit { background: linear-gradient(135deg, #dd1621, #a90913); }
.mark-button span { font-size: 13px; font-weight: 850; }
.mark-button small { margin-top: 3px; opacity: .88; font-size: 11px; }
.door-card { padding: 22px 27px 24px; grid-column: 1 / -1; }
.door-note { margin: 4px 0 0; color: #5c6570; font-size: 12.5px; line-height: 1.45; }
.door-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; margin-top: 14px; }
.door-button { min-height: 84px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 11px; color: #fff; border: 0; border-radius: 12px; box-shadow: 0 7px 18px rgba(0,0,0,.12); font: inherit; cursor: pointer; }
.door-button span { font-size: 24px; line-height: 1; }
.door-button strong { font-size: 14px; font-weight: 850; }
.door-button.open { background: linear-gradient(135deg, #188a56, #11673f); }
.door-button.stop { background: linear-gradient(135deg, #a05a00, #6f3d00); }
.door-button.close { background: linear-gradient(135deg, #dd1621, #a90913); }
.door-button:disabled { cursor: not-allowed; opacity: .5; }
.door-card .status-pill.off { background: #fbe9ea; color: #aa0913; }
@media (max-width: 560px) { .door-button { min-height: 76px; } .door-button span { font-size: 20px; } }
.location-test { width: 100%; min-height: 42px; margin-top: 10px; color: #4e555c; background: #fff; border: 1px solid #dfe2e5; font-size: 12px; }
.assignment-card { padding: 25px; }
.assignment-icon { width: 46px; height: 46px; display: grid; place-items: center; color: #fff; background: var(--graphite); border-radius: 12px; font-size: 24px; }
.assignment-card > p { margin: 18px 0 5px; color: #747a80; font-size: 11px; font-weight: 850; letter-spacing: .12em; }
.assignment-card h2 { margin: 0; font-size: 20px; }
.assignment-card dl { margin: 21px 0 0; }
.assignment-card dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid #eceeef; }
.assignment-card dt { color: #747a80; font-size: 12px; }
.assignment-card dd { max-width: 57%; margin: 0; overflow: hidden; font-size: 12px; font-weight: 800; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.privacy-box { display: flex; align-items: flex-start; gap: 10px; margin-top: 21px; padding: 13px; color: #5d636a; background: #f2f4f5; border-radius: 11px; }
.privacy-box svg { width: 23px; height: 23px; flex: 0 0 auto; fill: none; stroke: var(--green); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.privacy-box p { margin: 0; display: flex; flex-direction: column; }
.privacy-box strong { font-size: 12px; }
.privacy-box span { margin-top: 3px; font-size: 12px; line-height: 1.5; }
.history-card { margin-top: 18px; padding: 25px 27px; }
.history-card .section-heading > span { color: #6f767d; font-size: 12px; }
.history-table-wrap { margin-top: 18px; overflow-x: auto; border: 1px solid #e2e4e6; border-radius: 11px; }
table { width: 100%; border-collapse: collapse; }
th { padding: 11px 13px; color: #d7d9dc; background: #2b2e32; font-size: 11px; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
td { padding: 13px; border-bottom: 1px solid #ebedef; font-size: 13px; }
tbody tr:last-child td { border-bottom: 0; }
.table-status { display: inline-flex; padding: 5px 8px; color: #765300; background: var(--amber-soft); border-radius: 999px; font-size: 11px; font-weight: 800; }
.table-status.complete { color: var(--green); background: var(--green-soft); }
.gps-evidence { color: #555c63; font-size: 11px; }
.history-cards { display: none; }
.empty-state { min-height: 190px; display: grid; place-items: center; align-content: center; text-align: center; color: #858b91; }
.empty-state > span { font-size: 35px; }
.empty-state strong { margin-top: 7px; color: #555b61; font-size: 13px; }
.empty-state p { margin: 5px 0 0; font-size: 12px; }
footer { min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 11px 20px; color: #c3c6c9; background: var(--graphite); font-size: 12px; }

@media (max-width: 850px) {
  .login-layout { width: min(100%, 540px); grid-template-columns: 1fr; gap: 48px; }
  .login-intro { text-align: center; }
  .login-intro > p:last-of-type, .feature-list { margin-inline: auto; }
  .feature-list { text-align: left; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .assignment-card { display: grid; grid-template-columns: 58px minmax(0,1fr); column-gap: 12px; }
  .assignment-card > p, .assignment-card h2, .assignment-card dl, .assignment-card .privacy-box { grid-column: 2; }
  .assignment-card > p { margin-top: 2px; }
  .assignment-card .assignment-icon { grid-column: 1; grid-row: 1 / span 2; }
}

@media (max-width: 590px) {
  .topbar, .topbar-inner { min-height: 68px; }
  .topbar { border-bottom-width: 3px; }
  .topbar-inner { width: calc(100% - 24px); }
  .brand-media { width: 50px; height: 38px; }
  .brand-copy strong { max-width: 53vw; font-size: 14px; }
  .brand-copy small { font-size: 10px; }
  .secure-label span { display: none; }
  .login-view { min-height: calc(100vh - 110px); padding: 40px 14px; }
  .login-layout { gap: 36px; }
  .login-intro h1 { font-size: clamp(38px, 12vw, 50px); }
  .login-intro > p:last-of-type { font-size: 14px; }
  .feature-list { display: none; }
  .login-card { padding: 29px 21px 25px; border-radius: 16px; }
  .login-company-logo { width: 96px; height: 61px; }
  .app-view { padding: 16px 10px 42px; }
  .welcome-card { min-height: 0; display: block; padding: 21px; border-radius: 15px; }
  .welcome-card h1 { font-size: 26px; }
  .session-actions { justify-content: space-between; margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.13); }
  .live-clock { text-align: left; }
  .attendance-card, .assignment-card, .history-card { padding: 20px 15px; border-radius: 14px; }
  .today-marks, .mark-actions { grid-template-columns: 1fr 1fr; gap: 7px; }
  .today-marks .worked-duration { grid-column: 1 / -1; }
  .today-marks > div { min-height: 68px; padding: 10px; }
  .mark-icon { width: 32px; height: 32px; }
  .today-marks strong { font-size: 17px; }
  .location-box { align-items: flex-start; }
  .mark-button { min-height: 69px; padding-inline: 6px; }
  .mark-button span { font-size: 12px; }
  .history-table-wrap { display: none; }
  .history-cards { display: grid; gap: 8px; margin-top: 16px; }
  .history-row-card { padding: 13px; background: #f7f8f8; border: 1px solid #e3e5e6; border-radius: 11px; }
  .history-row-card > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .history-row-card > p { margin: 9px 0 0; color: #5c636a; font-size: 12px; line-height: 1.45; }
  .history-row-card strong { font-size: 12px; }
  footer { flex-wrap: wrap; }
}

@media (max-width: 380px) {
  .today-marks { grid-template-columns: 1fr; }
  .today-marks .worked-duration { grid-column: auto; }
  .mark-actions { grid-template-columns: 1fr; }
  .assignment-card { display: block; }
  .assignment-card > p { margin-top: 17px; }
}

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

/* ---------- 3.9.5: App con menú inferior y colores de la empresa ---------- */
:root { --brand-primary: #B3121B; --brand-dark: #7A0C12; --brand-tint: #FBEAEB; --brand-soft: #F4C9CC; --brand-line: #E7A3A7; --brand-accent: #E8A33D; }
:root[data-brand="on"] { --red: var(--brand-primary); --red-dark: var(--brand-dark); }
body.xa-in-app { background: #f3f4f6; }
/* 3.9.7: solo el pie de la página; antes ocultaba también la barra de botones del escáner de facturas. */
body.xa-in-app > footer { display: none; }
body.xa-in-app .topbar { min-height: 64px; color: #15191d; background: #fff; border-bottom: 1px solid #e3e6ea; position: sticky; top: 0; }
body.xa-in-app .topbar-inner { min-height: 64px; width: min(760px, calc(100% - 32px)); }
body.xa-in-app .brand-copy small { color: #5b636b; letter-spacing: .04em; }
body.xa-in-app .brand-media { width: 42px; height: 42px; border-radius: 11px; background: var(--brand-primary); border: 0; }
body.xa-in-app .secure-label { display: none; }
.xa-in-app .app-view { min-height: 0; padding: 0 0 104px; background: transparent; }
.xa { width: min(760px, 100%); margin: 0 auto; padding: 16px; }
.xa-view { display: flex; flex-direction: column; gap: 14px; }
.xa-view[hidden] { display: none !important; }
.xa .welcome-card { min-height: 0; display: flex; align-items: flex-end; justify-content: space-between; padding: 4px 2px 0; color: #15191d; background: none; box-shadow: none; border: 0; }
.xa .welcome-card h1 { font-size: 24px; letter-spacing: -.01em; }
.xa .welcome-card > div > p:last-child { color: #5b636b; font-size: 14px; }
.xa .live-clock { text-align: right; color: #15191d; background: none; border: 0; padding: 0; }
.xa .live-clock strong { font-size: 22px; }
.xa .live-clock span { color: #5b636b; font-size: 12px; }
.xa .attendance-card, .xa .assignment-card, .xa .history-card { margin: 0; padding: 18px; border-radius: 20px; box-shadow: none; border-color: #e3e6ea; }
.xa .section-heading h2 { font-size: 18px; margin: 0; }
.xa-hero { background: var(--brand-primary) !important; border-color: var(--brand-primary) !important; color: #fff; }
.xa-hero .section-heading h2 { color: #fff; font-size: 15px; opacity: .95; }
.xa-hero .status-pill { background: rgba(255,255,255,.18); color: #fff; }
.xa-hero .today-marks { margin-top: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.xa-hero .today-marks > div { min-height: 0; padding: 0; background: none; border: 0; }
.xa-hero .today-marks small { color: rgba(255,255,255,.85); }
.xa-hero .today-marks strong { color: #fff; font-size: 22px; }
.xa-hero .mark-actions { grid-template-columns: 1fr; margin-top: 14px; }
.xa-hero .mark-button { min-height: 62px; background: #fff !important; color: var(--brand-dark); border-radius: 16px; box-shadow: none; }
.xa-hero .mark-button span { font-size: 19px; }
.xa-hero .mark-button small { color: #5b636b; font-size: 12px; }
.xa-done { min-height: 56px; display: flex; align-items: center; justify-content: center; border-radius: 16px; background: rgba(255,255,255,.18); font-weight: 800; }
.xa-hero .location-box { margin-top: 12px; border-radius: 14px; }
.xa-hero .message:not(:empty) { color: #fff; }
.xa-hero .message.error:not(:empty) { color: #fff; background: rgba(0,0,0,.18); border-radius: 10px; padding: 8px 10px; }
.xa-eyebrow { font-size: 13px; font-weight: 800; color: #5b636b; letter-spacing: .04em; text-transform: uppercase; margin-top: 2px; }
.xa-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.xa-tile { min-height: 108px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; text-align: left; color: #15191d; background: #fff; border: 1px solid #e3e6ea; border-radius: 18px; }
.xa-tile.wide { grid-column: 1 / -1; min-height: 0; flex-direction: row; align-items: center; }
.xa-tile b { display: block; font-size: 16px; }
.xa-tile small { display: block; font-size: 13px; color: #5b636b; }
.xa-tile-ico { width: 44px; height: 44px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; background: var(--brand-tint); color: var(--brand-primary); }
.xa-tile-ico svg, .xa-tabs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.xa-note { margin: 0; font-size: 12.5px; color: #5b636b; line-height: 1.4; }
.xa .door-card { padding: 18px; }
.xa .door-actions { grid-template-columns: 1fr; gap: 12px; }
.xa .door-button { min-height: 92px; flex-direction: row; justify-content: flex-start; gap: 16px; padding: 0 22px; border-radius: 20px; }
.xa .door-button span { font-size: 26px; }
.xa .door-button strong { font-size: 20px; }
.xa .door-button.open { background: var(--brand-primary); }
.xa .door-button.stop { background: #fff; color: var(--brand-dark); border: 2px solid var(--brand-line); }
.xa .door-button.close { background: var(--brand-dark); }
.xa .invoice-scan { min-height: 110px; flex-direction: column; font-size: 20px; border-radius: 20px; background: var(--brand-primary); box-shadow: none; }
.xa-me { display: flex; align-items: center; gap: 14px; padding: 16px; background: #fff; border: 1px solid #e3e6ea; border-radius: 18px; }
.xa-me b { display: block; font-size: 18px; }
.xa-me small { display: block; font-size: 14px; color: #5b636b; }
.xa-avatar { width: 56px; height: 56px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--brand-primary); color: #fff; font-size: 20px; font-weight: 800; }
.xa .assignment-card { display: block; }
.xa .assignment-card .location-test { width: 100%; margin-top: 14px; color: var(--brand-dark); border: 1.5px solid var(--brand-line); background: #fff; }
.xa-logout { min-height: 52px; border-radius: 16px; border: 1.5px solid #f0c2c5; background: #fff; color: #b42318; font-weight: 800; }
.xa .history-card { margin: 0; }
.xa .history-table-wrap { display: none; }
.xa .history-cards { display: grid; gap: 8px; }
.xa-tabs { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 2px; padding: 6px 6px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid #e3e6ea; }
.app-view[hidden] + .xa-tabs, .app-view[hidden] .xa-tabs { display: none; }
.xa-tabs button { flex: 1 1 0; max-width: 120px; min-height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0; color: #5b636b; background: none; border: 0; font-size: 11.5px; font-weight: 700; }
.xa-tabs button[hidden] { display: none; }
.xa-tabs button > span { display: flex; padding: 3px 12px; border-radius: 999px; }
.xa-tabs button[aria-current="page"] { color: var(--brand-primary); }
.xa-tabs button[aria-current="page"] > span { background: var(--brand-tint); }
@media (min-width: 900px) { .xa-tabs { left: 50%; right: auto; transform: translateX(-50%); width: 560px; bottom: 16px; border: 1px solid #e3e6ea; border-radius: 22px; box-shadow: 0 10px 30px rgba(0,0,0,.08); padding-bottom: 6px; } }
.xa-hero .today-marks { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.xa-hero .today-marks .worked-duration { grid-column: auto !important; }
@media (max-width: 700px) {
  .login-view { padding: 18px 16px 40px; place-items: start center; }
  .login-intro { display: none; }
  .login-layout { gap: 0; }
}

/* 5.0: App simple como la de NEXUZ — botones grandes, sin zoom y siempre «Volver» (imagen 18). */
html, body { touch-action: manipulation; -webkit-text-size-adjust: 100%; }
input, select, textarea { font-size: 16px; }
.xa-top { display: flex; align-items: center; gap: 12px; margin: -2px 0 2px; }
.xa-top b { font-size: 18px; }
.xa-back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 14px 0 8px; border: 0; border-radius: 12px; background: #f1f3f5; color: #15191d; font: inherit; font-weight: 800; cursor: pointer; }
.xa-back svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.xa-tiles { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.xa-tile, .xa-tile.wide { min-height: 76px; flex-direction: row; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 18px; background: #f3f4f6; border-color: transparent; }
.xa-tile b { font-size: 18px; }
.xa-tile[data-xa-tile="door"] { background: #1b1f23; color: #fff; }
.xa-tile[data-xa-tile="door"] small { color: #d6d9dc; }
.xa-tile[data-xa-tile="door"] .xa-tile-ico { background: rgba(255,255,255,.12); color: #fff; }
.door-actions .door-button { min-height: 104px; font-size: 20px; border-radius: 20px; }
.mark-button { min-height: 76px; border-radius: 18px; }
.xa-tabs button { min-height: 52px; }
