/* assets/css/workspace.css */
/* Razync workspace: presentation only; processing contracts stay in app.js. */
:root { color-scheme: light; --bg:#f5f7fb; --surface:#fff; --surface-2:#f0f4fa; --border:#e2e8f0; --text:#18283e; --muted:#65758a; --accent:#3264db; --accent-soft:#edf2ff; }
body { background:var(--bg); font-family:Inter,"Segoe UI",sans-serif; font-size:14px; line-height:1.5; }
button,input,select,textarea { font:inherit; }
button,a,input,select,summary { -webkit-tap-highlight-color:transparent; }
button:focus-visible,a:focus-visible,summary:focus-visible { outline:3px solid #7aa0f1; outline-offset:4px; }
[hidden] { display:none !important; }
.visually-hidden { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.app-shell { width:auto; max-width:1560px; margin:0 0 0 238px; padding:0 40px; }
.sidebar { position:fixed; inset:0 auto 0 0; z-index:20; width:238px; padding:30px 18px 24px; background:#14243b; color:#fff; display:flex; flex-direction:column; }
.sidebar .brand { padding:0 12px 36px; color:#fff; gap:12px; }
.brand-mark { width:42px; height:42px; background:#3669e3; border:0; color:#fff; border-radius:12px; font-size:22px; }
.brand strong { font-size:23px; letter-spacing:-1px; }
.brand small { color:#a5b4cb; font-size:11px; }
.nav-caption { padding:0 14px; color:#91a2bd; font-size:9px; font-weight:700; letter-spacing:1.6px; }
.main-nav { flex-direction:column; gap:7px; border:0; padding:16px 0; overflow:visible; }
.main-nav-btn { display:flex; align-items:center; text-align:left; white-space:normal; min-height:46px; padding:12px 14px; color:#bfcbdd; border-radius:9px; font-size:12px; font-weight:500; gap:12px; }
.main-nav-btn::before { content:""; width:18px; height:18px; flex:none; background:currentColor; mask:var(--nav-icon) center/contain no-repeat; }
.main-nav-btn[data-view="companies"] { --nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.7' viewBox='0 0 24 24'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E"); }
.main-nav-btn[data-view="converter"] { --nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.7' viewBox='0 0 24 24'%3E%3Cpath d='M4 7h16m-4-4 4 4-4 4M20 17H4m4-4-4 4 4 4'/%3E%3C/svg%3E"); }
.main-nav-btn[data-view="ledger"] { --nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.7' viewBox='0 0 24 24'%3E%3Cpath d='M12 3v18M4 6h16M4 6l-3 8h6L4 6Zm16 0-3 8h6l-3-8ZM7 21h10'/%3E%3C/svg%3E"); }
.main-nav-btn[data-view="tasks"] { --nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.7' viewBox='0 0 24 24'%3E%3Crect x='4' y='4' width='16' height='17' rx='2'/%3E%3Cpath d='M8 2v5m8-5v5M8 13l3 3 5-6'/%3E%3C/svg%3E"); }
.main-nav-btn:hover { background:#203653; color:#fff; }
.main-nav-btn.active { background:#2d4c75; color:#fff; box-shadow:inset 3px 0 #75a5ff; }
.sidebar-note { margin-top:auto; border-top:1px solid #30415a; padding:22px 12px 0; display:flex; align-items:flex-start; gap:10px; font-size:11px; color:#dde5f1; }
.sidebar-note small { display:block; font-size:10px; color:#91a2bd; margin-top:4px; }
.sidebar-dot { width:7px; height:7px; background:#68c9b6; border-radius:50%; margin-top:5px; flex:none; }
.topbar { height:82px; border-bottom:1px solid var(--border); }
.topbar-title { display:flex; gap:12px; align-items:center; font-size:12px; }
.topbar-title span { color:var(--muted); }
.topbar-title strong { font-weight:600; border-left:1px solid #cdd5e1; padding-left:12px; }
.status-pill { font-size:10px; padding:6px 10px; border:1px solid var(--border); color:var(--muted); background:#fff; display:inline-flex; align-items:center; gap:7px; }
.status-pill.online { color:#277663; background:#eef8f4; border-color:#d5eadf; }
.status-pill.online::before { content:""; width:6px; height:6px; background:#3a9e7c; border-radius:50%; }
.hero { max-width:none; padding:26px 0 22px; }
.eyebrow { font-size:10px; letter-spacing:1.5px; color:#5a78a8; }
.hero h1 { font-size:34px; line-height:1.15; letter-spacing:-1.3px; margin:8px 0 10px; }
.hero p { font-size:13px; max-width:720px; line-height:1.7; }
.overview { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin-bottom:30px; }
.hero[hidden]+.overview { display:none; }
.overview-card { display:flex; align-items:center; gap:15px; background:#fff; border:1px solid var(--border); border-radius:12px; padding:18px 20px; box-shadow:0 2px 4px #14243b03; }
.overview-icon { display:grid; place-items:center; width:43px; height:43px; border-radius:11px; background:#edf2ff; color:#476bdd; font-size:25px; }
.overview-card:nth-child(2) .overview-icon { color:#378b75; background:#eef7f2; }
.overview-card:nth-child(3) .overview-icon { color:#ac7b3c; background:#fbf3e8; }
.overview-card strong { display:block; font-size:26px; font-weight:650; line-height:1.2; }
.overview-card div>span { display:block; color:var(--muted); font-size:11px; margin-top:4px; }
.workspace { padding:0 0 40px; }
.search-card { background:transparent; border:0; padding:0; border-radius:0; }
.directory-heading { display:flex; justify-content:space-between; align-items:center; margin-bottom:20px; }
.directory-heading h2 { font-size:20px; letter-spacing:-.5px; margin:0; }
.directory-heading p { font-size:12px; color:var(--muted); margin:4px 0 0; }
.directory-tag { font-size:9px; letter-spacing:1px; color:#708097; border:1px solid var(--border); border-radius:5px; padding:5px 8px; }
.directory-controls { display:grid; grid-template-columns:1fr 215px; gap:12px; }
.search-wrap { height:45px; background:#fff; border-radius:9px; }
.search-wrap span { font-size:22px; }
.search-wrap input { font-size:12px; }
.directory-controls select { background:#fff; border:1px solid var(--border); color:#52637a; padding:10px 12px; border-radius:9px; font-size:12px; width:100%; }
.company-filters { display:flex; gap:7px; margin-top:17px; flex-wrap:wrap; }
.company-filter { background:transparent; border:1px solid transparent; color:var(--muted); border-radius:6px; padding:6px 11px; font-size:11px; cursor:pointer; }
.company-filter.active { background:#e7edfa; color:#315daa; border-color:#d9e2f3; font-weight:650; }
.company-filter:hover { color:var(--accent); }
.search-meta { font-size:10px; margin-top:17px; padding-bottom:12px; }
.grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-top:0; }
.company-card { position:relative; align-items:stretch; min-height:162px; padding:20px; border-radius:11px; box-shadow:0 2px 4px #14243b03; transition:border-color .16s,box-shadow .16s,transform .16s; }
.company-card>div { min-width:0; }
.company-card:hover { background:#fff; border-color:#93aedc; box-shadow:0 5px 16px #14243b0a; transform:translateY(-2px); }
.card-topline { justify-content:space-between; gap:8px; margin-bottom:12px; }
.card-topline .company-code { font-size:10px; letter-spacing:.5px; background:#edf2fa; color:#526b93; border-radius:5px; padding:4px 8px; }
.company-card h2 { font-size:13px; line-height:1.5; font-weight:650; letter-spacing:0; margin:0 28px 12px 0; }
.company-card p { font-size:9px; letter-spacing:.45px; font-weight:600; color:#8190a4; }
.company-card .arrow { position:absolute; bottom:17px; right:19px; width:25px; height:25px; background:#f4f6fa; color:#7c8da5; font-size:15px; display:grid; place-items:center; border-radius:50%; }
.mini-status { font-size:9px; padding:3px 7px; background:#f7f9fc; color:#6c7b90; border-color:#e8edf3; }
.company-card[data-availability="api_ready"] .mini-status { color:#397b65; background:#f0f8f3; border-color:#ddebdf; }
.empty-state { grid-column:1/-1; background:#fff; padding:35px; }
.company-panel { padding:28px 0 44px; }
.back-button { font-size:12px; margin-bottom:22px; }
.panel-head { padding:23px 26px; background:#fff; border:1px solid var(--border); border-radius:12px; align-items:center; margin-bottom:16px; }
.panel-head h2 { font-size:26px; line-height:1.35; letter-spacing:-.7px; max-width:760px; }
.panel-head p { font-size:11px; margin-top:6px; }
.admin-access { border:0; background:transparent; padding:8px 3px; margin:0 0 15px; font-size:11px; color:var(--muted); }
.admin-access summary { cursor:pointer; }
.admin-access input { background:#fff; border:1px solid var(--border); padding:10px 12px; border-radius:8px; }
.tool-tabs { background:#eaf0f8; border:1px solid #e0e7f1; border-radius:10px; padding:5px; gap:4px; margin-bottom:20px; }
.tool-tab { border:0; color:#66768c; background:transparent; padding:10px 14px; font-size:11px; border-radius:7px; }
.tool-tab.active { color:#294f8f; background:#fff; box-shadow:0 1px 4px #18283e14; }
.tool-tab:hover { background:#f8faff; color:var(--accent); }
.tool-card { background:#fff; border-radius:12px; padding:26px; grid-template-columns:minmax(0,.8fr) minmax(0,1.4fr); gap:28px; box-shadow:0 2px 5px #14243b03; }
.tool-card h3 { font-size:19px; letter-spacing:-.4px; }
.tool-card p { font-size:12px; line-height:1.7; }
.tool-card>div:first-child { padding-right:18px; }
form label { display:block; font-size:11px !important; color:#53657d !important; font-weight:600; margin:3px 0 6px; }
form input,form select,form textarea { width:100%; background:#fbfcfe !important; border:1px solid #dce4ef !important; color:var(--text) !important; border-radius:8px !important; padding:11px 12px !important; font-size:12px !important; min-width:0; }
form input:focus,form select:focus,form textarea:focus { outline:2px solid #a4bff4; outline-offset:1px; }
form input[type="file"] { background:#f8faff !important; border:1px dashed #becde4 !important; padding:15px !important; }
input::file-selector-button { border:0; background:#e6edfa; color:#355987; border-radius:5px; padding:6px 9px; margin-right:10px; font-size:11px; cursor:pointer; }
form input[type="checkbox"] { width:auto; accent-color:var(--accent); }
form button[type="submit"],#processButton { background:#3264db !important; border:1px solid #3264db !important; color:#fff !important; border-radius:8px; padding:12px 16px; font-size:12px; font-weight:650; cursor:pointer; }
form button[type="submit"]:hover,#processButton:hover { background:#2656c4 !important; }
button.secondary-action,.base-management button { background:#fff !important; color:#46618c !important; border:1px solid #d9e2ef !important; border-radius:8px; padding:11px 14px; font-size:11px; cursor:pointer; }
#processForm .secondary-action { background:#f6f9ff !important; color:#46618c !important; border-color:#d9e2ef !important; }
form button:disabled { opacity:.55; cursor:wait; }
.stack-forms form { background:#fbfcfe; border-color:var(--border); padding:20px; gap:10px; }
.base-management { padding:16px 0; border-top:1px solid var(--border); margin-top:8px; }
.mini-metrics { margin-top:18px; gap:9px; }
.mini-metrics span { background:#f2f6fc; border:0; padding:12px; font-size:10px; }
.mini-metrics strong { display:block; font-size:21px; color:#315585; }
.preview-results table { font-size:11px; border:1px solid var(--border); }
.preview-results th { color:#546882; background:#f3f6fb; padding:12px; font-size:10px; letter-spacing:.3px; }
.preview-results td { padding:12px; border-bottom:1px solid var(--border); }
.preview-results h4 { font-size:13px; padding-top:10px; }
.preview-results tr:nth-child(even) td { background:#fbfcfe; }
.page-head { padding:35px 0 26px; }
.page-head h1 { font-size:32px; letter-spacing:-1px; }
.page-head p { font-size:13px; }
#txtForm { grid-column:1 / -1; border-top:1px solid var(--border); padding-top:22px; display:grid; gap:9px; }
#txtForm h3 { margin:0 0 6px; }
.task-panel,.task-metric { border-radius:11px; background:#fff; }
.task-metric strong { color:#315585; font-size:26px; }
.task-item { background:#fbfcfe; }
footer { font-size:10px; min-height:68px; color:#8491a4; }
@media(min-width:1600px) { .grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:1100px) { .app-shell { margin-left:210px; padding:0 26px; } .sidebar { width:210px; padding-inline:13px; } .overview-card { padding:16px 13px; gap:10px; } .overview-icon { width:34px; height:34px; } .overview-card div>span { font-size:10px; } .tool-card { grid-template-columns:1fr; gap:18px; } .task-layout { grid-template-columns:1fr; } }
@media(max-width:760px) { .sidebar { position:static; width:100%; padding:17px 18px 8px; } .sidebar .brand { padding:0 0 15px; } .brand-mark { width:34px; height:34px; } .brand strong { font-size:20px; } .nav-caption,.sidebar-note { display:none; } .main-nav { flex-direction:row; overflow-x:auto; padding:0; gap:5px; } .main-nav-btn { white-space:nowrap; min-height:39px; font-size:10px; padding:9px 10px; gap:6px; } .main-nav-btn::before { width:14px; height:14px; } .app-shell { margin:0; padding:0; max-width:none; } .topbar,main,footer { margin:0 20px; } .topbar { height:62px; } .status-pill { display:inline-flex; font-size:9px; } .topbar-title { font-size:10px; gap:7px; } .topbar-title strong { padding-left:7px; } .hero { padding:29px 0 24px; } .hero h1 { font-size:31px; } .overview { gap:9px; margin-bottom:26px; } .overview-card { padding:13px 10px; gap:0; } .overview-icon { display:none; } .overview-card strong { font-size:23px; } .overview-card div>span { font-size:9px; line-height:1.5; } .directory-controls { grid-template-columns:1fr; gap:9px; } .directory-heading p { font-size:11px; } .grid { grid-template-columns:1fr; gap:11px; } .company-card { min-height:146px; } .panel-head { padding:20px; align-items:flex-start; gap:12px; } .panel-head h2 { font-size:23px; } .tool-card { padding:19px; } .tool-tabs { margin-left:0; padding:5px; } .tool-tab { padding:9px 11px; font-size:10px; } .task-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } .directory-tag { display:none; } footer { padding:15px 0; } }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto !important; transition:none !important; } }
@media(max-width:760px) { .main-nav,.tool-tabs { scrollbar-width:none; } .main-nav::-webkit-scrollbar,.tool-tabs::-webkit-scrollbar { display:none; } }


/* Preview contábil inspirada no fluxo do Streamlit: tabela primeiro, download depois. */
.streamlit-preview {
  display:grid;
  gap:16px;
  margin-top:22px;
  max-width:100%;
  min-width:0;
}

.preview-intro {
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:18px;
  padding:18px 0 2px;
  border-top:1px solid var(--border);
}

.preview-eyebrow {
  display:block;
  margin-bottom:6px;
  color:#6d84a5;
  font-size:9px;
  font-weight:800;
  letter-spacing:1.35px;
}

.preview-intro h3 {
  margin:0;
  color:var(--text);
  font-size:18px;
  letter-spacing:-.25px;
}

.preview-intro p {
  max-width:760px;
  margin:6px 0 0;
  color:var(--muted);
  font-size:11px;
  line-height:1.55;
}

.preview-sheet {
  min-width:0;
  overflow:hidden;
  border:1px solid var(--border);
  border-radius:10px;
  background:#fff;
}

.preview-sheet-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:13px 15px;
  border-bottom:1px solid var(--border);
  background:#f8fafc;
}

.preview-sheet-head h4 {
  margin:0 !important;
  padding:0 !important;
  color:#263a56;
  font-size:13px !important;
  font-weight:750;
}

.preview-sheet-head > div:first-child > span {
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-size:9px;
}

.preview-metrics {
  display:flex;
  align-items:center;
  gap:7px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.preview-metric {
  display:flex;
  align-items:baseline;
  gap:6px;
  padding:6px 9px;
  border:1px solid #dbe3ee;
  border-radius:7px;
  background:#fff;
  white-space:nowrap;
}

.preview-metric small {
  color:#7a899d;
  font-size:8px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.45px;
}

.preview-metric strong {
  color:#334f74;
  font-size:10px;
}

.preview-table-scroll {
  width:100%;
  max-width:100%;
  overflow:auto;
  max-height:560px;
  background:#fff;
}

.preview-results .dataframe-preview {
  width:100%;
  min-width:820px;
  margin:0;
  border:0;
  border-collapse:separate;
  border-spacing:0;
  font-size:11px;
}

.preview-results .dataframe-preview thead th {
  position:sticky;
  top:0;
  z-index:2;
  padding:9px 11px;
  border:0;
  border-bottom:1px solid #d7e0eb;
  background:#f1f5f9;
  color:#52657f;
  font-size:9px;
  font-weight:800;
  letter-spacing:.35px;
  text-transform:uppercase;
  white-space:nowrap;
}

.preview-results .dataframe-preview tbody td {
  padding:8px 11px;
  border:0;
  border-bottom:1px solid #edf1f5;
  background:#fff;
  color:#29384c;
  line-height:1.35;
  white-space:nowrap;
}

.preview-results .dataframe-preview tbody tr:nth-child(even) td {
  background:#fbfcfe;
}

.preview-results .dataframe-preview tbody tr:hover td {
  background:#f2f6fb;
}

.preview-results .dataframe-preview .numeric {
  text-align:right;
  font-variant-numeric:tabular-nums;
}

.preview-results .dataframe-preview .history-cell {
  min-width:290px;
  white-space:normal;
}

.preview-diagnostics {
  overflow:hidden;
  border:1px solid var(--border);
  border-radius:9px;
  background:#fff;
}

.preview-diagnostics summary {
  cursor:pointer;
  padding:12px 14px;
  color:#4c6180;
  font-size:10px;
  font-weight:750;
  background:#f8fafc;
}

.diagnostic-block {
  padding:0 14px 14px;
}

.diagnostic-block h4 {
  margin:14px 0 8px !important;
  padding:0 !important;
  font-size:11px !important;
}

.preview-note {
  margin:0;
  color:#7e8b9d;
  font-size:9px;
}

.preview-download {
  justify-self:start;
  min-width:220px;
  border:1px solid #315585;
  border-radius:8px;
  padding:10px 15px;
  background:#315585;
  color:#fff;
  cursor:pointer;
  font-size:11px;
  font-weight:750;
}

.preview-download:hover {
  background:#27476f;
}

@media(max-width:760px) {
  .preview-intro { padding-top:15px; }
  .preview-intro h3 { font-size:16px; }
  .preview-sheet-head { align-items:flex-start; flex-direction:column; gap:10px; }
  .preview-metrics { justify-content:flex-start; }
  .preview-table-scroll { max-height:460px; }
  .preview-results .dataframe-preview { min-width:760px; font-size:10px; }
  .preview-results .dataframe-preview thead th,
  .preview-results .dataframe-preview tbody td { padding:8px 9px; }
  .preview-download { width:100%; }
}


/* === Workspace refinement v2: mais próximo do fluxo simples do Streamlit === */
.compact-hero {
  padding:24px 0 14px;
  max-width:880px;
}
.compact-hero .eyebrow {
  color:#71829a;
  font-size:9px;
  letter-spacing:1.7px;
}
.compact-hero h1 {
  margin:5px 0 4px;
  font-size:30px;
  line-height:1.18;
  letter-spacing:-.9px;
}
.compact-hero p {
  max-width:760px;
  font-size:12px;
  line-height:1.55;
}

/* Resumo discreto em vez de três cards grandes. */
.overview {
  display:flex;
  align-items:center;
  gap:0;
  margin:0 0 24px;
  padding:0 0 16px;
  border-bottom:1px solid var(--border);
}
.overview-card {
  min-width:0;
  display:flex;
  align-items:baseline;
  gap:7px;
  padding:0 22px;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.overview-card:first-child { padding-left:0; }
.overview-card + .overview-card { border-left:1px solid var(--border); }
.overview-icon { display:none; }
.overview-card strong {
  display:inline;
  font-size:17px;
  line-height:1;
  color:#314b70;
}
.overview-card div {
  display:flex;
  align-items:baseline;
  gap:7px;
}
.overview-card div>span {
  display:inline;
  margin:0;
  color:#8090a4;
  font-size:9px;
}

/* Busca e filtros mais compactos, como no catálogo do Streamlit. */
.directory-heading {
  margin-bottom:12px;
}
.directory-heading h2 {
  font-size:16px;
  letter-spacing:-.2px;
}
.directory-heading p {
  margin-top:2px;
  font-size:10px;
}
.directory-controls {
  grid-template-columns:minmax(0,1fr) 205px;
  gap:8px;
}
.search-wrap {
  height:42px;
  border-color:#d7e0eb;
  box-shadow:0 1px 2px rgba(31,49,73,.025);
}
.search-wrap:focus-within {
  border-color:#9bb2d7;
  box-shadow:0 0 0 3px rgba(77,112,170,.09);
}
.search-wrap input {
  font-size:11px;
}
.directory-controls select {
  padding:9px 11px;
  font-size:11px;
}
.company-filters {
  margin-top:11px;
  gap:4px;
}
.company-filter {
  padding:5px 9px;
  font-size:9px;
}
.search-meta {
  margin-top:10px;
  padding-bottom:8px;
  font-size:9px;
}

/* Lista de empresas: linhas discretas, sem aparência de botões grandes. */
.grid {
  display:block;
  margin-top:0;
  overflow:hidden;
  border:1px solid var(--border);
  border-radius:11px;
  background:#fff;
  box-shadow:0 2px 8px rgba(30,47,70,.025);
}
.company-card.company-row {
  width:100%;
  min-height:68px;
  display:grid;
  grid-template-columns:58px minmax(0,1fr) auto;
  align-items:center;
  gap:14px;
  padding:10px 14px;
  border:0;
  border-bottom:1px solid #edf1f5;
  border-radius:0;
  background:#fff;
  box-shadow:none;
  text-align:left;
  color:inherit;
  cursor:pointer;
  transform:none;
  transition:background .14s ease, box-shadow .14s ease;
  animation:rowEnter .22s ease both;
  animation-delay:calc(var(--row-index, 0) * 14ms);
}
.company-card.company-row:last-child {
  border-bottom:0;
}
.company-card.company-row:hover {
  background:#f8fafd;
  border-color:#edf1f5;
  box-shadow:inset 3px 0 #6f91ca;
  transform:none;
}
.company-card.company-row:focus-visible {
  position:relative;
  z-index:2;
}
.company-row-code {
  display:inline-flex;
  width:46px;
  height:28px;
  align-items:center;
  justify-content:center;
  border-radius:6px;
  background:#edf2f8;
  color:#526b8f;
  font-size:10px;
  font-weight:750;
  font-variant-numeric:tabular-nums;
}
.company-row-main {
  min-width:0;
  display:grid;
  gap:4px;
}
.company-row-name {
  overflow:hidden;
  color:#25364e;
  font-size:12px;
  font-weight:650;
  line-height:1.35;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.company-row-meta {
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}
.company-row-regime {
  color:#7c8999;
  font-size:8px;
  font-weight:700;
  letter-spacing:.45px;
  text-transform:uppercase;
}
.company-row .mini-status {
  padding:2px 6px;
  border:0;
  background:transparent;
  color:#8a98aa;
  font-size:8px;
}
.company-row[data-availability="api_ready"] .mini-status {
  background:transparent;
  color:#447866;
}
.company-row-action {
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:#7d8b9f;
  font-size:9px;
  font-weight:650;
}
.company-row-action b {
  display:grid;
  width:24px;
  height:24px;
  place-items:center;
  border-radius:50%;
  background:#f0f4f8;
  color:#5f7391;
  font-size:12px;
  font-weight:600;
  transition:transform .14s ease, background .14s ease;
}
.company-row:hover .company-row-action b {
  transform:translateX(2px);
  background:#e8eef7;
}

/* Área da empresa: contexto no topo e navegação de ferramentas mais limpa. */
.company-panel {
  padding:18px 0 44px;
}
.back-button {
  margin:0 0 14px;
  color:#708096;
  font-size:10px;
}
.panel-head {
  align-items:flex-start;
  margin:0 0 10px;
  padding:0 0 16px;
  border:0;
  border-bottom:1px solid var(--border);
  border-radius:0;
  background:transparent;
}
.panel-head h2 {
  max-width:900px;
  margin:4px 0 3px;
  font-size:24px;
  line-height:1.25;
  letter-spacing:-.6px;
}
.panel-head p {
  margin:0;
  font-size:10px;
}
.panel-quick-info {
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  margin-top:9px;
}
.panel-quick-info span {
  display:inline-flex;
  align-items:center;
  min-height:23px;
  padding:3px 8px;
  border:1px solid #dae2ec;
  border-radius:999px;
  background:#fff;
  color:#657791;
  font-size:8px;
  font-weight:650;
}
.panel-head>.status-pill {
  margin-top:2px;
  background:transparent;
}
.admin-access {
  margin:3px 0 8px;
  padding:5px 0;
  font-size:9px;
}
.admin-access summary {
  color:#8190a3;
}
.admin-access[open] {
  padding-bottom:12px;
}
.tool-tabs {
  position:sticky;
  top:0;
  z-index:12;
  margin:0 0 13px;
  padding:4px;
  border:1px solid #dce4ee;
  border-radius:9px;
  background:rgba(245,247,251,.94);
  backdrop-filter:blur(12px);
}
.tool-tab {
  padding:8px 11px;
  font-size:9px;
}
.tool-tab.active {
  color:#294f80;
  box-shadow:0 1px 3px rgba(37,55,78,.09);
}

/* Ferramentas mais compactas, mantendo a prévia como área principal. */
.tool-pane.active {
  animation:paneEnter .18s ease both;
}
.tool-card {
  border-color:#dfe6ef;
  border-radius:10px;
  padding:20px;
  grid-template-columns:minmax(190px,.55fr) minmax(360px,1.45fr);
  gap:22px;
  box-shadow:0 2px 8px rgba(34,52,74,.025);
}
.tool-card>div:first-child {
  padding-right:8px;
}
.tool-card h3 {
  margin:4px 0 5px;
  font-size:16px;
}
.tool-card p {
  margin-top:6px;
  font-size:10px;
  line-height:1.6;
}
#processForm {
  align-content:start;
  gap:7px;
}
#processForm label,
form label {
  margin:2px 0 4px;
  font-size:9px !important;
}
form input,
form select,
form textarea {
  min-height:40px;
  padding:9px 10px !important;
  border-radius:7px !important;
  font-size:10px !important;
}
form input[type="file"] {
  min-height:auto;
  padding:11px !important;
  background:#fbfcfe !important;
  border-style:dashed !important;
  transition:border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
form input[type="file"].has-files {
  border-style:solid !important;
  border-color:#93b6a9 !important;
  background:#f5faf8 !important;
  box-shadow:0 0 0 2px rgba(70,124,102,.05);
}
input::file-selector-button {
  padding:5px 8px;
  font-size:9px;
}
form button[type="submit"],
#processButton {
  min-height:39px;
  padding:9px 13px;
  border-radius:7px;
  font-size:10px;
}
.secondary-action {
  min-height:37px;
  padding:8px 12px !important;
  font-size:9px !important;
}
#workflowPreview {
  grid-column:1 / -1;
  margin-top:2px;
}

/* Barra de filtro dentro de cada prévia. */
.preview-table-tools {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:8px 10px;
  border-bottom:1px solid #e4eaf1;
  background:#fbfcfe;
}
.preview-table-tools input {
  width:min(360px,100%);
  min-height:32px;
  padding:7px 10px;
  border:1px solid #dce4ed;
  border-radius:6px;
  background:#fff;
  color:#32445d;
  font-size:9px;
}
.preview-table-tools input:focus {
  outline:2px solid rgba(73,111,172,.18);
  border-color:#9fb4d5;
}
.preview-table-tools span {
  flex:none;
  color:#8a98aa;
  font-size:8px;
  font-variant-numeric:tabular-nums;
}

/* A prévia fica visualmente integrada ao fluxo, não como um card separado. */
.streamlit-preview {
  gap:11px;
  margin-top:14px;
}
.preview-intro {
  padding:14px 0 0;
}
.preview-intro h3 {
  font-size:15px;
}
.preview-intro p {
  max-width:820px;
  margin-top:4px;
  font-size:9px;
}
.preview-sheet {
  border-radius:8px;
}
.preview-sheet-head {
  padding:10px 12px;
}
.preview-sheet-head h4 {
  font-size:11px !important;
}
.preview-sheet-head>div:first-child>span {
  font-size:8px;
}
.preview-metric {
  padding:4px 7px;
  border-radius:6px;
}
.preview-metric small {
  font-size:7px;
}
.preview-metric strong {
  font-size:9px;
}
.preview-table-scroll {
  max-height:610px;
}
.preview-results .dataframe-preview {
  min-width:760px;
  font-size:10px;
}
.preview-results .dataframe-preview thead th {
  padding:8px 10px;
  font-size:8px;
}
.preview-results .dataframe-preview tbody td {
  padding:7px 10px;
}
.preview-results .dataframe-preview .history-cell {
  min-width:330px;
}
.preview-download {
  min-width:190px;
  padding:9px 13px;
  font-size:9px;
}
.preview-diagnostics summary {
  padding:9px 11px;
  font-size:9px;
}

/* Transições curtas para dar sensação de aplicativo, sem exagero visual. */
.global-view.active,
.company-panel:not([hidden]) {
  animation:viewEnter .2s ease both;
}
@keyframes viewEnter {
  from { opacity:0; transform:translateY(4px); }
  to { opacity:1; transform:none; }
}
@keyframes paneEnter {
  from { opacity:0; transform:translateY(3px); }
  to { opacity:1; transform:none; }
}
@keyframes rowEnter {
  from { opacity:0; transform:translateY(3px); }
  to { opacity:1; transform:none; }
}

@media(max-width:900px) {
  .tool-card {
    grid-template-columns:1fr;
  }
  .tool-card>div:first-child {
    padding-right:0;
  }
}

@media(max-width:760px) {
  .compact-hero { padding:22px 0 12px; }
  .compact-hero h1 { font-size:25px; }
  .compact-hero p { font-size:10px; }
  .overview {
    gap:0;
    overflow-x:auto;
    padding-bottom:12px;
    margin-bottom:18px;
  }
  .overview-card {
    flex:0 0 auto;
    padding:0 12px;
  }
  .overview-card strong { font-size:15px; }
  .overview-card div>span { font-size:8px; }
  .directory-controls { grid-template-columns:1fr; }
  .grid { border-radius:9px; }
  .company-card.company-row {
    min-height:64px;
    grid-template-columns:48px minmax(0,1fr) auto;
    gap:10px;
    padding:9px 10px;
  }
  .company-row-code {
    width:40px;
    height:26px;
    font-size:9px;
  }
  .company-row-name {
    font-size:10px;
  }
  .company-row-regime,
  .company-row .mini-status {
    font-size:7px;
  }
  .company-row-action>span {
    display:none;
  }
  .company-row-action b {
    width:22px;
    height:22px;
  }
  .panel-head {
    gap:8px;
    padding-bottom:13px;
  }
  .panel-head h2 {
    font-size:20px;
  }
  .panel-head>.status-pill {
    align-self:flex-start;
  }
  .tool-tabs {
    top:0;
    margin-left:0;
    overflow-x:auto;
  }
  .tool-card {
    padding:15px;
    gap:14px;
  }
  .preview-table-tools {
    align-items:stretch;
    flex-direction:column;
    gap:5px;
  }
  .preview-table-tools input {
    width:100%;
  }
  .preview-table-tools span {
    padding-left:1px;
  }
}

@media(prefers-reduced-motion:reduce) {
  .company-card.company-row,
  .global-view.active,
  .company-panel:not([hidden]),
  .tool-pane.active {
    animation:none !important;
  }
}


/* === Tool workspace v3: identidade visual moderna para as ferramentas === */
.tool-tabs {
  gap:5px;
  padding:5px;
  box-shadow:0 1px 2px rgba(28,44,65,.025);
}
.tool-tab {
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:36px;
  padding:8px 12px;
  font-size:9px;
  letter-spacing:.01em;
}
.tool-tab::before {
  content:"";
  width:14px;
  height:14px;
  flex:none;
  background:currentColor;
  -webkit-mask:var(--tool-tab-icon) center/contain no-repeat;
  mask:var(--tool-tab-icon) center/contain no-repeat;
  opacity:.82;
}
.tool-tab[data-tool="organizar"] {
  --tool-tab-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.7' viewBox='0 0 24 24'%3E%3Cpath d='M3 7.5h7l2 2h9v9.5a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7.5Z'/%3E%3Cpath d='M3 7.5V5a2 2 0 0 1 2-2h5l2 2h5'/%3E%3C/svg%3E");
}
.tool-tab[data-tool="base"] {
  --tool-tab-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.7' viewBox='0 0 24 24'%3E%3Cellipse cx='12' cy='5' rx='7' ry='3'/%3E%3Cpath d='M5 5v7c0 1.7 3.1 3 7 3s7-1.3 7-3V5M5 12v7c0 1.7 3.1 3 7 3s7-1.3 7-3v-7'/%3E%3C/svg%3E");
}
.tool-tab[data-tool="extrato"] {
  --tool-tab-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.7' viewBox='0 0 24 24'%3E%3Cpath d='m4 7 3-3 3 3M7 4v12M20 17l-3 3-3-3m3 3V8'/%3E%3Cpath d='M11 8h6M7 16h6'/%3E%3C/svg%3E");
}
.tool-tab[data-tool="fiscal"] {
  --tool-tab-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.7' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 4 6v5c0 5 3.4 8.4 8 10 4.6-1.6 8-5 8-10V6l-8-3Z'/%3E%3Cpath d='m8.5 12 2.2 2.2 4.8-5'/%3E%3C/svg%3E");
}
.tool-tab[data-tool="francesinhas"] {
  --tool-tab-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.7' viewBox='0 0 24 24'%3E%3Cpath d='M6 2h9l4 4v16H6z'/%3E%3Cpath d='M14 2v5h5M9 11h6M9 15h6M9 19h4'/%3E%3C/svg%3E");
}
.tool-tab.active::before { opacity:1; }

/* Bloco descritivo da ferramenta */
.tool-card > div:first-child {
  position:relative;
  align-self:stretch;
  min-width:0;
  padding:18px 18px 17px !important;
  border:1px solid #e4eaf2;
  border-radius:10px;
  background:
    radial-gradient(circle at 100% 0, rgba(76,111,178,.08), transparent 11rem),
    linear-gradient(145deg,#f9fbff 0%,#f6f9fd 100%);
}
.tool-card > div:first-child .company-code {
  display:block;
  margin-top:12px;
  color:#6b7f9c;
  font-size:8px;
  letter-spacing:1.1px;
}
.tool-card > div:first-child h3 {
  margin-top:4px;
  color:#24364f;
  font-size:17px;
  letter-spacing:-.35px;
}
.tool-card > div:first-child p {
  max-width:470px;
  color:#6d7d91;
  font-size:10px;
  line-height:1.65;
}

.tool-visual-icon {
  display:grid;
  width:38px;
  height:38px;
  place-items:center;
  border:1px solid #d8e2f0;
  border-radius:10px;
  background:#fff;
  color:#42669b;
  box-shadow:0 4px 12px rgba(40,67,104,.06);
}
.tool-visual-icon::before {
  content:"";
  width:19px;
  height:19px;
  background:currentColor;
  -webkit-mask:var(--tool-visual-mask) center/contain no-repeat;
  mask:var(--tool-visual-mask) center/contain no-repeat;
}
.tool-visual-organizar {
  --tool-visual-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.7' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h6l2 3h8v13H4z'/%3E%3Cpath d='M8 12h8M8 16h5'/%3E%3C/svg%3E");
}
.tool-visual-base {
  color:#477862;
  border-color:#d8e9e2;
  --tool-visual-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.7' viewBox='0 0 24 24'%3E%3Cellipse cx='12' cy='5' rx='7' ry='3'/%3E%3Cpath d='M5 5v7c0 1.7 3.1 3 7 3s7-1.3 7-3V5M5 12v7c0 1.7 3.1 3 7 3s7-1.3 7-3v-7'/%3E%3Cpath d='m10 11 1.4 1.4L15 9'/%3E%3C/svg%3E");
}
.tool-visual-extrato {
  color:#426b9e;
  --tool-visual-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.7' viewBox='0 0 24 24'%3E%3Cpath d='M3 6h8v12H3zM13 6h8v12h-8z'/%3E%3Cpath d='m8 9 2 3-2 3m8-6-2 3 2 3'/%3E%3C/svg%3E");
}
.tool-visual-fiscal {
  color:#886d35;
  border-color:#ebe2cf;
  --tool-visual-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.7' viewBox='0 0 24 24'%3E%3Cpath d='M5 3h14v18H5z'/%3E%3Cpath d='M8 7h8M8 11h8M8 15h3M14 15h2'/%3E%3C/svg%3E");
}
.tool-visual-tax {
  color:#6e568e;
  border-color:#e3dcec;
  --tool-visual-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.7' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 4 6v5c0 5 3.4 8.4 8 10 4.6-1.6 8-5 8-10V6l-8-3Z'/%3E%3Cpath d='M9 9h6M9 13h6M12 7v8'/%3E%3C/svg%3E");
}
.tool-visual-francesinhas {
  color:#6a6f8f;
  --tool-visual-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.7' viewBox='0 0 24 24'%3E%3Cpath d='M6 2h9l4 4v16H6z'/%3E%3Cpath d='M14 2v5h5M9 11h6M9 15h6M9 19h4'/%3E%3C/svg%3E");
}

/* Fluxo visual do organizador */
.tool-flow {
  display:grid;
  grid-template-columns:auto 1fr auto 1fr auto;
  align-items:center;
  gap:7px;
  margin-top:18px;
}
.tool-flow span {
  display:inline-flex;
  align-items:center;
  gap:5px;
  color:#6d7d91;
  font-size:8px;
  font-weight:650;
  white-space:nowrap;
}
.tool-flow span b {
  display:grid;
  width:18px;
  height:18px;
  place-items:center;
  border:1px solid #d7e1ee;
  border-radius:50%;
  background:#fff;
  color:#45658e;
  font-size:7px;
}
.tool-flow i {
  height:1px;
  background:#dfe6ef;
}

/* Benefícios/explicações rápidas */
.tool-feature-list {
  display:grid;
  gap:7px;
  margin-top:17px;
}
.tool-feature-list span {
  display:flex;
  align-items:center;
  gap:7px;
  color:#6b7b8e;
  font-size:8px;
}
.tool-feature-list b {
  display:grid;
  width:16px;
  height:16px;
  place-items:center;
  border-radius:50%;
  background:#edf6f2;
  color:#4b806c;
  font-size:8px;
}

/* Formulários agora funcionam como painéis de ação */
.modern-form,
.stack-forms .modern-form {
  position:relative;
  align-content:start;
  padding:16px !important;
  border:1px solid #e1e7ef !important;
  border-radius:10px !important;
  background:#fff !important;
  box-shadow:0 5px 18px rgba(28,46,71,.035);
}
.modern-form {
  display:grid;
  gap:8px;
}
.form-card-header {
  display:flex;
  align-items:center;
  gap:10px;
  margin:-2px 0 6px;
  padding-bottom:11px;
  border-bottom:1px solid #edf1f5;
}
.form-card-header > div {
  min-width:0;
}
.form-card-header strong {
  display:block;
  color:#293c57;
  font-size:10px;
  font-weight:750;
}
.form-card-header small {
  display:block;
  margin-top:2px;
  color:#8995a5;
  font-size:8px;
  line-height:1.45;
}
.form-card-icon {
  display:grid;
  width:30px;
  height:30px;
  flex:none;
  place-items:center;
  border-radius:8px;
  background:#edf3fb;
  color:#456b9e;
}
.form-card-icon::before {
  content:"";
  width:15px;
  height:15px;
  background:currentColor;
  -webkit-mask:var(--form-icon-mask) center/contain no-repeat;
  mask:var(--form-icon-mask) center/contain no-repeat;
}
.icon-files {
  --form-icon-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath d='M4 5h6l2 2h8v12H4z'/%3E%3Cpath d='M12 10v6m-3-3h6'/%3E%3C/svg%3E");
}
.icon-learn {
  color:#4c7b69;
  background:#edf7f3;
  --form-icon-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath d='M4 6.5 12 3l8 3.5-8 3.5-8-3.5Z'/%3E%3Cpath d='M7 9v5c0 2 2.2 3.5 5 3.5s5-1.5 5-3.5V9M20 7v7'/%3E%3C/svg%3E");
}
.icon-classify {
  color:#5d6f9d;
  background:#f0f2fb;
  --form-icon-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath d='M4 5h7v6H4zM13 5h7v6h-7zM4 13h7v6H4z'/%3E%3Cpath d='m15 16 2 2 4-5'/%3E%3C/svg%3E");
}
.icon-review {
  color:#866f46;
  background:#fbf6ea;
  --form-icon-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Ccircle cx='10' cy='10' r='6'/%3E%3Cpath d='m14.5 14.5 5 5M8 10l1.5 1.5L12.5 8'/%3E%3C/svg%3E");
}
.icon-compare {
  --form-icon-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath d='M4 7h13m-3-3 3 3-3 3M20 17H7m3-3-3 3 3 3'/%3E%3C/svg%3E");
}
.icon-ledger {
  color:#8a713f;
  background:#fbf6e9;
  --form-icon-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath d='M5 3h14v18H5z'/%3E%3Cpath d='M8 7h8M8 11h8M8 15h3M14 15h2'/%3E%3C/svg%3E");
}
.icon-tax {
  color:#72568f;
  background:#f5effa;
  --form-icon-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 4 6v5c0 5 3.4 8.4 8 10 4.6-1.6 8-5 8-10V6l-8-3Z'/%3E%3Cpath d='M9 9h6M9 13h6'/%3E%3C/svg%3E");
}
.icon-zip {
  color:#676d8d;
  background:#f0f1f8;
  --form-icon-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath d='M7 3h10l3 3v15H7z'/%3E%3Cpath d='M11 3v3h2V9h-2v3h2v3h-2'/%3E%3C/svg%3E");
}

/* Inputs com hierarquia e feedback mais nítidos */
.modern-form label {
  color:#667990 !important;
  font-size:8px !important;
  font-weight:700 !important;
  letter-spacing:.02em;
}
.modern-form input:not([type="checkbox"]),
.modern-form select,
.modern-form textarea {
  border-color:#dce4ee !important;
  background:#fafbfd !important;
}
.modern-form input:not([type="file"]):focus,
.modern-form select:focus,
.modern-form textarea:focus {
  border-color:#9eb4d5 !important;
  box-shadow:0 0 0 3px rgba(75,112,174,.08);
}
.modern-form input[type="file"] {
  min-height:52px;
  border:1px dashed #cbd7e6 !important;
  background:
    linear-gradient(180deg,#fbfdff,#f8fafd) !important;
  color:#75859a !important;
}
.modern-form input[type="file"]:hover {
  border-color:#99aed0 !important;
  background:#f7faff !important;
}
.modern-form input[type="file"].has-files {
  border-color:#91b6a7 !important;
  background:#f5faf8 !important;
}
.modern-form input::file-selector-button {
  border:1px solid #d7e1ed;
  background:#fff;
  color:#496584;
  box-shadow:0 1px 2px rgba(29,47,70,.04);
}
.optional {
  color:#a0abb9;
  font-size:7px;
  font-weight:500;
}

/* Arquivos escolhidos: nomes visíveis sem depender do tooltip do navegador */
.file-selection {
  display:grid;
  gap:5px;
  margin:-2px 0 3px;
}
.file-selection[hidden] { display:none !important; }
.file-selection-item {
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  padding:7px 8px;
  border:1px solid #e4eaf1;
  border-radius:7px;
  background:#fbfcfe;
}
.file-selection-item > i {
  width:14px;
  height:14px;
  flex:none;
  background:#6881a4;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath d='M6 2h9l4 4v16H6z'/%3E%3Cpath d='M14 2v5h5'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath d='M6 2h9l4 4v16H6z'/%3E%3Cpath d='M14 2v5h5'/%3E%3C/svg%3E") center/contain no-repeat;
}
.file-selection-item > span {
  display:grid;
  min-width:0;
}
.file-selection-item strong {
  overflow:hidden;
  color:#41546e;
  font-size:8px;
  font-weight:650;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.file-selection-item small {
  margin-top:1px;
  color:#96a2b1;
  font-size:7px;
}
.file-selection-more {
  color:#8290a2;
  font-size:7px;
}

/* Botões primários com ícone e resposta tátil */
form button[type="submit"],
#processButton {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  transition:transform .12s ease, box-shadow .12s ease, background .12s ease;
}
form button[type="submit"]::before,
#processButton::before {
  content:"";
  width:13px;
  height:13px;
  flex:none;
  background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.9' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14m-5-5 5 5-5 5'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.9' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14m-5-5 5 5-5 5'/%3E%3C/svg%3E") center/contain no-repeat;
}
form button[type="submit"]:hover:not(:disabled),
#processButton:hover:not(:disabled) {
  transform:translateY(-1px);
  box-shadow:0 5px 12px rgba(50,100,219,.14);
}
#processButton.is-loading::before {
  width:12px;
  height:12px;
  border:2px solid rgba(255,255,255,.45);
  border-top-color:#fff;
  border-radius:50%;
  background:none;
  -webkit-mask:none;
  mask:none;
  animation:toolSpinner .75s linear infinite;
}
@keyframes toolSpinner { to { transform:rotate(360deg); } }

/* Mensagens deixam de parecer texto solto */
.helper:not(:empty) {
  position:relative;
  margin-top:5px !important;
  padding:8px 10px 8px 28px;
  border:1px solid #e3e9f0;
  border-radius:7px;
  background:#f8fafc;
  color:#62738a;
  font-size:8px;
  line-height:1.5;
}
.helper:not(:empty)::before {
  content:"i";
  position:absolute;
  left:9px;
  top:8px;
  display:grid;
  width:12px;
  height:12px;
  place-items:center;
  border:1px solid #bac7d8;
  border-radius:50%;
  color:#72849c;
  font-size:7px;
  font-weight:800;
}
.helper:empty { display:none; }

/* Base Inteligente: aprendizado, classificação e gerenciamento da base. */
.stack-forms {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.stack-forms .modern-form {
  min-width:0;
}
.base-management {
  grid-column:1 / -1;
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px;
  padding:11px 0 0;
  margin:0;
  border-top:1px solid #e9eef4;
}
.base-management .helper {
  flex-basis:100%;
}
.mini-metrics {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:6px;
  margin-top:17px;
}
.mini-metrics span {
  min-width:0;
  padding:9px 8px;
  border:1px solid #e0e8f1;
  border-radius:7px;
  background:rgba(255,255,255,.78);
  color:#728297;
  font-size:7px;
  text-align:center;
}
.mini-metrics strong {
  margin-bottom:2px;
  color:#35577f;
  font-size:15px;
}

/* Fiscal: visual de auditoria, dois módulos bem definidos */
.fiscal-grid {
  gap:12px;
}
.fiscal-grid .vertical-card {
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
  padding:15px;
}
.fiscal-grid .vertical-card > div:first-child {
  padding:15px !important;
}
.fiscal-grid .vertical-card .modern-form {
  box-shadow:none;
}
.inline-fields {
  align-items:center;
}

/* A prévia passa a "encaixar" no mesmo sistema visual das ferramentas */
.preview-intro {
  border-top:0;
  margin-top:2px;
  padding:13px 14px 0;
  border-radius:9px 9px 0 0;
  background:#f8fafc;
}
.preview-intro + .preview-sheet {
  margin-top:-4px;
}
.preview-sheet {
  box-shadow:0 4px 14px rgba(28,46,70,.03);
}
.preview-download {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  transition:transform .12s ease,box-shadow .12s ease;
}
.preview-download::before {
  content:"";
  width:13px;
  height:13px;
  background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.9' viewBox='0 0 24 24'%3E%3Cpath d='M12 3v12m-4-4 4 4 4-4M5 21h14'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.9' viewBox='0 0 24 24'%3E%3Cpath d='M12 3v12m-4-4 4 4 4-4M5 21h14'/%3E%3C/svg%3E") center/contain no-repeat;
}
.preview-download:hover {
  transform:translateY(-1px);
  box-shadow:0 5px 12px rgba(49,85,133,.14);
}

/* Mobile: preserva a hierarquia sem criar telas enormes */
@media(max-width:980px) {
  .stack-forms {
    grid-template-columns:1fr;
  }
}
@media(max-width:760px) {
  .tool-tab {
    min-height:34px;
    padding:7px 9px;
    gap:5px;
  }
  .tool-tab::before {
    width:12px;
    height:12px;
  }
  .tool-card > div:first-child {
    padding:14px !important;
  }
  .tool-visual-icon {
    width:34px;
    height:34px;
  }
  .tool-flow {
    grid-template-columns:auto 1fr auto 1fr auto;
    margin-top:14px;
  }
  .tool-flow span {
    font-size:7px;
  }
  .tool-flow span b {
    width:16px;
    height:16px;
  }
  .modern-form,
  .stack-forms .modern-form {
    padding:13px !important;
  }
  .form-card-header {
    gap:8px;
    padding-bottom:9px;
  }
  .form-card-icon {
    width:27px;
    height:27px;
  }
  .form-card-header strong {
    font-size:9px;
  }
  .form-card-header small {
    font-size:7px;
  }
  .file-selection-item {
    padding:6px 7px;
  }
  .fiscal-grid {
    grid-template-columns:1fr;
  }
}


/* === Tool workspace v4: refinamento estrutural e hierarquia visual === */
.tool-card {
  display:grid;
  grid-template-columns:minmax(230px,.62fr) minmax(0,1.38fr);
  gap:14px;
  padding:0;
  border:0;
  background:transparent;
  box-shadow:none;
}

#companyPanel .tool-card > div:first-child {
  position:static;
  align-self:start;
  min-height:0;
  padding:18px !important;
  border:1px solid #dfe6ef;
  border-radius:12px;
  background:
    linear-gradient(155deg,rgba(255,255,255,.98),rgba(247,250,254,.98)),
    #fff;
  box-shadow:0 7px 22px rgba(30,48,72,.035);
}

.modern-form,
.stack-forms .modern-form {
  border-radius:12px !important;
  box-shadow:0 7px 22px rgba(30,48,72,.035);
}

#processForm.modern-form,
#reconcileForm.modern-form {
  min-height:100%;
}

/* Campos avançados ficam organizados como blocos de entrada, e não como uma pilha crua. */
.dynamic-fields {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.field-group {
  display:grid;
  align-content:start;
  gap:5px;
  min-width:0;
  padding:10px;
  border:1px solid #e3e9f0;
  border-radius:8px;
  background:#fbfcfe;
}
.field-group:focus-within {
  border-color:#b4c6df;
  background:#fff;
  box-shadow:0 0 0 3px rgba(70,104,158,.05);
}
.field-group label {
  margin:0 0 2px !important;
}
.field-group input,
.field-group select {
  background:#fff !important;
}

/* Períodos lado a lado, visual mais compacto. */
#standardPeriod {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  grid-template-rows:auto auto;
  gap:4px 8px;
  margin-top:2px;
  padding:10px;
  border:1px solid #e8edf3;
  border-radius:8px;
  background:#fbfcfd;
}
#standardPeriod label:nth-of-type(1) { grid-column:1; grid-row:1; }
#standardPeriod input:nth-of-type(1) { grid-column:1; grid-row:2; }
#standardPeriod label:nth-of-type(2) { grid-column:2; grid-row:1; }
#standardPeriod input:nth-of-type(2) { grid-column:2; grid-row:2; }

/* O formulário principal recebe uma barra de ação no final. */
#processButton,
#reconcileForm button[type="submit"],
#fiscalForm button[type="submit"],
#taxForm button[type="submit"] {
  margin-top:4px;
}
#processButton {
  position:relative;
  overflow:hidden;
}
#processButton::after {
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(110deg,transparent 25%,rgba(255,255,255,.18) 45%,transparent 65%);
  transform:translateX(-120%);
  transition:transform .5s ease;
}
#processButton:hover::after {
  transform:translateX(120%);
}

/* Abas com indicador ativo mais moderno. */
.tool-tabs {
  overflow:visible;
}
.tool-tab {
  position:relative;
}
.tool-tab.active::after {
  content:"";
  position:absolute;
  left:14px;
  right:14px;
  bottom:3px;
  height:2px;
  border-radius:99px;
  background:#5478b9;
}

/* Base inteligente com melhor separação de níveis. */
.stack-forms {
  align-items:start;
}
.stack-forms .modern-form {
  min-height:100%;
}
.base-management {
  padding:10px 12px;
  border:1px solid #e3e9f1;
  border-radius:9px;
  background:#fafbfd;
}
.base-management::before {
  content:"Gerenciamento da base";
  flex-basis:100%;
  color:#73849a;
  font-size:8px;
  font-weight:750;
  letter-spacing:.03em;
  text-transform:uppercase;
}

/* Conferência: reforça a ideia de dois documentos sendo comparados. */
#reconcileForm {
  position:relative;
}
#reconcileForm::after {
  content:"";
  position:absolute;
  right:14px;
  top:17px;
  width:38px;
  height:38px;
  border-radius:10px;
  background:#f2f6fb;
  opacity:.8;
  pointer-events:none;
}
#reconcileForm::before {
  content:"";
  position:absolute;
  z-index:1;
  right:24px;
  top:27px;
  width:18px;
  height:18px;
  background:#6a82a5;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath d='M4 7h13m-3-3 3 3-3 3M20 17H7m3-3-3 3 3 3'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath d='M4 7h13m-3-3 3 3-3 3M20 17H7m3-3-3 3 3 3'/%3E%3C/svg%3E") center/contain no-repeat;
  pointer-events:none;
}

/* Fiscal ganha divisões mais claras para não parecer um formulário longo. */
.fiscal-grid .vertical-card {
  border:1px solid #e0e6ee;
  border-radius:12px;
  background:#fff;
  box-shadow:0 7px 22px rgba(30,48,72,.03);
}
.fiscal-grid .vertical-card > div:first-child {
  position:static;
  min-height:0;
  border:0;
  border-bottom:1px solid #e9eef4;
  border-radius:0;
  box-shadow:none;
  background:transparent;
}
.fiscal-grid .vertical-card .modern-form {
  border:0 !important;
  border-bottom:1px solid #edf1f5 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  padding:14px 15px !important;
}

/* Melhor leitura dos arquivos escolhidos */
.file-selection-item {
  transition:border-color .12s ease,background .12s ease,transform .12s ease;
}
.file-selection-item:hover {
  border-color:#d1dbe7;
  background:#fff;
  transform:translateY(-1px);
}

/* Área de resultado claramente separada da entrada de dados. */
#workflowPreview:not(:empty) {
  margin-top:14px;
  padding-top:14px;
  border-top:1px solid #e1e7ee;
}
.preview-intro {
  position:relative;
  overflow:hidden;
}
.preview-intro::before {
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:3px;
  background:#5e7fb5;
}

/* Pesquisa não deve ter aparência de login/autofill. */
#companySearch {
  appearance:none;
  -webkit-appearance:none;
  background:#fff;
}
#companySearch:-webkit-autofill,
#companySearch:-webkit-autofill:hover,
#companySearch:-webkit-autofill:focus {
  -webkit-text-fill-color:#2d405b;
  -webkit-box-shadow:0 0 0 1000px #fff inset;
  transition:background-color 9999s ease-out 0s;
}

/* Layout responsivo */
@media(max-width:1100px) {
  .tool-card {
    grid-template-columns:minmax(200px,.7fr) minmax(0,1.3fr);
  }
  .dynamic-fields {
    grid-template-columns:1fr;
  }
}

@media(max-width:900px) {
  .tool-card {
    grid-template-columns:1fr;
  }
  .tool-card > div:first-child {
    position:static;
  }
}

@media(max-width:760px) {
  .tool-tabs {
    overflow-x:auto;
  }
  .tool-tab.active::after {
    left:10px;
    right:10px;
  }
  #standardPeriod {
    grid-template-columns:1fr;
    grid-template-rows:auto auto auto auto;
  }
  #standardPeriod label:nth-of-type(1),
  #standardPeriod input:nth-of-type(1),
  #standardPeriod label:nth-of-type(2),
  #standardPeriod input:nth-of-type(2) {
    grid-column:1;
  }
  #standardPeriod label:nth-of-type(1) { grid-row:1; }
  #standardPeriod input:nth-of-type(1) { grid-row:2; }
  #standardPeriod label:nth-of-type(2) { grid-row:3; }
  #standardPeriod input:nth-of-type(2) { grid-row:4; }
}


/* === Tool workspace v5: fluxo, dropzones e resultados interativos === */
.tool-flow span {
  transition:color .15s ease,opacity .15s ease;
}
.tool-flow span b {
  transition:background .15s ease,border-color .15s ease,color .15s ease,transform .15s ease;
}
.tool-flow span.active {
  color:#315d99;
}
.tool-flow span.active b {
  border-color:#7697cb;
  background:#315f9f;
  color:#fff;
  transform:scale(1.04);
}
.tool-flow span.completed {
  color:#4f7a69;
}
.tool-flow span.completed b {
  border-color:#b9d6ca;
  background:#e9f5f0;
  color:#46725f;
}
.tool-flow span.completed b::after {
  content:"✓";
  font-size:8px;
}
.tool-flow span.completed b {
  font-size:0;
}
.tool-flow span.completed + i {
  background:#b9d6ca;
}

/* Drag & drop sem abandonar o input nativo */
.file-drop-shell {
  position:relative;
  display:grid;
  gap:6px;
  padding:8px;
  border:1px dashed #cdd8e6;
  border-radius:9px;
  background:linear-gradient(180deg,#fcfdff,#f8fafc);
  transition:border-color .16s ease,background .16s ease,box-shadow .16s ease,transform .16s ease;
}
.file-drop-shell:hover {
  border-color:#a9bad2;
  background:#f9fbfe;
}
.file-drop-shell.is-dragging {
  border-color:#6689bd;
  background:#f1f6fd;
  box-shadow:0 0 0 4px rgba(82,121,177,.08);
  transform:translateY(-1px);
}
.file-drop-shell input[type="file"] {
  margin:0;
  border:0 !important;
  background:transparent !important;
  min-height:42px !important;
  padding:7px !important;
}
.file-drop-shell input[type="file"].has-files {
  border:0 !important;
  box-shadow:none !important;
  background:transparent !important;
}
.file-drop-hint {
  display:flex;
  align-items:center;
  gap:6px;
  padding:0 5px 3px;
  color:#97a3b2;
  font-size:7px;
}
.file-drop-hint i {
  width:12px;
  height:12px;
  flex:none;
  background:#8799b0;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath d='M12 16V4m-4 4 4-4 4 4M5 14v6h14v-6'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath d='M12 16V4m-4 4 4-4 4 4M5 14v6h14v-6'/%3E%3C/svg%3E") center/contain no-repeat;
}
.file-drop-shell .file-selection {
  margin:0;
  padding-top:2px;
}
.file-drop-shell .file-selection-item {
  background:#fff;
}

/* Estado de processamento com feedback real */
.process-visual-status {
  display:flex;
  align-items:center;
  gap:10px;
  min-height:48px;
  padding:10px 12px;
  border:1px solid #dfe6ef;
  border-radius:9px;
  background:#f9fbfd;
  transition:border-color .15s ease,background .15s ease;
}
.process-visual-status[hidden] { display:none !important; }
.process-status-icon {
  position:relative;
  width:27px;
  height:27px;
  flex:none;
  border-radius:8px;
  background:#edf3fb;
}
.process-status-icon::before {
  content:"";
  position:absolute;
  inset:7px;
  background:#55749c;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath d='m5 12 4 4L19 6'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath d='m5 12 4 4L19 6'/%3E%3C/svg%3E") center/contain no-repeat;
}
.process-visual-status strong {
  display:block;
  color:#3a4f69;
  font-size:9px;
}
.process-visual-status small {
  display:block;
  margin-top:2px;
  color:#8794a5;
  font-size:7px;
  line-height:1.4;
}
.process-visual-status.is-processing {
  border-color:#d4e0ef;
  background:#f5f8fd;
}
.process-visual-status.is-processing .process-status-icon::before {
  inset:6px;
  border:2px solid #89a2c5;
  border-top-color:#3e679d;
  border-radius:50%;
  background:none;
  -webkit-mask:none;
  mask:none;
  animation:toolSpinner .8s linear infinite;
}
.process-visual-status.is-success {
  border-color:#d7e9e1;
  background:#f6faf8;
}
.process-visual-status.is-success .process-status-icon {
  background:#e9f6f0;
}
.process-visual-status.is-success .process-status-icon::before {
  background:#477a64;
}
.process-visual-status.is-error {
  border-color:#eadada;
  background:#fdf8f8;
}
.process-visual-status.is-error .process-status-icon {
  background:#f8eaea;
}
.process-visual-status.is-error .process-status-icon::before {
  background:#a05d5d;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v6m0 4h.01'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v6m0 4h.01'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Skeleton da prévia enquanto o backend trabalha */
.processing-preview {
  overflow:hidden;
  border:1px solid #e1e7ef;
  border-radius:10px;
  background:#fff;
}
.processing-preview-head {
  display:flex;
  align-items:center;
  gap:10px;
  padding:14px;
  border-bottom:1px solid #edf1f5;
}
.processing-preview-head > div {
  display:grid;
  flex:1;
  gap:6px;
}
.processing-preview-table {
  display:grid;
  gap:7px;
  padding:12px 14px 16px;
}
.skeleton {
  display:block;
  position:relative;
  overflow:hidden;
  border-radius:5px;
  background:#edf1f5;
}
.skeleton::after {
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.72),transparent);
  transform:translateX(-100%);
  animation:skeletonMove 1.15s ease-in-out infinite;
}
.skeleton-icon { width:34px;height:34px;border-radius:9px; }
.skeleton-line { height:8px; }
.skeleton-line.wide { width:210px; }
.skeleton-line.short { width:120px; }
.skeleton-row { height:31px; }
@keyframes skeletonMove { to { transform:translateX(100%); } }

/* Barra de comando da prévia */
.preview-commandbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:11px 12px;
  border:1px solid #dfe6ee;
  border-radius:10px;
  background:#fff;
  box-shadow:0 5px 16px rgba(31,49,74,.035);
}
.preview-command-info {
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
}
.preview-ready-dot {
  width:8px;
  height:8px;
  flex:none;
  border-radius:50%;
  background:#4f9679;
  box-shadow:0 0 0 4px #e9f5f0;
}
.preview-command-info strong {
  display:block;
  color:#31465f;
  font-size:9px;
}
.preview-command-info small {
  display:block;
  margin-top:1px;
  color:#8d98a7;
  font-size:7px;
}
.preview-primary-actions {
  display:flex;
  align-items:center;
  gap:7px;
  flex:none;
}
.preview-primary-actions .preview-download {
  min-width:0;
  margin:0;
  padding:8px 12px;
}

/* Resumo geral com leitura instantânea */
.preview-summary-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:7px;
}
.preview-summary-item {
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
  padding:10px;
  border:1px solid #e4e9f0;
  border-radius:9px;
  background:#fbfcfe;
}
.preview-summary-item > div {
  display:grid;
  min-width:0;
}
.preview-summary-item small {
  color:#8996a6;
  font-size:7px;
}
.preview-summary-item strong {
  overflow:hidden;
  margin-top:1px;
  color:#344b69;
  font-size:10px;
  font-weight:750;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.summary-icon {
  display:grid;
  width:28px;
  height:28px;
  flex:none;
  place-items:center;
  border-radius:8px;
  background:#edf3fa;
  color:#5a759a;
}
.summary-icon::before {
  content:"";
  width:14px;
  height:14px;
  background:currentColor;
  -webkit-mask:var(--summary-mask) center/contain no-repeat;
  mask:var(--summary-mask) center/contain no-repeat;
}
.summary-icon-rows {
  --summary-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath d='M5 6h14M5 12h14M5 18h14'/%3E%3C/svg%3E");
}
.summary-icon-in {
  color:#4d7a68;
  background:#edf7f3;
  --summary-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath d='M12 20V5m-5 5 5-5 5 5'/%3E%3C/svg%3E");
}
.summary-icon-out {
  color:#8a6b51;
  background:#faf3ed;
  --summary-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath d='M12 4v15m-5-5 5 5 5-5'/%3E%3C/svg%3E");
}
.summary-icon-sheets {
  color:#666f97;
  background:#f1f2f9;
  --summary-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath d='M6 4h12v15H6z'/%3E%3Cpath d='M3 7v14h12'/%3E%3C/svg%3E");
}

/* Navegação entre bancos/abas */
.preview-sheet-switcher {
  display:flex;
  align-items:center;
  gap:5px;
  overflow-x:auto;
  padding:1px 0 2px;
  scrollbar-width:none;
}
.preview-sheet-switcher::-webkit-scrollbar { display:none; }
.preview-sheet-switcher > span {
  flex:none;
  margin-right:3px;
  color:#929dac;
  font-size:7px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.5px;
}
.preview-sheet-switcher button {
  flex:none;
  min-height:28px;
  padding:5px 9px;
  border:1px solid #e0e6ee;
  border-radius:7px;
  background:#fff;
  color:#6d7d91;
  cursor:pointer;
  font-size:8px;
  transition:border-color .12s ease,background .12s ease,color .12s ease;
}
.preview-sheet-switcher button:hover {
  border-color:#b8c8dc;
  color:#415e83;
}
.preview-sheet-switcher button.active {
  border-color:#b5c6dc;
  background:#eef3f9;
  color:#315b91;
  font-weight:700;
}
.preview-sheet[hidden] { display:none !important; }

/* Cabeçalho de cada tabela com marcador visual */
.preview-sheet-title {
  display:flex;
  align-items:center;
  gap:9px;
}
.preview-sheet-badge {
  display:grid !important;
  width:28px;
  height:28px;
  flex:none;
  place-items:center;
  margin:0 !important;
  border:1px solid #dce5ef;
  border-radius:8px;
  background:#fff;
  color:#6c7f99 !important;
  font-size:7px !important;
  font-weight:800;
  font-variant-numeric:tabular-nums;
}
.preview-table-search {
  display:flex;
  align-items:center;
  gap:7px;
  width:min(420px,100%);
  padding:0 9px;
  border:1px solid #dce4ed;
  border-radius:7px;
  background:#fff;
}
.preview-table-search i {
  width:13px;
  height:13px;
  flex:none;
  background:#8696a9;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='6'/%3E%3Cpath d='m16 16 4 4'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='6'/%3E%3Cpath d='m16 16 4 4'/%3E%3C/svg%3E") center/contain no-repeat;
}
.preview-table-search input {
  width:100% !important;
  min-height:31px !important;
  padding:6px 0 !important;
  border:0 !important;
  outline:0 !important;
  box-shadow:none !important;
  background:transparent !important;
  font-size:8px !important;
}
.preview-diagnostics summary {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.preview-diagnostics summary b {
  display:grid;
  min-width:21px;
  height:21px;
  place-items:center;
  border-radius:999px;
  background:#edf2f8;
  color:#60748f;
  font-size:7px;
}

/* Layout pequeno */
@media(max-width:900px) {
  .preview-summary-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:760px) {
  .preview-commandbar {
    align-items:flex-start;
    flex-direction:column;
  }
  .preview-primary-actions {
    width:100%;
  }
  .preview-primary-actions .preview-download {
    width:100%;
  }
  .preview-summary-grid {
    grid-template-columns:1fr 1fr;
  }
  .preview-summary-item {
    padding:8px;
  }
  .preview-table-tools {
    align-items:stretch;
  }
  .preview-table-search {
    width:100%;
  }
  .file-drop-hint {
    font-size:6px;
  }
}


/* === Regression fixes: isolate the new company-workspace design === */
/* The v4/v5 tool-card rules are intentionally for company tools only.
   Restore the global converter/ledger cards so those pages do not inherit
   sticky sidebars, transparent cards or zero padding. */
.global-view .tool-card {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(280px,420px);
  gap:28px;
  padding:26px;
  border:1px solid var(--border);
  border-radius:12px;
  background:#fff;
  box-shadow:0 2px 5px rgba(20,36,59,.03);
}
.global-view .tool-card > div:first-child {
  position:static;
  align-self:auto;
  min-height:0;
  padding:0 !important;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.global-view .single-card {
  align-items:start;
}
.global-view .tool-card form {
  min-width:0;
}

/* Loading spinner follows whichever action actually submitted the form. */
#companyPanel button.is-loading::before {
  width:12px !important;
  height:12px !important;
  border:2px solid rgba(255,255,255,.45) !important;
  border-top-color:#fff !important;
  border-radius:50% !important;
  background:none !important;
  -webkit-mask:none !important;
  mask:none !important;
  animation:toolSpinner .75s linear infinite !important;
}
#companyPanel .secondary-action.is-loading::before {
  border-color:rgba(70,97,140,.25) !important;
  border-top-color:#46618c !important;
}

/* Prevent the drag/drop shell from fighting nested field-group layout. */
.field-group > .file-drop-shell,
#standardFields > .file-drop-shell {
  width:100%;
  min-width:0;
}
.file-drop-shell .file-selection-item {
  max-width:100%;
}
.file-drop-shell .file-selection-item strong {
  max-width:100%;
}

/* Keep company workspace stable at smaller desktop widths. */
@media(max-width:1100px) {
  .global-view .tool-card {
    grid-template-columns:1fr;
    gap:18px;
  }
}
@media(max-width:760px) {
  .global-view .tool-card {
    padding:19px;
  }
}


/* Original Razync identity and readable workspace controls. */
.brand-logo { width:48px; height:48px; object-fit:contain; flex-shrink:0; border-radius:12px; }
#companyPanel form label { font-size:12px !important; line-height:1.5; }
#companyPanel form input, #companyPanel form select, #companyPanel form textarea { font-size:13px !important; min-height:42px; }
#companyPanel .tool-card p { font-size:12px; line-height:1.65; }
#companyPanel .tool-tab { font-size:12px; min-height:42px; }
#companyPanel button[type="submit"], #companyPanel .secondary-action, .preview-download { font-size:12px !important; min-height:42px; }
#companyPanel .form-card-header strong { font-size:13px; }
#companyPanel .form-card-header small, #companyPanel .file-drop-hint, #companyPanel .file-selection-item, #companyPanel .helper { font-size:12px; line-height:1.5; }
.preview-results table, .preview-results td { font-size:12px; line-height:1.6; }
.preview-results th { font-size:11px; color:#40516a; }
.preview-command-info strong { font-size:14px; }
.preview-command-info small, .preview-summary-item small, .preview-note { font-size:12px; line-height:1.5; }
.preview-summary-item strong { font-size:17px; }
.preview-intro p { font-size:12px; }
.preview-table-scroll { overscroll-behavior-x:contain; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline:3px solid #0ba8cf; outline-offset:3px; }
@media(max-width:760px) {
  .brand-logo { width:38px; height:38px; border-radius:9px; }
  #companyPanel .tool-tab { white-space:nowrap; }
  .preview-summary-grid { gap:10px; }
}


/* Foco discreto na busca e no filtro de regime. */
.directory-controls .search-wrap,
#regimeFilter {
  transition:border-color .14s ease,box-shadow .14s ease,background .14s ease;
}
.directory-controls .search-wrap:focus-within {
  border-color:#9aacbf;
  background:#fff;
  box-shadow:0 0 0 2px rgba(69,98,136,.08);
}
#companySearch:focus,
#companySearch:focus-visible {
  outline:none !important;
  box-shadow:none !important;
}
#regimeFilter:focus,
#regimeFilter:focus-visible {
  outline:none !important;
  border-color:#9aacbf !important;
  box-shadow:0 0 0 2px rgba(69,98,136,.08) !important;
}


/* Ajuda flutuante da empresa: visível apenas quando há instruções específicas. */
.company-tool-help {
  position:fixed;
  z-index:45;
  right:24px;
  bottom:22px;
  margin:0;
  width:43px;
  height:43px;
  pointer-events:none;
}
.company-tool-help > * { pointer-events:auto; }
.company-tool-help-button {
  display:grid;
  width:43px;
  height:43px;
  min-width:43px;
  place-items:center;
  padding:0;
  border:1px solid #486c9e;
  border-radius:50%;
  background:#355c90;
  color:#fff;
  font-size:19px;
  font-weight:750;
  line-height:1;
  box-shadow:0 5px 16px rgba(22,44,75,.17);
  cursor:grab;
  touch-action:none;
  user-select:none;
  -webkit-user-select:none;
  transition:background .15s ease,box-shadow .15s ease;
}
.company-tool-help.is-dragging .company-tool-help-button { cursor:grabbing; }
.company-tool-help-button:hover,
.company-tool-help-button[aria-expanded="true"] {
  background:#294d7b;
  box-shadow:0 6px 18px rgba(22,44,75,.22);
}
.company-tool-help-button:focus-visible,
#companyToolGuideClose:focus-visible {
  outline:2px solid #81a4d3;
  outline-offset:3px;
}
.company-tool-guide {
  position:fixed;
  width:min(370px,calc(100vw - 32px));
  max-height:min(70vh,620px);
  max-height:min(70dvh,620px);
  overflow-y:auto;
  overscroll-behavior:contain;
  border:1px solid #dae4ee;
  border-radius:12px;
  background:#fff;
  box-shadow:0 12px 34px rgba(20,42,73,.16);
}
.company-tool-guide-heading {
  position:sticky;
  z-index:1;
  top:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:13px 14px 11px;
  border-bottom:1px solid #edf1f6;
  background:#fff;
}
.company-tool-guide-heading > div {
  display:grid;
  gap:2px;
  min-width:0;
}
.company-tool-guide-heading strong {
  color:#314965;
  font-size:13px;
  font-weight:750;
}
.company-tool-guide-heading small {
  color:#798da4;
  font-size:10px;
}
#companyToolGuideClose {
  flex:none;
  display:grid;
  width:29px;
  height:29px;
  place-items:center;
  padding:0;
  border:0;
  border-radius:7px;
  background:#f1f5fa;
  color:#667b93;
  font-size:21px;
  line-height:1;
  cursor:pointer;
}
#companyToolGuideClose:hover { background:#e7edf6; color:#344e70; }
.company-tool-guide-body {
  padding:12px 14px 14px;
}
.company-tool-guide-body > p:first-child {
  margin:0 0 12px;
  color:#5b6e85;
  font-size:11px;
  line-height:1.55;
}
.company-tool-guide-steps {
  display:grid;
  grid-template-columns:1fr;
  gap:9px;
}
.company-tool-guide-step {
  display:grid;
  grid-template-columns:26px minmax(0,1fr);
  gap:9px;
  align-items:start;
}
.company-tool-guide-index {
  display:grid;
  width:26px;
  height:26px;
  place-items:center;
  border-radius:7px;
  background:#edf2f8;
  color:#46668f;
  font-size:11px;
  font-weight:750;
}
.company-tool-guide-step strong {
  display:block;
  margin:0 0 2px;
  color:#374d68;
  font-size:11px;
}
.company-tool-guide-step p {
  margin:0;
  color:#6b7d92;
  font-size:10px;
  line-height:1.5;
}
.company-tool-guide-note {
  margin:13px 0 0;
  padding:9px 10px;
  border-radius:7px;
  background:#f2f6fa;
  color:#526c8d;
  font-size:10px;
  line-height:1.5;
}
@media(max-width:760px) {
  .company-tool-help {
    right:16px;
    bottom:max(16px,env(safe-area-inset-bottom));
    width:46px;
    height:46px;
  }
  .company-tool-guide {
    width:min(350px,calc(100vw - 32px));
    max-height:65vh;
    max-height:65dvh;
  }
  .company-tool-help-button {
    width:46px;
    height:46px;
    min-width:46px;
  }
}
@media(prefers-reduced-motion:reduce) {
  .company-tool-help-button { transition:none; }
}

/* Navegação da conferência Fiscal × Contábil universal. */
.main-nav-btn[data-view="fiscal"] { --nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.7' viewBox='0 0 24 24'%3E%3Cpath d='M4 5h16M4 10h16M4 15h8M15 15l2 2 4-5M4 20h8'/%3E%3C/svg%3E"); }

/* Colaboradores e carteiras: pequena etapa de navegação antes da pesquisa. */
.portfolio-picker { padding:37px 0 40px; max-width:900px; }
.portfolio-heading { margin-bottom:26px; }
.portfolio-heading h1 { font-size:29px;letter-spacing:-.9px;margin:7px 0;line-height:1.2;color:var(--text); }
.portfolio-heading p { font-size:13px;color:var(--muted);margin:0; }
.portfolio-list { display:grid;grid-template-columns:repeat(auto-fit,minmax(235px,320px));gap:12px; }
.portfolio-entry { text-align:left;display:grid;grid-template-columns:1fr auto;gap:3px 12px;align-items:center;background:#fff;border:1px solid var(--border);border-radius:11px;padding:20px 19px;cursor:pointer;min-height:93px;transition:border-color .16s,box-shadow .16s; }
.portfolio-entry:hover { border-color:#9bb4d7;box-shadow:0 4px 14px #14243b0a; }
.portfolio-entry strong { grid-column:1;font-weight:650;font-size:16px;color:#243d59; }
.portfolio-entry>span:not(.portfolio-entry-arrow) { grid-column:1;color:var(--muted);font-size:12px; }
.portfolio-entry-arrow { grid-column:2;grid-row:1 / span 2;background:#f0f4f9;border-radius:50%;width:29px;height:29px;display:grid;place-items:center;color:#567494;font-size:16px; }
.portfolio-toolbar { display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;margin:0 0 21px; }
.portfolio-back { border:0;background:transparent;color:#3b6594;padding:6px 0;font-size:12px;cursor:pointer; }
.portfolio-back:hover { text-decoration:underline; }
.portfolio-owner { color:#6b7e94;font-size:12px; }
@media(max-width:650px) {
  .portfolio-picker { padding:25px 0; }
  .portfolio-heading h1 { font-size:25px; }
  .portfolio-list { grid-template-columns:minmax(0,1fr); }
}

/* Refinamento localizado da seleção de carteiras — mantém as empresas intactas. */
.portfolio-picker { max-width:960px; padding:48px 0 50px; }
.portfolio-heading { margin-bottom:29px; }
.portfolio-heading .eyebrow { font-size:10px; font-weight:750; letter-spacing:1.5px; color:#5a7597; }
.portfolio-heading h1 { font-size:clamp(28px,3.1vw,38px); letter-spacing:-1.35px; font-weight:720; margin:9px 0 9px; color:#192d46; }
.portfolio-heading p { max-width:570px; font-size:13px; line-height:1.7; color:#748399; }
.portfolio-list { grid-template-columns:repeat(auto-fit,minmax(min(100%,285px),340px)); gap:14px; }
.portfolio-entry {
  position:relative; display:flex; align-items:center; gap:15px;
  width:100%; min-height:104px; padding:19px 19px; background:linear-gradient(145deg,#fff 45%,#f9fbfe);
  border:1px solid #e0e8f1; border-radius:14px;
  box-shadow:0 3px 12px #203c5c06; text-align:left;
  transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease;
}
.portfolio-entry:hover { transform:translateY(-2px); border-color:#b6c8de; box-shadow:0 10px 25px #1c3c6010; }
.portfolio-entry:active { transform:translateY(0); }
.portfolio-avatar {
  flex:0 0 49px; width:49px; height:49px; display:grid; place-items:center;
  color:#315477; font-size:21px; font-weight:650; letter-spacing:-.7px;
  background:#e9eff7; border:1px solid #dde7f2; border-radius:13px;
}
.portfolio-entry-info { display:flex; flex:1; flex-direction:column; gap:5px; min-width:0; }
.portfolio-entry-info strong { display:block; font-size:15px; font-weight:700; color:#203a56; line-height:1.25; }
.portfolio-entry-info>span { display:block; font-size:11.5px; color:#74849a; font-variant-numeric:tabular-nums; }
.portfolio-entry .portfolio-entry-arrow {
  flex:0 0 30px; width:30px; height:30px; display:grid; place-items:center;
  border-radius:9px; color:#557492; background:#f0f4f8;
  font-size:17px; transition:background .18s ease,color .18s ease;
}
.portfolio-entry:hover .portfolio-entry-arrow { color:#294e7a; background:#e5edf8; }
@media(max-width:650px) {
  .portfolio-picker { padding:27px 0 35px; }
  .portfolio-heading { margin-bottom:22px; }
  .portfolio-heading h1 { letter-spacing:-.9px; }
  .portfolio-entry { padding:17px; min-height:96px; }
}
@media(prefers-reduced-motion:reduce) {
  .portfolio-entry,.portfolio-entry .portfolio-entry-arrow { transition:none; }
  .portfolio-entry:hover { transform:none; }
}

/* A mesma lista compacta de anexos em ferramentas globais e empresas. */
.file-drop-shell { min-width:0; }
.file-selection-summary { display:flex; justify-content:space-between; gap:12px; color:#68788d; font-size:11px; padding:3px 2px; }
.file-drop-shell .file-selection { max-height:240px; overflow:auto; overscroll-behavior:contain; }
.file-drop-shell .file-selection-item { display:flex; align-items:center; gap:8px; }
.file-drop-shell .file-selection-item > span { flex:1; min-width:0; }
.file-drop-shell .file-selection-item strong { font-size:12px; line-height:1.4; }
.file-drop-shell .file-selection-item small { font-size:10px; line-height:1.4; }
.file-drop-shell .file-selection-remove { flex:0 0 30px; width:30px !important; min-width:30px !important; height:30px !important; min-height:30px !important; margin:0 !important; padding:0 !important; border:1px solid #dce4ed !important; border-radius:8px !important; background:#fff !important; color:#52647a !important; box-shadow:none !important; }
.file-drop-shell .file-selection-remove > span { font-size:21px; line-height:1; }
.file-drop-shell .file-selection-remove:hover { background:#f1f5f9 !important; color:#192f4a !important; }
.file-drop-shell .file-selection-remove:focus-visible { outline:2px solid #5179af; outline-offset:2px; }
.fiscal-upload-item > .fiscal-file-selected { display:none; }

/* assets/css/tools.css */
/* Company tools: spacious headers, balanced forms and clear results. */
#companyPanel { --tool-accent:#087f9c; --tool-ink:#19324f; }
#companyPanel .panel-head { padding:22px 24px; background:#fff; border:1px solid #dde7ef; border-radius:18px; box-shadow:0 4px 18px #19324f06; margin-bottom:16px; }
#companyPanel .panel-head h2 { font-size:25px; line-height:1.3; letter-spacing:-.7px; }
#companyPanel .tool-tabs { position:static; display:flex; gap:6px; padding:7px; border:1px solid #dde7ef; border-radius:14px; background:#eaf0f6; backdrop-filter:none; margin:18px 0; }
#companyPanel .tool-tab { flex:1; justify-content:center; padding:13px 16px; min-height:48px; border-radius:10px; color:#546880; font-weight:600; box-shadow:none; }
#companyPanel .tool-tab.active { background:#fff; color:var(--tool-accent); box-shadow:0 3px 10px #19324f0d; }
#companyPanel .tool-card { display:grid; grid-template-columns:minmax(0,1fr); gap:20px; padding:0; background:transparent; border:0; }
#companyPanel .tool-card > div:first-child { position:static; min-height:0; display:block; padding:26px 28px !important; border:1px solid #d9e7ee; border-radius:18px; background:linear-gradient(115deg,#f0fafb,#f8fbfe 70%); box-shadow:none; }
#companyPanel .tool-card > div:first-child .tool-visual-icon { float:left; width:52px; height:52px; margin:0 18px 12px 0; border-radius:14px; background:#fff; color:var(--tool-accent); box-shadow:0 3px 10px #087f9c0b; }
#companyPanel .tool-card h3 { font-size:23px; letter-spacing:-.5px; margin:5px 0 8px; color:var(--tool-ink); }
#companyPanel .tool-card p { font-size:14px; line-height:1.7; max-width:820px; }
#companyPanel .company-code { font-size:10px; letter-spacing:1.4px; color:#50758c; }
#companyPanel .tool-flow { clear:both; max-width:600px; margin-top:22px; padding-top:18px; border-top:1px solid #dce9ee; }
#companyPanel .tool-flow span { font-size:12px; }
#companyPanel .tool-feature-list { display:flex; flex-wrap:wrap; gap:12px 24px; margin-top:16px; font-size:12px; color:#506b80; }
#companyPanel .modern-form, #companyPanel .stack-forms .modern-form { padding:26px !important; gap:12px; border:1px solid #dde7ef !important; border-radius:18px !important; background:#fff; box-shadow:0 5px 20px #19324f06 !important; min-height:0; }
#companyPanel .form-card-header { padding-bottom:18px; margin-bottom:8px; border-bottom:1px solid #edf1f5; }
#companyPanel .form-card-header strong { font-size:17px; color:var(--tool-ink); }
#companyPanel .form-card-header small { font-size:13px; margin-top:5px; color:#6a7e92; }
#companyPanel form label { font-size:13px !important; font-weight:600; color:#405670; }
#companyPanel form input, #companyPanel form select, #companyPanel form textarea { border-radius:10px !important; padding:12px 14px !important; min-height:46px; border-color:#d9e3ed; background:#fbfcfe; }
#companyPanel form input[type=checkbox] { min-height:0; width:auto; }
#companyPanel form input:focus, #companyPanel form select:focus, #companyPanel form textarea:focus { border-color:#1a9ab5; box-shadow:0 0 0 3px #0b9ab514; }
#companyPanel .file-drop-shell { padding:16px; border:1px dashed #b9cedd; border-radius:12px; background:#f8fbfd; transition:border-color .18s,background .18s; }
#companyPanel .file-drop-shell:hover, #companyPanel .file-drop-shell:focus-within { border-color:#1593ac; background:#f1fafb; }
#companyPanel .file-drop-title { font-size:14px; }
#companyPanel .file-drop-hint { color:#647c92; font-size:12px; }
#companyPanel button[type=submit], #companyPanel .preview-download { min-height:46px; padding:12px 18px; border-radius:10px; background:#087f9c; color:#fff; box-shadow:0 4px 10px #087f9c15; font-weight:600; }
#companyPanel button[type=submit]:hover, #companyPanel .preview-download:hover { background:#076d86; }
#companyPanel .secondary-action { border-radius:10px; min-height:44px; padding:11px 16px !important; box-shadow:none; }
#companyPanel .stack-forms { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; align-items:start; }
#companyPanel .stack-forms > .base-management { grid-column:1/-1; }
#companyPanel .base-management { padding:16px 20px; border:1px solid #dde7ef; border-radius:14px; background:#f5f8fb; }
#companyPanel #workflowPreview { margin-top:6px; padding-top:20px; border-top:1px solid #dce6ef; min-width:0; }
#companyPanel .preview-commandbar { border-radius:14px; padding:18px 20px; background:#fff; border:1px solid #dde7ef; box-shadow:0 4px 16px #19324f05; }
#companyPanel .preview-summary-item { padding:18px; border-radius:14px; background:#fff; border:1px solid #e0e8ef; }
#companyPanel .preview-summary-item strong { font-size:22px; margin-top:5px; color:var(--tool-ink); }
#companyPanel .preview-intro { padding:18px 20px; border-left:3px solid #0b9bb5; background:#f0f8fa; border-radius:0 12px 12px 0; }
#companyPanel .preview-sheet { border:1px solid #dce6ee; border-radius:14px; background:#fff; overflow:hidden; }
#companyPanel .preview-sheet-head { padding:18px 20px; background:#fff; }
#companyPanel .preview-results th { font-size:11px; padding:14px; background:#eef4f8; }
#companyPanel .preview-results td { font-size:13px; padding:14px; line-height:1.6; }
#companyPanel .preview-results tbody tr:hover td { background:#edf8fa; }
#companyPanel .preview-note { padding:12px 0; color:#637a90; }
@media(max-width:1100px) {
  #companyPanel .tool-tab { flex:none; padding:12px 15px; }
  #companyPanel .tool-tabs { overflow-x:auto; }
}
@media(max-width:760px) {
  #companyPanel .panel-head { padding:18px; border-radius:14px; }
  #companyPanel .panel-head h2 { font-size:21px; }
  #companyPanel .tool-card > div:first-child { padding:20px !important; }
  #companyPanel .tool-card h3 { font-size:21px; }
  #companyPanel .tool-card p { font-size:13px; }
  #companyPanel .modern-form, #companyPanel .stack-forms .modern-form { padding:20px !important; }
  #companyPanel .stack-forms { grid-template-columns:minmax(0,1fr); }
  #companyPanel .preview-commandbar { gap:14px; padding:16px; }
  #companyPanel .preview-summary-item { padding:14px; }
  #companyPanel .preview-summary-item strong { font-size:18px; }
}
@media(prefers-reduced-motion:reduce) { #companyPanel * { transition:none !important; } }

#companyPanel .period-card { grid-column:1/-1; min-width:0; margin:10px 0; padding:16px 18px; border:1px solid #dce7ef; border-radius:12px; background:#f6fafc; }
#companyPanel .period-card legend { padding:0 6px; font-size:13px; font-weight:600; color:#405670; }
#companyPanel .period-card legend span { font-weight:400; color:#718498; }
#companyPanel .period-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
#companyPanel .period-fields > div { display:grid; gap:6px; min-width:0; }
#companyPanel .period-card p { font-size:12px; margin:10px 0 0; }
#companyPanel #processButton { background:#f3f8fb; color:#41677f; border:1px solid #d9e6ef; box-shadow:none; }
@media(max-width:480px) { #companyPanel .period-fields { gap:8px; } #companyPanel .period-card { padding:12px; } #companyPanel .period-fields input { padding:10px 6px !important; font-size:12px !important; min-width:0; width:100%; } }

/* Keep document selection close to results. */
#companyPanel .panel-head { padding:16px 22px; }
#companyPanel .panel-head h2 { font-size:22px; }
#companyPanel .tool-card > div:first-child { padding:18px 22px !important; }
#companyPanel .tool-card h3 { font-size:20px; margin:2px 0 5px; }
#companyPanel .tool-card > div:first-child p { margin:4px 0; }
#companyPanel .tool-flow { margin-top:12px; padding-top:12px; }
#companyPanel .tool-tabs { margin:12px 0; }
#companyPanel .upload-progress { padding:12px 14px; border-radius:10px; background:#edf8fa; color:#24657a; font-size:13px; line-height:1.6; }
#companyPanel #advancedFields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
#companyPanel #advancedFields[hidden] { display:none; }
#companyPanel .preview-table-tools { display:flex; flex-wrap:wrap; gap:12px; padding:14px 18px; }
#companyPanel .preview-table-tools input { flex:1; min-width:180px; padding:10px 12px; border:1px solid #d5e2ec; border-radius:9px; background:#fff; }
#companyPanel .preview-table-tools select { padding:10px 12px; border:1px solid #d5e2ec; border-radius:9px; background:#fff; }
#companyPanel .preview-table-tools span { font-size:12px; color:#60788c; }
#companyPanel .preview-results .accounts-pending td { background:#fff; }
#companyPanel .preview-results .accounts-pending td:first-child { border-left:3px solid #8aa5c2; }
#companyPanel .preview-commandbar { border-color:#abd8df; }
@media(max-width:760px) {
 #companyPanel #advancedFields { grid-template-columns:minmax(0,1fr); }
 #companyPanel .preview-table-tools input { min-width:0; width:100%; flex-basis:100%; }
 #companyPanel .preview-table-tools select { max-width:100%; }
}
#companyPanel #advancedFields > .bank-options { grid-column:1/-1; }

#companyPanel #classificationPreview { grid-column:1/-1; min-width:0; }


/* Organizer preview lives outside the upload card so no sticky/tool column can overlap it. */
#companyPanel .tool-pane {
  display:none;
  min-width:0;
}
#companyPanel .tool-pane.active {
  display:block;
}
#companyPanel .tool-pane[data-pane="organizar"].active {
  display:block;
}
#companyPanel .tool-pane[data-pane="organizar"] > .tool-card {
  width:100%;
  min-width:0;
}
#companyPanel .organizer-preview {
  position:relative;
  z-index:0;
  width:100%;
  min-width:0;
  margin-top:22px;
  padding-top:0;
  border-top:0;
  clear:both;
}
#companyPanel .organizer-preview:empty {
  display:none;
}
#companyPanel .organizer-preview:not(:empty) {
  display:grid;
}
#companyPanel .organizer-preview .preview-commandbar,
#companyPanel .organizer-preview .preview-summary-grid,
#companyPanel .organizer-preview .preview-intro,
#companyPanel .organizer-preview .preview-sheet-switcher,
#companyPanel .organizer-preview .preview-sheet,
#companyPanel .organizer-preview .preview-diagnostics,
#companyPanel .organizer-preview .preview-note {
  width:100%;
  min-width:0;
}

/* Keep table scrolling internal instead of making the whole page overlap horizontally. */
#companyPanel .organizer-preview .preview-sheet {
  overflow:hidden;
}
#companyPanel .organizer-preview .preview-table-scroll {
  width:100%;
  max-width:100%;
  overflow:auto;
}
#companyPanel .organizer-preview .dataframe-preview {
  width:100%;
}

@media(max-width:760px) {
  #companyPanel .organizer-preview {
    margin-top:16px;
  }
}


/* Result panels: conferências ficam legíveis na tela antes do download. */
#companyPanel .tool-result {
  display:grid;
  gap:14px;
  min-width:0;
  padding:18px;
  border:1px solid #dfe7ef;
  border-radius:14px;
  background:#fff;
  box-shadow:0 5px 18px rgba(31,50,76,.04);
}
#companyPanel .tool-result[hidden] { display:none !important; }
#companyPanel .tool-result.compact-result {
  margin:0 15px 15px;
  padding:15px;
  box-shadow:none;
}
#companyPanel #reconcileResult {
  margin-top:18px;
}
#companyPanel .tool-result-head {
  display:flex;
  align-items:flex-start;
  gap:11px;
}
#companyPanel .tool-result-icon {
  position:relative;
  width:34px;
  height:34px;
  flex:none;
  border-radius:10px;
  background:#edf6f2;
}
#companyPanel .tool-result-icon::before {
  content:"";
  position:absolute;
  inset:9px;
  background:#4c7c68;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.9' viewBox='0 0 24 24'%3E%3Cpath d='m5 12 4 4L19 6'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.9' viewBox='0 0 24 24'%3E%3Cpath d='m5 12 4 4L19 6'/%3E%3C/svg%3E") center/contain no-repeat;
}
#companyPanel .tool-result-head > div {
  display:grid;
  gap:3px;
  min-width:0;
}
#companyPanel .tool-result-head strong {
  color:#29405b;
  font-size:14px;
  line-height:1.35;
}
#companyPanel .tool-result-head span {
  color:#6c7f93;
  font-size:12px;
  line-height:1.55;
}
#companyPanel .tool-result.is-warning {
  border-color:#eadfca;
  background:#fffdf9;
}
#companyPanel .tool-result.is-warning .tool-result-icon {
  background:#fbf3e5;
}
#companyPanel .tool-result.is-warning .tool-result-icon::before {
  background:#9a7740;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.9' viewBox='0 0 24 24'%3E%3Cpath d='M12 4 3 20h18L12 4Z'/%3E%3Cpath d='M12 9v5m0 3h.01'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.9' viewBox='0 0 24 24'%3E%3Cpath d='M12 4 3 20h18L12 4Z'/%3E%3Cpath d='M12 9v5m0 3h.01'/%3E%3C/svg%3E") center/contain no-repeat;
}
#companyPanel .tool-result.is-error {
  border-color:#ecd9d9;
  background:#fffafa;
}
#companyPanel .tool-result.is-error .tool-result-icon {
  background:#f8eaea;
}
#companyPanel .tool-result.is-error .tool-result-icon::before {
  background:#a15c5c;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.9' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M9 9l6 6m0-6-6 6'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.9' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M9 9l6 6m0-6-6 6'/%3E%3C/svg%3E") center/contain no-repeat;
}
#companyPanel .tool-result-metrics {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
}
#companyPanel .tool-result-metrics > span {
  display:grid;
  min-width:0;
  gap:3px;
  padding:10px 11px;
  border:1px solid #e5eaf0;
  border-radius:9px;
  background:#f9fbfd;
}
#companyPanel .tool-result-metrics small {
  color:#8896a6;
  font-size:10px;
}
#companyPanel .tool-result-metrics strong {
  overflow:hidden;
  color:#344d6a;
  font-size:13px;
  font-weight:700;
  text-overflow:ellipsis;
  white-space:nowrap;
}
#companyPanel .result-download {
  justify-self:start;
  min-height:40px;
  padding:9px 14px;
  border:1px solid #315fc5;
  border-radius:9px;
  background:#315fc5;
  color:#fff;
  cursor:pointer;
  font-size:12px;
  font-weight:650;
}
#companyPanel .result-download:hover {
  background:#264fa9;
}
#companyPanel .fiscal-grid {
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:start;
}
#companyPanel .fiscal-grid .vertical-card {
  min-width:0;
}
#companyPanel .fiscal-grid .vertical-card > div:first-child {
  min-height:150px;
}
@media(max-width:1050px) {
  #companyPanel .fiscal-grid {
    grid-template-columns:1fr;
  }
  #companyPanel .tool-result-metrics {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:560px) {
  #companyPanel .tool-result-metrics {
    grid-template-columns:1fr 1fr;
  }
  #companyPanel .result-download {
    width:100%;
  }
}


/* === Ferramentas realmente separadas: cada aba funciona como uma página própria === */
#companyPanel .tool-tabs {
  display:flex;
  gap:10px;
  margin:18px 0 22px;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  overflow-x:auto;
  scrollbar-width:none;
}
#companyPanel .tool-tabs::-webkit-scrollbar { display:none; }

#companyPanel .tool-tab {
  flex:0 0 auto;
  min-height:52px;
  padding:11px 16px;
  border:1px solid #dde5ee;
  border-radius:12px;
  background:#fff;
  color:#5f7186;
  box-shadow:0 2px 8px rgba(26,46,72,.025);
  font-size:12px;
  font-weight:600;
  white-space:nowrap;
  transition:border-color .15s ease, background .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease;
}
#companyPanel .tool-tab:hover {
  border-color:#bccbdb;
  background:#fbfcfe;
  color:#3f5877;
  transform:translateY(-1px);
}
#companyPanel .tool-tab.active {
  border-color:#9fb7d7;
  background:#eef3fb;
  color:#315fc5;
  box-shadow:0 4px 12px rgba(49,95,197,.08);
}
#companyPanel .tool-tab.active::after {
  display:none;
}

#companyPanel .tool-tab[data-tool="impostos"] {
  --tool-tab-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='1.7' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 4 6v5c0 5 3.4 8.4 8 10 4.6-1.6 8-5 8-10V6l-8-3Z'/%3E%3Cpath d='M9 9h6M9 13h6'/%3E%3C/svg%3E");
}

#companyPanel .tool-pane {
  display:none !important;
  min-width:0;
}
#companyPanel .tool-pane.active {
  display:block !important;
  animation:paneEnter .18s ease both;
}

/* Cada ferramenta possui seu próprio espaço; nada lado a lado com outra ferramenta. */
#companyPanel .tool-pane > .tool-card {
  width:100%;
  min-width:0;
  margin:0;
}
#companyPanel .tool-pane > .tool-result {
  margin-top:18px;
}
#companyPanel .fiscal-grid {
  display:block;
}

/* Base Inteligente: ações relacionadas, mas visualmente independentes. */
#companyPanel .stack-forms {
  display:grid;
  grid-template-columns:1fr;
  gap:16px;
}
#companyPanel .stack-forms > .modern-form,
#companyPanel .stack-forms > .base-management {
  grid-column:1;
  width:100%;
}
#companyPanel .base-management {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  margin:0;
  padding:15px 16px;
  border:1px solid #e0e7ef;
  border-radius:12px;
  background:#f8fafc;
}
#companyPanel .base-management::before {
  content:"Gerenciamento da Base Inteligente";
  flex-basis:100%;
  margin-bottom:2px;
  color:#6f8195;
  font-size:11px;
  font-weight:700;
  text-transform:none;
  letter-spacing:0;
}

/* Fiscal e Impostos agora têm páginas independentes e mesma largura do restante. */
#companyPanel [data-pane="fiscal"] .tool-card,
#companyPanel [data-pane="impostos"] .tool-card {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:18px;
}
#companyPanel [data-pane="fiscal"] .tool-card > div:first-child,
#companyPanel [data-pane="impostos"] .tool-card > div:first-child {
  min-height:0;
}
#companyPanel [data-pane="fiscal"] .compact-result,
#companyPanel [data-pane="impostos"] .compact-result {
  margin:0;
}

/* Uma pequena transição reforça a sensação de trocar de ferramenta, não de juntar cards. */
@keyframes paneEnter {
  from { opacity:0; transform:translateY(4px); }
  to { opacity:1; transform:none; }
}

@media(max-width:760px) {
  #companyPanel .tool-tabs {
    gap:8px;
    margin:14px 0 18px;
  }
  #companyPanel .tool-tab {
    min-height:46px;
    padding:9px 12px;
    border-radius:10px;
    font-size:11px;
  }
}


