:root {
  --inc-blue: #08a8dc;
  --inc-blue-dark: #087ba3;
  --inc-blue-soft: #e9f8fd;
  --inc-gray: #6c6d70;
  --navy: #153344;
  --navy-2: #0d2533;
  --surface: #ffffff;
  --surface-2: #f5f8fa;
  --surface-3: #eef4f7;
  --line: #d9e4e9;
  --line-strong: #c4d4dc;
  --text: #1b2b34;
  --muted: #61737d;
  --green: #1f7957;
  --green-bg: #e8f6ef;
  --amber: #946200;
  --amber-bg: #fff4d8;
  --red: #a43b3b;
  --red-bg: #fdecec;
  --blue-bg: #e8f5fb;
  --shadow: 0 12px 32px rgba(14, 54, 75, .08);
  --shadow-lg: 0 24px 70px rgba(5, 31, 46, .20);
  --radius: 16px;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--surface-2); }
body { margin: 0; min-height: 100%; font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif; color: var(--text); background: var(--surface-2); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { appearance: none; }
img { max-width: 100%; }

/* Login */
body.login-page { background: radial-gradient(circle at 15% 15%, rgba(8,168,220,.22), transparent 28%), linear-gradient(145deg, #0b2635 0%, #153b50 58%, #087ba3 100%); display: grid; place-items: center; padding: 28px; }
.login-layout { width: min(980px, 100%); display: grid; grid-template-columns: 1.08fr .92fr; overflow: hidden; border-radius: 26px; box-shadow: var(--shadow-lg); background: white; min-height: 560px; }
.login-brand { padding: 58px 54px; display: flex; flex-direction: column; justify-content: center; background: linear-gradient(160deg, #f8fdff, #e8f7fc); border-right: 1px solid rgba(8,168,220,.18); }
.login-brand img { width: min(520px, 100%); height: auto; object-fit: contain; }
.login-brand h1 { margin: 38px 0 10px; font-size: clamp(30px, 4vw, 43px); line-height: 1.08; color: var(--navy); }
.login-brand p { margin: 0; max-width: 520px; color: var(--muted); font-size: 16px; line-height: 1.65; }
.login-card { padding: 54px 48px; display: flex; flex-direction: column; justify-content: center; background: white; }
.login-heading { margin-bottom: 24px; }
.login-kicker, .eyebrow { display: block; color: var(--inc-blue-dark); font-size: 10px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.login-heading h2 { margin: 8px 0 5px; font-size: 28px; }
.login-heading p { margin: 0; color: var(--muted); }
.login-card form { display: grid; gap: 16px; }
.login-security { margin-top: 22px; color: var(--muted); font-size: 11px; text-align: center; }

/* Application shell */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 278px minmax(0, 1fr); }
.sidebar { background: linear-gradient(180deg, var(--navy-2), #102e3f 70%, #143a4d); color: #eaf5f8; padding: 18px 14px 22px; position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 30; }
.brand-panel { background: white; border-radius: 14px; padding: 15px 12px 12px; margin-bottom: 16px; box-shadow: 0 8px 24px rgba(0,0,0,.14); }
.brand-logo { display: block; width: 100%; height: 84px; object-fit: contain; }
.brand-caption { color: #617078; text-align: center; font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; border-top: 1px solid #e8eef1; margin-top: 8px; padding-top: 9px; }
.nav { display: grid; gap: 12px; }
.nav-group { display: grid; gap: 5px; }
.nav-label { color: #74a0b3; font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: .12em; padding: 11px 11px 4px; }
.nav a { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 9px 10px; border-radius: 11px; color: #dcecf1; font-size: 13px; font-weight: 620; transition: .18s ease; }
.nav a:hover { background: rgba(255,255,255,.075); color: white; transform: translateX(2px); }
.nav a.active { background: linear-gradient(100deg, rgba(8,168,220,.26), rgba(8,168,220,.10)); color: white; box-shadow: inset 3px 0 0 var(--inc-blue); }
.nav-icon { width: 25px; height: 25px; border-radius: 8px; display: grid; place-items: center; background: rgba(255,255,255,.08); color: #a9dff0; font-size: 10px; font-weight: 900; flex: 0 0 auto; }
.nav a.active .nav-icon { background: var(--inc-blue); color: white; }
.sidebar-footer { margin-top: 24px; padding: 16px 10px 0; border-top: 1px solid rgba(255,255,255,.12); font-size: 12px; color: #a8c3cf; }
.sidebar-user { display: grid; gap: 3px; }
.sidebar-user strong { color: white; font-size: 12px; }
.sidebar-user span { font-size: 11px; }
.sidebar-actions { display: flex; gap: 12px; margin-top: 12px; }
.sidebar-actions a { color: #b9e8f5; font-weight: 700; }
.sidebar-actions form { margin: 0; }
.logout-link-button { appearance: none; border: 0; padding: 0; background: transparent; color: #b9e8f5; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.version { margin-top: 14px; color: #6f98a9; font-size: 10px; }
.main { min-width: 0; }
.topbar { min-height: 78px; padding: 14px 28px; background: rgba(255,255,255,.96); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 18px; position: sticky; top: 0; z-index: 20; }
.topbar h1 { font-size: 21px; margin: 4px 0 0; line-height: 1.2; }
.topbar-title { flex: 1; min-width: 0; }
.global-back-button { min-height: 38px; padding: 8px 11px; border: 1px solid var(--line-strong); background: white; color: var(--navy); border-radius: 10px; cursor: pointer; font-weight: 780; font-size: 12px; white-space: nowrap; }
.global-back-button:hover { border-color: var(--inc-blue); color: var(--inc-blue-dark); background: var(--surface-2); }
.user-pill { min-width: 138px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 8px 12px; display: grid; text-align: right; }
.user-pill span { font-size: 10px; color: var(--muted); text-transform: uppercase; font-weight: 800; letter-spacing: .08em; }
.user-pill strong { font-size: 12px; margin-top: 2px; }
.menu-button { display: none; width: 40px; height: 40px; border: 1px solid var(--line); background: white; border-radius: 10px; cursor: pointer; font-size: 19px; }
.sr-only { 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; }
.global-search { display:flex; align-items:center; flex:0 1 410px; min-width:210px; max-width:410px; border:1px solid var(--line-strong); border-radius:11px; background:white; overflow:hidden; }
.global-search input { width:100%; min-width:0; min-height:38px; padding:8px 10px; border:0; outline:0; font-size:11px; }
.global-search button { flex:0 0 40px; align-self:stretch; border:0; border-left:1px solid var(--line); background:var(--surface-2); color:var(--inc-blue-dark); cursor:pointer; font-size:20px; }
.global-search-page { display:grid; gap:8px; }
.global-search-page>div { display:flex; gap:8px; }
.search-results { display:grid; }
.search-result { display:flex; justify-content:space-between; gap:14px; padding:13px 18px; border-bottom:1px solid var(--line); }
.search-result:last-child { border-bottom:0; }
.search-result:hover { background:var(--inc-blue-soft); }
.search-result span { color:var(--muted); font-size:11px; text-align:right; }
.content { padding: 27px; max-width: 1780px; margin: 0 auto; }
.app-footer { padding: 12px 2px 2px; color: var(--muted); font-size: 10px; text-align: right; }

/* Headings and actions */
.page-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 20px; }
.page-head h2 { margin: 0 0 6px; font-size: 25px; line-height: 1.2; }
.page-head p { margin: 0; color: var(--muted); line-height: 1.55; max-width: 900px; }
.actions { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.btn { border: 0; border-radius: 10px; padding: 10px 14px; min-height: 39px; font-weight: 750; font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px; transition: .16s ease; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); filter: brightness(.98); }
.btn-primary { background: linear-gradient(135deg, var(--inc-blue-dark), var(--inc-blue)); color: white; box-shadow: 0 7px 18px rgba(8,123,163,.18); }
.btn-secondary { background: white; color: var(--navy); border: 1px solid var(--line-strong); }
.btn-danger { background: var(--red-bg); color: var(--red); border: 1px solid #f2c5c5; }
.btn-sm { padding: 7px 10px; min-height: 32px; font-size: 11px; }
.btn-lg { min-height: 48px; font-size: 14px; width: 100%; margin-top: 2px; }

/* Cards and metrics */
.grid { display: grid; gap: 17px; }
.kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 20px; }
.kpi { position: relative; overflow: hidden; background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); min-height: 118px; }
.kpi::after { content: ""; position: absolute; width: 80px; height: 80px; right: -35px; top: -35px; border-radius: 50%; background: rgba(8,168,220,.08); }
.kpi .label { color: var(--muted); font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; }
.kpi .value { font-size: 25px; font-weight: 850; margin-top: 9px; line-height: 1.1; color: var(--navy); }
.kpi .hint { color: var(--muted); font-size: 11px; margin-top: 8px; line-height: 1.45; }
.kpi.good { border-top: 3px solid var(--green); }
.kpi.warning { border-top: 3px solid #d69a16; }
.kpi.info { border-top: 3px solid var(--inc-blue); }
.kpi.danger { border-top: 3px solid var(--red); }
.card { background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; overflow: hidden; }
.card-header { padding: 16px 19px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; background: linear-gradient(180deg, #fff, #fbfdfe); }
.card-header h3 { margin: 0; font-size: 15px; }
.card-header .muted { margin-top: 3px; }
.card-body { padding: 19px; }
.card-section-title { display: flex; align-items: center; gap: 9px; margin: 6px 0 14px; font-size: 13px; color: var(--navy); }
.card-section-title::before { content:""; width: 4px; height: 20px; border-radius: 4px; background: var(--inc-blue); }
.two-col { grid-template-columns: 1.2fr .8fr; }
.three-col { grid-template-columns: repeat(3, minmax(0,1fr)); }

/* Forms */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.filters .field { min-width: 155px; flex: 0 1 210px; }
.filters-wide { display: grid; grid-template-columns: repeat(4,minmax(170px,1fr)); align-items: end; gap: 12px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-size: 11px; font-weight: 780; color: #41535e; }
.field-hint { color: var(--muted); font-size: 10px; line-height: 1.4; }
.input, select, textarea { width: 100%; border: 1px solid #cbdbe2; background: white; border-radius: 9px; padding: 10px 11px; min-height: 40px; color: var(--text); outline: none; transition: .15s ease; }
.input:focus, select:focus, textarea:focus { border-color: var(--inc-blue); box-shadow: 0 0 0 3px rgba(8,168,220,.13); }
.input[readonly] { background: var(--surface-3); color: var(--muted); }
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 15px; }
.form-grid .span-2, .filters-wide .span-2 { grid-column: span 2; }
.form-grid .span-3 { grid-column: span 3; }
.form-grid .span-4 { grid-column: 1 / -1; }
.period-controls { display:flex; gap:10px; align-items:end; flex-wrap:wrap; }
.field.compact { min-width:145px; }
.num-input { min-width:115px; text-align:right; }
.catalog { margin-top: 4px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.catalog summary { cursor: pointer; padding: 8px 10px; color: var(--inc-blue-dark); font-size: 11px; font-weight: 750; }
.catalog[open] summary { border-bottom: 1px solid var(--line); }
.catalog-group { padding: 10px; }
.catalog-group + .catalog-group { border-top: 1px dashed var(--line); }
.catalog-group strong { display: block; font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 7px; }
.catalog-options { display: flex; flex-wrap: wrap; gap: 6px; }
.catalog-option { border: 1px solid #cce4ec; background: white; color: var(--navy); border-radius: 999px; padding: 6px 9px; font-size: 10px; cursor: pointer; }
.catalog-option:hover { border-color: var(--inc-blue); color: var(--inc-blue-dark); }

/* Tables */
.table-wrap { overflow: auto; max-width: 100%; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; }
thead { position: sticky; top: 0; z-index: 2; }
th { text-align: left; padding: 11px 10px; background: #edf5f8; color: #3f5c69; border-bottom: 1px solid var(--line-strong); white-space: nowrap; font-size: 10.5px; font-weight: 820; text-transform: none; }
td { padding: 10px; border-bottom: 1px solid #edf2f4; vertical-align: top; line-height: 1.45; }
tbody tr:nth-child(even) td { background: #fbfdfe; }
tbody tr:hover td { background: #f2f9fc; }
tfoot th, tfoot td { background: #eaf3f7; font-weight: 800; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wide-table { min-width: 3000px; }
.marketing-table { min-width: 2100px; }
.compact-table td, .compact-table th { padding: 7px 8px; }
.sticky-first th:first-child, .sticky-first td:first-child { position: sticky; left: 0; z-index: 1; background: white; }
.sticky-first th:first-child { z-index: 3; background: #edf5f8; }

/* Status and alerts */
.badge { display: inline-flex; align-items: center; min-height: 23px; padding: 4px 8px; border-radius: 999px; font-size: 10px; font-weight: 820; white-space: nowrap; }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-blue { background: var(--blue-bg); color: var(--inc-blue-dark); }
.flash { padding: 13px 15px; border-radius: 11px; margin-bottom: 17px; font-size: 12px; font-weight: 680; border: 1px solid transparent; }
.flash-success { background: var(--green-bg); color: var(--green); border-color: #bee5d2; }
.flash-error { background: var(--red-bg); color: var(--red); border-color: #f1caca; }
.warning-box { border: 1px solid #efd291; background: #fff9e8; padding: 13px 15px; border-radius: 10px; color: #6c5312; font-size: 12px; line-height: 1.5; }
.info-box { border: 1px solid #bee4f2; background: #effaff; padding: 13px 15px; border-radius: 10px; color: #285f75; font-size: 12px; line-height: 1.5; }
.muted { color: var(--muted); }
.small { font-size:11px; margin-top:4px; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.footer-note { color: var(--muted); font-size: 10px; margin-top: 15px; line-height: 1.5; }
.pagination { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-top: 1px solid var(--line); font-size: 11px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs a { padding: 9px 12px; background: white; border: 1px solid var(--line); border-radius: 9px; font-size: 12px; font-weight: 720; }
.tabs a.active { background: var(--navy); color: white; border-color: var(--navy); }
.metric-line { display: flex; justify-content: space-between; gap: 15px; padding: 10px 0; border-bottom: 1px solid #edf2f4; }
.metric-line:last-child { border-bottom: 0; }
.quick-links { display:grid; gap:10px; }
.quick-link { display:flex; justify-content:space-between; gap:15px; padding:13px; border:1px solid var(--line); border-radius:11px; transition:.15s ease; }
.quick-link:hover { border-color: #9fd7e8; background: var(--inc-blue-soft); }
.quick-link span { color:var(--muted); font-size:11px; text-align:right; }
.funnel { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-bottom:16px; }
.funnel div { background:var(--inc-blue-soft); border:1px solid #cce8f1; border-radius:12px; padding:13px 8px; text-align:center; }
.funnel strong { display:block; font-size:23px; color: var(--navy); }
.funnel span { display:block; color:var(--muted); font-size:10px; margin-top:4px; }
.chart-list { display: grid; gap: 12px; }
.chart-row { display: grid; grid-template-columns: minmax(90px, 150px) 1fr 110px; align-items: center; gap: 10px; font-size: 11px; }
.bar-track { height: 11px; border-radius: 999px; background: #e5eef2; overflow: hidden; }
.bar { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--inc-blue-dark), var(--inc-blue)); min-width: 2px; }
.bar.negative { background: var(--red); }
.progress-line { display: grid; grid-template-columns: 150px 1fr 70px; gap: 10px; align-items: center; padding: 7px 0; font-size: 11px; }

/* Reports */
.report-controls { margin-bottom: 20px; }
.report-page { background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.report-header { padding: 28px 30px 22px; border-bottom: 2px solid var(--inc-blue); background: linear-gradient(135deg, #fff, #f5fbfd); }
.report-brand { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.report-brand img { width: 390px; max-width: 48%; height: 96px; object-fit: contain; object-position: left center; }
.report-brand div { text-align: right; }
.report-brand span { color: var(--inc-blue-dark); font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: .12em; }
.report-brand h2 { margin: 5px 0 0; font-size: 26px; color: var(--navy); }
.report-meta { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-top: 22px; }
.report-meta > div { border-left: 3px solid #c8eaf4; padding-left: 10px; display: grid; gap: 3px; }
.report-meta strong { font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.report-meta span { font-size: 11px; font-weight: 700; }
.report-subtitle { margin: 18px 0 0; color: var(--muted); line-height: 1.5; }
.report-notes { margin-top: 14px; padding: 11px 13px; background: #f4f8fa; border: 1px solid var(--line); border-radius: 9px; font-size: 11px; }
.report-body { padding: 24px 28px 30px; }
.report-section { margin-top: 24px; break-inside: avoid; }
.report-section:first-child { margin-top: 0; }
.report-section h3 { margin: 0 0 11px; font-size: 16px; color: var(--navy); border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.report-signature { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 80px; margin: 54px 10px 10px; }
.report-signature div { border-top: 1px solid #72838c; padding-top: 7px; text-align: center; font-size: 10px; color: var(--muted); }
.report-kpis { grid-template-columns: repeat(4,minmax(0,1fr)); }
.report-kpis .kpi { box-shadow: none; min-height: 96px; padding: 14px; }
.report-kpis .kpi .value { font-size: 20px; }
.report-table { font-size: 10.5px; }
.report-table th { font-size: 9.5px; }
.catalog-admin { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.option-list { display:flex; flex-wrap:wrap; gap:7px; }
.option-chip { display:inline-flex; border:1px solid var(--line); background:var(--surface-2); border-radius:999px; padding:6px 9px; font-size:10px; }

@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 246px minmax(0,1fr); }
  .kpis, .report-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .form-grid .span-4 { grid-column: 1 / -1; }
  .two-col, .three-col { grid-template-columns: 1fr; }
  .filters-wide { grid-template-columns: repeat(2,minmax(160px,1fr)); }
  .catalog-admin { grid-template-columns: 1fr; }
  .global-search { flex-basis:280px; max-width:280px; }
}
@media (max-width: 1024px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; left: 0; top: 0; width: 278px; transform: translateX(-102%); transition: transform .2s ease; box-shadow: 20px 0 40px rgba(0,0,0,.22); }
  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-open::after { content:""; position:fixed; inset:0; background:rgba(2,18,27,.45); z-index:25; }
  .menu-button { display: grid; place-items: center; }
  .topbar { position: sticky; padding: 12px 16px; justify-content: flex-start; flex-wrap:wrap; }
  .topbar-title { flex: 1; }
  .global-search { order:3; flex:1 1 100%; max-width:none; width:100%; }
  .user-pill { display:none; }
  .content { padding: 18px 12px; }
  .page-head { display: block; }
  .page-head .actions { margin-top: 14px; }
  .kpis, .report-kpis, .form-grid, .filters-wide { grid-template-columns: 1fr; }
  .form-grid .span-2, .form-grid .span-3, .form-grid .span-4, .filters-wide .span-2 { grid-column: auto; }
  .filters .field { flex: 1 1 100%; }
  .period-controls { width:100%; }
  .field.compact { flex:1; min-width:130px; }
  .funnel { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .quick-link { display:block; }
  .quick-link span { display:block; text-align:left; margin-top:4px; }
  .login-layout { grid-template-columns: 1fr; min-height: auto; }
  .login-brand { display: none; }
  .login-card { padding: 36px 26px; }
  .report-brand { display: block; }
  .report-brand img { max-width: 100%; width: 100%; height: 80px; }
  .report-brand div { text-align: left; margin-top: 14px; }
  .report-meta { grid-template-columns: 1fr; }
  .report-body, .report-header { padding-left: 17px; padding-right: 17px; }
  .report-signature { grid-template-columns: 1fr; gap: 48px; }
}
@media (max-width: 520px) {
  .global-back-button span { display:none; }
  .global-back-button { width:40px; padding:8px; }
  .topbar { gap:8px; }
  .topbar h1 { font-size:17px; }
  .eyebrow { display:none; }
  .global-search-page>div,.search-result { flex-direction:column; }
  .search-result span { text-align:left; }
}

@media print {
  @page { size: A4 landscape; margin: 10mm; }
  html, body { background: white !important; color: #111; }
  .sidebar, .topbar, .no-print, .report-controls, .actions, .app-footer, .pagination, .btn, form:not(.print-keep) { display: none !important; }
  .app-shell, .main, .content { display: block !important; width: 100% !important; max-width: none !important; padding: 0 !important; margin: 0 !important; }
  .report-page { border: 0; box-shadow: none; border-radius: 0; overflow: visible; }
  .report-header { padding: 0 0 7mm; background: white; }
  .report-brand img { width: 90mm; height: 25mm; }
  .report-brand h2 { font-size: 18pt; }
  .report-body { padding: 6mm 0 0; }
  .card, .kpi { box-shadow: none; break-inside: avoid; }
  .table-wrap { overflow: visible; }
  table { font-size: 7.5pt; }
  th { background: #e8eef1 !important; color: #111 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  td, th { padding: 4px 5px; }
  thead { display: table-header-group; position: static; }
  tr { break-inside: avoid; }
  .wide-table, .marketing-table { min-width: 0; }
  .badge { border: 1px solid #bbb; background: white !important; color: #111 !important; }
}

/* Secretaria profissional + produtos — v0.6.0 */
.secretary-kpis { grid-template-columns: repeat(4,minmax(0,1fr)); }
.secretary-switch { display:flex; gap:6px; margin:-4px 0 16px; padding:5px; width:max-content; max-width:100%; background:#eaf3f7; border:1px solid var(--line); border-radius:12px; }
.secretary-switch a { padding:8px 13px; border-radius:8px; font-size:11px; font-weight:800; color:var(--muted); }
.secretary-switch a.active { background:#fff; color:var(--navy); box-shadow:0 1px 4px rgba(7,34,48,.10); }
.secretary-overview { margin-bottom:16px; }
.product-only { border-left:2px solid #bde5f1; padding-left:8px; }
.new-bookings-panel { margin-bottom:20px; border-left:5px solid var(--inc-blue); }
.new-bookings-panel .card-header { background:linear-gradient(90deg,rgba(8,168,220,.08),rgba(255,255,255,0)); }
.new-bookings-panel .card-header h3 { margin:0 0 4px; }
.new-bookings-panel table { min-width:1040px; }
.new-bookings-panel .secretary-actions form { margin:0; }
.new-bookings-count { min-width:36px; height:36px; display:inline-flex; align-items:center; justify-content:center; border-radius:999px; background:var(--inc-blue); color:#fff; font-weight:850; }
@media (max-width:1180px){ .secretary-kpis{grid-template-columns:repeat(2,minmax(0,1fr));} }
@media (max-width:820px){ .secretary-kpis{grid-template-columns:1fr;} .secretary-switch{width:100%;overflow:auto;} }

.password-field { position: relative; }
.password-field .input { padding-right: 48px; }
.password-toggle { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; font-size: 20px; }
.password-toggle:hover { background: #edf7fb; color: var(--inc-blue-dark); }
.login-link { display: inline-block; text-align: center; color: var(--inc-blue-dark); font-size: 13px; font-weight: 700; text-decoration: none; margin-top: 2px; }
.login-link:hover { text-decoration: underline; }


/* v0.8.0 — Secretaria compacta e Saúde da empresa */
.secretary-table{min-width:980px}.secretary-table th,.secretary-table td{vertical-align:middle}.secretary-table td:nth-child(2){min-width:220px}.secretary-table td:nth-child(3){min-width:220px}.secretary-actions{display:flex;gap:8px;align-items:center;white-space:nowrap}.nowrap{white-space:nowrap}.row-details{position:relative}.row-details>summary{list-style:none;cursor:pointer}.row-details>summary::-webkit-details-marker{display:none}.row-details-panel{position:absolute;z-index:30;right:0;top:42px;width:min(680px,82vw);display:grid;grid-template-columns:1fr 1fr;gap:12px;background:#fff;border:1px solid #d8e5ec;border-radius:14px;padding:16px;box-shadow:0 18px 50px rgba(18,48,64,.18)}.row-details-panel>div{display:flex;flex-direction:column;gap:4px;border-bottom:1px solid #edf3f6;padding-bottom:8px}.row-details-panel span{font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:#67808d}.row-details-panel strong{font-size:13px;color:#17303d;overflow-wrap:anywhere}.row-details-panel .span-2{grid-column:span 2}
.health-kpis .kpi .value{font-size:28px}.health-alerts{display:grid;gap:10px}.health-alert{display:flex;align-items:center;justify-content:space-between;gap:18px;border:1px solid #dfe9ee;border-left:5px solid #7d98a5;border-radius:12px;padding:14px 16px;background:#fbfdfe}.health-alert p{margin:4px 0 0;color:#5d7480}.health-alert.attention{border-left-color:#d48a20;background:#fffaf1}.health-alert.critical{border-left-color:#b84141;background:#fff6f6}.health-alert.ok{border-left-color:#3c8b65;background:#f5fbf8}.health-chart-grid{align-items:stretch}.health-chart{background:#fff;border:1px solid #dfe9ee;border-radius:16px;padding:16px;min-width:0}.health-chart h4{margin:0 0 14px}.health-bars{display:grid;gap:8px}.health-bar-row{display:grid;grid-template-columns:56px 1fr 96px;gap:8px;align-items:center;font-size:12px}.health-bar-row>strong{text-align:right;font-size:11px}.health-bar-track{height:10px;background:#edf3f6;border-radius:999px;overflow:hidden}.health-bar-track i{display:block;height:100%;background:#1699c6;border-radius:999px}.health-bar-track i.negative{background:#b84141}.health-table{min-width:1600px}
@media(max-width:900px){.row-details-panel{position:fixed;left:5vw;right:5vw;top:18vh;width:90vw;max-height:68vh;overflow:auto}.health-bar-row{grid-template-columns:48px 1fr 78px}.secretary-actions{flex-direction:column;align-items:stretch}}

/* v1.5.5-rc.5 — alerta global do Chat, destacado sem expor conteúdo */
.chat-global-alert{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 16px;padding:12px 16px;border:1px solid #e9a2a2;border-left:5px solid #c62828;border-radius:12px;background:#fff1f1;color:#8f1717;box-shadow:0 4px 18px rgba(151,30,30,.09);font-size:14px}.chat-global-alert[hidden]{display:none}.chat-global-alert a{display:inline-flex;align-items:center;min-height:34px;padding:6px 12px;border-radius:9px;background:#b71c1c;color:#fff;font-weight:800;text-decoration:none;white-space:nowrap}.chat-global-alert a:hover{background:#971515}.chat-global-alert-pulse{animation:chatAlertPulse .8s ease-out}@keyframes chatAlertPulse{0%{transform:scale(.985);box-shadow:0 0 0 0 rgba(198,40,40,.34)}100%{transform:scale(1);box-shadow:0 4px 18px rgba(151,30,30,.09)}}@media(max-width:640px){.chat-global-alert{align-items:flex-start;flex-direction:column;gap:8px}}

/* RC14 — organização visual do lançamento da Secretaria */
.secretary-section-title{margin-top:6px;padding:10px 12px;border-radius:10px;background:#f1f7f9;border-left:4px solid #149dc4}.secretary-section-title strong,.secretary-section-title small{display:block}.secretary-section-title strong{font-size:13px;color:#173d4c}.secretary-section-title small{margin-top:2px;color:#617984;font-size:10.5px}.secretary-finance-title{margin-top:14px}

/* RC17 — controle operacional de receitas por quantidade */
.secretary-revenue-section{margin-bottom:18px}
.secretary-revenue-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.secretary-revenue-card{border:1px solid var(--line);border-radius:14px;padding:15px 16px;background:#fff;min-width:0}
.secretary-revenue-card .label{color:var(--muted);font-size:10px;font-weight:850;text-transform:uppercase;letter-spacing:.06em}
.secretary-revenue-statuses{display:grid;gap:8px;margin-top:12px}
.secretary-revenue-statuses>div{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 10px;border:1px solid var(--line);border-radius:10px;background:var(--soft)}
.secretary-revenue-statuses span{font-size:12px;font-weight:700;color:var(--muted)}
.secretary-revenue-statuses strong{font-size:20px;line-height:1;font-weight:900;color:var(--navy);font-variant-numeric:tabular-nums}
.secretary-courtesy-card .secretary-revenue-statuses>div{background:#fff}
.secretary-courtesy-card{background:linear-gradient(135deg,#fffdf7,#ffffff);border-left:4px solid #d5a53a}
.workflow-form-error{margin-top:10px;padding:10px 12px;border:1px solid #efb5b5;border-radius:10px;background:#fff6f6;color:#9f2424;font-weight:700;font-size:12px}
.workflow-required-hint{margin-top:8px}
@media (max-width:1180px){.secretary-revenue-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (max-width:820px){.secretary-revenue-grid{grid-template-columns:1fr;}}
