:root {
  color-scheme: light;
  --navy: #032456;
  --navy-strong: #021b42;
  --navy-soft: #0d376f;
  --yellow: #feeb3e;
  --yellow-soft: #fff9bf;
  --white: #fefefe;
  --canvas: #f5f7fa;
  --surface: #ffffff;
  --ink: #14213d;
  --ink-soft: #506077;
  --muted: #78869a;
  --line: #e3e8ef;
  --line-strong: #d4dce7;
  --green: #18835b;
  --green-soft: #e7f6ef;
  --red: #b83a3a;
  --red-soft: #fff0ef;
  --amber: #9a6810;
  --amber-soft: #fff7d9;
  --blue-soft: #eaf1fb;
  --shadow-sm: 0 5px 18px rgb(3 36 86 / 6%);
  --shadow-md: 0 18px 50px rgb(3 36 86 / 10%);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --sidebar-width: 264px;
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; background: var(--canvas); }
body.nav-open { overflow: hidden; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { cursor: pointer; }
svg { display: block; fill: currentColor; }

:focus-visible { outline: 3px solid rgb(254 235 62 / 80%); outline-offset: 3px; }
.skip-link { position: fixed; z-index: 1000; top: 12px; left: 12px; transform: translateY(-150%); padding: 10px 14px; border-radius: 8px; color: var(--navy); background: var(--yellow); font-weight: 800; text-decoration: none; }
.skip-link:focus { transform: translateY(0); }
.sr-only, .file-input { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
[hidden] { display: none !important; }

/* Login */
.auth-page { background: var(--white); }
.auth-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(480px, 1.05fr) minmax(440px, .95fr); }
.auth-brand-panel { position: relative; isolation: isolate; min-height: 100vh; overflow: hidden; color: var(--white); background: linear-gradient(145deg, var(--navy-strong), var(--navy) 70%, #07336c); }
.auth-brand-panel::before, .auth-brand-panel::after { content: ""; position: absolute; z-index: -1; width: 270px; height: 270px; border: 2px solid rgb(254 235 62 / 38%); }
.auth-brand-panel::before { top: -150px; left: -130px; border-radius: 0 0 80px; }
.auth-brand-panel::after { right: -145px; bottom: -150px; border-radius: 80px 0 0; }
.auth-brand-glow { position: absolute; z-index: -2; border-radius: 50%; filter: blur(4px); }
.auth-brand-glow-one { width: 420px; height: 420px; top: -210px; right: -120px; background: radial-gradient(circle, rgb(254 235 62 / 11%), transparent 68%); }
.auth-brand-glow-two { width: 480px; height: 480px; left: -240px; bottom: -250px; background: radial-gradient(circle, rgb(59 111 179 / 25%), transparent 68%); }
.auth-brand-content { width: min(620px, calc(100% - 96px)); min-height: 100vh; margin: auto; padding: 58px 0 46px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-brand-logo { width: 238px; min-height: 106px; display: grid; place-items: center; }
.auth-brand-logo img { width: 220px; height: auto; }
.auth-brand-message { max-width: 540px; padding: 64px 0; }
.brand-kicker, .section-kicker { color: var(--navy); font-size: 11px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.auth-brand-message .brand-kicker { color: var(--yellow); }
.auth-brand-message h1 { max-width: 530px; margin: 14px 0 18px; font-size: clamp(38px, 4.2vw, 64px); line-height: 1.03; letter-spacing: -.045em; }
.auth-brand-message p { max-width: 460px; margin: 0; color: rgb(255 255 255 / 72%); font-size: 18px; line-height: 1.65; }
.auth-client-lockup { display: flex; align-items: center; gap: 20px; }
.auth-client-lockup > span:first-child { color: rgb(255 255 255 / 56%); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.auth-client-logo { width: 144px; height: 60px; display: grid; place-items: center; overflow: hidden; padding: 5px 10px; border-radius: 10px; background: var(--white); }
.auth-client-logo img { width: 124px; height: 48px; object-fit: cover; }
.auth-stage { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 26px; padding: 48px; background: radial-gradient(circle at 80% 5%, #eef4fb, transparent 30%), var(--white); }
.form-box { width: min(100%, 450px); overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); color: var(--ink); background: var(--surface); box-shadow: var(--shadow-md); }
.mobile-brand-lockup { display: none; }
.login-form { display: flex; flex-direction: column; gap: 24px; padding: 42px 42px 34px; }
.form-heading { display: grid; gap: 8px; text-align: left; }
.form-heading .title { color: var(--navy); font-size: 32px; font-weight: 850; letter-spacing: -.035em; }
.form-heading .subtitle { color: var(--ink-soft); font-size: 15px; line-height: 1.5; }
.form-container { display: grid; gap: 18px; }
.input-group, .field-group { display: grid; gap: 8px; color: var(--ink); font-size: 13px; font-weight: 800; }
.input-shell { position: relative; display: flex; align-items: center; }
.input-shell > svg { position: absolute; left: 15px; width: 19px; height: 19px; color: #7890ad; pointer-events: none; }
.input, .field-group > input, .field-group select, .password-field input, .search-field input { width: 100%; min-height: 48px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); color: var(--ink); background: var(--surface); outline: 0; transition: border-color .2s, box-shadow .2s, background .2s; }
.input { padding: 11px 48px 11px 46px; }
.input::placeholder, .field-group input::placeholder, .search-field input::placeholder { color: #9aa6b6; }
.input:hover, .field-group input:hover, .field-group select:hover, .search-field input:hover { border-color: #aebbc9; }
.input:focus, .field-group input:focus, .field-group select:focus, .search-field input:focus { border-color: var(--navy-soft); box-shadow: 0 0 0 4px rgb(3 36 86 / 9%); }
.password-toggle { position: absolute; top: 50%; right: 9px; width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 8px; color: #6f8096; background: transparent; transform: translateY(-50%); }
.password-toggle:hover { color: var(--navy); background: #f0f4f8; }
.password-toggle svg { width: 20px; height: 20px; }
.password-toggle .eye-closed { display: none; }
.password-toggle.is-visible .eye-open { display: none; }
.password-toggle.is-visible .eye-closed { display: block; }
.primary-button, .button-link { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 11px 18px; border: 1px solid var(--navy); border-radius: var(--radius-sm); color: var(--white); background: var(--navy); font-weight: 850; text-decoration: none; box-shadow: 0 7px 18px rgb(3 36 86 / 12%); transition: transform .18s, background .18s, box-shadow .18s; }
.primary-button:hover, .button-link:hover { transform: translateY(-1px); background: var(--navy-soft); box-shadow: 0 10px 24px rgb(3 36 86 / 17%); }
.primary-button svg, .button-link svg { width: 19px; height: 19px; }
.primary-button:disabled { cursor: wait; opacity: .72; transform: none; }
.login-button { width: 100%; min-height: 50px; }
.form-section { padding: 18px 42px; border-top: 1px solid var(--line); text-align: center; background: #f8fafc; }
.recovery-trigger { padding: 5px; border: 0; color: var(--navy); background: transparent; font-size: 13px; font-weight: 850; }
.recovery-trigger:hover { text-decoration: underline; }
.recovery-help { margin: 8px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }
.auth-copyright { margin: 0; color: var(--muted); font-size: 12px; }

.alert { display: flex; align-items: flex-start; gap: 11px; padding: 13px 15px; border: 1px solid #ffd5d2; border-radius: var(--radius-sm); color: #8f2d2d; background: var(--red-soft); font-size: 13px; line-height: 1.45; }
.alert svg { flex: 0 0 auto; width: 19px; height: 19px; margin-top: 1px; }
.alert span { display: grid; gap: 3px; }
.alert-spaced { margin: 20px 0; }

/* Application shell */
.portal-page { background: var(--canvas); }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 50; inset: 0 auto 0 0; width: var(--sidebar-width); display: flex; flex-direction: column; overflow-y: auto; color: var(--white); background: linear-gradient(180deg, var(--navy-strong), var(--navy)); box-shadow: 12px 0 40px rgb(3 36 86 / 8%); }
.sidebar-brand { padding: 26px 22px 20px; }
.brand-mark { min-height: 82px; display: grid; place-items: center; text-decoration: none; }
.brand-mark img { width: 180px; height: auto; }
.client-brand { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.client-brand > span { color: rgb(255 255 255 / 48%); font-size: 9px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.client-brand img { width: 92px; height: 40px; border-radius: 7px; object-fit: cover; background: var(--white); }
.sidebar-nav { display: grid; gap: 5px; padding: 20px 14px; border-top: 1px solid rgb(255 255 255 / 8%); }
.nav-item { position: relative; display: flex; align-items: center; gap: 13px; min-height: 48px; padding: 10px 14px; border-radius: 11px; color: rgb(255 255 255 / 68%); font-size: 14px; font-weight: 750; text-decoration: none; transition: color .18s, background .18s, transform .18s; }
.nav-item svg { width: 20px; height: 20px; }
.nav-item:hover { color: var(--white); background: rgb(255 255 255 / 8%); transform: translateX(2px); }
.nav-item.active { color: var(--navy); background: var(--yellow); box-shadow: 0 8px 20px rgb(0 0 0 / 15%); }
.nav-item.active::before { content: ""; position: absolute; left: -14px; width: 3px; height: 26px; border-radius: 0 4px 4px 0; background: var(--yellow); }
.sidebar-footer { margin-top: auto; padding: 18px 18px 22px; border-top: 1px solid rgb(255 255 255 / 9%); }
.user-summary { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.avatar { flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: var(--navy); background: var(--yellow); font-size: 12px; font-weight: 900; }
.user-summary-copy { min-width: 0; display: grid; gap: 3px; }
.user-summary-copy strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.user-summary-copy small { color: rgb(255 255 255 / 52%); font-size: 11px; }
.logout-button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid rgb(255 255 255 / 10%); border-radius: 9px; color: rgb(255 255 255 / 70%); background: rgb(255 255 255 / 5%); font-size: 12px; font-weight: 750; }
.logout-button:hover { color: var(--white); background: rgb(255 255 255 / 10%); }
.logout-button svg { width: 17px; height: 17px; }
.secure-label { display: flex; align-items: center; gap: 7px; margin-top: 15px; color: rgb(255 255 255 / 35%); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.secure-label i { width: 6px; height: 6px; border-radius: 50%; background: #54c794; box-shadow: 0 0 0 3px rgb(84 199 148 / 14%); }
.nav-scrim, .menu-toggle { display: none; }
.app-main { min-height: 100vh; margin-left: var(--sidebar-width); }
.content-header { position: sticky; z-index: 30; top: 0; height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(24px, 4vw, 56px); border-bottom: 1px solid var(--line); background: rgb(255 255 255 / 92%); box-shadow: 0 3px 14px rgb(3 36 86 / 3%); backdrop-filter: blur(14px); }
.header-copy { display: grid; gap: 3px; }
.header-copy span { color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.header-copy strong { color: var(--navy); font-size: 18px; letter-spacing: -.015em; }
.header-client { width: 108px; height: 44px; display: grid; place-items: center; overflow: hidden; border-radius: 8px; }
.header-client img { width: 108px; height: 44px; object-fit: cover; }
.content { width: min(1240px, calc(100% - clamp(48px, 8vw, 112px))); margin: 0 auto; padding: 40px 0 64px; }
.content-narrow { max-width: 1020px; }

/* Shared surfaces */
.surface { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.welcome-panel { position: relative; isolation: isolate; min-height: 180px; display: flex; align-items: center; justify-content: space-between; gap: 32px; overflow: hidden; padding: 34px 38px; border-radius: var(--radius-lg); color: var(--white); background: linear-gradient(125deg, var(--navy-strong), var(--navy) 70%, #0c3a78); box-shadow: var(--shadow-md); }
.welcome-panel::after { content: ""; position: absolute; z-index: -1; right: -90px; top: -120px; width: 330px; height: 330px; border: 1px solid rgb(254 235 62 / 22%); border-radius: 50%; box-shadow: 0 0 0 55px rgb(254 235 62 / 3%), 0 0 0 110px rgb(254 235 62 / 3%); }
.welcome-panel .section-kicker { color: var(--yellow); }
.welcome-panel h1 { margin: 8px 0 9px; font-size: clamp(28px, 3vw, 42px); line-height: 1.08; letter-spacing: -.04em; }
.welcome-panel p { margin: 0; color: rgb(255 255 255 / 68%); font-size: 15px; }
.welcome-symbol { flex: 0 0 auto; width: 100px; height: 100px; display: grid; place-items: center; border: 1px solid rgb(255 255 255 / 10%); border-radius: 28px; color: var(--yellow); background: rgb(255 255 255 / 6%); transform: rotate(-4deg); }
.welcome-symbol img { width: 82px; height: 68px; object-fit: contain; }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; }
.summary-card { min-height: 106px; display: flex; align-items: center; gap: 16px; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.summary-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; }
.summary-icon svg { width: 22px; height: 22px; }
.summary-icon.navy { color: var(--navy); background: var(--blue-soft); }
.summary-icon.green { color: var(--green); background: var(--green-soft); }
.summary-icon.yellow { color: #7d6300; background: var(--yellow-soft); }
.summary-card > span:last-child { display: grid; gap: 3px; }
.summary-card small { color: var(--muted); font-size: 11px; font-weight: 700; }
.summary-card strong { color: var(--navy); font-size: 28px; line-height: 1; }
.content-section { margin-top: 42px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.section-heading h2 { margin: 5px 0 0; color: var(--navy); font-size: 23px; letter-spacing: -.025em; }
.text-link { color: var(--navy); font-size: 13px; font-weight: 850; text-decoration: none; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Dashboard */
.module-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.module-card { min-height: 290px; display: flex; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .2s, border-color .2s, box-shadow .2s; }
.module-card:hover { transform: translateY(-3px); border-color: #cbd5e1; box-shadow: var(--shadow-md); }
.module-card-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.module-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 15px; color: var(--navy); background: var(--blue-soft); }
.module-planilha-custos .module-icon { color: var(--green); background: var(--green-soft); }
.module-relatorio-comum .module-icon,
.module-card[class*="module-relatorio-comum-sac"] .module-icon { color: #7e6500; background: var(--yellow-soft); }
.module-icon svg { width: 25px; height: 25px; }
.availability-badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border-radius: 999px; color: var(--green); background: var(--green-soft); font-size: 10px; font-weight: 850; }
.availability-badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.availability-badge.muted-badge { color: #6c7788; background: #edf1f5; }
.module-card-copy { margin: 24px 0 22px; }
.module-version { color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.module-card h3 { margin: 7px 0 9px; color: var(--navy); font-size: 21px; letter-spacing: -.02em; }
.module-card p { display: -webkit-box; margin: 0; overflow: hidden; color: var(--ink-soft); font-size: 13px; line-height: 1.6; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.module-card-action { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); }
.module-card-action .button-link { width: 100%; min-height: 42px; font-size: 13px; }
.viewer-note { color: var(--muted); font-size: 12px; font-weight: 750; }
.full-span { grid-column: 1 / -1; }
.activity-list { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.activity-item { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 14px; min-height: 72px; padding: 13px 18px; border-bottom: 1px solid var(--line); text-decoration: none; transition: background .18s; }
.activity-item:last-child { border-bottom: 0; }
.activity-item:hover { background: #f8fafc; }
.activity-module-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; color: var(--navy); background: var(--blue-soft); }
.activity-module-icon svg { width: 19px; height: 19px; }
.activity-copy { min-width: 0; display: grid; gap: 4px; }
.activity-copy strong { overflow: hidden; color: var(--ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.activity-copy small { color: var(--muted); font-size: 11px; }
.activity-arrow { color: #96a3b3; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; width: max-content; padding: 6px 9px; border-radius: 999px; color: #536174; background: #edf1f5; font-size: 10px; font-weight: 850; white-space: nowrap; }
.status-pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-completed { color: var(--green); background: var(--green-soft); }
.status-failed { color: var(--red); background: var(--red-soft); }
.status-processing { color: var(--amber); background: var(--amber-soft); }
.status-queued, .status-received { color: #3568a6; background: var(--blue-soft); }
.empty-state { display: grid; place-items: center; padding: 48px 28px; text-align: center; }
.empty-state.compact { padding: 30px 24px; }
.empty-state h3 { margin: 0 0 7px; color: var(--navy); font-size: 17px; }
.empty-state p { margin: 0; color: var(--muted); font-size: 13px; }
.empty-state .button-link { margin-top: 18px; }
.empty-icon { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 14px; border-radius: 16px; color: var(--navy); background: var(--blue-soft); }
.empty-icon svg { width: 24px; height: 24px; }

/* Page intros and breadcrumbs */
.breadcrumb { display: flex; align-items: center; gap: 9px; margin-bottom: 24px; color: var(--muted); font-size: 12px; }
.breadcrumb a { color: var(--navy); font-weight: 750; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.page-intro { display: flex; align-items: center; justify-content: space-between; gap: 26px; margin-bottom: 28px; }
.page-intro h1 { margin: 6px 0 8px; color: var(--navy); font-size: clamp(29px, 3vw, 40px); line-height: 1.1; letter-spacing: -.04em; }
.page-intro p { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.55; }
.module-version-chip, .security-chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--navy); background: var(--surface); font-size: 11px; font-weight: 850; white-space: nowrap; }
.security-chip svg { width: 16px; height: 16px; }

/* Upload */
.execution-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(260px, .85fr); gap: 20px; align-items: start; }
.execution-methods { display: grid; gap: 18px; }
.upload-surface, .treatment-surface, .requirements-card { padding: 28px; }
.treatment-card { padding: 24px 26px; border-color: #d7e1ed; background: linear-gradient(145deg, #fff, #fbfcfe); }
.treatment-heading { margin-bottom: 16px; }
.esl-surface { padding: 28px; border-color: #c8d7e8; background: linear-gradient(145deg, #fff, #f6f9fd); }
.esl-surface .surface-heading { align-items: center; }
.method-chip { margin-left: auto; padding: 6px 9px; border-radius: 999px; color: var(--navy); background: var(--yellow); font-size: 9px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.esl-execution-form { display: grid; gap: 20px; }
.date-range-fields { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: 12px; }
.date-range-separator { padding-bottom: 14px; color: var(--muted); font-size: 11px; font-weight: 800; }
.esl-form-footer { display: flex; align-items: center; justify-content: flex-end; gap: 18px; }
.method-divider { position: relative; display: flex; align-items: center; justify-content: center; min-height: 18px; color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.method-divider::before { content: ""; position: absolute; inset-inline: 0; top: 50%; height: 1px; background: var(--line); }
.method-divider span { position: relative; padding: 0 12px; background: var(--canvas); }
.surface-heading { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 24px; }
.surface-heading h2 { margin: 1px 0 5px; color: var(--navy); font-size: 19px; letter-spacing: -.02em; }
.surface-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.step-number { flex: 0 0 auto; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; color: var(--navy); background: var(--yellow); font-size: 12px; font-weight: 900; }
.execution-form { display: grid; gap: 18px; }
.dropzone { min-height: 230px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 28px; border: 1.5px dashed #b9c6d6; border-radius: 14px; text-align: center; background: #f9fbfd; cursor: pointer; transition: border-color .18s, background .18s, transform .18s; }
.dropzone:hover, .dropzone.dragging { border-color: var(--navy-soft); background: #f2f6fb; transform: translateY(-1px); }
.dropzone.has-files { border-style: solid; border-color: var(--green); background: var(--green-soft); }
.dropzone-icon { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 5px; border-radius: 17px; color: var(--navy); background: var(--blue-soft); }
.dropzone-icon svg { width: 26px; height: 26px; }
.dropzone > strong { color: var(--navy); font-size: 16px; }
.dropzone > span:not(.dropzone-icon):not(.choose-file) { color: var(--muted); font-size: 12px; }
.compact-dropzone { min-height: 180px; }
.treatment-form { gap: 14px; }
.treatment-summary-card { display: grid; gap: 12px; margin: 0 0 16px; padding: 14px; border: 1px solid #dce6f1; border-radius: 12px; background: var(--blue-soft); }
.treatment-summary-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.treatment-summary-heading > div { display: grid; gap: 2px; }
.treatment-summary-heading strong { color: var(--navy); font-size: 13px; }
.treatment-summary-heading small { color: var(--muted); font-size: 10px; }
.treatment-summary-heading > span { padding: 5px 8px; border: 1px solid #c7d7e9; border-radius: 999px; color: var(--navy-soft); background: rgb(255 255 255 / 72%); font-size: 9px; font-weight: 800; white-space: nowrap; }
.treatment-summary-grid, .treatment-modal-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin: 0; }
.treatment-summary-metric, .treatment-modal-metrics div { min-width: 0; display: grid; align-content: center; gap: 3px; padding: 9px 10px; border: 1px solid rgb(3 36 86 / 7%); border-radius: 9px; background: rgb(255 255 255 / 82%); }
.treatment-summary-metric dt, .treatment-modal-metrics dt { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .035em; line-height: 1.25; text-transform: uppercase; }
.treatment-summary-metric dd, .treatment-modal-metrics dd { margin: 0; color: var(--navy); font-size: 18px; font-weight: 900; line-height: 1; }
.treatment-upload-zone { min-height: 132px; gap: 4px; padding: 16px 20px; border-color: #c5d1df; background: #fbfcfe; }
.treatment-upload-zone .dropzone-icon { width: 40px; height: 40px; margin-bottom: 2px; border-radius: 12px; }
.treatment-upload-zone .dropzone-icon svg { width: 20px; height: 20px; }
.treatment-upload-zone > strong { font-size: 14px; }
.treatment-upload-zone .choose-file { margin-top: 5px; padding: 6px 11px; }
.treatment-footer { min-height: 42px; padding-top: 0; }
.treatment-modal-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 22px; background: rgb(3 36 86 / 58%); animation: treatment-backdrop-in .2s ease-out both; }
.treatment-modal { width: min(100%, 470px); display: grid; justify-items: center; gap: 14px; padding: 30px; border: 1px solid rgb(255 255 255 / 30%); border-radius: 18px; text-align: center; background: var(--surface); box-shadow: 0 24px 70px rgb(3 36 86 / 28%); animation: treatment-modal-in .22s ease-out both; }
.treatment-modal-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; color: #174b35; background: var(--green-soft); font-size: 24px; font-weight: 900; }
.treatment-modal h2 { margin: 2px 0 0; color: var(--navy); font-size: 24px; letter-spacing: -.03em; }
.treatment-modal > p { max-width: 380px; margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.55; }
.treatment-modal-metrics { width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 4px 0; }
.treatment-modal-metrics div { background: var(--blue-soft); }
.treatment-modal-metrics dt { color: var(--muted); }
.treatment-modal-metrics dd { color: var(--navy); }
.treatment-modal-close { min-width: 140px; justify-content: center; margin-top: 3px; text-decoration: none; }
.treatment-modal-close:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
@keyframes treatment-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes treatment-modal-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.choose-file { margin-top: 9px; padding: 8px 13px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--navy); background: var(--surface); font-size: 11px; font-weight: 850; }
.selected-files { display: grid; gap: 8px; }
.selected-files:empty { display: none; }
.selected-file { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.selected-file > span:first-child { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: var(--navy); background: var(--blue-soft); font-size: 9px; font-weight: 900; }
.selected-file-details { min-width: 0; display: grid; gap: 2px; }
.selected-file strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.selected-file small { color: var(--muted); font-size: 10px; }
.form-submit-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 4px; }
.secure-upload { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; font-weight: 750; }
.secure-upload svg { width: 16px; height: 16px; color: var(--green); }
.compact-heading { margin-bottom: 18px; }
.requirements-list { display: grid; gap: 13px; margin: 0; padding: 0; list-style: none; }
.requirements-list li { position: relative; padding-left: 24px; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }
.requirements-list li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; color: var(--green); background: var(--green-soft); font-size: 10px; font-weight: 900; }
.info-note, .warning-note { display: flex; align-items: flex-start; gap: 9px; margin-top: 20px; padding: 12px; border-radius: 10px; color: #45617d; background: var(--blue-soft); font-size: 11px; line-height: 1.5; }
.warning-note { color: #775c00; background: var(--amber-soft); }
.info-note svg, .warning-note svg { flex: 0 0 auto; width: 17px; height: 17px; }

/* History */
.history-intro .primary-button { min-width: 156px; }
.history-surface { overflow: hidden; }
.history-toolbar { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.history-toolbar > div { display: grid; gap: 4px; }
.history-toolbar h2 { margin: 0; color: var(--navy); font-size: 18px; }
.history-toolbar > div > span { color: var(--muted); font-size: 11px; }
.search-field { position: relative; width: min(320px, 100%); }
.search-field svg { position: absolute; left: 13px; top: 50%; width: 18px; height: 18px; color: #8090a4; transform: translateY(-50%); }
.search-field input { min-height: 42px; padding: 9px 12px 9px 40px; font-size: 12px; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 15px 20px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.data-table th { color: var(--muted); background: #fafbfd; font-size: 10px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.data-table td { color: var(--ink-soft); font-size: 12px; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background .18s; }
.data-table tbody tr:hover { background: #fafbfd; }
.date-cell { display: grid; gap: 2px; }
.date-cell strong { color: var(--ink); font-size: 12px; }
.date-cell small { color: var(--muted); font-size: 10px; }
.table-module { display: flex; align-items: center; gap: 9px; }
.table-module i { width: 8px; height: 8px; border-radius: 3px; background: var(--navy); box-shadow: 0 0 0 4px var(--blue-soft); }
.table-module strong { color: var(--ink); }
.action-cell { text-align: right !important; }
.icon-link { display: inline-flex; align-items: center; gap: 7px; color: var(--navy); font-weight: 850; text-decoration: none; }
.icon-link:hover { text-decoration: underline; }
.icon-link svg { width: 16px; height: 16px; }
.history-empty { min-height: 330px; }

/* Execution detail */
.execution-status-hero { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; padding: 27px 30px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.status-hero-icon { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 18px; color: var(--amber); background: var(--amber-soft); }
.status-hero-completed .status-hero-icon { color: var(--green); background: var(--green-soft); }
.status-hero-failed .status-hero-icon { color: var(--red); background: var(--red-soft); }
.status-hero-icon svg { width: 29px; height: 29px; }
.execution-status-hero h1 { margin: 9px 0 6px; color: var(--navy); font-size: 23px; letter-spacing: -.025em; }
.execution-status-hero p { margin: 0; color: var(--ink-soft); font-size: 12px; }
.execution-code { align-self: flex-start; padding: 7px 9px; border-radius: 8px; color: var(--muted); background: #f3f5f8; font: 750 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.execution-metadata { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 1px; margin-top: 20px; padding: 1px; overflow: hidden; background: var(--line); }
.metadata-item { display: grid; gap: 5px; min-width: 0; padding: 17px; background: var(--surface); }
.metadata-item span { color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.metadata-item strong { overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.metadata-item .metadata-value-wrap { overflow: visible; overflow-wrap: anywhere; text-overflow: clip; white-space: normal; }
.file-count { color: var(--muted); font-size: 11px; }
.file-list { overflow: hidden; }
.file-row { display: flex; align-items: center; gap: 13px; min-height: 74px; padding: 13px 17px; border-bottom: 1px solid var(--line); }
.file-row:last-child { border-bottom: 0; }
.file-type { flex: 0 0 auto; width: 43px; height: 43px; display: grid; place-items: center; border-radius: 11px; color: #3568a6; background: var(--blue-soft); font-size: 9px; font-weight: 900; }
.file-type-output { color: var(--green); background: var(--green-soft); }
.file-copy { min-width: 0; display: grid; gap: 4px; }
.file-copy strong { overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.file-copy span { color: var(--muted); font-size: 10px; }
.download-button { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--navy); background: var(--surface); font-size: 11px; font-weight: 850; text-decoration: none; }
.download-button:hover { border-color: var(--navy); background: var(--blue-soft); }
.download-button svg { width: 16px; height: 16px; }
.internal-section-heading { margin-bottom: 8px; }
.internal-section-note { margin: 0 0 14px; color: var(--muted); font-size: 11px; }
.internal-access-badge { display: inline-flex; align-items: center; padding: 7px 10px; border-radius: 999px; color: #725900; background: var(--yellow-soft); font-size: 9px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.internal-file-list { border-color: #eadfa4; background: #fffdf2; }
.internal-file-row { background: rgb(255 253 242 / 72%); }
.page-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 24px; }
.secondary-link { color: var(--navy); font-size: 12px; font-weight: 850; text-decoration: none; }
.secondary-link:hover { text-decoration: underline; }

/* Administration */
.admin-layout { display: grid; grid-template-columns: minmax(300px, 370px) minmax(0, 1fr); gap: 20px; align-items: start; }
.create-user-card { padding: 26px; }
.surface-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: var(--navy); background: var(--yellow); }
.surface-icon svg { width: 20px; height: 20px; }
.admin-form { display: grid; gap: 16px; }
.field-group > input, .field-group select, .password-field input { min-height: 44px; padding: 10px 12px; }
.field-group small { color: var(--muted); font-size: 10px; font-weight: 500; line-height: 1.45; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 48px; }
.full-button { width: 100%; margin-top: 3px; }
.accounts-card { overflow: hidden; }
.accounts-heading { min-height: 78px; display: flex; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.accounts-heading h2 { margin: 0 0 4px; color: var(--navy); font-size: 18px; }
.accounts-heading span { color: var(--muted); font-size: 11px; }
.account-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 14px; padding: 19px 22px; border-bottom: 1px solid var(--line); }
.account-row:last-child { border-bottom: 0; }
.account-inactive { background: #fafbfc; opacity: .78; }
.account-avatar { color: var(--white); background: var(--navy); }
.account-main { min-width: 0; }
.account-identity { display: grid; gap: 3px; }
.account-identity strong { color: var(--ink); font-size: 13px; }
.account-identity span { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.account-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.role-chip, .self-chip, .inactive-chip { display: inline-flex; padding: 4px 7px; border-radius: 999px; color: #47617d; background: var(--blue-soft); font-size: 9px; font-weight: 850; }
.self-chip { color: var(--green); background: var(--green-soft); }
.inactive-chip { color: #667080; background: #edf0f3; }
.module-access { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.module-access > span { margin-right: 2px; color: var(--muted); font-size: 9px; font-weight: 850; text-transform: uppercase; }
.module-access form { display: inline-flex; }
.access-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; color: #718096; background: var(--surface); font-size: 9px; font-weight: 800; }
.access-toggle i { width: 6px; height: 6px; border-radius: 50%; background: #aab3bf; }
.access-toggle.granted { border-color: #bfe6d4; color: var(--green); background: var(--green-soft); }
.access-toggle.granted i { background: var(--green); }
.account-action { align-self: center; }
.secondary-button { padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 8px; color: #69768a; background: var(--surface); font-size: 10px; font-weight: 850; }
.secondary-button:hover { color: var(--red); border-color: #efbaba; background: var(--red-soft); }
.secondary-button.activate-button:hover { color: var(--green); border-color: #bfe6d4; background: var(--green-soft); }

@media (max-width: 1080px) {
  .execution-layout { grid-template-columns: 1fr; }
  .requirements-card { display: grid; grid-template-columns: minmax(200px, .7fr) 1.3fr; gap: 18px; }
  .requirements-card .surface-heading { margin: 0; }
  .requirements-card .info-note, .requirements-card .warning-note { grid-column: 2; margin-top: 0; }
  .admin-layout { grid-template-columns: 340px minmax(0, 1fr); }
  .account-row { grid-template-columns: auto minmax(0, 1fr); }
  .account-action { grid-column: 2; justify-self: start; }
}

@media (max-width: 900px) {
  :root { --sidebar-width: 278px; }
  .sidebar { transform: translateX(-105%); transition: transform .25s ease; }
  .nav-open .sidebar { transform: translateX(0); }
  .nav-scrim { position: fixed; z-index: 40; inset: 0; display: block; border: 0; background: rgb(2 27 66 / 55%); opacity: 0; pointer-events: none; transition: opacity .25s; }
  .nav-open .nav-scrim { opacity: 1; pointer-events: auto; }
  .app-main { margin-left: 0; }
  .menu-toggle { width: 42px; height: 42px; display: grid; place-content: center; gap: 4px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
  .menu-toggle span { width: 19px; height: 2px; border-radius: 2px; background: var(--navy); }
  .content-header { justify-content: flex-start; gap: 14px; padding: 0 22px; }
  .header-client { margin-left: auto; }
  .content { width: min(100% - 40px, 850px); padding-top: 30px; }
  .auth-layout { grid-template-columns: minmax(380px, .9fr) minmax(410px, 1.1fr); }
  .auth-brand-content { width: min(560px, calc(100% - 58px)); }
  .auth-brand-message h1 { font-size: clamp(34px, 5vw, 48px); }
  .auth-stage { padding: 34px; }
  .admin-layout { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .auth-layout { display: block; min-height: 100vh; background: linear-gradient(160deg, var(--navy) 0 210px, var(--canvas) 210px); }
  .auth-brand-panel { display: none; }
  .auth-stage { min-height: 100vh; align-content: center; padding: 32px 20px; background: transparent; }
  .mobile-brand-lockup { min-height: 86px; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 12px 22px 0; }
  .mobile-brand-lockup img:first-child { width: 126px; }
  .mobile-brand-lockup img:last-child { width: 92px; }
  .mobile-brand-lockup span { width: 1px; height: 36px; background: var(--line); }
  .form-box { max-width: 470px; }
  .login-form { padding: 26px 28px 28px; }
  .form-heading { text-align: center; }
  .form-heading .title { font-size: 28px; }
  .form-section { padding-inline: 28px; }
  .summary-grid { grid-template-columns: 1fr; gap: 10px; }
  .summary-card { min-height: 82px; padding: 15px 18px; }
  .summary-icon { width: 42px; height: 42px; }
  .summary-card strong { font-size: 23px; }
  .page-intro { align-items: flex-start; flex-direction: column; }
  .history-intro .primary-button { width: 100%; }
  .history-toolbar { align-items: stretch; flex-direction: column; }
  .search-field { width: 100%; }
  .data-table thead { display: none; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table tr { padding: 14px 17px; border-bottom: 1px solid var(--line); }
  .data-table td { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 7px 0; border: 0; text-align: right; }
  .data-table td::before { content: attr(data-label); color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
  .data-table .action-cell { justify-content: flex-end; padding-top: 12px; }
  .data-table .action-cell::before { display: none; }
  .execution-status-hero { grid-template-columns: auto 1fr; padding: 22px; }
  .execution-code { grid-column: 2; justify-self: start; }
  .execution-metadata { grid-template-columns: 1fr 1fr; }
  .requirements-card { display: block; }
  .requirements-card .surface-heading { margin-bottom: 18px; }
  .requirements-card .info-note, .requirements-card .warning-note { margin-top: 20px; }
}

@media (max-width: 560px) {
  .content-header { height: 68px; padding-inline: 15px; }
  .header-copy span { display: none; }
  .header-copy strong { font-size: 15px; }
  .header-client { width: 82px; }
  .content { width: calc(100% - 28px); padding: 22px 0 42px; }
  .welcome-panel { min-height: 200px; align-items: flex-start; padding: 28px 24px; }
  .welcome-panel h1 { font-size: 29px; }
  .welcome-panel p { max-width: 260px; line-height: 1.5; }
  .welcome-symbol { position: absolute; right: -10px; bottom: -14px; width: 86px; height: 86px; opacity: .65; }
  .module-grid { grid-template-columns: 1fr; }
  .module-card { min-height: 265px; padding: 20px; }
  .section-heading { align-items: flex-start; }
  .section-heading h2 { font-size: 20px; }
  .activity-item { grid-template-columns: auto 1fr auto; gap: 10px; padding: 12px; }
  .activity-item .status-pill { grid-column: 2; }
  .activity-arrow { grid-column: 3; grid-row: 1 / span 2; }
  .activity-copy small { white-space: normal; }
  .execution-intro { margin-bottom: 20px; }
  .upload-surface, .treatment-surface, .requirements-card { padding: 20px; }
  .esl-surface { padding: 20px; }
  .esl-surface .surface-heading { align-items: flex-start; }
  .method-chip { display: none; }
  .date-range-fields { grid-template-columns: 1fr; }
  .date-range-separator { display: none; }
  .esl-form-footer { align-items: stretch; flex-direction: column-reverse; }
  .esl-form-footer .primary-button { width: 100%; }
  .esl-form-footer .secure-upload { justify-content: center; text-align: center; }
  .dropzone { min-height: 210px; padding: 22px 15px; }
  .treatment-summary-heading { align-items: flex-start; flex-direction: column; gap: 7px; }
  .treatment-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .treatment-modal-metrics { grid-template-columns: 1fr; }
  .treatment-upload-zone { min-height: 126px; padding: 15px 12px; }
  .treatment-footer { align-items: stretch; flex-direction: column-reverse; }
  .treatment-footer .primary-button { width: 100%; }
  .treatment-modal { gap: 12px; padding: 24px 18px; }
  .treatment-modal-close { width: 100%; }
  .form-submit-row { align-items: stretch; flex-direction: column-reverse; }
  .form-submit-row .primary-button { width: 100%; }
  .secure-upload { justify-content: center; }
  .execution-status-hero { display: flex; align-items: flex-start; flex-direction: column; }
  .execution-status-hero h1 { font-size: 21px; }
  .execution-code { align-self: auto; }
  .execution-metadata { grid-template-columns: 1fr; }
  .metadata-item { padding: 14px 17px; }
  .file-row { align-items: flex-start; flex-wrap: wrap; }
  .file-copy { flex: 1; }
  .download-button { width: 100%; margin-left: 56px; }
  .page-actions { align-items: stretch; flex-direction: column-reverse; }
  .page-actions .button-link { width: 100%; }
  .account-row { grid-template-columns: auto minmax(0, 1fr); padding: 17px; }
  .account-action { grid-column: 1 / -1; width: 100%; }
  .account-action .secondary-button { width: 100%; }
  .admin-intro .security-chip { display: none; }
}

@media (max-width: 380px) {
  .treatment-summary-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