/* Estado final das abas: o painel declara qual ferramenta está ativa. */
#companyPanel .tool-pane {
  display:none !important;
}
#companyPanel[data-active-tool="organizar"] .tool-pane[data-pane="organizar"],
#companyPanel[data-active-tool="base"] .tool-pane[data-pane="base"],
#companyPanel[data-active-tool="extrato"] .tool-pane[data-pane="extrato"],
#companyPanel[data-active-tool="fiscal"] .tool-pane[data-pane="fiscal"],
#companyPanel[data-active-tool="impostos"] .tool-pane[data-pane="impostos"],
#companyPanel[data-active-tool="francesinhas"] .tool-pane[data-pane="francesinhas"] {
  display:block !important;
}


/* === Seleção padronizada de bancos === */
#companyPanel .bank-selector {
  grid-column:1 / -1;
  display:grid;
  gap:12px;
  min-width:0;
  padding:14px;
  border:1px solid #dfe7ef;
  border-radius:13px;
  background:#f8fafc;
}
#companyPanel .bank-selector[hidden] {
  display:none !important;
}
#companyPanel .bank-selector-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
#companyPanel .bank-selector-head > div {
  display:grid;
  gap:2px;
}
#companyPanel .bank-selector-head strong {
  color:#304863;
  font-size:13px;
}
#companyPanel .bank-selector-head span {
  color:#7a8b9e;
  font-size:11px;
}
#companyPanel .bank-selector-options {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(170px,1fr));
  gap:8px;
}
#companyPanel .bank-choice,
#companyPanel .bank-select-all {
  display:flex;
  align-items:center;
  gap:9px;
  margin:0 !important;
  cursor:pointer;
  user-select:none;
}
#companyPanel .bank-choice {
  min-width:0;
  padding:10px 11px;
  border:1px solid #dce5ee;
  border-radius:10px;
  background:#fff;
  transition:border-color .14s ease, background .14s ease, box-shadow .14s ease;
}
#companyPanel .bank-choice:hover {
  border-color:#b9c9dc;
  background:#fcfdff;
}
#companyPanel .bank-choice.selected {
  border-color:#9eb7d8;
  background:#eef4fb;
  box-shadow:inset 0 0 0 1px rgba(49,95,197,.04);
}
#companyPanel .bank-choice input,
#companyPanel .bank-select-all input {
  width:16px !important;
  height:16px !important;
  min-height:0 !important;
  padding:0 !important;
  margin:0 !important;
  accent-color:#315fc5;
  flex:none;
}
#companyPanel .bank-choice > span {
  display:grid;
  min-width:0;
  gap:1px;
}
#companyPanel .bank-choice strong {
  overflow:hidden;
  color:#344d69;
  font-size:12px;
  font-weight:650;
  text-overflow:ellipsis;
  white-space:nowrap;
}
#companyPanel .bank-choice small {
  color:#8292a4;
  font-size:10px;
}
#companyPanel .bank-select-all {
  flex:none;
  padding:7px 9px;
  border:1px solid #d7e1eb;
  border-radius:9px;
  background:#fff;
  color:#496078;
  font-size:11px !important;
  font-weight:600 !important;
}
#companyPanel .field-group[hidden] {
  display:none !important;
}

