:root {
  --blue: #0969ed;
  --blue-dark: #0648bd;
  --blue-soft: #eaf3ff;
  --orange: #ff5a09;
  --orange-dark: #d94100;
  --orange-soft: #fff0e8;
  --ink: #10131b;
  --muted: #687086;
  --line: #e3e7ee;
  --surface: #ffffff;
  --canvas: #f5f7fa;
  --shadow: 0 14px 40px rgba(23, 40, 76, .08);
  --shadow-small: 0 5px 18px rgba(23, 40, 76, .07);
  --radius: 22px;
  --radius-small: 14px;
  --sidebar: 268px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body { min-height: 100vh; margin: 0; background: var(--canvas); color: var(--ink); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.no-scroll { overflow: hidden; }
.muted { color: var(--muted); }

.button { min-height: 44px; border: 0; border-radius: 12px; padding: 0 17px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-weight: 750; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.button-primary { background: linear-gradient(135deg, var(--blue), #087df5); color: #fff; box-shadow: 0 9px 22px rgba(9, 105, 237, .22); }
.button-dark { background: var(--ink); color: #fff; }
.button-outline { border: 1px solid var(--blue); background: #fff; color: var(--blue); }
.button-white { background: #fff; color: var(--blue); box-shadow: 0 10px 25px rgba(0, 0, 0, .12); }
.button-large { min-height: 52px; padding: 0 22px; }
.button.is-loading { pointer-events: none; position: relative; color: transparent !important; }
.button.is-loading::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .4); border-top-color: currentColor; border-radius: 50%; animation: spin .7s linear infinite; color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }

.eyebrow { display: block; margin-bottom: 7px; color: var(--blue); font-size: 11px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow.light { color: rgba(255, 255, 255, .75); }
.orange-text { color: var(--orange); }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; width: var(--sidebar); padding: 26px 18px 18px; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 24px; }
.brand-icon { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, var(--blue), #087ff7); box-shadow: 0 8px 20px rgba(9, 105, 237, .23); }
.brand-icon .icon { width: 25px; height: 25px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; letter-spacing: -.02em; }
.brand small { color: var(--muted); font-size: 12px; margin-top: 2px; }
.side-nav { display: flex; flex-direction: column; gap: 5px; }
.nav-link { min-height: 48px; display: flex; align-items: center; gap: 13px; padding: 0 14px; border-radius: 13px; color: #4d5568; font-size: 14px; font-weight: 700; transition: background .16s ease, color .16s ease; }
.nav-link:hover { background: #f5f7fb; color: var(--ink); }
.nav-link.is-active { color: #fff; background: linear-gradient(135deg, var(--blue), #0879f4); box-shadow: 0 8px 19px rgba(9, 105, 237, .2); }
.nav-divider { height: 1px; background: var(--line); margin: 10px 12px; }
.sidebar-foot { margin-top: auto; }
.sidebar-source { display: flex; align-items: center; gap: 9px; padding: 13px; margin-bottom: 9px; border: 1px solid var(--line); border-radius: 13px; background: #fafbfc; }
.source-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 5px var(--blue-soft); }
.sidebar-source strong, .sidebar-source small { display: block; }
.sidebar-source strong { font-size: 11px; }
.sidebar-source small { margin-top: 2px; font-size: 9px; color: var(--muted); }
.sidebar-foot form { margin: 0; }
.user-chip { width: 100%; border: 0; background: transparent; display: flex; align-items: center; gap: 9px; padding: 10px; border-radius: 13px; cursor: pointer; text-align: left; }
.user-chip:hover { background: #f5f7fb; }
.user-chip > span:nth-child(2) { min-width: 0; flex: 1; }
.user-chip strong, .user-chip small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip strong { font-size: 11px; }
.user-chip small { color: var(--muted); font-size: 10px; margin-top: 2px; }
.user-chip > .icon { width: 17px; color: var(--muted); }
.avatar { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 12px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); font-size: 12px; font-weight: 850; }

.main-column { min-height: 100vh; margin-left: var(--sidebar); }
.topbar { height: 88px; position: sticky; z-index: 20; top: 0; display: flex; align-items: center; gap: 24px; padding: 0 34px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .94); backdrop-filter: blur(14px); }
.page-title { min-width: 0; flex: 1; }
.page-title h1 { margin: 0; font-size: 22px; letter-spacing: -.035em; }
.page-title p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.global-search { width: min(360px, 34vw); height: 45px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border: 1px solid var(--line); border-radius: 14px; background: #f8f9fb; }
.global-search .icon { color: var(--muted); }
.global-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; font-size: 13px; }
.global-search kbd { padding: 3px 7px; border: 1px solid #dfe3e9; border-radius: 6px; background: #fff; color: #8991a2; font-size: 10px; }
.icon-button { width: 43px; height: 43px; border: 0; border-radius: 12px; display: grid; place-items: center; background: transparent; color: var(--ink); cursor: pointer; }
.menu-button, .mobile-search-button { display: none; }
.content { width: min(1440px, 100%); margin: 0 auto; padding: 28px 34px 54px; }

.panel { padding: 25px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-small); }
.panel h2 { margin: 0; font-size: 20px; letter-spacing: -.03em; }
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 19px; }
.panel-header a { display: inline-flex; align-items: center; gap: 4px; color: var(--blue); font-size: 12px; font-weight: 750; }
.panel-header a .icon { width: 16px; }
.panel-wide { min-width: 0; }

.alert { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; margin-bottom: 18px; border: 1px solid; border-radius: 14px; font-size: 13px; line-height: 1.45; }
.alert .icon { flex: 0 0 auto; width: 19px; margin-top: 1px; }
.alert a { text-decoration: underline; font-weight: 750; }
.alert-success { color: #065f46; background: #ecfdf5; border-color: #a7f3d0; }
.alert-error { color: #9a3412; background: #fff7ed; border-color: #fed7aa; }
.alert-warning { color: #854d0e; background: #fffbeb; border-color: #fde68a; }

.welcome-banner { min-height: 272px; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 34px 38px; border-radius: 26px; color: #fff; background: linear-gradient(120deg, #0748c9 0%, #0877f4 55%, #ff5a09 145%); box-shadow: 0 18px 45px rgba(9, 105, 237, .2); }
.welcome-banner::after { content: ""; position: absolute; width: 360px; height: 360px; right: -70px; top: -170px; border: 1px solid rgba(255, 255, 255, .24); border-radius: 50%; box-shadow: 0 0 0 60px rgba(255, 255, 255, .05), 0 0 0 120px rgba(255, 255, 255, .035); }
.welcome-banner > * { position: relative; z-index: 1; }
.welcome-banner-copy { min-width: 0; max-width: 920px; }
.welcome-banner h2 { margin: 0; font-size: clamp(30px, 3vw, 45px); line-height: 1.05; letter-spacing: -.05em; }
.welcome-banner p { max-width: 760px; margin: 14px 0 0; color: rgba(255,255,255,.82); font-size: 13px; line-height: 1.55; }
.banner-summary-chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.banner-summary-chips > span { min-width: 150px; padding: 10px 13px; border: 1px solid rgba(255,255,255,.2); border-radius: 13px; background: rgba(255,255,255,.1); backdrop-filter: blur(8px); }
.banner-summary-chips small, .banner-summary-chips strong { display: block; }
.banner-summary-chips small { color: rgba(255,255,255,.68); font-size: 8px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.banner-summary-chips strong { margin-top: 4px; color: #fff; font-size: 11px; }

.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 20px 0; }
.metric-card { min-height: 138px; display: flex; align-items: center; gap: 15px; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow-small); }
.metric-icon { width: 50px; height: 50px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 16px; }
.metric-icon.blue, .record-icon.blue, .movement-icon.blue { color: var(--blue); background: var(--blue-soft); }
.metric-icon.orange, .record-icon.orange, .movement-icon.orange { color: var(--orange); background: var(--orange-soft); }
.metric-card > div > span, .metric-card small { display: block; color: var(--muted); }
.metric-card > div > span { font-size: 11px; font-weight: 700; }
.metric-card strong { display: block; margin: 3px 0; font-size: 31px; line-height: 1; letter-spacing: -.05em; }
.metric-card small { font-size: 10px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, .75fr); gap: 20px; margin-top: 20px; }
.dashboard-grid.two-lists { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dashboard-updates-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.dashboard-update-panel { min-width: 0; }
.dashboard-update-list { display: flex; flex-direction: column; }
.dashboard-update-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.dashboard-update-item:first-child { padding-top: 0; border-top: 0; }
.dashboard-update-item:last-child { padding-bottom: 0; }
.dashboard-update-item.is-read { opacity: .7; }
.dashboard-update-copy { min-width: 0; }
.dashboard-update-copy > span, .dashboard-update-copy > small { display: block; }
.dashboard-update-heading { display: flex !important; align-items: center; justify-content: space-between; gap: 8px; }
.dashboard-update-heading strong { color: var(--blue); font-size: 10px; letter-spacing: .03em; }
.indication-updates .dashboard-update-heading strong { color: var(--orange); }
.dashboard-update-heading em { flex: 0 0 auto; padding: 4px 7px; border-radius: 999px; color: var(--blue); background: var(--blue-soft); font-size: 8px; font-style: normal; font-weight: 800; }
.indication-updates .dashboard-update-heading em { color: var(--orange); background: var(--orange-soft); }
.dashboard-update-title { margin-top: 4px; overflow: hidden; color: var(--ink); font-size: 12px; font-weight: 780; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-update-movement { margin: 4px 0 5px; overflow: hidden; color: #4e5668; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.movement-event-kind { display: inline-flex !important; width: fit-content; margin-top: 5px; padding: 4px 7px; border-radius: 999px; color: #35506f; background: #edf3fa; font-size: 8px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.dashboard-update-copy small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.dashboard-update-item > .movement-icon { align-self: flex-start; }
.dashboard-update-item > form { align-self: center; }
.dashboard-update-item .seen-button span { display: inline; }
.dashboard-sync-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; margin-top: 20px; background: linear-gradient(120deg, #fff, #f5f9ff); }
.dashboard-sync-card .sync-icon { margin: 0; }
.dashboard-sync-copy h2 { margin: 3px 0 4px; font-size: 17px; }
.dashboard-sync-copy p { margin: 0; color: var(--muted); font-size: 11px; }
.dashboard-sync-copy .sync-warning { display: block; margin-top: 7px; color: #854d0e; font-size: 10px; }
.dashboard-sync-actions { display: flex; align-items: center; gap: 9px; }
.dashboard-sync-actions form { margin: 0; }
.sync-summary { display: flex; flex-direction: column; align-items: flex-start; background: linear-gradient(160deg, #fff, #f5f9ff); }
.sync-summary h2 { margin: 4px 0 8px; text-transform: capitalize; }
.sync-summary p { margin: 0 0 22px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.sync-summary form { margin-top: auto; width: 100%; }
.sync-summary .button { width: 100%; }
.sync-icon { width: 49px; height: 49px; display: grid; place-items: center; border-radius: 16px; color: var(--blue); background: var(--blue-soft); margin-bottom: 24px; }
.sync-icon.large { width: 64px; height: 64px; border-radius: 20px; }
.sync-icon.large .icon { width: 30px; height: 30px; }

.movement-list { display: flex; flex-direction: column; }
.movement-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 15px 0; border-top: 1px solid var(--line); }
.movement-item:first-child { border-top: 0; padding-top: 0; }
.movement-item:last-child { padding-bottom: 0; }
.movement-item.is-read { opacity: .68; }
.movement-icon { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 14px; }
.movement-copy { min-width: 0; }
.movement-copy > * { display: block; }
.movement-label { color: var(--blue); font-size: 9px; font-weight: 850; letter-spacing: .07em; }
.movement-copy strong { margin: 4px 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.movement-copy p { margin: 6px 0; color: #4e5668; font-size: 12px; line-height: 1.5; }
.movement-copy small { color: var(--muted); font-size: 10px; }
.seen-button { border: 1px solid var(--line); border-radius: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; background: #fff; color: var(--muted); cursor: pointer; font-size: 10px; font-weight: 700; }
.seen-button .icon { width: 15px; height: 15px; }
.read-check { display: inline-flex; align-items: center; gap: 4px; color: var(--blue); font-size: 10px; font-weight: 750; }
.read-check .icon { width: 15px; }

.compact-list { display: flex; flex-direction: column; }
.compact-list > a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.compact-list > a:first-child { border-top: 0; padding-top: 0; }
.compact-list > a:last-child { padding-bottom: 0; }
.compact-list > a > span:nth-child(2) { min-width: 0; }
.compact-list strong, .compact-list small { display: block; }
.compact-list strong { font-size: 12px; }
.compact-list small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.compact-list > a > .icon { width: 17px; color: var(--muted); }
.record-icon { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 14px; }

.filter-panel { margin-bottom: 19px; padding: 18px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow-small); }
.filters { display: flex; align-items: center; gap: 10px; }
.filters select, .stack-form select, .stack-form input, .stack-form textarea { border: 1px solid var(--line); outline: 0; background: #fff; color: var(--ink); transition: border .16s, box-shadow .16s; }
.filters select { min-height: 44px; min-width: 132px; border-radius: 11px; padding: 0 35px 0 12px; font-size: 12px; }
.filters select:focus, .stack-form select:focus, .stack-form input:focus, .stack-form textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(9, 105, 237, .11); }
.search-field { min-width: 220px; flex: 1; height: 44px; display: flex; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; background: #f9fafb; }
.search-field .icon { color: var(--muted); }
.search-field input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; font-size: 12px; }
.status-tabs { display: flex; align-items: center; gap: 8px; overflow-x: auto; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); scrollbar-width: none; }
.status-tabs::-webkit-scrollbar { display: none; }
.status-tabs a { flex: 0 0 auto; padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px; color: #4f5769; font-size: 11px; font-weight: 700; }
.status-tabs a.is-active { border-color: var(--blue); background: var(--blue); color: #fff; }
.list-heading { display: flex; align-items: center; justify-content: space-between; margin: 0 3px 11px; color: var(--muted); font-size: 11px; }
.list-heading strong { color: var(--ink); }
.proposition-list { display: flex; flex-direction: column; gap: 12px; }
.proposition-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 17px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow-small); transition: transform .16s ease, box-shadow .16s ease, border .16s ease; }
.proposition-card:hover { transform: translateY(-2px); border-color: #cfd8e8; box-shadow: var(--shadow); }
.proposition-card > .record-icon { width: 52px; height: 52px; border-radius: 17px; }
.record-main { min-width: 0; }
.record-title-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 13px; }
.record-title-line h2 { margin: 0; font-size: 15px; line-height: 1.3; letter-spacing: -.02em; }
.record-main > p { display: -webkit-box; overflow: hidden; margin: 6px 0 11px; color: var(--muted); font-size: 12px; line-height: 1.5; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.record-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 15px; color: var(--muted); font-size: 10px; }
.record-meta > span:not(.category-tag) { display: inline-flex; align-items: center; gap: 5px; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-meta .icon { width: 14px; height: 14px; color: var(--blue); }
.status-badge { max-width: 220px; display: inline-flex; align-items: center; justify-content: center; padding: 6px 9px; border-radius: 8px; font-size: 9px; font-weight: 800; text-align: center; text-transform: capitalize; }
.status-tramitacao, .status-executando { color: var(--blue); background: var(--blue-soft); }
.status-aprovado, .status-lei, .status-sucesso, .status-respondido { color: #067647; background: #e8f8f0; }
.status-arquivado, .status-erro { color: #596174; background: #eef0f3; }
.status-parcial { color: var(--orange-dark); background: var(--orange-soft); }
.category-tag { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 999px; font-size: 9px; font-weight: 800; }
.category-tag.azul { color: var(--blue); background: var(--blue-soft); }
.category-tag.laranja { color: var(--orange); background: var(--orange-soft); }
.card-arrow { color: #9aa1ae; }

.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 16px; color: var(--muted); font-size: 11px; font-weight: 700; }
.back-link .icon { width: 17px; }
.detail-hero { display: flex; align-items: stretch; justify-content: space-between; gap: 40px; padding: 33px 36px; margin-bottom: 20px; border-radius: 24px; color: #fff; box-shadow: var(--shadow); }
.detail-hero.blue { background: linear-gradient(120deg, #064bc9, var(--blue)); }
.detail-hero.orange { background: linear-gradient(120deg, #da4300, var(--orange)); }
.detail-hero h2 { margin: 0; font-size: 34px; letter-spacing: -.05em; }
.detail-hero p { margin: 8px 0 0; color: rgba(255,255,255,.84); font-size: 14px; }
.hero-status { min-width: 270px; display: flex; flex-direction: column; justify-content: center; padding-left: 30px; border-left: 1px solid rgba(255,255,255,.24); }
.hero-status span, .hero-status small { color: rgba(255,255,255,.7); font-size: 10px; }
.hero-status strong { margin: 6px 0; font-size: 16px; }
.hero-official-link { display: inline-flex; align-items: center; justify-content: center; align-self: flex-start; min-height: 36px; margin-top: 13px; padding: 0 13px; border: 1px solid rgba(255,255,255,.45); border-radius: 10px; color: #fff; background: rgba(255,255,255,.12); font-size: 10px; font-weight: 800; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, .7fr); gap: 20px; align-items: start; }
.detail-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.detail-ementa { margin: 14px 0 20px; color: #4c5466; font-size: 14px; line-height: 1.7; }
.detail-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding-top: 17px; border-top: 1px solid var(--line); }
.detail-facts span { min-width: 0; }
.detail-facts small, .detail-facts strong { display: block; }
.detail-facts small { color: var(--muted); font-size: 9px; }
.detail-facts strong { margin-top: 4px; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.sticky-panel { position: sticky; top: 108px; }
.count-pill { padding: 6px 10px; border-radius: 999px; background: #f0f2f5; color: var(--muted); font-size: 10px; font-weight: 700; }
.timeline { position: relative; }
.timeline::before { content: ""; position: absolute; top: 21px; bottom: 21px; left: 20px; width: 2px; background: #dfe5ee; }
.timeline-item { position: relative; display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 14px; padding-bottom: 17px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot { position: relative; z-index: 1; width: 42px; height: 42px; display: grid; place-items: center; border: 5px solid #fff; border-radius: 50%; background: #dfe4ec; color: #788194; }
.timeline-dot .icon { width: 17px; height: 17px; }
.timeline-item.is-latest .timeline-dot { color: #fff; background: var(--blue); box-shadow: 0 0 0 5px var(--blue-soft); }
.timeline-card { padding: 15px 17px; border: 1px solid var(--line); border-radius: 15px; background: #fafbfc; }
.timeline-item.is-latest .timeline-card { border-color: #c4dbfb; background: #f8fbff; }
.timeline-card header { display: flex; justify-content: space-between; gap: 14px; }
.timeline-card header strong { font-size: 12px; }
.timeline-card header > span { min-width: 0; }
.timeline-badge { display: inline-flex; margin-top: 6px; padding: 4px 7px; border-radius: 999px; color: var(--blue); background: var(--blue-soft); font-size: 8px; font-style: normal; font-weight: 750; }
.timeline-card time { flex: 0 0 auto; color: var(--muted); font-size: 9px; }
.timeline-card p { margin: 7px 0; color: #51596b; font-size: 11px; line-height: 1.55; }
.timeline-card > small { display: flex; align-items: center; color: var(--muted); font-size: 9px; }
.timeline-card > small .icon { width: 13px; margin: 0 5px; }
.timeline-card > small.timeline-unit { margin: 0 0 6px; gap: 4px; }
.timeline-card blockquote { margin: 10px 0 0; padding: 8px 10px; border-left: 3px solid var(--orange); background: var(--orange-soft); color: #7d310f; font-size: 10px; }
.timeline-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin: 12px 0 0; }
.timeline-details div { min-width: 0; padding-top: 8px; border-top: 1px solid var(--line); }
.timeline-details dt { color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.timeline-details dd { margin: 3px 0 0; color: #303849; font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; }
.movement-changes { display: grid; gap: 6px; margin: 10px 0 0; padding: 10px; border-radius: 10px; background: #f2f6fb; }
.movement-changes div { display: grid; grid-template-columns: minmax(90px, .35fr) 1fr; gap: 8px; }
.movement-changes dt, .movement-changes dd { margin: 0; font-size: 9px; line-height: 1.4; }
.movement-changes dt { color: #40546f; font-weight: 800; }
.movement-changes dd { color: #27364a; }
.movement-changes del { color: var(--muted); }
.documents-list { display: flex; flex-direction: column; gap: 9px; }
.documents-list > a { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; }
.documents-list strong, .documents-list small { display: block; }
.documents-list strong { font-size: 11px; }
.documents-list small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.documents-list > a > .icon { width: 18px; color: var(--muted); }
.document-fallback { display: flex; align-items: flex-start; gap: 11px; padding: 14px; border: 1px dashed #b7c6dc; border-radius: 14px; color: var(--muted); background: #f8fbff; }
.document-fallback > .icon { flex: 0 0 auto; width: 18px; color: var(--blue); }
.document-fallback strong, .document-fallback small { display: block; }
.document-fallback strong { color: var(--ink); font-size: 11px; }
.document-fallback small { margin-top: 4px; line-height: 1.45; }

.stack-form { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.stack-form label { display: flex; flex-direction: column; gap: 6px; color: #4d5566; font-size: 10px; font-weight: 750; }
.stack-form input, .stack-form select, .stack-form textarea { width: 100%; min-height: 43px; padding: 0 11px; border-radius: 11px; font-size: 12px; font-weight: 500; }
.stack-form textarea { min-height: 105px; padding-top: 10px; resize: vertical; line-height: 1.5; }
.stack-form .check-field { flex-direction: row; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; }
.check-field input { width: 17px; min-height: 17px; accent-color: var(--blue); }

.movement-feed .movement-item { padding: 19px 0; align-items: flex-start; }
.movement-feed .movement-copy strong { white-space: normal; }
.feed-filters .filters { justify-content: flex-start; }
.feed-panel { max-width: 1000px; }
.sync-grid, .users-grid, .settings-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; margin-bottom: 20px; align-items: start; }
.users-grid { grid-template-columns: minmax(0, 2fr) minmax(280px, .65fr); }
.settings-grid { grid-template-columns: repeat(3, 1fr); }
.sync-control > p { margin: 8px 0 24px; color: var(--muted); font-size: 12px; }
.sync-status-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 18px 0; margin-bottom: 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sync-status-row small, .sync-status-row strong { display: block; }
.sync-status-row small { color: var(--muted); font-size: 9px; }
.sync-status-row strong { margin-top: 5px; font-size: 11px; text-transform: capitalize; }
.result-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.result-grid span { padding: 15px 10px; border-radius: 13px; text-align: center; background: #f6f8fb; }
.result-grid strong, .result-grid small { display: block; }
.result-grid strong { color: var(--blue); font-size: 24px; }
.result-grid small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.sync-type-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.sync-type-card { border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: #fff; }
.sync-type-card header { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.sync-type-card header strong, .sync-type-card header small { display: block; }
.sync-type-card header small { margin-top: 3px; font-size: 9px; text-transform: capitalize; }
.sync-type-card > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sync-type-card > div span { min-width: 0; padding: 9px 6px; border-radius: 10px; text-align: center; background: #f6f8fb; }
.sync-type-card > div strong, .sync-type-card > div small { display: block; }
.sync-type-card > div strong { font-size: 15px; color: var(--blue); }
.sync-type-card.orange > div strong { color: var(--orange); }
.sync-type-card > div small { margin-top: 2px; color: var(--muted); font-size: 7px; line-height: 1.25; }
.sync-history { display: flex; flex-direction: column; gap: 9px; }
.sync-run { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.sync-run > summary { display: grid; grid-template-columns: minmax(150px, 1.4fr) repeat(4, minmax(65px, .65fr)) auto; align-items: center; gap: 12px; padding: 13px 15px; cursor: pointer; list-style: none; }
.sync-run > summary::-webkit-details-marker { display: none; }
.sync-run > summary > span:not(.status-badge) strong, .sync-run > summary > span:not(.status-badge) small { display: block; }
.sync-run > summary > span:not(.status-badge) strong { font-size: 10px; }
.sync-run > summary > span:not(.status-badge) small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.sync-run > summary > .icon { width: 17px; color: var(--muted); transition: transform .2s ease; }
.sync-run[open] > summary > .icon { transform: rotate(90deg); }
.sync-run-body { padding: 15px; border-top: 1px solid var(--line); background: #fbfcfe; }
.sync-run-body .alert { margin: 14px 0 0; }
.technical-log { margin-top: 14px; border: 1px solid #25334a; border-radius: 12px; overflow: hidden; background: #111827; color: #dbeafe; }
.technical-log > summary { padding: 11px 13px; cursor: pointer; font-size: 10px; font-weight: 750; }
.technical-log pre { max-height: 360px; overflow: auto; margin: 0; padding: 14px; border-top: 1px solid #334155; white-space: pre-wrap; overflow-wrap: anywhere; font: 9px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.table-wrap { max-width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th, td { padding: 13px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: 10px; }
th { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .04em; }
tbody tr:last-child td { border-bottom: 0; }
.table-user { display: flex; align-items: center; gap: 9px; }
.table-user strong, .table-user small { display: block; }
.table-user strong { font-size: 10px; }
.table-user small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.table-actions { display: flex; align-items: center; gap: 5px; }
.table-actions button { border: 0; background: transparent; color: var(--blue); cursor: pointer; font-size: 9px; font-weight: 750; }
.preference-toggle { min-height: 28px; padding: 0 9px; border: 1px solid #fed7aa; border-radius: 999px; color: #9a3412; background: #fff7ed; cursor: pointer; font-size: 9px; font-weight: 750; }
.preference-toggle.is-on { color: #065f46; border-color: #a7f3d0; background: #ecfdf5; }
.blue-text { color: var(--blue); }
.table-link { color: var(--blue); font-size: 10px; font-weight: 750; }

.email-preview-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 20px; border-color: #b8d5ff; background: linear-gradient(120deg, #fff, #f4f8ff); }
.email-preview-card p { color: var(--muted); font-size: 12px; }
.email-preview-card blockquote { margin: 13px 0; padding: 12px 14px; border-left: 3px solid var(--blue); border-radius: 0 10px 10px 0; background: var(--blue-soft); color: #174a8b; font-size: 12px; }
.email-preview-card .alert { margin: 12px 0 0; }
.email-preview-actions { display: flex; align-items: flex-end; gap: 9px; }
.email-preview-actions form { margin: 0; }
.email-preview-actions .stack-form { gap: 8px; }
.email-top-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
.email-config-card dl { margin: 20px 0; }
.email-config-card dl div { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 10px 0; border-top: 1px solid var(--line); }
.email-config-card dt { color: var(--muted); font-size: 10px; }
.email-config-card dd { margin: 0; text-align: right; font-size: 11px; font-weight: 700; }
.email-rules-card p, .email-rules-card li { color: #4e5668; font-size: 12px; line-height: 1.55; }
.email-rules-card ul { margin: 16px 0 0; padding-left: 18px; }
.order-day-panel { margin-bottom: 20px; border-color: #fed7aa; background: linear-gradient(135deg, #fff, #fffaf6); }
.order-day-panel .panel-header { align-items: flex-start; }
.order-day-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; margin-top: 18px; padding: 18px; border: 1px solid #f0e1d7; border-radius: 14px; background: #fff; }
.order-day-summary h3 { margin: 10px 0 5px; font-size: 16px; }
.order-day-summary p { margin: 0; color: var(--muted); font-size: 10px; }
.order-day-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.order-day-links a { color: var(--blue); font-size: 10px; font-weight: 750; }
.order-day-summary form { min-width: 180px; }
.order-matters { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.order-matters strong { width: 100%; font-size: 10px; }
.order-matters span { padding: 7px 9px; border-radius: 999px; background: var(--blue-soft); color: #174a8b; font-size: 9px; font-weight: 700; }
.order-text { margin-top: 14px; }
.order-text summary { color: var(--blue); cursor: pointer; font-size: 10px; font-weight: 750; }
.order-text pre { max-height: 310px; overflow: auto; margin: 10px 0 0; padding: 14px; border-radius: 12px; background: #f8fafc; white-space: pre-wrap; font: 10px/1.55 inherit; }
.compact-empty { padding: 18px 10px; }
.email-manual-panel, .email-history-panel, .email-detail-panel { margin-bottom: 20px; }
.email-filters { display: grid; grid-template-columns: 1fr repeat(2, minmax(130px, .65fr)) minmax(180px, 1.2fr) 1fr auto; gap: 9px; margin-bottom: 18px; }
.email-filters input, .email-filters select { min-width: 0; }
.email-movement-table { max-height: 530px; border: 1px solid var(--line); border-radius: 14px; }
.email-movement-table thead { position: sticky; z-index: 2; top: 0; background: #f8fafc; }
.email-movement-table td { vertical-align: top; white-space: normal; }
.email-movement-table td:nth-child(4) { min-width: 260px; }
.email-movement-table td strong, .email-movement-table td small { display: block; }
.email-movement-table td small { max-width: 330px; margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.email-movement-table input[type="checkbox"], .recipient-mode input, .recipient-list input { accent-color: var(--blue); }
.email-compose-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding-top: 22px; }
.recipient-mode { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: #4e5668; font-size: 11px; font-weight: 700; }
.recipient-list { max-height: 210px; overflow: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 13px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: #fafbfc; opacity: .48; pointer-events: none; }
.recipient-list.is-enabled { opacity: 1; pointer-events: auto; }
.recipient-list label { display: flex; align-items: flex-start; gap: 8px; padding: 7px; border-radius: 8px; background: #fff; }
.recipient-list strong, .recipient-list small { display: block; }
.recipient-list strong { font-size: 10px; }
.recipient-list small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.email-compose-grid textarea { width: 100%; min-height: 120px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; resize: vertical; font-size: 12px; line-height: 1.5; }
.email-compose-grid .muted { font-size: 10px; line-height: 1.5; }
.email-history-panel td small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; }
.email-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.email-detail-grid h3 { margin: 0 0 13px; font-size: 13px; }
.email-detail-grid p { padding: 11px 0; margin: 0; border-top: 1px solid var(--line); }
.email-detail-grid p strong, .email-detail-grid p span, .email-detail-grid p small { display: block; }
.email-detail-grid p strong { font-size: 10px; }
.email-detail-grid p span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.email-detail-grid p small { margin-top: 5px; color: #9a3412; font-size: 8px; }
.category-cloud { display: flex; flex-wrap: wrap; gap: 7px; margin: 18px 0; }
.inline-create { padding-top: 16px; border-top: 1px solid var(--line); }
.empty-state { padding: 30px 15px; text-align: center; color: var(--muted); }
.empty-state > span { width: 46px; height: 46px; display: grid; place-items: center; margin: 0 auto 10px; border-radius: 15px; color: var(--blue); background: var(--blue-soft); }
.empty-state strong { display: block; color: var(--ink); font-size: 12px; }
.empty-state p { margin: 5px 0 0; font-size: 10px; }
.search-results { max-width: 900px; }
.search-results > h2 { margin-bottom: 25px; }
.search-group { margin-top: 22px; }
.search-group > header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.search-group h3 { margin: 0; font-size: 14px; }
.search-group > header span { color: var(--muted); font-size: 10px; }

.dialog { width: min(440px, calc(100vw - 30px)); padding: 0; border: 0; border-radius: 20px; box-shadow: 0 30px 90px rgba(10, 20, 40, .28); }
.dialog::backdrop { background: rgba(15, 20, 32, .55); backdrop-filter: blur(4px); }
.dialog form { padding: 24px; margin: 0; }
.dialog header { display: flex; align-items: flex-start; justify-content: space-between; }
.dialog header h2 { margin: 0; font-size: 20px; }
.dialog header button { border: 0; background: transparent; cursor: pointer; }
.dialog p { color: var(--muted); font-size: 12px; }

.bottom-nav, .mobile-overlay, .mobile-more, .mobile-search { display: none; }

.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; background: #fff; }
.login-brand { position: relative; overflow: hidden; min-height: 100vh; display: grid; place-items: center; padding: 50px; color: #fff; background: linear-gradient(145deg, #0752d5, #087cf6 65%, #ff5a09 155%); }
.login-brand::before { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent, rgba(0, 29, 90, .18)); }
.login-orb { position: absolute; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; }
.login-orb-one { width: 500px; height: 500px; left: -230px; top: -210px; box-shadow: 0 0 0 70px rgba(255,255,255,.04), 0 0 0 140px rgba(255,255,255,.025); }
.login-orb-two { width: 340px; height: 340px; right: -150px; bottom: -120px; box-shadow: 0 0 0 55px rgba(255,90,9,.09); }
.login-brand-content { position: relative; z-index: 1; width: min(500px, 100%); }
.login-badge { display: inline-flex; padding: 7px 11px; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; color: rgba(255,255,255,.75); font-size: 10px; font-weight: 800; letter-spacing: .11em; }
.brand-symbol { width: 72px; height: 72px; display: grid; place-items: center; margin: 50px 0 30px; border: 1px solid rgba(255,255,255,.24); border-radius: 23px; background: rgba(255,255,255,.12); backdrop-filter: blur(10px); }
.brand-symbol .icon { width: 36px; height: 36px; }
.login-brand h1 { margin: 0; font-size: clamp(54px, 6vw, 88px); line-height: .88; letter-spacing: -.075em; }
.login-brand p { max-width: 400px; margin: 28px 0 0; color: rgba(255,255,255,.78); font-size: 17px; line-height: 1.55; }
.login-panel { min-height: 100vh; display: grid; place-items: center; padding: 50px; }
.login-form-wrap { width: min(390px, 100%); }
.login-form-wrap h2 { margin: 0; font-size: 34px; letter-spacing: -.05em; }
.login-form-wrap > p { margin: 9px 0 0; font-size: 13px; }
.login-form-wrap .stack-form { margin-top: 28px; }
.login-form-wrap .stack-form input { min-height: 52px; font-size: 13px; }
.mobile-login-brand { display: none; }

@media (max-width: 1180px) {
  :root { --sidebar: 236px; }
  .content, .topbar { padding-left: 24px; padding-right: 24px; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .filters { flex-wrap: wrap; }
  .search-field { min-width: 45%; }
  .settings-grid { grid-template-columns: repeat(2, 1fr); }
  .email-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .email-filters .button { grid-column: auto; }
}

@media (max-width: 900px) {
  .dashboard-grid, .dashboard-grid.two-lists, .dashboard-updates-grid, .sync-grid, .users-grid, .detail-grid { grid-template-columns: 1fr; }
  .sticky-panel { position: static; }
  .hero-status { min-width: 220px; }
  .global-search { width: 300px; }
}

@media (max-width: 800px) {
  :root { --bottom-nav-height: 72px; }
  body { padding-bottom: var(--bottom-nav-height); }
  .sidebar { z-index: 80; width: min(300px, 86vw); transform: translateX(-105%); box-shadow: 20px 0 60px rgba(10, 20, 40, .2); transition: transform .25s ease; }
  .sidebar.is-open { transform: translateX(0); }
  .main-column { margin-left: 0; }
  .topbar { height: 76px; gap: 10px; padding: 0 16px; background: linear-gradient(135deg, var(--blue), #087af5); color: #fff; border: 0; }
  .page-title p { display: none; }
  .page-title h1 { color: #fff; font-size: 18px; }
  .menu-button, .mobile-search-button { display: grid; color: #fff; }
  .global-search { display: none; }
  .content { padding: 17px 14px 30px; }
  .welcome-banner { min-height: 0; padding: 26px 24px; border-radius: 22px; align-items: flex-end; }
  .welcome-banner h2 { font-size: 32px; }
  .welcome-banner p { font-size: 12px; }
  .welcome-banner .button { display: none; }
  .banner-summary-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 17px; }
  .banner-summary-chips > span { min-width: 0; padding: 9px 10px; }
  .banner-summary-chips > span:first-child { grid-column: 1 / -1; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 12px 0; }
  .metric-card { min-height: 118px; flex-direction: column; align-items: flex-start; gap: 9px; padding: 15px; border-radius: 17px; }
  .metric-icon { width: 38px; height: 38px; border-radius: 13px; }
  .metric-icon .icon { width: 18px; }
  .metric-card strong { font-size: 26px; }
  .dashboard-grid { gap: 12px; margin-top: 12px; }
  .dashboard-updates-grid { gap: 12px; margin-top: 12px; }
  .panel { padding: 19px; border-radius: 19px; }
  .panel h2 { font-size: 18px; }
  .sync-summary { display: none; }
  .dashboard-update-item { grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 10px; }
  .dashboard-update-item > form, .dashboard-update-item > .read-check { grid-column: 2; justify-self: start; }
  .dashboard-update-item .seen-button span { display: inline; }
  .dashboard-sync-card { grid-template-columns: auto minmax(0, 1fr); gap: 13px; margin-top: 12px; }
  .dashboard-sync-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .dashboard-sync-actions .button { width: 100%; }
  .movement-item { grid-template-columns: auto minmax(0,1fr); }
  .movement-item form, .movement-item .read-check { grid-column: 2; }
  .seen-button span { display: inline; }
  .compact-list > a { padding: 14px 0; }
  .filter-panel { padding: 12px; border-radius: 17px; }
  .filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .search-field { grid-column: 1 / -1; min-width: 0; }
  .filters .button { grid-column: 1 / -1; }
  .filters select { min-width: 0; width: 100%; }
  .status-tabs { margin-top: 11px; padding-top: 11px; }
  .list-heading small { display: none; }
  .proposition-card { grid-template-columns: auto minmax(0,1fr); gap: 12px; padding: 16px; border-radius: 18px; }
  .proposition-card > .record-icon { width: 45px; height: 45px; border-radius: 15px; align-self: flex-start; }
  .card-arrow { display: none; }
  .record-title-line { display: block; }
  .record-title-line h2 { padding-right: 0; font-size: 14px; }
  .record-title-line .status-badge { margin-top: 7px; }
  .record-main > p { font-size: 11px; }
  .record-meta > span:nth-last-child(2) { max-width: 200px; }
  .detail-hero { display: block; padding: 25px; }
  .detail-hero h2 { font-size: 28px; }
  .hero-status { min-width: 0; margin-top: 22px; padding: 18px 0 0; border-left: 0; border-top: 1px solid rgba(255,255,255,.24); }
  .detail-facts { grid-template-columns: repeat(2, 1fr); }
  .timeline-card header { display: block; }
  .timeline-card time { display: block; margin-top: 4px; }
  .timeline-details { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .email-top-grid, .email-compose-grid, .email-detail-grid { grid-template-columns: 1fr; }
  .order-day-panel .panel-header { display: grid; gap: 14px; }
  .order-day-summary { grid-template-columns: 1fr; gap: 16px; }
  .order-day-summary form { min-width: 0; }
  .email-preview-card { display: block; }
  .email-preview-actions { margin-top: 15px; }
  .email-filters { grid-template-columns: 1fr 1fr; }
  .email-filters .button { grid-column: 1 / -1; }
  .recipient-list { grid-template-columns: 1fr; }
  .sync-status-row { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: repeat(2, 1fr); }
  .sync-type-grid { grid-template-columns: 1fr; }
  .sync-run > summary { grid-template-columns: minmax(130px, 1fr) auto auto; }
  .sync-run > summary > span:nth-of-type(3), .sync-run > summary > span:nth-of-type(4) { display: none; }
  .bottom-nav { position: fixed; z-index: 70; inset: auto 0 0; height: var(--bottom-nav-height); display: grid; grid-template-columns: repeat(5, 1fr); padding: 7px 8px max(7px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,255,255,.97); backdrop-filter: blur(16px); box-shadow: 0 -8px 30px rgba(15, 25, 45, .08); }
  .bottom-nav a, .bottom-nav button { border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #727989; font-size: 9px; cursor: pointer; }
  .bottom-nav a.is-active, .bottom-nav button.is-active { color: var(--blue); font-weight: 800; }
  .bottom-nav .icon { width: 22px; height: 22px; }
  .mobile-overlay { position: fixed; z-index: 75; inset: 0; display: block; visibility: hidden; opacity: 0; background: rgba(14, 20, 32, .52); transition: opacity .2s, visibility .2s; }
  .mobile-overlay.is-visible { visibility: visible; opacity: 1; }
  .mobile-more { position: fixed; z-index: 90; left: 0; right: 0; bottom: 0; display: block; padding: 12px 18px calc(24px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; background: #fff; transform: translateY(105%); transition: transform .25s ease; }
  .mobile-more.is-open { transform: translateY(0); }
  .mobile-more .sheet-handle { width: 42px; height: 4px; margin: 0 auto 18px; border-radius: 999px; background: #d9dde4; }
  .mobile-more h2 { margin: 0 0 14px; font-size: 19px; }
  .mobile-more .nav-link { margin-bottom: 4px; }
  .mobile-search { position: fixed; z-index: 90; inset: 0 0 auto; display: block; padding: 14px; background: #fff; transform: translateY(-110%); transition: transform .22s ease; box-shadow: 0 15px 40px rgba(15,25,45,.18); }
  .mobile-search.is-open { transform: translateY(0); }
  .mobile-search form { height: 50px; display: flex; align-items: center; gap: 9px; padding: 0 11px; border: 1px solid var(--line); border-radius: 14px; background: #f7f8fa; }
  .mobile-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; font-size: 13px; }
  .mobile-search button { border: 0; background: transparent; }
  .login-page { display: block; }
  .login-brand { display: none; }
  .login-panel { min-height: 100vh; align-items: start; padding: 0 22px 40px; background: linear-gradient(180deg, var(--blue) 0 215px, #fff 215px); }
  .login-form-wrap { width: 100%; margin-top: 36px; padding: 27px 22px; border-radius: 24px; background: #fff; box-shadow: 0 22px 55px rgba(4, 56, 150, .2); }
  .mobile-login-brand { display: block; margin: -8px -4px 45px; color: #fff; }
  .mobile-login-brand span, .mobile-login-brand small { display: block; }
  .mobile-login-brand span { font-size: 24px; font-weight: 850; letter-spacing: -.04em; }
  .mobile-login-brand small { margin-top: 3px; color: rgba(255,255,255,.8); }
  .login-form-wrap h2 { font-size: 27px; }
}

@media (max-width: 430px) {
  .metrics-grid { gap: 8px; }
  .metric-card { padding: 13px; }
  .record-meta > span:nth-last-child(2) { max-width: 150px; }
  .filters { grid-template-columns: 1fr; }
  .search-field, .filters .button { grid-column: auto; }
  .detail-facts { gap: 15px 8px; }
}

/* Exportações, Mensagens Executivas e emendas estruturadas */
.export-bar{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:18px 0;padding:16px 18px;background:#fff;border:1px solid var(--border);border-radius:18px;box-shadow:var(--shadow-sm)}
.export-intro{display:flex;align-items:center;gap:16px;margin-bottom:16px}.export-intro .export-icon{width:54px;height:54px;flex:0 0 auto}.export-intro h2{margin:4px 0}.export-intro p{margin:0}.export-filters{align-items:end}.export-results{margin-bottom:24px}
.export-bar>div{display:flex;align-items:center;gap:12px}.export-bar strong,.export-bar small{display:block}.export-bar small{color:var(--muted);margin-top:3px}.export-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:#eaf3ff;color:var(--blue)}
.export-options{display:flex!important;flex-wrap:wrap;justify-content:flex-end}.export-options select{min-width:175px}.export-options details{position:relative}.export-options summary{padding:10px 12px;border:1px solid var(--border);border-radius:10px;cursor:pointer;font-size:13px}.export-options details[open]{padding:10px;background:#fff;border:1px solid var(--border);border-radius:12px}.export-options details label{display:block;margin-top:7px;font-size:12px}
.export-config-dialog{width:min(900px,calc(100vw - 32px));max-height:calc(100vh - 40px);padding:0;border:0;border-radius:22px;box-shadow:0 30px 90px rgba(10,31,68,.3);color:var(--ink)}.export-config-dialog::backdrop{background:rgba(8,24,49,.58);backdrop-filter:blur(3px)}.export-config-dialog>header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:22px 24px 18px;border-bottom:1px solid var(--border)}.export-config-dialog h2{margin:3px 0 5px}.export-config-dialog header p{margin:0;color:var(--muted)}.dialog-close{display:grid;place-items:center;width:38px;height:38px;border:1px solid var(--border);border-radius:12px;background:#fff;color:var(--muted);cursor:pointer}.export-config-flow{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:18px 24px 8px}.export-config-flow>section{display:flex;align-items:flex-start;gap:11px;padding:14px;border:1px solid var(--border);border-radius:15px;background:#f8fafc}.export-config-flow>section>div{display:grid;gap:7px;min-width:0;flex:1}.export-config-flow select{width:100%}.export-config-flow small{color:var(--muted);line-height:1.4}.export-fields-step{grid-column:1/-1}.step-number{display:grid;place-items:center;flex:0 0 auto;width:25px;height:25px;border-radius:50%;background:var(--blue);color:#fff;font-size:12px;font-weight:800}.field-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.field-actions button{padding:5px 8px;border:1px solid var(--border);border-radius:8px;background:#fff;color:var(--blue);font:inherit;font-size:12px;font-weight:700;cursor:pointer}.field-actions span{margin-left:auto;color:var(--muted);font-size:12px}.export-field-groups{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:8px 24px 18px}.export-field-groups fieldset{min-width:0;padding:13px;border:1px solid var(--border);border-radius:14px}.export-field-groups legend{padding:0 6px;color:var(--muted);font-size:11px;font-weight:800;letter-spacing:.05em;text-transform:uppercase}.export-field-groups label{display:flex;align-items:flex-start;gap:8px;padding:6px 2px;font-size:13px;line-height:1.35;cursor:pointer}.export-field-groups input{width:17px;height:17px;flex:0 0 auto;accent-color:var(--blue)}.export-field-warning{margin:0 24px 14px;padding:10px 12px;border-radius:10px;background:#fff4e5;color:#8b4b08;font-size:12px}.export-config-dialog>footer{position:sticky;bottom:0;display:flex;justify-content:flex-end;gap:10px;padding:16px 24px;border-top:1px solid var(--border);background:#fff}
.selectable-record{position:relative;padding-left:40px}.selectable-record>.proposition-card{width:100%}.record-checkbox{position:absolute;left:10px;top:50%;transform:translateY(-50%);z-index:2;padding:8px}.record-checkbox input,.select-all input{width:18px;height:18px;accent-color:var(--blue)}.select-all{display:flex;align-items:center;gap:7px;cursor:pointer}
.executive-list .proposition-card>.icon:last-child{color:var(--muted);flex:0 0 auto}.relation-list{display:grid;gap:10px}.relation-list a{display:flex;align-items:center;gap:13px;padding:14px;border:1px solid var(--border);border-radius:14px;color:inherit;text-decoration:none}.relation-list a>span:nth-child(2){display:grid;gap:4px;flex:1}.relation-list small{color:var(--muted);line-height:1.4}.relation-list a>.icon{color:var(--muted)}
.amendment-list{display:grid;gap:12px}.amendment-list article{padding:18px;border:1px solid var(--border);border-radius:16px;background:#fff}.amendment-list article header{display:flex;align-items:center;justify-content:space-between;gap:12px}.amendment-list article header>div{display:flex;align-items:center;gap:9px}.amendment-list time,.amendment-list small{color:var(--muted);font-size:12px}.amendment-list p{line-height:1.55;margin:12px 0}.amendment-list article>a{color:var(--blue);font-weight:700;text-decoration:none;font-size:13px}
@media(max-width:980px){.export-bar{align-items:flex-start;flex-direction:column}.export-options{justify-content:flex-start!important;width:100%}}
@media(max-width:680px){.export-options{display:grid!important;grid-template-columns:1fr 1fr}.export-options select,.export-options details{grid-column:1/-1}.export-options .button{width:100%;font-size:11px}.selectable-record{padding-left:31px}.record-checkbox{left:0}.export-bar{padding:14px}.export-config-dialog{width:calc(100vw - 16px);max-height:calc(100vh - 16px)}.export-config-dialog>header,.export-config-flow,.export-field-groups,.export-config-dialog>footer{padding-left:16px;padding-right:16px}.export-config-flow,.export-field-groups{grid-template-columns:1fr}.export-fields-step{grid-column:auto}.export-config-dialog>footer .button{flex:1}.amendment-list article header{align-items:flex-start;flex-direction:column}}

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