:root {
  --ink: #18231f;
  --muted: #68736e;
  --line: #dfe4df;
  --surface: #ffffff;
  --surface-soft: #f6f7f3;
  --green: #0f6a4f;
  --green-dark: #0a4d3a;
  --green-soft: #dff3e9;
  --lime: #c9f064;
  --amber: #c57a0a;
  --amber-soft: #fff1d6;
  --red: #bd3b3b;
  --red-soft: #fde7e5;
  --blue: #2e669a;
  --blue-soft: #e4f0fb;
  --shadow: 0 18px 45px rgba(21, 42, 34, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--surface-soft);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--surface-soft); }
body { margin: 0; min-height: 100vh; background: var(--surface-soft); }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(15, 106, 79, 0.28);
  outline-offset: 2px;
}

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 264px minmax(0, 1fr); }
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 22px 16px 18px;
  background: #112a23; color: #eff8f3; display: flex; flex-direction: column; z-index: 20;
}
.brand { display: flex; gap: 12px; align-items: center; padding: 0 8px 20px; }
.brand img { width: 42px; height: 42px; object-fit: contain; border-radius: 12px; background: white; }
.brand strong { display: block; letter-spacing: -0.02em; }
.brand small { color: #a9c1b8; font-size: 11px; }
.prototype-flag { margin: 0 8px 18px; padding: 9px 11px; border: 1px solid rgba(201,240,100,.3); border-radius: 11px; color: #dcf7a6; background: rgba(201,240,100,.08); font-size: 11px; line-height: 1.35; }
.role-switch { margin: 0 8px 20px; padding: 4px; background: rgba(255,255,255,.08); border-radius: 12px; display: grid; grid-template-columns: repeat(3,1fr); gap: 3px; }
.role-switch button { border: 0; background: transparent; color: #a9c1b8; padding: 9px 6px; border-radius: 9px; cursor: pointer; font-weight: 700; font-size: 12px; }
.role-switch button.active { background: white; color: var(--green-dark); box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.nav-label { margin: 0 12px 8px; color: #77948a; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.main-nav { display: grid; gap: 4px; overflow: auto; }
.nav-item { width: 100%; border: 0; background: transparent; color: #bed1ca; border-radius: 11px; display: flex; align-items: center; gap: 11px; padding: 11px 12px; text-align: left; cursor: pointer; font-weight: 650; }
.nav-item:hover { background: rgba(255,255,255,.06); color: white; }
.nav-item.active { background: rgba(201,240,100,.14); color: var(--lime); }
.nav-icon { width: 22px; height: 22px; display: grid; place-items: center; font-size: 15px; }
.nav-badge { margin-left: auto; min-width: 20px; padding: 2px 6px; border-radius: 999px; background: #f8cd72; color: #4e3100; font-size: 10px; text-align: center; }
.sidebar-user { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid rgba(255,255,255,.1); display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 850; background: #daf09b; color: var(--green-dark); flex: none; }
.avatar.blue { background: #dce9f7; color: #285781; }
.avatar.amber { background: #ffe8b9; color: #8c5500; }
.sidebar-user strong { display: block; font-size: 13px; }
.sidebar-user small { color: #8eaaa0; font-size: 11px; }

.workspace { min-width: 0; }
.topbar { min-height: 84px; padding: 18px 34px; background: rgba(246,247,243,.9); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(223,228,223,.85); display: flex; align-items: center; justify-content: space-between; gap: 18px; position: sticky; top: 0; z-index: 15; }
.topbar::before { content: ""; width: 148px; height: 48px; border-radius: 9px; background: #fff url("./assets/logo-oficial-electrihogargs.jpg") center/contain no-repeat; flex: 0 0 auto; }
.eyebrow { color: var(--green); font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: .11em; }
.topbar h1 { margin: 3px 0 0; font-size: clamp(23px, 2.5vw, 32px); line-height: 1.05; letter-spacing: -.035em; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.logout-btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 15px; border: 1px solid rgba(15,106,79,.18); border-radius: 12px; background: linear-gradient(180deg,#fff,#f8fbf9); color: var(--green-dark); box-shadow: 0 4px 14px rgba(15,77,58,.06); font-weight: 800; cursor: pointer; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease; }
.logout-btn svg { width: 19px; height: 19px; flex: none; }
.logout-btn:hover { transform: translateY(-1px); border-color: rgba(15,106,79,.38); background: #fff; box-shadow: 0 8px 22px rgba(15,77,58,.11); }
.logout-btn:active { transform: translateY(0) scale(.98); box-shadow: 0 3px 10px rgba(15,77,58,.08); }
.logout-btn:focus-visible { outline: 3px solid rgba(15,106,79,.25); outline-offset: 3px; }
.sync-pill { display: flex; align-items: center; gap: 8px; color: var(--green-dark); background: var(--green-soft); border-radius: 999px; padding: 9px 13px; font-size: 12px; font-weight: 750; }
.connection-toggle { border: 0; cursor: pointer; }
.connection-toggle.offline { color: #7a4a00; background: var(--amber-soft); }
.connection-toggle.offline .sync-dot { background: var(--amber); box-shadow: 0 0 0 4px rgba(197,122,10,.12); }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: #26a16f; box-shadow: 0 0 0 4px rgba(38,161,111,.12); }
.icon-btn, .ghost-btn, .primary-btn, .soft-btn, .danger-btn { border: 0; cursor: pointer; border-radius: 11px; font-weight: 750; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.icon-btn:hover, .ghost-btn:hover, .primary-btn:hover, .soft-btn:hover, .danger-btn:hover { transform: translateY(-1px); }
.icon-btn { width: 40px; height: 40px; background: white; border: 1px solid var(--line); display: grid; place-items: center; }
.ghost-btn { padding: 10px 14px; background: white; border: 1px solid var(--line); }
.primary-btn { padding: 11px 16px; background: var(--green); color: white; box-shadow: 0 9px 20px rgba(15,106,79,.18); }
.primary-btn.lime { background: var(--lime); color: var(--green-dark); box-shadow: none; }
.soft-btn { padding: 10px 14px; color: var(--green-dark); background: var(--green-soft); }
.danger-btn { padding: 10px 14px; color: var(--red); background: var(--red-soft); }
.small-btn { padding: 8px 11px; font-size: 12px; }

.page { padding: 28px 34px 94px; max-width: 1560px; margin: 0 auto; }
.demo-banner { display: flex; align-items: center; gap: 10px; background: #fff8e9; color: #74500f; border: 1px solid #f4dfad; border-radius: 12px; padding: 10px 14px; margin-bottom: 22px; font-size: 12px; }
.demo-banner strong { font-weight: 850; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 0 0 16px; }
.section-head h2 { margin: 0; font-size: 20px; letter-spacing: -.025em; }
.section-head p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.section-head + .section-head { margin-top: 28px; }
.section-link { border: 0; background: transparent; color: var(--green); cursor: pointer; font-weight: 800; font-size: 12px; }
.grid { display: grid; gap: 16px; }
.kpi-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
.two-col { grid-template-columns: minmax(0, 1.6fr) minmax(280px, .9fr); align-items: start; }
.equal-col { grid-template-columns: repeat(2, minmax(0,1fr)); }
.three-col { grid-template-columns: repeat(3, minmax(0,1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 18px rgba(24,35,31,.025); }
.card-pad { padding: 20px; }
.kpi { padding: 18px; min-height: 138px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; position: relative; }
.kpi::after { content: ""; position: absolute; width: 80px; height: 80px; border-radius: 50%; right: -25px; bottom: -30px; background: var(--tint, var(--green-soft)); opacity: .8; }
.kpi-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 12px; font-weight: 700; }
.kpi-icon { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--tint, var(--green-soft)); color: var(--tone, var(--green)); }
.kpi-value { font-size: 31px; font-weight: 880; letter-spacing: -.05em; line-height: 1; }
.kpi-foot { color: var(--muted); font-size: 11px; margin-top: 6px; }

.decision-list { display: grid; }
.decision-row { border: 0; background: transparent; width: 100%; display: grid; grid-template-columns: 9px minmax(0,1fr) auto; gap: 13px; align-items: center; padding: 15px 18px; border-bottom: 1px solid #edf0ed; text-align: left; cursor: pointer; }
.decision-row:last-child { border-bottom: 0; }
.decision-row:hover, .decision-row.selected { background: #f9fbf8; }
.severity { width: 9px; height: 38px; border-radius: 999px; background: var(--amber); }
.severity.high { background: var(--red); }
.severity.low { background: var(--blue); }
.decision-title { display: block; font-weight: 800; font-size: 13px; }
.decision-meta { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }
.age { color: var(--muted); font-size: 11px; font-weight: 700; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 650px; }
.data-table th { padding: 10px 14px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .09em; text-align: left; border-bottom: 1px solid var(--line); }
.data-table td { padding: 14px; font-size: 12px; border-bottom: 1px solid #edf0ed; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.clickable-row { cursor: pointer; }
.clickable-row:hover { background: #f8faf7; }
.person-cell { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.person-cell .avatar { width: 32px; height: 32px; font-size: 11px; }
.person-cell strong { display: block; }
.person-cell small { color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; white-space: nowrap; background: #edf0ed; color: #53605a; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.ok { background: var(--green-soft); color: var(--green); }
.status.warn { background: var(--amber-soft); color: var(--amber); }
.status.bad { background: var(--red-soft); color: var(--red); }
.status.info { background: var(--blue-soft); color: var(--blue); }

.work-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.work-card { padding: 17px; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease; }
.work-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.work-card-top { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.work-card h3 { margin: 0; font-size: 15px; letter-spacing: -.02em; }
.work-card p { margin: 5px 0 14px; color: var(--muted); font-size: 11px; }
.progress { height: 7px; border-radius: 999px; overflow: hidden; background: #e9ede9; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.work-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin-top: 14px; }
.work-stats div { padding: 8px; border-radius: 9px; background: #f7f8f6; }
.work-stats strong { display: block; font-size: 13px; }
.work-stats small { color: var(--muted); font-size: 9px; text-transform: uppercase; }

.activity-list { display: grid; gap: 14px; }
.activity { display: grid; grid-template-columns: 31px minmax(0,1fr) auto; gap: 10px; align-items: start; }
.activity-icon { width: 31px; height: 31px; border-radius: 10px; display: grid; place-items: center; background: #f0f3ef; font-size: 13px; }
.activity strong { display: block; font-size: 12px; }
.activity p { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.activity time { color: #8c9691; font-size: 10px; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.search { min-width: 210px; flex: 1; position: relative; }
.search input, .select, .field input, .field textarea { width: 100%; border: 1px solid var(--line); background: white; color: var(--ink); border-radius: 11px; padding: 11px 13px; }
.filter-chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: white; border-radius: 999px; padding: 8px 11px; font-size: 11px; font-weight: 750; cursor: pointer; }
.chip.active { background: var(--ink); color: white; border-color: var(--ink); }
.chip .count { opacity: .65; margin-left: 4px; }

.split-panel { display: grid; grid-template-columns: minmax(360px, .95fr) minmax(380px, 1.25fr); min-height: 520px; overflow: hidden; }
.split-list { border-right: 1px solid var(--line); }
.split-detail { padding: 24px; background: #fbfcfa; }
.detail-top { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.detail-top h2 { margin: 7px 0 7px; font-size: 22px; letter-spacing: -.03em; }
.detail-top p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.detail-block { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.detail-block h3 { margin: 0 0 11px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.fact-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
.fact { padding: 12px; border-radius: 11px; border: 1px solid var(--line); background: white; }
.fact span { display: block; color: var(--muted); font-size: 10px; }
.fact strong { display: block; margin-top: 5px; font-size: 13px; }
.callout { border-radius: 12px; padding: 13px; font-size: 11px; line-height: 1.45; background: var(--amber-soft); color: #74500f; }
.detail-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 18px; }

.page-back { border: 0; background: transparent; color: var(--green); padding: 0; margin-bottom: 16px; font-weight: 800; cursor: pointer; }
.hero-card { padding: 24px; background: linear-gradient(125deg, #123d31, #0f6a4f); color: white; border: 0; position: relative; overflow: hidden; }
.hero-card::after { content: ""; position: absolute; width: 240px; height: 240px; border-radius: 50%; background: rgba(201,240,100,.12); right: -70px; top: -90px; }
.hero-card h2 { margin: 8px 0 5px; font-size: clamp(24px,3vw,38px); letter-spacing: -.045em; }
.hero-card p { margin: 0; color: #c4d9d1; font-size: 12px; }
.hero-meta { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 24px; position: relative; z-index: 1; }
.hero-meta div { min-width: 110px; }
.hero-meta small { display: block; color: #97b9ac; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.hero-meta strong { display: block; margin-top: 5px; font-size: 14px; }
.tabs { display: flex; gap: 4px; padding: 5px; overflow-x: auto; background: #ecefeb; border-radius: 12px; margin: 18px 0; }
.tab { border: 0; background: transparent; border-radius: 9px; padding: 9px 12px; white-space: nowrap; font-size: 11px; font-weight: 750; cursor: pointer; color: var(--muted); }
.tab.active { background: white; color: var(--green-dark); box-shadow: 0 3px 10px rgba(23,45,37,.08); }
.metric-strip { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.metric-strip .fact { background: #f9faf8; }
.photo-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.photo-placeholder { aspect-ratio: 1.25; border-radius: 12px; background: linear-gradient(145deg, #d7dfda, #eef2ef); display: flex; align-items: end; padding: 10px; color: #53605a; font-size: 10px; font-weight: 700; position: relative; overflow: hidden; }
.photo-placeholder::before { content: ""; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.7); position: absolute; top: 16px; right: 16px; }

.profile-layout { display: grid; grid-template-columns: 300px minmax(0,1fr); gap: 16px; }
.profile-summary { padding: 24px; text-align: center; }
.profile-summary .avatar { width: 72px; height: 72px; font-size: 22px; margin: 0 auto 12px; }
.profile-summary h2 { margin: 0; font-size: 19px; }
.profile-summary p { margin: 5px 0 16px; color: var(--muted); font-size: 12px; }
.profile-facts { display: grid; gap: 9px; text-align: left; }
.calendar { display: grid; grid-template-columns: repeat(7,1fr); gap: 6px; }
.day { min-height: 54px; padding: 7px; border: 1px solid var(--line); border-radius: 9px; font-size: 10px; color: var(--muted); }
.day.work { background: var(--green-soft); border-color: transparent; color: var(--green-dark); }
.day.away { background: var(--amber-soft); border-color: transparent; color: #875508; }
.day.off { opacity: .45; }

.resource-lane { padding: 18px; }
.resource-lane h3 { margin: 0 0 14px; font-size: 15px; }
.resource-item { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid #edf0ed; }
.resource-item strong { display: block; font-size: 12px; }
.resource-item small { color: var(--muted); font-size: 10px; }

.report-card { padding: 20px; min-height: 170px; display: flex; flex-direction: column; }
.report-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--green-soft); color: var(--green); display: grid; place-items: center; }
.report-card h3 { margin: 16px 0 6px; font-size: 15px; }
.report-card p { color: var(--muted); font-size: 11px; line-height: 1.5; margin: 0 0 16px; }
.report-card button { margin-top: auto; align-self: start; }

/* Operario */
.operator-page { max-width: 860px; }
.now-card { padding: 26px; border: 0; color: white; background: linear-gradient(140deg,#103c30,#0d7052); box-shadow: 0 24px 55px rgba(15,106,79,.2); overflow: hidden; position: relative; }
.now-card::after { content: ""; position: absolute; width: 260px; height: 260px; right: -110px; bottom: -130px; border-radius: 50%; background: rgba(201,240,100,.18); }
.now-top { display: flex; align-items: start; justify-content: space-between; gap: 14px; position: relative; z-index: 1; }
.now-top small { color: #a9cabb; font-size: 11px; text-transform: uppercase; font-weight: 800; letter-spacing: .09em; }
.now-top h2 { margin: 7px 0 4px; font-size: clamp(26px,5vw,42px); letter-spacing: -.055em; }
.now-top p { color: #c5dbd2; margin: 0; font-size: 12px; }
.timer { font-variant-numeric: tabular-nums; font-size: 28px; font-weight: 850; letter-spacing: -.04em; }
.now-details { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; margin-top: 24px; position: relative; z-index: 1; }
.now-details div { background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 12px; }
.now-details span { display: block; color: #a9cabb; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.now-details strong { display: block; margin-top: 5px; font-size: 12px; }
.now-actions { display: flex; gap: 10px; margin-top: 22px; position: relative; z-index: 1; }
.now-actions button { flex: 1; min-height: 48px; }
.hero-action { min-height: 58px !important; font-size: 15px; letter-spacing: .025em; }
.on-dark { background: rgba(255,255,255,.12); color: white; border-color: rgba(255,255,255,.22); }
.worker-action-grid { width: 100%; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.worker-action-grid .danger-outline { grid-column: 1 / -1; }
.danger-outline { min-height: 48px; border: 1px solid rgba(255,255,255,.35); border-radius: 11px; background: rgba(164,39,39,.3); color: white; font-weight: 800; cursor: pointer; }
.quick-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.quick-action { border: 1px solid var(--line); background: white; border-radius: 15px; min-height: 105px; padding: 15px; cursor: pointer; text-align: left; display: flex; flex-direction: column; justify-content: space-between; }
.quick-action:hover { border-color: #b8c9c0; box-shadow: var(--shadow); }
.quick-action .quick-icon { width: 35px; height: 35px; border-radius: 11px; display: grid; place-items: center; background: var(--green-soft); }
.quick-action strong { display: block; font-size: 12px; }
.quick-action small { display: block; color: var(--muted); font-size: 9px; margin-top: 2px; }
.sync-card { padding: 15px 17px; display: flex; align-items: center; gap: 12px; }
.sync-card .sync-mark { width: 40px; height: 40px; border-radius: 12px; background: var(--green-soft); color: var(--green); display: grid; place-items: center; }
.sync-card strong { display: block; font-size: 12px; }
.sync-card p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.sync-card .status { margin-left: auto; }
.timeline { display: grid; gap: 0; }
.timeline-item { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 12px; position: relative; padding-bottom: 20px; }
.timeline-item:not(:last-child)::before { content: ""; position: absolute; left: 20px; top: 35px; bottom: 2px; width: 1px; background: var(--line); }
.timeline-dot { width: 42px; height: 42px; border-radius: 13px; background: #eef2ef; display: grid; place-items: center; z-index: 1; }
.timeline-item strong { display: block; font-size: 12px; margin-top: 3px; }
.timeline-item p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.mobile-bottom { display: none; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(8,22,17,.48); z-index: 50; display: grid; place-items: center; padding: 20px; backdrop-filter: blur(4px); }
.modal { width: min(620px, 100%); max-height: min(760px, calc(100vh - 40px)); overflow: auto; background: white; border-radius: 22px; box-shadow: 0 30px 90px rgba(0,0,0,.26); }
.modal-head { padding: 20px 22px 15px; display: flex; justify-content: space-between; align-items: start; gap: 12px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 20px; }
.modal-head p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.modal-body { padding: 20px 22px 24px; }
.field { display: grid; gap: 6px; margin-bottom: 13px; }
.field label { font-size: 11px; font-weight: 800; }
.field textarea { min-height: 85px; resize: vertical; }
.choice-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 9px; }
.work-choice-scroll { max-height: min(52vh,460px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 2px 6px 12px 2px; scrollbar-gutter: stable; }
.work-choice-scroll .choice { min-height: 74px; }
.work-actions-sticky { position: sticky; bottom: -24px; z-index: 2; padding: 14px 0 4px; background: linear-gradient(180deg,rgba(255,255,255,0),#fff 22%); }
.choice { border: 1px solid var(--line); background: white; border-radius: 12px; padding: 13px; text-align: left; cursor: pointer; }
.choice.selected { border-color: var(--green); background: var(--green-soft); }
.choice strong { display: block; font-size: 12px; }
.choice small { display: block; color: var(--muted); margin-top: 3px; font-size: 10px; }
.frequent-strip { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 5px; }
.frequent-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 10px; }
.cart-row { display: grid; grid-template-columns: minmax(0,1fr) 90px 48px 40px; gap: 7px; align-items: center; margin-bottom: 8px; }
.cart-row input { min-width: 0; width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 9px; }
.photo-placeholder small { display: block; margin-top: 3px; font-weight: 500; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; }
.upload-zone { border: 1.5px dashed #b9c6bf; border-radius: 14px; min-height: 150px; display: grid; place-items: center; text-align: center; color: var(--muted); background: #fafbf9; padding: 20px; }
.upload-zone strong { display: block; color: var(--ink); font-size: 13px; margin-top: 7px; }
.upload-zone small { display: block; margin-top: 5px; font-size: 10px; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 80; width: min(360px, calc(100vw - 32px)); background: #142a22; color: white; border-radius: 14px; padding: 14px 16px; box-shadow: 0 20px 50px rgba(0,0,0,.24); animation: toast-in .25s ease both; }
.toast strong { display: block; font-size: 12px; }
.toast span { display: block; margin-top: 4px; color: #b9cfc6; font-size: 10px; line-height: 1.4; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); margin-bottom: 5px; }
.vehicle-card { padding: 22px; display: grid; grid-template-columns: 54px 1fr; gap: 16px; cursor: pointer; }
.vehicle-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); font-size: 26px; }
.vehicle-card .ghost-btn { margin-top: 14px; }
.vehicle-row { width: 100%; border: 0; background: transparent; text-align: left; cursor: pointer; }
.van-spotlight { padding: 28px; color: white; background: linear-gradient(135deg,#102c22,#1e4c3c); display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; overflow: hidden; }
.van-spotlight h2 { font-size: clamp(26px,4vw,42px); margin: 8px 0; }
.van-spotlight p { color: #bdd2c8; }
.van-main-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; min-width: 390px; }
.van-spotlight > .ghost-btn { grid-column: 1/-1; justify-self: start; }
.check-row { display: flex; align-items: center; gap: 9px; padding: 12px 0; color: var(--ink); font-size: 12px; }
.check-row input { width: 18px; height: 18px; accent-color: var(--green); }
.muted { color: var(--muted); font-size: 11px; margin-top: 14px; }
.native-modal { border: 0; padding: 0; overflow: hidden; }
.native-modal::backdrop { background: rgba(8,28,22,.65); backdrop-filter: blur(4px); }
.native-modal[open] { display: block; position: fixed; inset: 50% auto auto 50%; transform: translate(-50%,-50%); }
.native-modal .modal-head { margin: 0; }
.logout-dialog { width: min(460px,calc(100vw - 32px)); border: 0; padding: 0; border-radius: 24px; color: var(--ink); background: transparent; box-shadow: 0 32px 100px rgba(7,28,21,.28); }
.logout-dialog::backdrop { background: rgba(7,25,19,.6); backdrop-filter: blur(7px); }
.logout-confirm { padding: 27px; border: 1px solid rgba(255,255,255,.7); border-radius: 24px; background: linear-gradient(150deg,#fff 0%,#fbfdfb 70%,#edf7f2 100%); }
.logout-confirm-icon { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 15px; color: var(--green-dark); background: var(--green-soft); box-shadow: inset 0 0 0 1px rgba(15,106,79,.08); }
.logout-confirm-icon svg { width: 25px; height: 25px; }
.logout-confirm-copy { margin-top: 19px; }
.logout-kicker { color: var(--green); font-size: 10px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.logout-confirm h2 { margin: 6px 0 7px; font-size: 25px; letter-spacing: -.035em; }
.logout-confirm p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.logout-pending { margin-top: 17px; padding: 13px 14px; border: 1px solid #f0d49b; border-radius: 13px; background: var(--amber-soft); color: #71480a; }
.logout-pending strong,.logout-pending span,.logout-pending small { display: block; }
.logout-pending strong { font-size: 12px; }
.logout-pending span { margin-top: 4px; font-size: 12px; }
.logout-pending small { margin-top: 6px; opacity: .82; line-height: 1.4; }
.logout-confirm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 23px; }
.logout-confirm-btn { min-height: 43px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; border: 0; border-radius: 12px; background: var(--green-dark); color: white; font-weight: 800; cursor: pointer; box-shadow: 0 10px 24px rgba(10,77,58,.2); transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.logout-confirm-btn svg { width: 18px; height: 18px; }
.logout-confirm-btn:hover { transform: translateY(-1px); background: var(--green); box-shadow: 0 13px 28px rgba(10,77,58,.25); }
.logout-confirm-btn:active { transform: scale(.98); }
.logout-confirm-btn:focus-visible { outline: 3px solid rgba(15,106,79,.28); outline-offset: 3px; }
.logout-confirm-btn.is-loading { cursor: wait; }
.login-page { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 18px; padding: 24px; text-align: center; background: linear-gradient(145deg,#f5f8f5,#e7f1ec); }
.login-page img { width: min(420px,80vw); max-height: 180px; object-fit: contain; }
.login-page h1 { margin: 0; font-size: clamp(28px,5vw,52px); color: var(--green); }
.login-page p { max-width: 560px; color: var(--muted); }
.login-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.client-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.client-card { padding: 24px; }
.client-card .avatar { margin-bottom: 14px; }
.client-card .metric-strip { margin: 16px 0; }
.client-hero { padding: 30px; background: linear-gradient(135deg,#12382c,#23644e); color: white; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.client-hero::before { content:""; display:block; width:160px; height:54px; border-radius:9px; background:#fff url("./assets/logo-oficial-electrihogargs.jpg") center/contain no-repeat; flex:0 0 auto; }
.client-hero p { color: #cce1d8; }
.equipment-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 16px; }
.equipment-card { border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; gap: 6px; background: #fbfcfb; }
.equipment-card span,.equipment-card small { color: var(--muted); }
.upload-zone img { display: block; max-width: 100%; max-height: 190px; border-radius: 12px; margin: 12px auto; object-fit: contain; }
.field > span { display:block; font-size:11px; font-weight:700; margin-bottom:6px; }
.field input,.field textarea,.field select { width:100%; border:1px solid var(--line); border-radius:10px; padding:11px; font:inherit; background:white; }
.field textarea { min-height:86px; resize:vertical; }
.choice input[type="radio"] { accent-color:var(--green); }
.attendance-toolbar { display:flex; align-items:end; gap:12px; flex-wrap:wrap; padding:16px; margin-bottom:16px; }
.attendance-toolbar .compact-field { min-width:180px; margin:0; }
.attendance-kpis { margin-bottom:16px; }
.attendance-table { max-height:640px; overflow:auto; }
.attendance-table thead { position:sticky; top:0; z-index:2; background:white; }
.attendance-table td { vertical-align:top; min-width:150px; }
.attendance-table td:first-child { min-width:170px; }
.attendance-table small { display:block; margin-top:5px; color:var(--muted); line-height:1.35; }
.attendance-table .table-actions { display:flex; gap:6px; flex-wrap:wrap; }
.attendance-help { margin-top:14px; }
.attendance-help strong { color:inherit; }

@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(2,1fr); }
  .work-grid { grid-template-columns: repeat(2,1fr); }
  .three-col { grid-template-columns: repeat(2,1fr); }
  .split-panel { grid-template-columns: minmax(310px,.85fr) minmax(350px,1.15fr); }
}

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 78px minmax(0,1fr); }
  .sidebar { padding-inline: 10px; }
  .brand { padding-inline: 8px; justify-content: center; }
  .brand > div:last-child, .prototype-flag, .role-switch, .nav-label, .nav-item > span:not(.nav-icon):not(.nav-badge), .sidebar-user > div:not(.avatar) { display: none; }
  .main-nav { justify-items: center; }
  .nav-item { width: 52px; height: 46px; justify-content: center; padding: 0; position: relative; }
  .nav-badge { position: absolute; right: 0; top: 1px; min-width: 17px; padding: 1px 4px; }
  .sidebar-user { justify-content: center; padding-inline: 0; }
  .topbar, .page { padding-inline: 22px; }
  .two-col, .profile-layout { grid-template-columns: 1fr; }
  .split-panel { grid-template-columns: 1fr; }
  .split-list { border-right: 0; }
  .split-detail { border-top: 1px solid var(--line); }
}

@media (max-width: 680px) {
  body { padding-bottom: 72px; }
  .app-shell { display: block; }
  .sidebar { display: none; }
  .topbar { min-height: 70px; padding: 12px 16px; }
  .topbar::before { display: none; }
  .topbar h1 { font-size: 22px; }
  .topbar > div:first-child { min-width: 0; }
  .top-actions { flex: 0 0 auto; gap: 7px; }
  .top-actions .sync-pill { width: 38px; height: 38px; padding: 0; justify-content: center; font-size: 0; }
  .top-actions .sync-pill::after { content: "●"; font-size: 15px; line-height: 1; }
  .logout-btn { width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 12px; }
  .logout-btn span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
  .page { padding: 18px 14px 30px; }
  .demo-banner { align-items: start; }
  .kpi-grid, .equal-col, .three-col, .work-grid, .profile-layout { grid-template-columns: 1fr; }
  .kpi-grid { gap: 10px; }
  .kpi { min-height: 120px; }
  .work-grid { display: grid; }
  .quick-grid { grid-template-columns: repeat(2,1fr); }
  .now-card { padding: 21px 18px; border-radius: 20px; }
  .now-top { display: block; }
  .timer { margin-top: 16px; }
  .now-details { grid-template-columns: 1fr; }
  .now-actions { flex-direction: column; }
  .metric-strip { grid-template-columns: repeat(2,1fr); }
  .photo-grid { grid-template-columns: repeat(2,1fr); }
  .section-head { align-items: start; }
  .section-head .primary-btn { padding: 9px 11px; font-size: 11px; }
  .split-panel { display: block; }
  .split-detail { padding: 18px; }
  .fact-grid { grid-template-columns: 1fr; }
  .choice-grid { grid-template-columns: 1fr; }
  .mobile-bottom { position: fixed; display: flex; left: 0; right: 0; bottom: 0; min-height: 66px; z-index: 40; background: rgba(255,255,255,.96); border-top: 1px solid var(--line); box-shadow: 0 -10px 30px rgba(20,35,29,.07); padding: 6px 5px max(6px, env(safe-area-inset-bottom)); backdrop-filter: blur(14px); overflow-x: auto; }
  .mobile-nav { flex: 1 0 68px; border: 0; background: transparent; color: var(--muted); border-radius: 10px; padding: 5px 2px; font-size: 9px; display: grid; justify-items: center; gap: 3px; cursor: pointer; }
  .mobile-nav.active { color: var(--green); background: var(--green-soft); }
  .mobile-nav .nav-icon { height: 20px; }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal { width: 100%; max-height: 88vh; border-radius: 22px 22px 0 0; }
  .worker-action-grid { grid-template-columns: 1fr; }
  .worker-action-grid .danger-outline { grid-column: auto; }
  .frequent-grid { grid-template-columns: 1fr; }
  .cart-row { grid-template-columns: minmax(0,1fr) 70px 38px 40px; }
  .toast { bottom: 82px; right: 16px; }
  .vehicle-card { grid-template-columns: 44px 1fr; padding: 17px; }
  .vehicle-icon { width: 44px; height: 44px; }
  .van-spotlight { grid-template-columns: 1fr; padding: 22px 18px; }
  .van-main-actions { grid-template-columns: 1fr; min-width: 0; }
  .van-main-actions .hero-action { width: 100%; min-height: 58px; }
  .client-grid,.equipment-grid { grid-template-columns:1fr; }
  .client-hero { display:grid; padding:22px 18px; }
  .client-hero::before { content:""; display:block; width:160px; height:54px; border-radius:9px; background:#fff url("./assets/logo-oficial-electrihogargs.jpg") center/contain no-repeat; grid-column:1/-1; margin-bottom:14px; }
  .client-hero .primary-btn { width:100%; }
  .attendance-toolbar { display:grid; grid-template-columns:1fr; align-items:stretch; }
  .attendance-toolbar .compact-field { min-width:0; }
  .attendance-toolbar button { width:100%; }
  .attendance-table { max-height:none; }
  .native-modal[open] { inset:auto 0 0 0; transform:none; width:100%; max-height:90vh; border-radius:22px 22px 0 0; }
  .logout-dialog[open] { width: 100%; max-width: none; margin: auto 0 0; border-radius: 24px 24px 0 0; }
  .logout-confirm { padding: 23px 18px max(23px,env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; }
  .logout-confirm-actions { display: grid; grid-template-columns: 1fr; }
  .logout-confirm-actions button { width: 100%; min-height: 48px; }
  .logout-confirm-btn { grid-row: 1; }
}

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