@media(max-width:700px) {
  #companyPanel .bank-selector-head {
    align-items:flex-start;
    flex-direction:column;
  }
  #companyPanel .bank-selector-options {
    grid-template-columns:1fr;
  }
}


/* Correções visuais: seletor de bancos e métricas da Base Inteligente */
#companyPanel .bank-select-all {
  appearance:none;
  -webkit-appearance:none;
  min-height:36px;
  padding:8px 12px !important;
  border:1px solid #b9c9dc !important;
  border-radius:9px !important;
  background:#fff !important;
  color:#3f5877 !important;
  box-shadow:none !important;
  font-size:11px !important;
  font-weight:700 !important;
  line-height:1.2;
}
#companyPanel .bank-select-all:hover {
  border-color:#91a9c7 !important;
  background:#f4f8fd !important;
  color:#315fc5 !important;
}
#companyPanel .bank-select-all[data-all-selected="true"] {
  border-color:#9eb7d8 !important;
  background:#eef4fb !important;
  color:#315fc5 !important;
}

#companyPanel #baseStats {
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  width:100%;
  margin-top:18px;
}
#companyPanel #baseStats > span {
  display:block;
  min-width:0;
  padding:12px 10px;
  border:1px solid #dfe7ef;
  border-radius:10px;
  background:#fff;
  color:#718297;
  font-size:10px;
  line-height:1.35;
  text-align:center;
}
#companyPanel #baseStats > span strong {
  display:block;
  margin-bottom:3px;
  color:#31577f;
  font-size:18px;
  font-weight:750;
}
#companyPanel #baseStats.is-loading > span {
  opacity:.68;
}
#companyPanel #baseStats .base-stat-error {
  grid-column:1 / -1;
  color:#8b6262;
}
#companyPanel #baseStats .base-stat-error strong {
  color:#9b5c5c;
}

