:root {
  color-scheme: light;
  --ink: #10201d;
  --muted: #667873;
  --line: #dfe8e5;
  --soft: #f2f7f5;
  --paper: #ffffff;
  --deep: #082a26;
  --deep-2: #0d3b35;
  --green: #11a875;
  --green-light: #36d399;
  --amber: #f7b84b;
  --danger: #b33a3a;
  --shadow: 0 18px 48px rgba(8, 42, 38, .12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--soft); color: var(--ink); }
button, input, select { font: inherit; }
button { cursor: pointer; }

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, .9fr) minmax(460px, 1.1fr);
  background: var(--deep);
}

.login-brand {
  position: relative;
  display: flex;
  min-height: 100vh;
  padding: clamp(32px, 6vw, 88px);
  align-items: flex-end;
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 75% 18%, rgba(54, 211, 153, .30), transparent 26%),
    linear-gradient(145deg, #061f1c 0%, #0d3b35 72%, #0f4c43 100%);
}

.login-brand::before, .login-brand::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 50%;
}
.login-brand::before { width: 520px; height: 520px; top: -190px; right: -180px; }
.login-brand::after { width: 310px; height: 310px; top: -85px; right: -75px; }

.brand-copy { position: relative; z-index: 1; max-width: 620px; }
.brand-mark { display: flex; align-items: center; gap: 14px; margin-bottom: 60px; }
.brand-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--green-light); color: var(--deep); }
.brand-icon svg { width: 27px; height: 27px; }
.brand-name { font-size: .84rem; font-weight: 800; letter-spacing: .16em; }
.brand-copy h1 { margin: 0 0 18px; max-width: 560px; font-size: clamp(2.6rem, 5vw, 5.6rem); line-height: .94; letter-spacing: -.055em; }
.brand-copy p { max-width: 520px; margin: 0; color: #bed5cf; font-size: 1.08rem; line-height: 1.65; }
.accent-line { width: 78px; height: 5px; margin: 28px 0; border-radius: 99px; background: var(--amber); }

.login-panel { display: grid; place-items: center; min-height: 100vh; padding: 32px; background: #fbfdfc; }
.login-card { width: min(440px, 100%); }
.eyebrow { margin: 0 0 10px; color: var(--green); font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.login-card h2 { margin: 0 0 8px; font-size: clamp(2rem, 4vw, 2.7rem); letter-spacing: -.04em; }
.login-card .intro { margin: 0 0 34px; color: var(--muted); line-height: 1.6; }
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 8px; font-size: .9rem; font-weight: 700; }
.input-wrap { position: relative; }
.field input { width: 100%; min-height: 52px; padding: 0 48px 0 16px; border: 1px solid #cad8d4; border-radius: 12px; background: white; color: var(--ink); outline: none; transition: .2s ease; }
.field input:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(17,168,117,.12); }
.input-icon { position: absolute; right: 15px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: #7a8b86; }
.primary-btn { width: 100%; min-height: 52px; border: 0; border-radius: 12px; background: var(--deep); color: white; font-weight: 800; transition: transform .18s ease, background .18s ease; }
.primary-btn:hover { background: var(--deep-2); transform: translateY(-1px); }
.primary-btn:disabled { opacity: .65; transform: none; }
.error { min-height: 24px; margin: 12px 0 0; color: var(--danger); font-size: .88rem; }
.login-note { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; line-height: 1.5; }

.portal { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 20px; color: #e9f6f2; background: var(--deep); }
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 30px; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar-brand .brand-icon { width: 38px; height: 38px; border-radius: 11px; }
.sidebar-brand strong { display: block; font-size: .91rem; }
.sidebar-brand span { color: #95b6ad; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.nav-label { margin: 30px 10px 10px; color: #7fa39a; font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.nav-item { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: #cfe3de; text-align: left; text-decoration: none; }
.nav-item svg { width: 19px; height: 19px; }
.nav-item.active { background: rgba(54,211,153,.14); color: white; }
.nav-item.active svg { color: var(--green-light); }
.sidebar-foot { position: absolute; left: 20px; right: 20px; bottom: 24px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 13px 10px; border-top: 1px solid rgba(255,255,255,.1); }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: rgba(54,211,153,.16); color: var(--green-light); font-weight: 800; text-transform: uppercase; }
.user-chip strong { display: block; font-size: .84rem; }
.user-chip small { color: #8faea6; }
.logout { width: 100%; padding: 9px 10px; border: 0; background: transparent; color: #a9c4bd; text-align: left; font-size: .84rem; }
.logout:hover { color: white; }

.main { min-width: 0; padding: 30px clamp(22px, 4vw, 58px) 56px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 42px; }
.crumb { color: var(--muted); font-size: .88rem; }
.today { padding: 9px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--muted); font-size: .82rem; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.page-head h1 { margin: 0 0 7px; font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -.05em; }
.page-head p { margin: 0; color: var(--muted); }
.count-badge { flex: 0 0 auto; padding: 8px 12px; border-radius: 999px; background: #dbf6ec; color: #087a56; font-size: .82rem; font-weight: 800; }
.toolbar { display: flex; gap: 12px; margin-bottom: 28px; }
.search { position: relative; width: min(430px, 100%); }
.search svg { position: absolute; left: 15px; top: 50%; width: 19px; height: 19px; transform: translateY(-50%); color: #82938e; }
.search input { width: 100%; min-height: 46px; padding: 0 16px 0 44px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); outline: none; }
.search input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(17,168,117,.1); }
.category-block { margin-top: 8px; }
.category-title { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 1.05rem; }
.category-title span { width: 9px; height: 9px; border-radius: 3px; background: var(--amber); }
.report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 370px)); gap: 20px; }
.report-card { position: relative; min-height: 268px; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: 0 8px 24px rgba(8,42,38,.04); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; overflow: hidden; }
.report-card::after { content: ""; position: absolute; width: 160px; height: 160px; right: -70px; top: -70px; border-radius: 50%; background: #e5f7f0; }
.report-card:hover { transform: translateY(-3px); border-color: #b8d9cf; box-shadow: var(--shadow); }
.report-icon { position: relative; z-index: 1; width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 28px; border-radius: 14px; background: var(--deep); color: var(--green-light); }
.report-icon svg { width: 28px; height: 28px; }
.report-card h2 { margin: 0 0 8px; font-size: 1.35rem; letter-spacing: -.02em; }
.report-card p { min-height: 63px; margin: 0 0 22px; color: var(--muted); font-size: .9rem; line-height: 1.55; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.status { color: #087a56; font-size: .78rem; font-weight: 800; }
.open-report { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 13px; border: 0; border-radius: 9px; background: var(--deep); color: white; font-weight: 800; font-size: .82rem; text-decoration: none; }
.open-report:hover { background: var(--deep-2); }
.open-report svg { width: 16px; height: 16px; }
.empty { padding: 36px; border: 1px dashed #bfd1cc; border-radius: 16px; color: var(--muted); text-align: center; background: rgba(255,255,255,.55); }
.mobile-menu { display: none; }

.report-title { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px 20px; margin-bottom: 24px; }
.report-title > a { grid-column: 1 / -1; width: fit-content; color: var(--muted); font-size: .86rem; text-decoration: none; }
.report-title > a:hover { color: var(--green); }
.report-title h1 { margin: 4px 0 7px; font-size: clamp(1.9rem, 4vw, 2.8rem); letter-spacing: -.045em; }
.report-title p { margin: 0; color: var(--muted); }
.source-badge { align-self: center; display: inline-flex; align-items: center; gap: 8px; padding: 7px 8px 7px 12px; border-radius: 999px; background: #dbf6ec; color: #087a56; font-size: .78rem; font-weight: 800; }
.source-badge::after { content: "v1.7"; padding: 4px 8px; border-radius: 999px; background: var(--deep); color: white; font-size: .66rem; letter-spacing: .01em; }
.fuel-panel { border: 1px solid var(--line); border-radius: 16px; background: var(--paper); box-shadow: 0 8px 24px rgba(8,42,38,.04); }
.fuel-filters { padding: 22px; }
.fuel-heading, .detail-tools { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.fuel-heading h2, .detail-tools h2 { margin: 4px 0 0; font-size: 1.1rem; }
.fuel-heading > svg { width: 24px; color: var(--green); }
.text-btn { border: 0; background: transparent; color: var(--muted); font-weight: 750; }
.text-btn:hover { color: var(--green); }
.fuel-filter-layout { display: grid; gap: 17px; margin-top: 20px; }
.fuel-date-row { display: grid; grid-template-columns: repeat(2, minmax(220px, 285px)) minmax(280px, 1fr); align-items: end; gap: 16px; padding-bottom: 17px; border-bottom: 1px solid #e7eeeb; }
.fuel-select-row { display: grid; grid-template-columns: repeat(5, minmax(125px, 1fr)) auto; align-items: end; gap: 13px; }
.fuel-date-row label, .fuel-select-row label { display: grid; gap: 7px; min-width: 0; }
.fuel-date-row label > span, .fuel-select-row label > span { color: #526762; font-size: .79rem; font-weight: 750; }
.fuel-select-row select, .date-control { width: 100%; min-height: 46px; border: 1px solid #d7e1de; border-radius: 10px; background: #fbfdfc; color: var(--ink); }
.fuel-select-row select { padding: 0 12px; }
.date-control { display: flex; align-items: center; gap: 8px; padding: 0 10px; }
.date-control svg { flex: 0 0 auto; width: 17px; color: #78908a; }
.date-control input { width: 100%; min-width: 150px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: .92rem; }
.period-presets { display: grid; gap: 7px; min-width: 0; }
.period-presets > span { color: #526762; font-size: .79rem; font-weight: 750; }
.period-presets > div { display: flex; flex-wrap: wrap; gap: 7px; }
.period-presets button { min-height: 34px; padding: 0 11px; border: 1px solid #d7e1de; border-radius: 9px; background: #f4f8f6; color: #36524b; font-size: .75rem; font-weight: 800; }
.period-presets button:hover { border-color: var(--green); background: #e6f7f1; color: #087a56; }
.active-filters { min-height: 31px; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.filter-hint { color: #7a8d88; font-size: .77rem; }
.active-label { margin-right: 2px; color: #526762; font-size: .76rem; font-weight: 800; }
.filter-chip, .clear-all { min-height: 30px; padding: 0 10px; border-radius: 999px; font-size: .72rem; font-weight: 750; }
.filter-chip { border: 1px solid #a9d9ca; background: #e8f8f2; color: #176a55; }
.filter-chip:hover { background: #d8f3e9; }
.clear-all { border: 0; background: transparent; color: #a33b32; }
.clear-all:hover { background: #fff0ee; }
.query-btn { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 21px; border: 0; border-radius: 10px; background: var(--deep); color: white; font-weight: 800; }
.query-btn:hover { background: var(--deep-2); }
.query-btn:disabled { opacity: .6; cursor: wait; }
.query-btn svg { width: 18px; }
.report-error { display: flex; gap: 10px; margin-top: 14px; padding: 13px 16px; border: 1px solid #efc4bd; border-radius: 11px; background: #fff2f0; color: #96372e; }
.comparison-strip { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 14px 1px -3px; color: #526762; font-size: .76rem; }
.comparison-strip > div { display: flex; align-items: center; gap: 8px; }
.comparison-strip strong { color: var(--deep); }
.interaction-note { padding: 5px 9px; border-radius: 999px; background: #e6f7f1; color: #087a56; font-weight: 750; }
.fuel-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin: 15px 0; }
.fuel-metric { min-height: 125px; display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); }
.fuel-metric > div { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; background: #e9f1ee; color: var(--deep-2); }
.fuel-metric svg { width: 22px; }
.fuel-metric p { margin: 0; color: var(--muted); font-size: .79rem; font-weight: 700; }
.fuel-metric strong { display: block; margin-top: 6px; color: var(--ink); font-size: clamp(1rem, 1.5vw, 1.35rem); }
.metric-change { display: block; width: fit-content; margin-top: 7px; padding: 3px 7px; border-radius: 999px; font-size: .64rem; font-weight: 800; white-space: nowrap; }
.metric-change.up { background: #e1f7ef; color: #087a56; }
.metric-change.down { background: #fff0e2; color: #a35b14; }
.metric-change.neutral { background: #edf2f0; color: #71857f; }
.quality-panel { margin-bottom: 15px; padding: 21px; }
.quality-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.quality-heading h2 { margin: 4px 0 5px; font-size: 1.1rem; }
.quality-heading p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: .8rem; }
.quality-total { padding: 6px 10px; border-radius: 999px; background: #fff0ee; color: #a33b32; font-size: .72rem; font-weight: 850; }
.quality-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 17px; }
.quality-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 3px 16px; padding: 15px 17px; border: 1px solid; border-radius: 13px; text-align: left; }
.quality-card span { font-size: .81rem; font-weight: 850; }
.quality-card strong { grid-row: 1 / 3; grid-column: 2; font-size: 1.8rem; }
.quality-card small { font-size: .72rem; }
.quality-card.danger { border-color: #f2c2bc; background: #fff4f2; color: #9a3028; }
.quality-card.warning { border-color: #f0d2a4; background: #fff8eb; color: #986018; }
.quality-card:hover, .quality-card.selected { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(8,42,38,.08); }
.quality-card.selected { outline: 2px solid currentColor; outline-offset: 1px; }
.capture-control-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 15px; margin-bottom: 15px; }
.capture-control-grid .compact-panel { min-height: 0; margin: 0; padding: 17px; }
.capture-control-grid .quality-cards { margin-top: 12px; }
.capture-control-grid .quality-card { padding: 11px 13px; }
.capture-control-grid .quality-card strong { font-size: 1.45rem; }
.capture-control-grid .status-panel { grid-column: auto; min-height: 0; }
.capture-control-grid .status-chart { margin-top: 13px; }
.capture-control-grid .status-stack { height: 14px; }
.capture-control-grid .status-list { margin-top: 10px; }
.capture-control-grid .status-row { padding: 7px 8px; }
.capture-control-grid .status-total { margin-top: 9px; }
.whatsapp-panel { margin-bottom: 15px; padding: 18px 21px; border-color: #b8decf; background: linear-gradient(135deg, #f8fffc, #edf9f4); }
.whatsapp-heading { display: flex; align-items: center; gap: 13px; }
.whatsapp-heading h2 { margin: 3px 0; font-size: 1.08rem; }
.whatsapp-heading p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: .78rem; }
.whatsapp-mark { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: #1fae72; color: white; font-size: 1.1rem; font-weight: 900; }
.whatsapp-state { margin-left: auto; padding: 6px 10px; border-radius: 999px; font-size: .7rem; font-weight: 850; white-space: nowrap; }
.whatsapp-state.active { background: #d9f5e9; color: #087a56; }
.whatsapp-state.ready { background: #fff1d7; color: #986018; }
.whatsapp-state.pending { background: #e9efed; color: #5d726c; }
.whatsapp-content { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto; align-items: end; gap: 12px; margin-top: 14px; }
.whatsapp-schedule { display: grid; gap: 3px; padding: 10px 12px; border: 1px solid #d5e9e1; border-radius: 10px; background: rgba(255,255,255,.75); }
.whatsapp-schedule strong { font-size: .78rem; }
.whatsapp-schedule span { color: #087a56; font-size: .77rem; font-weight: 800; }
.whatsapp-schedule small { color: var(--muted); font-size: .68rem; }
.whatsapp-actions { display: flex; gap: 7px; }
.whatsapp-actions button { min-height: 39px; padding: 0 11px; border: 1px solid #add9ca; border-radius: 9px; background: white; color: #087a56; font-size: .72rem; font-weight: 850; }
.whatsapp-actions button:hover:not(:disabled) { background: #daf5ea; }
.whatsapp-actions button:disabled { opacity: .48; cursor: not-allowed; }
.whatsapp-message { margin: 10px 0 0; color: #61766f; font-size: .72rem; }
.notification-page-head { align-items: center; }
.notification-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.notification-summary article { min-height: 92px; display: flex; align-items: center; gap: 13px; padding: 17px 19px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); }
.notification-summary article > span { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; background: #e7f5f0; color: var(--deep); font-weight: 900; }
.notification-summary article > span svg { width: 21px; }
.notification-summary article > .summary-whatsapp { border-radius: 50%; background: #1fae72; color: white; }
.notification-summary small { display: block; margin-bottom: 5px; color: var(--muted); font-size: .72rem; }
.notification-summary strong { font-size: 1rem; }
.notification-report { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: 0 10px 30px rgba(8,42,38,.06); }
.notification-report-head { display: flex; align-items: center; gap: 15px; padding: 22px 24px; border-bottom: 1px solid var(--line); background: linear-gradient(135deg, #fbfffd, #edf9f4); }
.notification-report-icon { width: 48px; height: 48px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 13px; background: var(--deep); color: var(--green-light); }
.notification-report-icon svg { width: 25px; }
.notification-report-head h2 { margin: 2px 0 4px; font-size: 1.28rem; }
.notification-report-head p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: .79rem; }
.notification-rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 20px 24px; }
.notification-rule { padding: 18px; border: 1px solid #dce7e3; border-radius: 14px; background: #fbfdfc; }
.rule-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.rule-title strong { display: block; margin-bottom: 4px; font-size: .94rem; }
.rule-title small { color: var(--muted); font-size: .72rem; }
.switch { position: relative; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span { width: 44px; height: 24px; display: block; border-radius: 99px; background: #b9c8c4; transition: .2s ease; }
.switch span::after { content: ""; position: absolute; width: 18px; height: 18px; top: 3px; left: 3px; border-radius: 50%; background: white; box-shadow: 0 2px 5px rgba(0,0,0,.2); transition: .2s ease; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid rgba(17,168,117,.2); }
.schedule-field { display: grid; gap: 7px; margin-top: 13px; }
.schedule-field > span { color: #526762; font-size: .74rem; font-weight: 800; }
.schedule-field input, .schedule-field select { width: 100%; min-height: 43px; padding: 0 11px; border: 1px solid #d5e1dd; border-radius: 10px; background: white; color: var(--ink); outline: none; }
.schedule-field input:focus, .schedule-field select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(17,168,117,.1); }
.weekly-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.day-picker { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.day-check { position: relative; }
.day-check input { position: absolute; opacity: 0; pointer-events: none; }
.day-check span { min-height: 34px; display: grid; place-items: center; border: 1px solid #d5e1dd; border-radius: 8px; background: white; color: #61756f; font-size: .68rem; font-weight: 800; cursor: pointer; }
.day-check input:checked + span { border-color: var(--green); background: #dcf6ec; color: #087a56; }
.day-check input:focus-visible + span { outline: 3px solid rgba(17,168,117,.2); }
.notification-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 24px; border-top: 1px solid var(--line); background: #f8fbfa; }
.notification-actions p { margin: 0; color: var(--muted); font-size: .75rem; line-height: 1.45; }
.notification-actions > div { display: flex; flex: 0 0 auto; gap: 8px; }
.primary-action, .secondary-action { min-height: 40px; padding: 0 13px; border-radius: 9px; font-size: .73rem; font-weight: 850; }
.primary-action { border: 0; background: var(--deep); color: white; }
.primary-action:hover { background: var(--deep-2); }
.secondary-action { border: 1px solid #b7d9ce; background: white; color: #087a56; }
.secondary-action:hover:not(:disabled) { background: #e5f7f0; }
.primary-action:disabled, .secondary-action:disabled { opacity: .5; cursor: not-allowed; }
.notification-future { display: flex; align-items: center; gap: 13px; margin-top: 16px; padding: 17px 20px; border: 1px dashed #b7cbc5; border-radius: 14px; color: #536b65; }
.notification-future > div:first-child { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; background: #e8f1ee; color: var(--deep); }
.notification-future svg { width: 19px; }
.notification-future strong { display: block; color: var(--ink); font-size: .82rem; }
.notification-future p { margin: 3px 0 0; font-size: .74rem; }
.fuel-metric.featured { background: var(--green-light); border-color: var(--green-light); }
.fuel-metric.featured > div { background: var(--deep); color: var(--green-light); }
.fuel-metric.featured p { color: #1c5549; }
.fuel-metric.reserve { background: #eef6ff; border-color: #d5e7f9; }
.fuel-metric.reserve > div { background: #dcecff; color: #35689b; }
.fuel-metric.total { background: #f0f7f4; border-color: #d4e8df; }
.fuel-metric.total > div { background: #dbece5; color: var(--deep-2); }
.fuel-chart-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); gap: 15px; margin-bottom: 15px; }
.chart-panel { min-height: 350px; padding: 21px; }
.status-panel { grid-column: 1 / -1; min-height: 260px; }
.status-chart { margin-top: 25px; }
.status-stack { width: 100%; height: 22px; display: flex; gap: 3px; overflow: hidden; border-radius: 999px; background: #edf2f0; }
.status-segment { min-width: 12px; height: 100%; border: 0; opacity: .9; }
.status-segment.accepted, .status-row i.accepted { background: #24be88; }
.status-segment.editing, .status-row i.editing { background: #f2ae3d; }
.status-segment.rejected, .status-row i.rejected { background: #df665d; }
.status-segment.other, .status-row i.other { background: #6d8c84; }
.status-segment:hover, .status-segment.selected { opacity: 1; filter: brightness(.82); }
.status-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 9px; margin-top: 18px; }
.status-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 10px 11px; border: 1px solid #dce6e3; border-radius: 10px; background: #fbfdfc; color: var(--ink); text-align: left; }
.status-row:hover, .status-row.selected { border-color: #9ecfbe; background: #ecf8f4; }
.status-row i { width: 10px; height: 10px; border-radius: 3px; }
.status-row span { overflow: hidden; font-size: .79rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.status-row strong { font-size: 1rem; }
.status-row small { color: var(--muted); font-size: .67rem; }
.status-total { margin: 15px 0 0; color: var(--muted); font-size: .76rem; }
.status-total strong { color: var(--ink); font-size: 1rem; }
.chart-note { margin: 5px 0 0; color: var(--muted); font-size: .78rem; }
.chart-fullscreen { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid #d8e4e0; border-radius: 9px; background: #f4f8f6; color: var(--deep); font-size: 1.15rem; }
.chart-fullscreen:hover { border-color: var(--green); background: #e6f7f1; }
.chart-panel:fullscreen { padding: 34px; background: var(--paper); overflow: auto; }
.chart-panel:fullscreen .trend-chart svg { height: min(68vh, 650px); }
.chart-panel:fullscreen .donut-layout { min-height: 70vh; grid-template-columns: minmax(240px, 430px) minmax(260px, 1fr); }
.chart-panel:fullscreen .fuel-bars { max-width: 1100px; margin: 45px auto 0; gap: 22px; }
.trend-chart { margin-top: 17px; }
.trend-chart svg { display: block; width: 100%; height: 255px; overflow: visible; }
.trend-grid line { stroke: #e5ece9; stroke-width: 1; }
.trend-grid text { fill: #71857f; font-size: 11px; }
.trend-area { fill: rgba(37,207,152,.13); }
.trend-line { fill: none; stroke: var(--green); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.trend-chart circle { fill: white; stroke: var(--green); stroke-width: 3; cursor: pointer; transition: r .15s ease, fill .15s ease; }
.trend-chart circle:hover, .trend-chart circle.selected { r: 8; fill: var(--green-light); stroke: var(--deep); }
.donut-layout { min-height: 255px; display: grid; grid-template-columns: minmax(145px, 185px) 1fr; align-items: center; gap: 24px; margin-top: 17px; }
.donut { position: relative; width: 100%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; }
.donut svg { width: 100%; height: 100%; overflow: visible; }
.donut-track { stroke: #edf2f0; }
.donut-segment { cursor: pointer; transition: stroke-width .15s ease, opacity .15s ease; }
.donut-segment:hover, .donut-segment.selected { stroke-width: 10; opacity: .88; }
.donut > div { position: absolute; width: 53%; aspect-ratio: 1; display: grid; place-content: center; border-radius: 50%; background: white; text-align: center; box-shadow: 0 4px 18px rgba(8,42,38,.09); pointer-events: none; }
.donut > div strong { font-size: clamp(1rem, 2vw, 1.45rem); line-height: 1.05; }
.donut > div span { margin-top: 3px; color: var(--muted); font-size: .72rem; }
.donut-legend { display: grid; gap: 12px; min-width: 0; }
.donut-legend-row { width: 100%; display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 7px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: inherit; font-size: .78rem; text-align: left; }
button.donut-legend-row:hover, .donut-legend-row.selected { border-color: #b9dfd3; background: #edf9f5; }
.donut-legend i { width: 10px; height: 10px; border-radius: 3px; }
.donut-legend span { overflow: hidden; color: #48605a; text-overflow: ellipsis; white-space: nowrap; }
.donut-legend strong { color: var(--ink); }
.fuel-bars { display: grid; gap: 14px; margin-top: 21px; }
.fuel-bar { width: 100%; display: block; padding: 8px 9px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: inherit; text-align: left; }
.fuel-bar:hover, .fuel-bar.selected { border-color: #b9dfd3; background: #edf9f5; }
.fuel-bar .bar-copy { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 7px; font-size: .84rem; }
.fuel-bar em { display: block; height: 9px; overflow: hidden; border-radius: 99px; background: #edf2f0; }
.fuel-bar em i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--deep-2), var(--green), var(--green-light)); }
.detail-panel { overflow: hidden; }
.detail-tools { padding: 19px 21px 15px; border-bottom: 1px solid var(--line); }
.detail-actions { display: flex; align-items: center; gap: 8px; }
.report-search { min-height: 40px; width: min(310px, 30vw); display: flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid #d7e1de; border-radius: 10px; background: #fbfdfc; }
.report-search svg { flex: 0 0 auto; width: 17px; color: #78908a; }
.report-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; }
.detail-actions button { min-height: 40px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; border: 1px solid #d7e1de; border-radius: 10px; background: #f2f7f5; color: var(--deep); font-weight: 800; }
.detail-actions button svg { width: 17px; }
.fuel-table-wrap { max-height: 600px; overflow: auto; }
.fuel-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.fuel-table th { position: sticky; top: 0; z-index: 1; padding: 12px 13px; border-bottom: 1px solid var(--line); background: #f2f6f4; color: #5c716b; font-size: .72rem; text-align: left; text-transform: uppercase; }
.fuel-table td { padding: 12px 13px; border-bottom: 1px solid #e9efed; color: #314742; font-size: .8rem; }
.fuel-table tbody tr:hover { background: #f8fbfa; }
.cell-number { text-align: right; }
.cell-strong { font-weight: 800; }
.unit-pill { display: inline-flex; padding: 4px 8px; border-radius: 7px; background: #e8f1ee; font-weight: 800; }
.status-pill { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: .68rem; font-weight: 850; }
.status-pill.accepted { background: #dcf6ec; color: #087a56; }
.status-pill.editing { background: #fff1d7; color: #986018; }
.status-pill.other { background: #e9efed; color: #536b65; }
.fuel-table tr.row-warning { background: #fff9ef; }
.fuel-table tr.row-warning:hover { background: #fff3dd; }
.zero-value { color: #b73d34 !important; background: #fff0ee; font-weight: 900; }
.cell-supplied { color: #087a56 !important; font-weight: 850; }
.cell-reserve { color: #35689b !important; }
.report-empty { min-height: 145px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; color: #71857f; text-align: center; }
.report-empty svg { width: 25px; color: #9ab1aa; }
.report-empty span { font-size: .81rem; }
.table-skeleton { display: block; width: 100%; height: 10px; border-radius: 99px; background: #e4ebe8; }

@media (max-width: 820px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { min-height: 300px; padding: 32px; align-items: center; }
  .brand-mark { margin-bottom: 36px; }
  .brand-copy h1 { font-size: 3rem; }
  .brand-copy p { display: none; }
  .login-panel { min-height: auto; padding: 44px 24px 64px; }
  .portal { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 30; width: 260px; transform: translateX(-105%); transition: transform .25s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .mobile-menu { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px; background: white; }
  .mobile-menu svg { width: 21px; height: 21px; }
  .main { padding: 20px 18px 42px; }
  .topbar { margin-bottom: 30px; }
  .page-head { align-items: flex-start; }
  .today { display: none; }
  .report-grid { grid-template-columns: 1fr; }
  .report-title { grid-template-columns: 1fr; }
  .source-badge { width: fit-content; }
  .fuel-date-row, .fuel-select-row { grid-template-columns: 1fr 1fr; }
  .period-presets { grid-column: 1 / -1; }
  .fuel-select-row .query-btn { grid-column: 1 / -1; }
  .fuel-metrics { grid-template-columns: 1fr 1fr; }
  .fuel-chart-grid { grid-template-columns: 1fr; }
  .capture-control-grid { grid-template-columns: 1fr; }
  .whatsapp-content { grid-template-columns: 1fr 1fr; }
  .whatsapp-actions { grid-column: 1 / -1; }
  .notification-summary { grid-template-columns: 1fr; }
  .notification-rules { grid-template-columns: 1fr; }
  .notification-actions { align-items: flex-start; flex-direction: column; }
  .notification-actions > div { width: 100%; flex-wrap: wrap; }
  .comparison-strip { align-items: flex-start; flex-direction: column; gap: 7px; }
  .detail-tools { align-items: flex-start; flex-direction: column; }
  .detail-actions { width: 100%; flex-wrap: wrap; }
  .report-search { width: 100%; }
}

@media (max-width: 480px) {
  .login-brand { min-height: 240px; }
  .brand-copy h1 { font-size: 2.45rem; }
  .page-head { display: block; }
  .count-badge { display: inline-block; margin-top: 14px; }
  .fuel-date-row, .fuel-select-row, .fuel-metrics { grid-template-columns: 1fr; }
  .quality-cards { grid-template-columns: 1fr; }
  .quality-heading { flex-direction: column; }
  .whatsapp-heading { align-items: flex-start; flex-wrap: wrap; }
  .whatsapp-state { margin-left: 0; }
  .whatsapp-content { grid-template-columns: 1fr; }
  .whatsapp-actions { grid-column: auto; flex-direction: column; }
  .notification-report-head { align-items: flex-start; flex-wrap: wrap; }
  .notification-report-head .whatsapp-state { margin-left: 0; }
  .notification-rules { padding: 15px; }
  .weekly-fields { grid-template-columns: 1fr; }
  .day-picker { grid-template-columns: repeat(4, 1fr); }
  .notification-actions > div { display: grid; }
  .period-presets { grid-column: auto; }
  .date-control input { min-width: 0; }
  .donut-layout { grid-template-columns: 1fr; justify-items: center; }
  .donut { width: min(190px, 70vw); }
  .donut-legend { width: 100%; }
}

@media print {
  .sidebar, .topbar, .fuel-filters, .detail-actions, .report-title > a, .source-badge, .whatsapp-panel { display: none !important; }
  .portal { display: block; }
  .main { padding: 0; }
  .fuel-metrics { grid-template-columns: repeat(3, 1fr); }
  .fuel-metric { min-height: 80px; padding: 9px; }
  .fuel-metric > div { display: none; }
  .fuel-chart-grid { display: none; }
  .fuel-table-wrap { max-height: none; overflow: visible; }
  .fuel-table th { position: static; }
  .fuel-panel { box-shadow: none; }
}
.user-admin-grid { display:grid; grid-template-columns:minmax(230px,1fr) minmax(300px,2fr); gap:20px; padding:0 24px 32px; }
.user-admin-panel { padding:24px; display:flex; flex-direction:column; gap:14px; }
.user-admin-panel h2,.user-admin-panel h3 { margin:0; }
.user-admin-panel label:not(.permission-option) { display:flex; flex-direction:column; gap:6px; font-weight:600; }
.user-admin-panel input:not([type=checkbox]) { width:100%; padding:11px 12px; border:1px solid #cbd5e1; border-radius:8px; background:#fff; color:#14243b; }
.user-admin-list { display:flex; flex-direction:column; gap:8px; }
.user-entry { text-align:left; border:1px solid #d9e3ea; border-radius:9px; background:#fff; padding:12px; cursor:pointer; display:flex; flex-direction:column; gap:3px; color:#17324c; }
.user-entry span { font-size:13px; color:#607387; }
.permission-list { display:grid; gap:8px; }
.permission-option { display:flex; align-items:center; gap:10px; cursor:pointer; }
.permission-option input { width:17px; height:17px; }
#user-form-message { min-height:20px; margin:0; color:#176143; }
@media(max-width:800px) { .user-admin-grid { grid-template-columns:1fr; padding:0 16px 24px; } }

.vale-save-confirmation { color: #34d399; margin: 12px 0; }

/* Encabezado limpio del formulario de despacho. */
.page-head.vale-capture-head { display: grid; grid-template-columns: 1fr; gap: 8px; }
.vale-capture-head .vale-title { width: 100%; text-align: center; }
.vale-capture-head .vale-title h1 { margin: 0; text-align: center; }
.vale-capture-head #vale-back { justify-self: end; }

/* Título integrado al panel principal de captura. */
.vale-form-heading { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-bottom: 20px; }
.vale-form-heading h1 { grid-column: 2; text-align: center; margin: 0; }
.vale-form-heading #vale-back { grid-column: 3; justify-self: end; }
@media (max-width: 640px) {
 .vale-form-heading { grid-template-columns: 1fr; gap: 10px; }
 .vale-form-heading h1 { grid-column: 1; }
 .vale-form-heading #vale-back { grid-column: 1; justify-self: end; }
}

.routes-panel { padding: 24px; }
.routes-panel > label { display: grid; gap: 8px; max-width: 440px; margin: 18px 0; }
.routes-panel input { min-height: 46px; padding: 10px 12px; border-radius: 10px; border: 1px solid #718f83; font: inherit; }
.route-liters-input { width: 170px; max-width: 100%; }
.route-alert-panel { padding: 22px; margin-bottom: 20px; }
.route-alert-panel li { margin: 10px 0; }
.route-capture-note { font-size: .9rem; color: #aac6bc; margin: 12px 0; }

.install-app-button { position: fixed; right: 18px; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 1000; background: #36d399; color: #071512; padding: 14px 20px; border: 0; border-radius: 14px; font: 700 16px system-ui; box-shadow: 0 6px 24px #0006; cursor: pointer; }
@media (display-mode: standalone) { .install-app-button { display: none; } }