@media(max-width:560px) {
  #companyPanel #baseStats {
    grid-template-columns:1fr;
  }
  #companyPanel .bank-select-all {
    width:100%;
  }
}


/* === Conferência diária: Extrato × Modelo e Extrato × Razão === */
.daily-reconciliation {
  display:grid;
  gap:12px;
  min-width:0;
  margin-top:18px;
}
.daily-reconciliation[hidden] {
  display:none !important;
}
#companyPanel .daily-reconciliation,
.global-daily-result {
  padding:16px;
  border:1px solid #dce5ee;
  border-radius:14px;
  background:#fff;
  box-shadow:0 4px 16px rgba(25,50,79,.04);
}
.daily-summary {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}
.daily-summary > div {
  display:grid;
  gap:3px;
  padding:12px 13px;
  border:1px solid #e0e7ef;
  border-radius:10px;
  background:#f8fafc;
}
.daily-summary small {
  color:#7d8da0;
  font-size:10px;
}
.daily-summary strong {
  color:#334f6e;
  font-size:19px;
  font-weight:750;
}
.daily-toolbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.daily-filters {
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}
.daily-filter,
.daily-download {
  min-height:36px;
  padding:8px 11px;
  border:1px solid #d6e0ea;
  border-radius:9px;
  background:#fff;
  color:#50657e;
  font-size:11px;
  font-weight:650;
  cursor:pointer;
}
.daily-filter:hover,
.daily-download:hover {
  border-color:#aec0d4;
  background:#f8fbfe;
}
.daily-filter.active {
  border-color:#9fb6d5;
  background:#eef4fb;
  color:#315fc5;
}
.daily-download {
  border-color:#315fc5;
  background:#315fc5;
  color:#fff;
}
.daily-download:hover {
  background:#294fa8;
  color:#fff;
}
.daily-download:disabled {
  opacity:.65;
  cursor:wait;
}
.daily-table-scroll {
  width:100%;
  max-width:100%;
  overflow:auto;
  border:1px solid #e1e8ef;
  border-radius:11px;
}
.daily-table {
  width:100%;
  min-width:1080px;
  border-collapse:collapse;
  background:#fff;
}
.daily-table th {
  position:sticky;
  top:0;
  z-index:1;
  padding:11px 12px;
  border-bottom:1px solid #dce5ed;
  background:#f1f5f9;
  color:#52657c;
  font-size:10px;
  font-weight:700;
  text-align:left;
  white-space:nowrap;
}
.daily-table td {
  padding:11px 12px;
  border-bottom:1px solid #edf1f5;
  color:#43576f;
  font-size:11px;
  white-space:nowrap;
}
.daily-table tr:last-child td {
  border-bottom:0;
}
.daily-table td.numeric {
  text-align:right;
  font-variant-numeric:tabular-nums;
}
.daily-table tr.daily-review td {
  background:#fffaf2;
}
.daily-table tr.daily-ok:hover td {
  background:#f7fafc;
}
.daily-table tr.daily-review:hover td {
  background:#fff6e8;
}
.daily-status {
  display:inline-flex;
  align-items:center;
  min-height:25px;
  padding:4px 8px;
  border-radius:999px;
  font-size:10px;
  font-weight:700;
}
.daily-status.is-ok {
  background:#edf4f8;
  color:#4a687d;
}
.daily-status.is-review {
  background:#fff1db;
  color:#8a652b;
}
.global-daily-result {
  margin-top:16px;
}

@media(max-width:700px) {
  .daily-summary {
    grid-template-columns:1fr 1fr 1fr;
  }
  .daily-summary > div {
    padding:10px;
  }
  .daily-summary strong {
    font-size:16px;
  }
  .daily-toolbar {
    align-items:stretch;
    flex-direction:column;
  }
  .daily-download {
    width:100%;
  }
}


/* === Valores grandes: cabem sem quebrar o layout dos cards === */
.preview-summary-item,
.preview-metric,
#companyPanel .tool-result-metrics > span,
#companyPanel #baseStats > span,
.daily-summary > div,
.overview-card,
.task-metric {
  min-width:0;
}

/* Não usar size containment em conteúdo textual: ele zera a largura intrínseca
   de flex-items e fazia os números/legendas se amontoarem. */
.preview-summary-item > div,
.preview-metric,
#companyPanel .tool-result-metrics > span,
#companyPanel #baseStats > span,
.daily-summary > div,
.overview-card > div,
.task-metric {
  container-type:normal !important;
  min-width:0;
}

.preview-summary-item strong,
.preview-metric strong,
#companyPanel .tool-result-metrics strong,
#companyPanel #baseStats > span strong,
.daily-summary strong,
.overview-card strong,
.task-metric strong {
  max-width:100%;
  overflow:visible !important;
  text-overflow:clip !important;
  font-variant-numeric:tabular-nums;
  line-height:1.15;
}

/* Valores monetários podem reduzir e quebrar em último caso, mas nunca somem. */
.preview-summary-item strong {
  font-size:clamp(13px,1.45vw,22px) !important;
  white-space:normal !important;
  overflow-wrap:anywhere;
}
.preview-summary-item strong.value-compact {
  font-size:clamp(12px,1.2vw,18px) !important;
}
.preview-summary-item strong.value-xcompact {
  font-size:clamp(11px,1vw,15px) !important;
}

.preview-metric strong {
  font-size:clamp(11px,1vw,15px) !important;
  white-space:normal !important;
  overflow-wrap:anywhere;
}
.preview-metric strong.value-compact {
  font-size:clamp(10px,.9vw,13px) !important;
}
.preview-metric strong.value-xcompact {
  font-size:clamp(9px,.8vw,11px) !important;
}

#companyPanel .tool-result-metrics strong,
#companyPanel #baseStats > span strong,
.daily-summary strong {
  font-size:clamp(12px,1.25vw,19px) !important;
  white-space:normal !important;
  overflow-wrap:anywhere;
}

/* O resumo da página de Empresas usa conteúdo curto. Mantém tudo em linha
   e impede que um item invada o seguinte. */
.overview {
  flex-wrap:wrap;
  row-gap:10px;
}
.overview-card {
  flex:0 0 auto;
  width:auto;
  max-width:100%;
}
.overview-card > div {
  width:auto;
  display:flex;
  align-items:baseline;
  gap:7px;
}
.overview-card strong {
  flex:none;
  font-size:17px !important;
  white-space:nowrap !important;
  overflow-wrap:normal !important;
}
.overview-card div > span {
  min-width:0;
  white-space:nowrap;
}

.task-metric strong {
  font-size:clamp(14px,1.55vw,26px) !important;
  white-space:normal !important;
  overflow-wrap:anywhere;
}

@media(max-width:760px) {
  .overview {
    flex-wrap:nowrap;
  }
  .overview-card strong {
    font-size:15px !important;
  }
}

@media(max-width:560px) {
  .preview-summary-item strong,
  .preview-summary-item strong.value-compact,
  .preview-summary-item strong.value-xcompact {
    font-size:clamp(12px,3.4vw,18px) !important;
  }
}

/* === Conferência com Extrato multi-banco === */
#companyPanel .reconcile-bank-files {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:10px;
  min-width:0;
}
#companyPanel .reconcile-bank-file {
  display:grid;
  gap:7px;
  min-width:0;
  padding:12px;
  border:1px solid #e0e7ef;
  border-radius:11px;
  background:#fbfcfe;
}
#companyPanel .reconcile-bank-file[hidden] {
  display:none !important;
}
#companyPanel .reconcile-bank-file > label {
  margin:0;
  color:#3e5672;
  font-size:11px;
  font-weight:650;
}
#companyPanel .reconcile-bank-file > label .optional {
  color:#8190a1;
  font-weight:500;
}
#companyPanel .reconcile-bank-file input[type="file"] {
  width:100%;
  min-width:0;
}
.daily-toolbar-left {
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  min-width:0;
}
.daily-bank-filter {
  min-height:36px;
  padding:7px 30px 7px 10px;
  border:1px solid #d6e0ea;
  border-radius:9px;
  background:#fff;
  color:#50657e;
  font-size:11px;
  font-weight:650;
}
.daily-bank-cell {
  color:#31577f !important;
  font-weight:700;
}
@media(max-width:700px) {
  #companyPanel .reconcile-bank-files {
    grid-template-columns:1fr;
  }
  .daily-toolbar-left {
    width:100%;
    align-items:stretch;
    flex-direction:column;
  }
  .daily-bank-filter {
    width:100%;
  }
}


/* === Regra clara da conferência diária === */
.daily-rule {
  display:grid;
  gap:3px;
  padding:10px 12px;
  border:1px solid #dfe7ef;
  border-radius:10px;
  background:#f8fafc;
}
.daily-rule strong {
  color:#425b76;
  font-size:11px;
}
.daily-rule span {
  color:#708196;
  font-size:10px;
  line-height:1.5;
}
.daily-rule b {
  color:#31577f;
}
.daily-table-reconciliation {
  min-width:980px;
}
.daily-balance {
  font-weight:700;
}
.daily-balance.is-zero {
  color:#4d697f;
  background:#f7fafc;
}
.daily-balance.is-different {
  color:#8a652b;
  background:#fff4df !important;
}
.daily-review .daily-balance.is-different {
  box-shadow:inset 3px 0 0 #d4a44f;
}


/* === Arquivos anexados: remoção individual === */
.file-selection {
  max-height:220px;
  overflow:auto;
  padding-right:2px;
}
.file-selection-item {
  position:relative;
}
.file-selection-item > span {
  flex:1 1 auto;
  min-width:0;
}
.file-selection-remove {
  width:28px !important;
  height:28px !important;
  min-width:28px !important;
  min-height:28px !important;
  flex:none;
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  padding:0 !important;
  border:1px solid #d9e2eb !important;
  border-radius:8px !important;
  background:#fff !important;
  color:#738296 !important;
  box-shadow:none !important;
  font:600 18px/1 Arial,sans-serif !important;
  cursor:pointer;
  transition:border-color .12s ease,background .12s ease,color .12s ease,transform .12s ease;
}
.file-selection-remove::before,
.file-selection-remove::after {
  content:none !important;
}
.file-selection-remove:hover {
  border-color:#c7d2df !important;
  background:#f6f8fb !important;
  color:#334b68 !important;
  transform:none !important;
}
.file-selection-remove:focus-visible {
  outline:2px solid #0b9bb5;
  outline-offset:2px;
}
.file-selection-remove > span {
  transform:translateY(-1px);
}
@media(max-width:560px) {
  .file-selection {
    max-height:180px;
  }
  .file-selection-remove {
    width:30px !important;
    height:30px !important;
    min-width:30px !important;
    min-height:30px !important;
  }
}


/* === Período padrão em todas as ferramentas === */
.standard-period-card {
  min-width:0;
  margin:10px 0;
  padding:16px 18px;
  border:1px solid #dce7ef;
  border-radius:12px;
  background:#f6fafc;
}
.standard-period-card legend {
  padding:0 6px;
  color:#405670;
  font-size:13px;
  font-weight:600;
}
.standard-period-card legend span {
  color:#718498;
  font-weight:400;
}
.standard-period-card .period-fields {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}
.standard-period-card .period-fields > div {
  display:grid;
  gap:6px;
  min-width:0;
}
.standard-period-card .period-fields label {
  margin:0;
}
.standard-period-card .period-fields input[type="date"] {
  width:100%;
  min-width:0;
}
.standard-period-card > p {
  margin:10px 0 0;
  color:#718498;
  font-size:12px;
  line-height:1.45;
}
#companyPanel .base-period-card {
  grid-column:1 / -1;
  width:100%;
}
.global-view .standard-period-card {
  grid-column:1 / -1;
  width:100%;
}
@media(max-width:560px) {
  .standard-period-card {
    padding:12px;
  }
  .standard-period-card .period-fields {
    grid-template-columns:1fr 1fr;
    gap:8px;
  }
  .standard-period-card .period-fields input[type="date"] {
    padding:10px 7px !important;
    font-size:12px !important;
  }
}


/* Base Inteligente: cobertura real de linhas, sem alterar a prévia da planilha. */
#companyPanel .classification-coverage {
  display:grid;
  gap:11px;
  min-width:0;
  margin-top:14px;
  padding:14px 0 0;
  border-top:1px solid #e2e9f1;
}
#companyPanel .classification-coverage[hidden] { display:none !important; }
#companyPanel .classification-coverage-heading {
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:10px;
  flex-wrap:wrap;
}
#companyPanel .classification-coverage-heading > div {
  display:flex;
  gap:9px;
  align-items:baseline;
  min-width:0;
  flex-wrap:wrap;
}
#companyPanel .classification-coverage-heading strong {
  font-size:clamp(22px,3vw,28px);
  letter-spacing:-.04em;
  font-weight:740;
  color:#254e80;
  line-height:1.1;
  font-variant-numeric:tabular-nums;
}
#companyPanel .classification-coverage-heading span {
  font-size:12px;
  color:#66778a;
}
#companyPanel .classification-coverage-fraction {
  font-variant-numeric:tabular-nums;
}
#companyPanel .classification-coverage-track {
  width:100%;
  height:8px;
  overflow:hidden;
  border-radius:99px;
  background:#e6edf5;
}
#companyPanel .classification-coverage-track span {
  display:block;
  height:100%;
  width:0;
  border-radius:inherit;
  background:#4774b4;
  transition:width 230ms ease;
}
#companyPanel .classification-coverage-details {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px 20px;
  font-size:12px;
  color:#64758b;
}
#companyPanel .classification-coverage-details strong {
  color:#253e5c;
  font-weight:740;
  font-variant-numeric:tabular-nums;
}
#companyPanel .classification-coverage > p {
  margin:0;
  color:#758599;
  font-size:11px;
  line-height:1.5;
}
@media(prefers-reduced-motion:reduce) {
  #companyPanel .classification-coverage-track span { transition:none; }
}

/* assets/css/layout.css */
/* Shared visual rhythm across company tools and global pages. */
:root { --surface:#fff; --surface-soft:#f5f8fc; --line:#dde5ef; --ink:#20364f; --ink-muted:#657b92; --action:#315fc5; }
body { background:#f4f7fb; }
main { max-width:1500px; }
.hero.compact-hero, .global-view .page-head { padding:22px 0; margin-bottom:8px; }
.hero.compact-hero h1, .global-view .page-head h1 { font-size:28px; letter-spacing:-.8px; color:var(--ink); }
.hero.compact-hero p, .global-view .page-head p { font-size:14px; line-height:1.7; color:var(--ink-muted); }
.search-card { margin-bottom:18px; padding:20px; border:1px solid var(--line); border-radius:14px; background:var(--surface); }
.directory-heading h2 { font-size:18px; }
.directory-controls { gap:12px; }
.search-meta { margin-top:12px; color:var(--ink-muted); }
.global-view .tool-card { gap:24px; border-radius:16px; padding:24px; border-color:var(--line); }
.global-view .tool-card h3 { font-size:21px; color:var(--ink); }
.global-view .tool-card p { font-size:14px; line-height:1.7; color:var(--ink-muted); }
.global-view form { gap:12px; }
.global-view form label { font-size:13px !important; color:var(--ink); font-weight:600; }
.global-view form input:not([type=checkbox]), .global-view form select { min-height:44px; font-size:13px !important; border-radius:10px !important; padding:11px 13px !important; }
.global-view form button[type=submit], #companyPanel form button[type=submit]:not(.secondary-action):not(#processButton), #companyPanel .preview-download { background:var(--action) !important; border-color:var(--action); border-radius:10px; min-height:44px; }
.global-view form button[type=submit]:hover, #companyPanel .preview-download:hover { background:#264fa9 !important; }
#companyPanel { --tool-accent:#315fc5; }
#companyPanel .tool-card > div:first-child { background:var(--surface-soft); border-color:var(--line); }
#companyPanel .tool-tab.active { color:var(--action); }
#companyPanel .tool-card > div:first-child .tool-visual-icon { color:var(--action); }
#companyPanel .upload-progress { background:#eef3fb; color:#486581; }
#companyPanel .preview-intro { background:var(--surface-soft); border-left-color:#6386ba; }
#companyPanel .preview-commandbar { border-color:var(--line); }
#companyPanel .preview-summary-grid { gap:12px; margin:14px 0; }
#companyPanel .preview-table-tools { background:var(--surface-soft); border-top:1px solid var(--line); }
#companyPanel .preview-results tbody tr:nth-child(even) td { background:#f9fbfd; }
#companyPanel .preview-results tbody tr:hover td { background:#edf3fb; }
#companyPanel .preview-results .accounts-pending td:first-child { border-left:3px solid #8aa5c2; }
#companyPanel .form-card-icon, #companyPanel .tool-visual-icon, #companyPanel .summary-icon { background:#eef3fa; color:#5277a8; }
#companyPanel .field-group { min-width:0; }
#companyPanel .fiscal-grid { gap:20px; }
.helper { font-size:12px; line-height:1.6; }
@media(max-width:760px) {
 .search-card { padding:16px; }
 .directory-controls { flex-wrap:wrap; }
 .global-view .tool-card { padding:18px; }
 .hero.compact-hero h1, .global-view .page-head h1 { font-size:25px; }
}

/* Cabeçalho realmente fixo na viewport; espaço reservado evita cobrir a página. */
.app-shell { padding-top: 82px; }
.app-shell > .topbar {
  position: fixed;
  top: 0;
  left: 40px;
  right: 40px;
  width: auto;
  max-width: 1480px;
  height: 82px;
  margin: 0 auto;
  box-sizing: border-box;
  z-index: 70;
  background: var(--bg, #f4f7fb);
  isolation: isolate;
}
html[data-theme="dark"] .app-shell > .topbar { background: var(--bg, #080808); }
@media (max-width: 760px) {
  .app-shell { padding-top: 62px; }
  .app-shell > .topbar { left: 20px; right: 20px; height: 62px; margin: 0; }
}

/* Home já usa topbar compacta: reservar a altura real, não os 82px internos. */
@media (min-width: 1000px) {
  .app-shell:has(#companiesView.active #portfolioPicker:not([hidden])) { padding-top: 56px; }
}
@media (min-width: 1000px) and (max-height: 640px) {
  .app-shell:has(#companiesView.active #portfolioPicker:not([hidden])) { padding-top: 48px; }
}

/* assets/css/workspace-polish.css */
/* Shared controls and preview layout, without changing accounting output. */
.preview-expand:focus-visible { outline:2px solid #315fc5; outline-offset:3px; }
.file-drop-shell.has-selection, #companyPanel .file-drop-shell.has-selection { padding:10px 12px; }
.file-drop-shell.has-selection .file-drop-hint { display:none; }
.file-selection { display:flex; flex-direction:column; gap:6px; max-height:190px; }
.file-selection-summary { display:flex; justify-content:space-between; gap:12px; font-size:12px; color:#64748b; padding:3px 0 7px; }
.file-selection-item { display:flex; align-items:center; gap:10px; padding:9px 10px !important; border:1px solid #e1e8f0; border-radius:9px; background:#fff; }
.file-selection-item strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; }
.file-selection-item small { display:block; color:#64748b; font-size:11px; line-height:1.5; }
.file-selection-remove { width:36px !important; height:36px !important; min-width:36px !important; min-height:36px !important; }
.preview-table-scroll, #companyPanel .preview-table-scroll, .daily-table-scroll { max-height:62vh; overflow:auto; overscroll-behavior:contain; }
.preview-table-scroll th, #companyPanel .preview-table-scroll th, .daily-table-scroll th { position:sticky; top:0; z-index:2; background:#f1f5fa !important; box-shadow:0 1px 0 #d9e2ed; }
.preview-expand { padding:10px 14px; min-height:44px; border:1px solid #d4dfed; border-radius:10px; background:#fff; color:#31547d; font-size:12px; font-weight:600; cursor:pointer; }
.preview-pending-summary { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; padding:13px 16px; margin:12px 0; background:#f5f7fb; border:1px solid #dce4ef; border-radius:11px; font-size:13px; color:#405b7c; }
.preview-pending-summary button { border:1px solid #cad7e9; border-radius:8px; background:#fff; color:#315fc5; min-height:40px; padding:8px 12px; cursor:pointer; }
.preview-row-warning { display:block; margin-top:5px; color:#a33c49; font-size:10px; line-height:1.4; white-space:normal; }
.preview-results .accounts-pending td:first-child { border-left:3px solid #bb6a76 !important; }
.daily-balance.is-different { color:#a33c49; background:#faf0f2 !important; }
.daily-review .daily-balance.is-different { box-shadow:inset 3px 0 0 #bb6a76; }
.preview-dialog { width:min(1440px,96vw); max-width:96vw; height:92dvh; max-height:92dvh; padding:0 20px 20px; border:1px solid #d8e2ee; border-radius:16px; background:#f8fafc; color:#243c57; box-shadow:0 24px 80px #14243b40; }
.preview-dialog::backdrop { background:#14243b80; }
.preview-dialog-header { display:flex; justify-content:space-between; align-items:center; gap:12px; position:sticky; top:0; z-index:5; padding:15px 0; background:#f8fafc; border-bottom:1px solid #dbe4ef; }
.preview-dialog-header button { min-height:44px; padding:10px 14px; border:1px solid #d4dfed; border-radius:9px; background:#fff; color:#31547d; cursor:pointer; }
.preview-dialog .preview-expand { display:none; }
.preview-dialog .preview-intro { display:none; }
#companyPanel .preview-dialog .preview-summary-item { padding:12px 16px; }
#companyPanel .preview-dialog .preview-sheet-head { padding:12px 16px; }
.preview-dialog .preview-table-scroll, #companyPanel .preview-dialog .preview-table-scroll, .preview-dialog .daily-table-scroll { max-height:68dvh; }
body.preview-modal-open { overflow:hidden; }
.mobile-preview-actions { display:none; }
@media(max-width:760px) {
 .preview-dialog { width:100vw; max-width:100vw; height:100dvh; max-height:100dvh; border-radius:0; border:0; padding:0 12px 16px; }
 .preview-dialog-header { padding-top:max(12px,env(safe-area-inset-top)); }
 .mobile-preview-actions:not([hidden]) { position:fixed; bottom:0; left:0; right:0; z-index:80; display:grid; grid-template-columns:1fr 1fr; gap:8px; padding:9px 14px calc(9px + env(safe-area-inset-bottom)); background:#fff; border-top:1px solid #dbe4ef; box-shadow:0 -5px 18px #14243b0c; }
 .mobile-preview-actions > span { grid-column:1/-1; font-size:11px; color:#64748b; }
 .mobile-preview-actions button { min-height:44px; border:1px solid #d0ddee; border-radius:9px; background:#fff; color:#315fc5; font-weight:600; }
 .mobile-preview-actions button:last-child { background:#315fc5; color:#fff; border-color:#315fc5; }
 .mobile-preview-actions button:disabled { opacity:.6; cursor:wait; }
 body.has-mobile-preview main { padding-bottom:calc(110px + env(safe-area-inset-bottom)); }
 .file-selection-remove { width:44px !important; height:44px !important; min-width:44px !important; min-height:44px !important; }
}

/* Controle de menu no cabeçalho: traços se transformam em fechar. */
.sidebar-toggle {
 position:relative; display:inline-flex; align-items:center; justify-content:center; flex:none;
 width:40px; height:40px; padding:0; border:1px solid #2c4665; border-radius:11px;
 background:#233c5b; color:#fff; cursor:pointer; box-shadow:0 2px 5px #1d355012;
 transition:background 180ms ease,border-color 180ms ease,color 180ms ease,box-shadow 180ms ease;
}
.sidebar-toggle::before,.sidebar-toggle::after { content:none; }
.sidebar-toggle:hover { background:#2e4c70; border-color:#3a5c84; box-shadow:0 3px 8px #1d35501a; }
.sidebar-toggle:active { box-shadow:inset 0 1px 4px #13263e30; }
.sidebar-toggle:focus-visible { outline:2px solid #759bc6; outline-offset:3px; }
.toggle-lines { position:relative; width:20px; height:20px; pointer-events:none; }
.toggle-stroke { position:absolute; left:1px; width:18px; height:1.5px; border-radius:2px; background:currentColor;
 transition:transform 280ms cubic-bezier(.22,1,.36,1),opacity 160ms ease,width 280ms ease; }
.toggle-stroke:nth-child(1) { top:5px; transform:translateY(4px) rotate(45deg); }
.toggle-stroke:nth-child(2) { top:9px; opacity:0; transform:scaleX(.3); }
.toggle-stroke:nth-child(3) { top:13px; transform:translateY(-4px) rotate(-45deg); }
body.sidebar-collapsed .sidebar-toggle { background:#fff; border-color:#d5e0ec; color:#496580; box-shadow:0 1px 3px #1d355007; }
body.sidebar-collapsed .sidebar-toggle:hover { background:#edf3fa; border-color:#b4c7de; color:#294f7b; }
body.sidebar-collapsed .toggle-stroke:nth-child(1),
body.sidebar-collapsed .toggle-stroke:nth-child(3) { transform:none; }
body.sidebar-collapsed .toggle-stroke:nth-child(2) { opacity:1; transform:none; width:14px; }
body.sidebar-collapsed .toggle-stroke:nth-child(3) { width:10px; }
.topbar { gap:14px; }
.topbar-title { margin-right:auto; }
.directory-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; }
#addCompany { min-height:44px; padding:10px 16px; border:1px solid #d2deef; border-radius:10px; background:#fff; color:#315fc5; font-weight:600; cursor:pointer; }
.company-dialog { width:min(480px,94vw); max-height:90dvh; padding:24px; border:1px solid #d8e2ee; border-radius:16px; color:#243c57; background:#fff; box-shadow:0 24px 80px #14243b40; }
.company-dialog::backdrop { background:#14243b80; }
.company-dialog form { display:flex; flex-direction:column; gap:10px; }
.company-dialog-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.company-dialog h2 { font-size:21px; margin:0; }
.company-dialog p { font-size:13px; line-height:1.6; color:#64748b; margin:0 0 6px; }
.company-dialog label { font-size:13px; font-weight:600; }
.company-dialog input, .company-dialog select { width:100%; min-height:44px; padding:10px 12px; border:1px solid #d4dfed; border-radius:9px; background:#f8fafc; font-size:16px; }
.company-dialog button { min-height:44px; padding:10px 16px; border:1px solid #d4dfed; border-radius:9px; background:#fff; color:#31547d; cursor:pointer; }
.company-dialog button[type=submit] { background:#315fc5; border-color:#315fc5; color:#fff; font-weight:600; }
.company-dialog button:disabled { opacity:.6; cursor:wait; }
#companyCreateMessage { color:#a33c49; }
@media(max-width:760px) {
 .topbar { gap:8px; }
 .sidebar-toggle { width:44px; height:44px; }
 .company-dialog { padding:18px; }
 .directory-heading #addCompany { width:100%; }
}
@media(prefers-reduced-motion:reduce) {
 .sidebar, body.sidebar-collapsed .sidebar, .app-shell, .sidebar-toggle, .toggle-stroke, .main-nav-btn { transition:none; }
}

/* Softer navigation surface and a clearly discoverable menu control. */
.sidebar { background:linear-gradient(165deg,#1c304c 0%,#14243b 65%); border-right:1px solid #ffffff0c; }
.sidebar .main-nav-btn { border:1px solid transparent; border-radius:12px; transition:background 180ms ease, border-color 180ms ease, color 180ms ease; }
.sidebar .main-nav-btn:hover { background:#ffffff0a; border-color:#ffffff12; }
.sidebar .main-nav-btn.active { background:#416ca13b; border-color:#85b4ff33; box-shadow:inset 3px 0 #86b5ff,0 4px 12px #08132612; color:#f4f8ff; }
.sidebar .brand { padding-bottom:28px; }
.sidebar .sidebar-note { border-color:#ffffff12; line-height:1.6; }
@media(prefers-reduced-motion:reduce) { .sidebar .main-nav-btn { transition:none; } }

/* Navegação sobre a página: o conteúdo mantém a mesma posição. */
html { scrollbar-gutter:stable; }
.app-shell,body.sidebar-collapsed .app-shell { margin-left:0; transition:none; }
.sidebar-backdrop {
 position:fixed; inset:0; z-index:80; background:#152a4540;
 opacity:1; visibility:visible; transition:opacity 180ms ease,visibility 0s;
}
body.sidebar-collapsed .sidebar-backdrop { opacity:0; visibility:hidden; pointer-events:none; transition:opacity 160ms ease,visibility 0s 180ms; }
body.nav-drawer-open { overflow:hidden; }
/* Avoid repainting the animated home behind the navigation overlay. */
body.nav-drawer-open #portfolioPicker *,
body.nav-drawer-open #portfolioPicker *::before,
body.nav-drawer-open #portfolioPicker *::after { animation-play-state:paused!important; }
#mainSidebar {
 position:fixed; inset:16px auto 16px 16px; z-index:90; width:280px; max-width:calc(100vw - 32px);
 max-height:none; padding:28px 18px 22px; border:1px solid #ffffff14; border-radius:20px;
 overflow-y:auto; overscroll-behavior:contain;
 background:linear-gradient(155deg,#203957,#14263f 68%);
 box-shadow:0 20px 70px #0a1a3330,inset 0 1px 0 #ffffff08;
 transform:translate3d(0,0,0); opacity:1; visibility:visible; will-change:transform;
 transition:transform 220ms cubic-bezier(.22,1,.36,1),opacity 160ms ease,visibility 0s;
}
body.sidebar-collapsed #mainSidebar {
 max-height:none; padding:28px 18px 22px; transform:translate3d(calc(-100% - 32px),0,0); opacity:0;
 visibility:hidden; pointer-events:none;
 transition:transform 180ms cubic-bezier(.4,0,1,1),opacity 140ms ease,visibility 0s 180ms;
}
#mainSidebar .brand { padding:4px 35px 30px 10px; gap:11px; }
#mainSidebar .brand-logo { width:40px; height:40px; }
#mainSidebar .brand strong { font-size:22px; }
#mainSidebar .brand small { font-size:10px; white-space:nowrap; }
#mainSidebar .nav-caption { display:block; padding:0 14px; font-size:9px; }
#mainSidebar .main-nav { flex-direction:column; overflow:visible; gap:8px; padding:16px 0; }
#mainSidebar .main-nav-btn { min-height:48px; padding:13px 14px; gap:12px; white-space:normal; font-size:12px; }
#mainSidebar .main-nav-btn::before { width:18px; height:18px; }
#mainSidebar .sidebar-note { display:flex; margin-top:auto; padding:22px 12px 0; }
.sidebar-close {
 position:absolute; top:18px; right:14px; width:36px; height:36px; padding:0;
 display:grid; place-items:center; border:1px solid transparent; border-radius:10px;
 background:transparent; color:#a8bbd3; cursor:pointer;
 transition:background 160ms ease,color 160ms ease;
}
.sidebar-close svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; }
.sidebar-close:hover { background:#ffffff10; color:#fff; }
.sidebar-close:focus-visible { outline:2px solid #a0c1ed; outline-offset:1px; }
.sidebar-toggle,body.sidebar-collapsed .sidebar-toggle {
 width:auto; height:40px; gap:8px; padding:0 12px; border:1px solid #dbe4ef; background:#ffffffb3; color:#526d8c;
 border-radius:12px; box-shadow:0 1px 3px #1d355004;
}
.sidebar-toggle:hover,body.sidebar-collapsed .sidebar-toggle:hover { background:#edf3fb; border-color:#b8cce3; color:#315c8d; }
.sidebar-toggle-label { font-size:12px; font-weight:600; letter-spacing:-.1px; }
.sidebar-toggle-hint { flex:none; width:12px; height:12px; fill:none; stroke:currentColor; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; opacity:.65; }
.sidebar-toggle .toggle-lines { flex:none; }
@media(max-width:760px) {
 #mainSidebar,body.sidebar-collapsed #mainSidebar { inset:10px auto 10px 10px; max-width:calc(100vw - 20px); border-radius:18px; }
 .sidebar-toggle,body.sidebar-collapsed .sidebar-toggle { width:auto; height:44px; gap:7px; padding:0 10px; }
 .topbar-title { min-width:0; flex:1; }
 .topbar-title > span { display:none; }
 .topbar-title strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; border-left:0; padding-left:0; }
 .sidebar-close { width:44px; height:44px; top:12px; right:10px; }
}
@media(prefers-reduced-motion:reduce) {
 #mainSidebar,body.sidebar-collapsed #mainSidebar,.sidebar-backdrop,body.sidebar-collapsed .sidebar-backdrop,.sidebar-close { transition:none; }
}

/* assets/css/refined-theme.css */
/* Shared presentation for the directory, global tools and company workspace. */
html { scroll-padding-top:24px; }
::selection { background:#dbe8fc; color:#203c63; }
:root { --bg:#f3f6fb; --border:#e0e7f0; --accent:#3769bc; --accent-soft:#edf3fc; --muted:#687b92; --panel-shadow:0 5px 22px #1c304c05; }
body { background:var(--bg); }
.topbar { border-bottom-color:#e1e8f1; }
.hero h1, .panel-head h2, .global-view h2 { letter-spacing:-.035em; }
.directory-controls, .panel-head, .global-view .tool-card,
#companyPanel .modern-form, #companyPanel .stack-forms .modern-form,
#companyPanel .preview-sheet, .preview-sheet, .daily-review {
 border-radius:20px !important; border-color:var(--border) !important;
 background:#fff; box-shadow:var(--panel-shadow);
}
.directory-controls { padding:24px; }
.company-card { transition:background 180ms ease,box-shadow 180ms ease,border-color 180ms ease; }
.company-card:hover { background:#f8faff !important; border-color:#c6d7ed !important; box-shadow:0 5px 18px #294d7a08; }
.tool-tabs { gap:8px; }
.tool-tab { border-radius:13px !important; border:1px solid var(--border) !important; background:#ffffffb3 !important; color:#64768d !important; box-shadow:none !important; transition:background 180ms ease,border-color 180ms ease,color 180ms ease; }
.tool-tab:hover { border-color:#c7d7ed !important; color:#3769bc !important; }
.tool-tab.active { background:#eaf1fc !important; border-color:#c7d8f1 !important; color:#315eab !important; box-shadow:inset 0 1px 0 #fff !important; }
#companyPanel .tool-card > div:first-child { border-radius:20px !important; border-color:#e0e8f3 !important; background:linear-gradient(125deg,#edf3fb,#f6f8fc) !important; }
.form-card-header { border-bottom-color:#edf1f6 !important; padding-bottom:16px; margin-bottom:16px; }
.form-card-icon, .tool-visual-icon { border-radius:14px !important; box-shadow:0 3px 12px #243c5705 !important; }
.modern-form label, .directory-controls label { color:#475e78; }
.modern-form input:not([type=file]):not([type=checkbox]):not([type=radio]),
.modern-form select, .modern-form textarea,
.directory-controls input, .directory-controls select {
 border-radius:11px !important; border-color:#dce5ef !important; background:#fafbfd !important;
 transition:border-color 180ms ease,box-shadow 180ms ease;
}
.modern-form input:focus-visible, .modern-form select:focus-visible, .modern-form textarea:focus-visible,
.directory-controls input:focus-visible, .directory-controls select:focus-visible {
 outline:2px solid #3769bc; outline-offset:2px; box-shadow:0 0 0 4px #3769bc0c;
}
.file-drop-shell, #companyPanel .file-drop-shell { border-radius:15px !important; border-color:#c9d8e9 !important; background:#f8fafd !important; }
.file-drop-shell:hover, #companyPanel .file-drop-shell:hover,
.file-drop-shell:focus-within, #companyPanel .file-drop-shell:focus-within { background:#f0f5fd !important; border-color:#7d9ecf !important; }
.modern-form button, .secondary-action, .preview-expand, #addCompany, .preview-download, .daily-download { border-radius:11px !important; transition:background 180ms ease,box-shadow 180ms ease; }
.modern-form button[type=submit]:not(.secondary-action) { background:#3769bc !important; border-color:#3769bc !important; color:#fff !important; box-shadow:0 3px 9px #3769bc14; }
.modern-form button[type=submit]:not(.secondary-action):hover:not(:disabled) { background:#2d5aa5 !important; box-shadow:0 5px 14px #3769bc20; }
.modern-form button:disabled { box-shadow:none !important; }
.secondary-action, .preview-expand { background:#f8fafd !important; border-color:#d9e3ef !important; color:#42648e !important; }
.period-card, #companyPanel .period-card { border-radius:14px !important; background:#f7f9fd !important; border-color:#e0e8f3 !important; }
#companyPanel .bank-choice { border-radius:12px; background:#fafbfd; border-color:#dfe7f1; }
#companyPanel .bank-choice.selected { background:#edf3fc; border-color:#a8c0e3; }
.mini-metrics > span, .preview-summary-item { border-radius:12px !important; border-color:#e1e8f1 !important; }
.preview-sheet-head, #companyPanel .preview-sheet-head { background:#f9fbfe; border-bottom:1px solid #e8eef6; }
.preview-table-scroll th, #companyPanel .preview-table-scroll th, .daily-table-scroll th { background:#edf3fa !important; color:#48617e; }
.preview-table-scroll tbody tr:hover td, .daily-table-scroll tbody tr:hover td { background:#f4f8fe; }
.company-dialog { border-radius:20px; }
@media(max-width:760px) {
 .directory-controls { padding:18px; }
 .directory-controls, .panel-head, .global-view .tool-card, #companyPanel .modern-form,
 #companyPanel .stack-forms .modern-form, #companyPanel .tool-card > div:first-child { border-radius:16px !important; }
 .tool-tabs { gap:6px; }
 .tool-tab { min-height:44px; }
 .modern-form input:not([type=checkbox]):not([type=radio]), .modern-form select { font-size:16px !important; }
}
@media(prefers-reduced-motion:reduce) {
 .company-card, .tool-tab, .modern-form input, .modern-form select, .modern-form textarea,
 .directory-controls input, .directory-controls select, .modern-form button, .secondary-action,
 .preview-expand, #addCompany, .preview-download, .daily-download { transition:none; }
}

/* Clearer reading rhythm and quieter grouping of everyday controls. */
.hero.compact-hero { padding-top:30px; padding-bottom:22px; }
.hero.compact-hero h1 { font-size:clamp(28px,2.6vw,36px); line-height:1.18; margin-bottom:10px; }
.hero.compact-hero p { max-width:680px; }
.overview { gap:12px; margin-bottom:24px; }
.overview .overview-card { background:#ffffffa6; border:1px solid #e2e9f3; border-radius:13px; padding:13px 17px; }
.overview .overview-card:first-child { padding-left:17px; }
.overview .overview-card strong { color:#355d91; font-variant-numeric:tabular-nums; }
.directory-heading { padding-bottom:8px; }
.directory-heading h2 { letter-spacing:-.025em; }
.company-card.company-row { min-height:80px; padding:14px 20px; gap:16px; }
.company-row-code { width:48px; height:38px; border-radius:11px; background:#edf3fc; color:#42648f; font-size:12px; border:1px solid #dfe8f4; }
.company-row-name { font-size:13px; line-height:1.5; }
.company-row-meta { gap:10px; margin-top:2px; }
.company-row-action { color:#587393; }
.company-row-action b { background:#edf3fc; color:#547caf; }
.company-card.company-row:hover { box-shadow:inset 3px 0 #789dce; }
.panel-head { padding:26px !important; }
.panel-head h2 { line-height:1.3; }
.tool-tabs { margin-top:22px; margin-bottom:22px; }
.form-card-header strong { letter-spacing:-.02em; }
.form-card-header small { line-height:1.6; }
.modern-form .helper { color:#61758e; line-height:1.75; }
.modern-form .helper:empty { display:none; }
#companyPanel .upload-progress { border-radius:10px; padding:10px 13px; margin-bottom:14px; border:1px solid #e1e9f4; }
.file-drop-hint { line-height:1.65; }
.period-fields { column-gap:20px; }
.preview-table-scroll table, .daily-table-scroll table { font-variant-numeric:tabular-nums; }
.preview-table-scroll td, .daily-table-scroll td { line-height:1.55; }
.preview-summary-item strong { font-variant-numeric:tabular-nums; }
footer { color:#7d8da2; border-top-color:#e5ebf3; }
@media(max-width:760px) {
 .hero.compact-hero { padding-top:24px; }
 .overview { gap:8px; flex-wrap:wrap; }
 .overview .overview-card { padding:10px 12px; }
 .overview .overview-card:first-child { padding-left:12px; }
 .company-card.company-row { padding:14px 12px; gap:10px; min-height:86px; }
 .company-row-name { font-size:12px; white-space:normal; overflow:visible; }
 .company-row-meta { flex-wrap:wrap; gap:4px 8px; }
 .panel-head { padding:20px !important; }
 .tool-tabs { margin-top:18px; margin-bottom:18px; }
}

/* Readable secondary text, compact spacing, and fully visible mobile navigation. */
.directory-heading p, .search-meta, .helper, .form-card-header small { font-size:13px !important; }
.company-row-regime, .company-row-meta .mini-status, .company-row-action { font-size:11px !important; }
.overview .overview-card div > span { font-size:11px; line-height:1.45; }
.company-code { font-size:11px; letter-spacing:.09em; }
.hero.compact-hero { padding-top:22px; padding-bottom:16px; }
.directory-heading { padding-bottom:0; }
.directory-controls { gap:12px; }
.directory-controls .directory-heading { margin-bottom:0; }
.directory-controls .search-meta { margin-top:0; }
#companyPanel .tool-card > div:first-child { padding:18px 22px !important; }
#companyPanel .modern-form, #companyPanel .stack-forms .modern-form { padding:22px !important; }
.form-card-header { padding-bottom:12px; margin-bottom:12px; }
.tool-feature-list { margin-top:10px; }
@media(max-width:760px) {
 #companyPanel .tool-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); overflow:visible; gap:8px; padding:0; margin:16px 0; }
 #companyPanel .tool-tab { width:100%; min-width:0; min-height:52px; margin:0; padding:10px 9px; font-size:12px; line-height:1.4; white-space:normal; justify-content:flex-start; text-align:left; }
 .main-nav { flex-wrap:wrap; overflow:visible; gap:6px; }
 .main-nav-btn { font-size:11px; min-height:44px; }
 .sidebar { max-height:260px; }
 .overview .overview-card { padding:9px 11px; }
 .overview .overview-card:first-child { padding-left:11px; }
 .overview .overview-card div > span { font-size:11px; }
 .directory-controls { padding:16px; }
 .hero.compact-hero { padding-top:18px; padding-bottom:14px; }
 #companyPanel .tool-card > div:first-child, #companyPanel .modern-form,
 #companyPanel .stack-forms .modern-form { padding:18px !important; }
 .company-row-regime, .company-row-meta .mini-status { font-size:11px !important; }
}

/* assets/css/preview-tables.css */
/* One table treatment for organized files, classification, review and reconciliation. */
body .razync-table, #companyPanel .razync-table {
 width:100%; min-width:760px; margin:0; border:0; border-collapse:separate;
 border-spacing:0; table-layout:auto; background:#fff; color:#29415d;
 font-size:13px; font-variant-numeric:tabular-nums;
}
body .razync-table thead th, #companyPanel .razync-table thead th {
 position:sticky; top:0; z-index:2; padding:13px 16px !important;
 background:#edf3fa !important; color:#49627f !important;
 font-size:12px !important; line-height:1.5; font-weight:600;
 letter-spacing:0; text-transform:none; text-align:left; white-space:nowrap;
 border:0; border-bottom:1px solid #d9e4f1; box-shadow:none;
}
body .razync-table tbody td, #companyPanel .razync-table tbody td {
 padding:12px 16px !important; font-size:13px !important; line-height:1.6;
 vertical-align:top; text-align:left; color:#29415d; background:#fff;
 border:0; border-bottom:1px solid #e8eef6;
}
body .razync-table tbody tr:nth-child(even) td,
#companyPanel .razync-table tbody tr:nth-child(even) td { background:#f8fafd; }
body .razync-table tbody tr:hover td,
#companyPanel .razync-table tbody tr:hover td { background:#eef4fc; }
body .razync-table tbody tr:last-child td, #companyPanel .razync-table tbody tr:last-child td { border-bottom:0; }
body .razync-table .numeric, #companyPanel .razync-table .numeric { text-align:right; white-space:nowrap; }
body .razync-table .history-cell, #companyPanel .razync-table .history-cell { min-width:260px; max-width:520px; white-space:normal; overflow-wrap:anywhere; }
.preview-table-scroll, #companyPanel .preview-table-scroll, .daily-table-scroll {
 width:100%; max-width:100%; min-width:0; max-height:62vh; overflow:auto;
 border:1px solid #e0e8f2; border-radius:12px; background:#fff;
 scrollbar-width:thin; scrollbar-color:#bfcee1 #f5f8fc;
}
.preview-sheet > .preview-table-scroll, #companyPanel .preview-sheet > .preview-table-scroll { border:0; border-top:1px solid #e0e8f2; border-radius:0; }
.diagnostic-block > .preview-table-scroll { margin-top:10px; }
.razync-table td input { width:100%; min-width:120px; }
.razync-table .daily-balance.is-different { color:#a33c49 !important; background:#faf0f2 !important; }
.preview-dialog .preview-table-scroll { max-height:68dvh; }
@media(max-width:760px) {
 body .razync-table thead th, #companyPanel .razync-table thead th { padding:11px 12px !important; }
 body .razync-table tbody td, #companyPanel .razync-table tbody td { padding:11px 12px !important; }
}

/* Período de visualização dos resultados da Conferência com Extrato. */
.daily-period-filter{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.daily-period-filter label{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:500}
.daily-period-filter input[type=date]{width:145px;max-width:100%;min-height:35px;padding:6px 8px;border:1px solid var(--border,#d4dce5);border-radius:8px;background:var(--surface,#fff);color:var(--text,#222);font:inherit;color-scheme:normal}
html[data-theme=dark] .daily-period-filter input[type=date]{color-scheme:dark}
.daily-period-clear{min-height:35px;padding:6px 10px;border:1px solid var(--border,#d4dce5);border-radius:8px;background:transparent;color:inherit;cursor:pointer;font-size:12px}
.daily-visible-count{font-size:12px;color:var(--muted,#64748b)}
.daily-table tr[hidden]{display:none!important}
@media(max-width:680px){.daily-period-filter{width:100%}.daily-period-filter input[type=date]{width:130px}}

/* assets/css/motion.css */
/* Short transitions keep daily work responsive. No artificial processing delay. */
@keyframes razyncAppear {
  from { opacity:0; translate:0 7px; }
  to { opacity:1; translate:0 0; }
}
@keyframes razyncSpin { to { rotate:360deg; } }
@keyframes razyncToolEnter {
  from { opacity:0; translate:0 8px; }
  to { opacity:1; translate:0 0; }
}
@keyframes razyncFileEnter {
  from { opacity:0; translate:0 4px; scale:.985; }
  to { opacity:1; translate:0 0; scale:1; }
}
/* Animate small groups, never hundreds of transaction rows. */
#companyPanel .tool-pane.active .tool-intro,
.global-view.active :is(.page-head,.fiscal-page-head) {
  animation:razyncToolEnter 280ms cubic-bezier(.22,1,.36,1) both;
}
#companyPanel .tool-pane.active .modern-form,
.global-view.active :is(#ledgerForm,.fiscal-setup) {
  animation:razyncToolEnter 320ms 35ms cubic-bezier(.22,1,.36,1) both;
}
#companyPanel .tool-pane.active .stack-forms > .modern-form:nth-child(2) {animation-delay:70ms}
.file-selection-item:nth-child(-n+9) {animation:razyncFileEnter 200ms ease-out both}
.tool-result:not([hidden]) :is(.preview-commandbar,.preview-summary-grid,.daily-summary),
.fiscal-section-panel:not([hidden]),.fiscal-ai-account[open] .fiscal-ai-account-content {
  animation:razyncToolEnter 260ms ease-out both;
}
@media(hover:hover) and (prefers-reduced-motion:no-preference) {
  .tool-tab:hover {translate:0 -1px}
  .file-drop-shell:focus-within {translate:0 -1px}
  :is(.preview-download,.daily-download):hover:not(:disabled) {translate:0 -2px}
}
.company-card, .tool-tab, .file-drop-shell, .preview-download, .daily-download {
  transition:background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, translate 180ms ease !important;
}
@media(hover:hover) {
  .company-card:hover { translate:0 -3px; box-shadow:0 9px 24px #213e6010 !important; }
  .file-drop-shell:hover { translate:0 -1px; }
}
.tool-tab:active, .preview-download:active, .daily-download:active { translate:0 1px; }
.tool-result:not([hidden]), .preview-sheet, .daily-reconciliation, .company-dialog[open] {
  animation:razyncAppear 240ms ease-out both;
}
.preview-loading {
  position:relative;
  box-sizing:border-box;
  min-height:28px;
  padding:6px 0 6px 22px !important;
  border:0 !important;
  border-radius:0;
  background:transparent !important;
  box-shadow:none !important;
  color:#64758a !important;
  font-size:11px !important;
  line-height:16px;
}
.preview-loading::before {
  content:""; position:absolute; top:7px; left:0;
  width:13px; height:13px; box-sizing:border-box;
  border:1.5px solid #e0e7ee; border-top-color:#52769b; border-radius:50%;
  animation:razyncSpin 800ms linear infinite;
}
.preview-loading::after {content:none;}
.preview-loading .notice-icon {display:none;}
#companyPanel #processVisualStatus.is-processing {
  display:flex;align-items:center;gap:8px;min-height:30px;
  padding:7px 0;margin:10px 0;
  border:0;border-radius:0;background:transparent;box-shadow:none;
}
#companyPanel #processVisualStatus.is-processing .process-status-icon {
  position:relative;flex:0 0 13px;width:13px;height:13px;
  border:0;border-radius:0;background:none;
}
#companyPanel #processVisualStatus.is-processing .process-status-icon::before {
  inset:0;border:1.5px solid #e0e7ee;border-top-color:#52769b;
  animation:razyncSpin 800ms linear infinite;
}
#companyPanel #processVisualStatus.is-processing strong {
  font-size:11px;font-weight:500;line-height:16px;color:#64758a;
}
#companyPanel #processVisualStatus.is-processing small {display:none;}
@media(prefers-reduced-motion:reduce) {
  *, *::before, *::after { animation:none !important; transition:none !important; scroll-behavior:auto !important; }
  .company-card:hover, .file-drop-shell:hover, .tool-tab:active, .preview-download:active, .daily-download:active { translate:none; }
}
