:root {
  --omie-navy: #001e28;
  --omie-navy-2: #012a36;
  --omie-header: #001f2b;
  --omie-cyan: #00e5ff;
  --omie-cyan-2: #00d4ef;
  --omie-teal: #12b1a3;
  --omie-green: #78be20;
  --omie-green-2: #76bb0a;
  --omie-blue: #00a3e0;
  --omie-sky: #00abe7;
  --omie-orange: #f18a00;
  --omie-red: #e53935;
  --omie-recv: #1e88e5;
  --omie-bg: #eef2f4;
  --omie-card: #ffffff;
  --omie-text: #1a1a1a;
  --omie-muted: #6b7280;
  --omie-purple: #7c4dff;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 8px 24px rgba(0, 30, 40, 0.08);
  --shadow-hover: 0 14px 34px rgba(0, 30, 40, 0.14);
  --font: "Montserrat", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--omie-text);
  background: var(--omie-bg);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button, input { font-family: inherit; }

/* ===== Portal header (Meus Apps) ===== */
.portal-header {
  background: var(--omie-header);
  color: #fff;
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 36px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.logo-omie {
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -1px;
  color: var(--omie-cyan);
  line-height: 1;
}
.logo-omie span { color: #7fe9ff; }
.portal-nav { display: flex; gap: 28px; flex: 1; }
.portal-nav a {
  color: #d7e6eb;
  font-size: 14px;
  font-weight: 500;
  padding: 22px 0 18px;
  border-bottom: 3px solid transparent;
}
.portal-nav a.active {
  color: #fff;
  border-bottom-color: var(--omie-cyan);
}
.user-chip {
  background: var(--omie-cyan);
  color: #00313d;
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.portal-main { max-width: 1240px; margin: 0 auto; padding: 36px 28px 64px; }
.page-title { font-size: 34px; font-weight: 800; margin: 0 0 6px; letter-spacing: -0.5px; }
.page-sub { color: var(--omie-muted); margin: 0 0 28px; font-size: 15px; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-bottom: 28px;
}
.search-wrap {
  flex: 1;
  min-width: 260px;
  position: relative;
}
.search-wrap input {
  width: 100%;
  border: 0;
  background: #e6ebef;
  border-radius: 999px;
  padding: 14px 48px 14px 18px;
  font-size: 14px;
  outline: none;
}
.search-wrap .icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--omie-purple);
}
.btn {
  border: 0;
  border-radius: 999px;
  padding: 13px 22px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.03); }
.btn-dark { background: #111; color: #fff; }
.btn-cyan { background: var(--omie-cyan); color: #00313d; }
.btn-green { background: var(--omie-green-2); color: #fff; }
.btn-teal { background: var(--omie-teal); color: #fff; }
.btn-sky { background: var(--omie-sky); color: #fff; }
.btn-outline-green {
  background: transparent;
  color: var(--omie-green-2);
  border: 2px solid var(--omie-green-2);
}
.btn-outline-teal {
  background: transparent;
  color: var(--omie-teal);
  border: 2px solid var(--omie-teal);
}
.btn-light {
  background: #dff4ff;
  color: #0077a8;
}
.btn-wide { width: 100%; justify-content: center; }
.view-tools { display: flex; gap: 10px; margin-left: auto; color: #7a8690; }
.view-tools button {
  border: 0; background: transparent; cursor: pointer; color: inherit; padding: 6px;
}
.view-tools .active { color: var(--omie-navy); }

.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.app-card, .promo-card, .invite-card {
  background: var(--omie-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 18px 16px;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s ease, transform .2s ease;
  animation: rise .45s ease both;
}
.app-card:hover, .invite-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.app-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.status-ativo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #2e7d32;
  font-weight: 700;
  font-size: 13px;
}
.status-ativo::before {
  content: "";
  width: 4px;
  height: 16px;
  background: #2e7d32;
  border-radius: 2px;
}
.card-actions { display: flex; gap: 12px; align-items: center; color: #8a94a0; font-size: 13px; }
.card-actions button { border: 0; background: transparent; cursor: pointer; color: inherit; }
.app-body {
  display: flex;
  gap: 14px;
  align-items: center;
  flex: 1;
  margin-bottom: 18px;
}
.avatar {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; font-weight: 800; flex-shrink: 0;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.35);
}
.app-name {
  font-weight: 800;
  font-size: 14px;
  line-height: 1.35;
  text-transform: uppercase;
}
.promo-card {
  padding: 0;
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(120deg, rgba(0,30,40,.35), rgba(0,30,40,.15)),
    radial-gradient(circle at 20% 20%, #5ee7ff, transparent 40%),
    radial-gradient(circle at 80% 0%, #ff7eb3, transparent 35%),
    linear-gradient(135deg, #1d2b64, #f8cdda);
  color: #fff;
  justify-content: flex-end;
}
.promo-card .promo-copy {
  padding: 22px;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.15;
  max-width: 220px;
  text-shadow: 0 6px 20px rgba(0,0,0,.35);
}
.promo-dots {
  position: absolute; left: 22px; bottom: 16px; display: flex; gap: 6px;
}
.promo-dots i {
  width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.45);
}
.promo-dots i.on { background: #fff; }

.section-block { margin-top: 42px; }
.section-block h2 { margin: 0 0 4px; font-size: 22px; }
.section-block p { margin: 0 0 18px; color: var(--omie-muted); }
.invites-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.invite-actions { display: flex; margin-top: auto; }
.invite-actions .btn { border-radius: 999px 0 0 999px; flex: 1; }
.invite-actions .btn-split {
  border-radius: 0 999px 999px 0;
  width: 42px;
  justify-content: center;
  border-left: 1px solid rgba(0,0,0,.08);
}

/* ===== App shell ===== */
.app-header {
  background: var(--omie-navy);
  color: #fff;
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 18px 0 16px;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 40;
}
.app-header .logo-omie { font-size: 24px; }
.app-header .sep { width: 1px; height: 22px; background: rgba(255,255,255,.25); }
.app-header .empresa {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 52vw;
}
.header-icons {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.header-icons button, .header-icons a {
  color: #fff;
  background: transparent;
  border: 0;
  cursor: pointer;
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
}
.badge-dot {
  position: absolute; top: 2px; right: 2px;
  width: 8px; height: 8px; border-radius: 50%; background: #ff3b30;
  border: 1px solid #001e28;
}
.user-mini {
  display: inline-flex; align-items: center; gap: 8px; margin-left: 4px;
  font-weight: 600; font-size: 13px;
}
.user-mini .av {
  width: 28px; height: 28px; border-radius: 50%;
  background: #3a4650; display: grid; place-items: center;
}

.shell { display: flex; min-height: calc(100vh - 56px); }
.sidebar {
  width: 56px;
  background: #1b242b;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 8px;
  flex-shrink: 0;
}
.sidebar a {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; color: #d5dde3;
}
.sidebar a.active-financas { background: transparent; color: #fff; }
.sidebar a.active-servicos { background: var(--omie-teal); color: #fff; }
.sidebar a.active-contador { background: var(--omie-sky); color: #fff; }
.sidebar a:hover { background: rgba(255,255,255,.08); }
/* Finanças: só marcado (verde) quando o módulo está ativo */
.icon-financas {
  width: 34px; height: 34px; border-radius: 10px;
  background: transparent;
  display: grid; place-items: center;
}
.icon-financas-inner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1.8px solid #d5dde3;
  color: #d5dde3;
  background: transparent;
  display: grid; place-items: center;
  font-weight: 800; font-size: 13px; line-height: 1;
}
.icon-financas.on,
.sidebar a.active-financas .icon-financas {
  background: #78be20;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.icon-financas.on .icon-financas-inner,
.sidebar a.active-financas .icon-financas-inner {
  border: 0;
  background: #fff;
  color: #78be20;
}
.hub-financas-badge {
  width: 54px; height: 54px; border-radius: 14px;
  background: rgba(255,255,255,.18);
  display: grid; place-items: center;
}
.hub-financas-circle {
  width: 34px; height: 34px; border-radius: 50%;
  background: #fff; color: #78be20;
  display: grid; place-items: center;
  font-weight: 800; font-size: 22px; line-height: 1;
}

.workspace { flex: 1; display: flex; flex-direction: column; min-width: 0; background: #fff; }
.tabs-bar {
  display: flex; align-items: flex-end; gap: 2px;
  background: #f3f5f7; border-bottom: 1px solid #dde3e8; padding: 8px 12px 0;
}
.tab {
  background: #e7ebef; color: #566069; padding: 10px 16px;
  border-radius: 10px 10px 0 0; font-size: 13px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 8px;
}
.tab.active-green { background: var(--omie-green); color: #fff; }
.tab.active-teal { background: var(--omie-teal); color: #fff; }
.tab.active-sky { background: var(--omie-sky); color: #fff; }
.tab .x { opacity: .85; font-weight: 400; }

/* Hub */
.hub {
  min-height: calc(100vh - 56px);
  background:
    radial-gradient(circle at 15% 20%, rgba(120, 220, 255, .22), transparent 28%),
    radial-gradient(circle at 70% 10%, rgba(80, 180, 255, .18), transparent 25%),
    radial-gradient(circle at 85% 60%, rgba(0, 229, 255, .12), transparent 30%),
    radial-gradient(circle at 30% 80%, rgba(255,255,255,.08), transparent 25%),
    linear-gradient(160deg, #003447 0%, #002433 45%, #001821 100%);
  color: #fff;
  padding: 48px 56px;
  position: relative;
  overflow: hidden;
}
.hub::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='160' height='160' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='20' r='2' fill='%23ffffff22'/%3E%3Ccircle cx='90' cy='70' r='3' fill='%2300e5ff33'/%3E%3Ccircle cx='140' cy='30' r='2' fill='%23ffffff18'/%3E%3C/svg%3E");
  opacity: .7;
  pointer-events: none;
  animation: drift 18s linear infinite;
}
.hub-hello { position: relative; z-index: 1; margin-bottom: 42px; }
.hub-hello h1 { margin: 0; font-size: 42px; font-weight: 800; letter-spacing: -0.8px; }
.hub-hello p { margin: 8px 0 0; font-size: 28px; font-weight: 600; opacity: .95; }
.hub-cards {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 210px);
  gap: 22px;
}
.hub-card {
  height: 210px;
  border-radius: 8px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  transition: transform .2s ease, filter .2s ease;
}
.hub-card:hover { transform: translateY(-4px) scale(1.02); filter: brightness(1.05); }
.hub-card h3 { margin: 0; font-size: 22px; line-height: 1.2; font-weight: 800; }
.hub-card.servicos { background: var(--omie-teal); }
.hub-card.financas { background: var(--omie-green); }
.hub-card.contador { background: var(--omie-blue); }

/* Setup wizards */
.setup-layout {
  display: grid;
  grid-template-columns: 280px 1fr 280px;
  gap: 28px;
  padding: 28px 32px 48px;
}
.setup-layout.two-col { grid-template-columns: 300px 1fr; }
.setup-promos { display: flex; flex-direction: column; gap: 16px; }
.promo-card-light {
  background: #fff;
  border: 1px solid #e5eaee;
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.promo-card-light .promo-kicker {
  color: #78be20; font-weight: 800; font-size: 12px; margin-bottom: 6px;
}
.promo-card-light h4 { margin: 0 0 8px; font-size: 20px; }
.promo-card-light p { margin: 0 0 14px; color: var(--omie-muted); font-size: 13px; }
.promo-card-dark {
  background: linear-gradient(160deg, #0b2a36, #123848);
  color: #fff;
  border-radius: 16px;
  padding: 18px;
}
.promo-card-dark .promo-brand { font-size: 18px; margin-bottom: 10px; }
.promo-card-dark .promo-brand strong { color: var(--omie-cyan); }
.promo-card-dark p { margin: 0 0 12px; font-size: 13px; line-height: 1.4; opacity: .92; }
.promo-card-dark ul { margin: 0 0 14px; padding-left: 18px; font-size: 13px; }
.setup-intro h1 {
  margin: 0 0 18px;
  font-size: 42px;
  font-weight: 800;
}
.setup-intro.financas h1 { color: var(--omie-green-2); }
.setup-intro.servicos h1 { color: var(--omie-teal); }
.setup-intro.contador h1 { color: var(--omie-sky); }
.illus {
  width: 220px; height: 180px; border-radius: 24px; margin-bottom: 18px;
  background:
    radial-gradient(circle at 30% 30%, #fff 0 8%, transparent 9%),
    radial-gradient(circle at 70% 40%, rgba(255,255,255,.7) 0 5%, transparent 6%),
    linear-gradient(160deg, #d9f5ff, #b7ecdf);
  position: relative;
  overflow: hidden;
}
.illus::after {
  content: "";
  position: absolute; left: 55px; bottom: 28px;
  width: 70px; height: 90px; border-radius: 28px 28px 12px 12px;
  background: #2c3e50;
  box-shadow: 40px 24px 0 -18px #4aa3b5;
}
.setup-intro h3 { margin: 0 0 8px; font-size: 18px; }
.setup-intro p { margin: 0; color: var(--omie-muted); line-height: 1.45; font-size: 14px; }

.steps { position: relative; padding-left: 8px; }
.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  padding-bottom: 26px;
  position: relative;
}
.step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 27px; top: 52px; bottom: 0;
  width: 2px; background: #d7dee4;
}
.step-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: #eef2f5; color: #60707c;
  display: grid; place-items: center;
}
.step-body h4 { margin: 0 0 4px; font-size: 18px; }
.step-body p { margin: 0 0 12px; color: var(--omie-muted); font-size: 13px; }
.step-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.side-card {
  background: #f4f6f8;
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 16px;
}
.side-card h4 { margin: 0 0 8px; }
.side-card p { margin: 0 0 14px; color: var(--omie-muted); font-size: 13px; line-height: 1.4; }
.status-ok { color: #2e7d32; font-weight: 700; font-size: 13px; display: flex; gap: 6px; align-items: center; }
.status-bad { color: #c62828; font-weight: 700; font-size: 13px; display: flex; gap: 6px; align-items: center; }
.warn-mini {
  margin-top: 12px; color: #c77700; font-size: 12px; display: flex; gap: 6px; align-items: flex-start;
}

/* Finance resumo */
.resumo-page { background: #f7f8fa; flex: 1; padding: 14px 18px 40px; }
.resumo-top {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px;
}
.link-refresh {
  color: var(--omie-green-2); font-weight: 700; display: inline-flex; gap: 8px; align-items: center;
  background: transparent; border: 0; cursor: pointer; font-size: 14px;
}
.check-auto {
  display: inline-flex; align-items: center; gap: 8px; color: #333; font-size: 13px;
}
.check-auto input { accent-color: var(--omie-green-2); width: 16px; height: 16px; }

.resumo-grid {
  display: grid;
  grid-template-columns: 280px 1fr 340px;
  grid-template-rows: auto auto auto;
  gap: 14px;
}
.card-saldo {
  grid-column: 1; grid-row: 1;
  background: linear-gradient(145deg, #f5a623, #ef8f00);
  color: #fff; border-radius: 8px; padding: 18px; min-height: 168px;
  position: relative; overflow: hidden;
}
.card-saldo .cal {
  display: flex; gap: 10px; align-items: center; margin-bottom: 22px;
}
.cal-box {
  background: #fff; color: #222; border-radius: 6px; width: 48px; text-align: center; overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,.15);
}
.cal-box .y { background: #e53935; color: #fff; font-size: 10px; font-weight: 700; padding: 2px 0; }
.cal-box .d { font-size: 20px; font-weight: 800; line-height: 1.1; padding: 4px 0 2px; }
.cal-box .m { font-size: 10px; text-transform: lowercase; padding-bottom: 4px; }
.card-saldo .lbl { opacity: .95; font-size: 14px; }
.card-saldo .val { font-size: 28px; font-weight: 800; margin-top: 4px; }
.card-saldo .bg-dollar {
  position: absolute; right: -10px; bottom: -28px; font-size: 140px; font-weight: 800; opacity: .18;
}

.card-chart {
  grid-column: 2 / 4; grid-row: 1;
  background: #fff; border-radius: 8px; padding: 14px 16px; box-shadow: var(--shadow);
  min-height: 168px;
}
.card-chart h3 { margin: 0 0 8px; font-size: 16px; }
.chart-wrap { height: 120px; }

.card-pagar, .card-receber {
  border-radius: 8px; color: #fff; padding: 16px; display: grid;
  grid-template-columns: 1.1fr 1fr; gap: 12px; min-height: 150px;
}
.card-pagar { grid-column: 1 / 3; grid-row: 2; background: linear-gradient(90deg, #e53935, #c62828); }
.card-receber { grid-column: 1 / 3; grid-row: 3; background: linear-gradient(90deg, #1e88e5, #1565c0); }
.kpi-title { font-size: 13px; letter-spacing: .4px; font-weight: 700; opacity: .95; }
.kpi-count { font-size: 12px; opacity: .9; margin-bottom: 8px; }
.kpi-val { font-size: 28px; font-weight: 800; }
.kpi-sub { font-size: 12px; opacity: .9; margin-top: 4px; }
.kpi-cats { border-left: 1px solid rgba(255,255,255,.25); padding-left: 14px; font-size: 12px; }
.kpi-cats div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }

.card-atrasos {
  grid-column: 3; grid-row: 2 / 4;
  background: #0d47a1; color: #fff; border-radius: 8px; padding: 16px;
  display: flex; flex-direction: column;
}
.card-atrasos h3 { margin: 0 0 14px; font-size: 16px; }
.atraso-item {
  display: grid; grid-template-columns: 36px 1fr auto; gap: 10px;
  align-items: start; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.12);
}
.atraso-item .ini {
  width: 36px; height: 36px; border-radius: 6px; background: rgba(255,255,255,.12);
  display: grid; place-items: center; font-weight: 800; font-size: 12px;
}
.atraso-item .nome { font-size: 12px; font-weight: 700; line-height: 1.3; }
.atraso-item .meta { font-size: 11px; opacity: .85; margin-top: 2px; }
.atraso-item .valor { font-weight: 800; font-size: 12px; white-space: nowrap; }
.atrasos-footer {
  margin-top: auto; padding-top: 12px; font-size: 12px; opacity: .9; cursor: pointer;
}

/* Import page */
.import-box {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 28px; max-width: 720px;
}
.import-box label { display: block; font-weight: 700; margin: 14px 0 6px; font-size: 13px; }
.import-box select, .import-box input[type=file] {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid #d5dde3; background: #fff;
}
.alert {
  padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; font-size: 14px;
}
.alert.ok { background: #e8f5e9; color: #1b5e20; }
.alert.err { background: #ffebee; color: #b71c1c; }

.header-right { margin-left: auto; }
.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(0,229,255,.18), transparent 35%),
    radial-gradient(circle at 80% 80%, rgba(120,190,32,.12), transparent 30%),
    linear-gradient(160deg, #001e28, #012a36 50%, #003447);
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 22px;
  box-shadow: var(--shadow-hover);
  padding: 32px 28px;
}
.login-card h1 { margin: 0 0 4px; font-size: 26px; }
.login-card label { display: block; font-weight: 700; margin: 12px 0 6px; font-size: 13px; }
.login-card input {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid #d5dde3;
}
.login-hint { margin-top: 18px; font-size: 12px; color: #6b7280; }

.admin-head {
  display: flex; justify-content: space-between; gap: 16px; align-items: flex-start;
  flex-wrap: wrap; margin-bottom: 8px;
}
.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-table-wrap {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: auto;
}
.admin-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.admin-table th, .admin-table td {
  text-align: left; padding: 14px 16px; border-bottom: 1px solid #eef2f5; font-size: 13px;
}
.admin-table th { background: #f7f9fb; color: #52606a; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.admin-table .row-inactive { opacity: .55; }
.td-actions { white-space: nowrap; display: flex; gap: 8px; align-items: center; }
.pill {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  background: #e8eef2; font-weight: 700; font-size: 12px;
}
.pill.nivel-admin { background: #dff7ff; color: #00627a; }
.pill.nivel-financeiro { background: #e8f5d4; color: #3f6d00; }
.pill.nivel-contador { background: #e3f2fd; color: #0d47a1; }
.form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.form-grid input, .form-grid select, .import-box input, .import-box select {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid #d5dde3; background: #fff;
}
.check-line { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.apps-check-grid {
  display: grid; grid-template-columns: 1fr; gap: 8px; max-height: 260px; overflow: auto;
  padding: 8px; background: #f7f9fb; border-radius: 12px;
}
.check-card {
  display: flex; gap: 10px; align-items: flex-start; background: #fff;
  border: 1px solid #e4eaef; border-radius: 12px; padding: 10px 12px; font-size: 13px; cursor: pointer;
}
.check-card input { margin-top: 2px; }

@media (max-width: 720px) {
  .form-grid { grid-template-columns: 1fr; }
}

/* ===== Recursos (Finanças / Contador) ===== */
.recursos-page {
  background: #f3f5f7;
  flex: 1;
  padding: 18px 22px 40px;
  min-height: calc(100vh - 100px);
}
.recursos-title {
  margin: 0 0 16px;
  font-size: 28px;
  font-weight: 800;
}
.recursos-title.financas { color: #3f6d00; }
.recursos-title.contador,
.recursos-title.servicos { color: #0077a8; }
.recursos-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 18px;
  align-items: start;
}
.recursos-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.side-pill {
  background: #fff;
  border-radius: 999px;
  padding: 12px 16px;
  color: #3f6d00;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  display: block;
}
.recursos-side.teal .side-pill { color: #0077a8; }
.side-pill small {
  display: block;
  font-weight: 500;
  color: #7a8690;
  margin-top: 4px;
  font-size: 11px;
}
.side-pill .tag-off { color: #e53935; font-weight: 700; }
.side-pill.muted { opacity: .85; }
.oneflow-box {
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.oneflow-box strong {
  color: #6b2bd6;
  font-size: 18px;
  letter-spacing: -0.3px;
}
.oneflow-box p {
  margin: 8px 0 12px;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.35;
}
.recursos-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.recursos-grid.contador-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.rec-card {
  background: #fff;
  border: 1px solid #e5eaee;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 140px;
}
.rec-card h3 {
  margin: 0 0 6px;
  color: #3f6d00;
  font-size: 15px;
  font-weight: 800;
}
.rec-card.teal h3 { color: #0077a8; }
.rec-card a {
  color: #333;
  font-size: 13px;
  line-height: 1.35;
}
.rec-card a:hover { color: #3f6d00; text-decoration: underline; }
.rec-card.teal a:hover { color: #0077a8; }
.rec-card.rec-wide { grid-column: span 2; }
.rec-card.rec-wide-3 { grid-column: 1 / -1; }
.recursos-grid.servicos-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.rec-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.rec-cols.three { grid-template-columns: 1fr 1fr 1fr; }
.rec-cols a { display: block; margin-bottom: 6px; }
.rec-sub {
  display: block;
  margin-bottom: 8px;
  color: #3f6d00;
  font-size: 13px;
}
.rec-sub.teal { color: #0077a8; }
.badge-new {
  display: inline-block;
  background: #dff5c2;
  color: #3f6d00;
  font-size: 11px;
  font-weight: 800;
  border-radius: 999px;
  padding: 2px 8px;
  margin-left: 6px;
}
.open-finance {
  margin-top: 8px;
  background: #eaf6d6;
  border-radius: 999px;
  padding: 8px 12px !important;
  font-weight: 700;
  color: #3f6d00 !important;
  display: inline-block;
  width: fit-content;
}
.passo-list {
  margin: 0;
  padding-left: 18px;
  color: #333;
  font-size: 13px;
  line-height: 1.7;
}
.rec-help { margin: 0; color: #6b7280; font-size: 13px; line-height: 1.4; }

@media (max-width: 1200px) {
  .recursos-grid.servicos-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .recursos-layout { grid-template-columns: 1fr; }
  .recursos-grid, .recursos-grid.contador-grid { grid-template-columns: 1fr 1fr; }
  .rec-card.rec-wide { grid-column: span 2; }
}
@media (max-width: 720px) {
  .recursos-grid, .recursos-grid.contador-grid, .recursos-grid.servicos-grid { grid-template-columns: 1fr; }
  .rec-card.rec-wide, .rec-card.rec-wide-3, .rec-cols, .rec-cols.three {
    grid-column: auto;
    grid-template-columns: 1fr;
  }
}

/* ===== Modal Contas Correntes ===== */
body.modal-open { overflow: hidden; }
.omie-modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(10, 20, 28, .55);
  display: grid; place-items: center;
  padding: 24px;
}
.omie-modal-backdrop[hidden] { display: none !important; }
.omie-modal {
  background: #fff;
  width: min(1180px, 96vw);
  height: min(720px, 92vh);
  border-radius: 10px;
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.omie-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 8px;
}
.omie-modal-head h2 {
  margin: 0; color: #78be20; font-size: 28px; font-weight: 700;
}
.omie-modal-close {
  border: 0; background: transparent; color: #78be20;
  font-weight: 700; cursor: pointer; font-size: 14px;
}
.omie-modal-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 20px 12px;
}
.btn-incluir {
  border: 0; background: transparent; color: #78be20;
  font-weight: 700; font-size: 15px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-incluir .plus {
  width: 22px; height: 22px; border-radius: 50%;
  background: #78be20; color: #fff;
  display: grid; place-items: center; font-size: 16px; font-weight: 800;
}
.toolbar-left { display: flex; gap: 18px; align-items: center; }
.btn-importar { font-size: 13px !important; }
.btn-importar .ico-sheet {
  display: inline-grid; place-items: center;
  width: 18px; height: 18px; font-size: 12px; color: #78be20;
}
.toolbar-icons { display: flex; gap: 8px; }
.toolbar-icons button {
  border: 0; background: transparent; color: #8a94a0; cursor: pointer; font-size: 16px;
}
.contas-body {
  flex: 1; display: grid; grid-template-columns: 1fr auto; min-height: 0;
  border-top: 1px solid #e8eef2;
}
.contas-table-wrap { overflow: auto; min-width: 0; }
.contas-table {
  width: 100%; border-collapse: collapse; font-size: 12px; min-width: 980px;
}
.contas-table th {
  text-align: left; padding: 10px 12px; color: #6b7280; font-weight: 700;
  border-bottom: 1px solid #e8eef2; white-space: nowrap; background: #fff;
  position: sticky; top: 0; z-index: 1;
}
.contas-table td {
  padding: 11px 12px; border-bottom: 1px solid #f0f3f5; color: #222; white-space: nowrap;
}
.clientes-table {
  min-width: 1280px;
  font-size: 12px;
}
.clientes-table th,
.clientes-table td {
  padding: 7px 10px;
  border-right: 1px solid #eef1f4;
  vertical-align: middle;
}
.clientes-table th:last-child,
.clientes-table td:last-child { border-right: 0; }
.clientes-table .col-tags {
  white-space: normal;
  min-width: 110px;
}
.clientes-table .col-tags .tag-pill { margin: 1px 2px 1px 0; }
.cli-link {
  color: #78be20;
  font-weight: 700;
  text-decoration: none;
}
.cli-link:hover { text-decoration: underline; }
.contas-table .col-check { width: 36px; }
.conta-row, .cliente-row { cursor: pointer; }
.conta-row:hover, .cliente-row:hover { background: #f7fbf0; }
.conta-row.selected, .cliente-row.selected { background: #e8f6cf; }
.sit { font-weight: 800; }
.sit-ok { color: #78be20; }
.sit-off { color: #e53935; }
.sit-ativo {
  display: inline-flex; align-items: center; gap: 6px;
  color: #333; font-weight: 600;
}
.tag-pill {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700;
}
.tag-cli { background: #e3f2fd; color: #1565c0; }
.tag-for { background: #fde8e8; color: #c62828; }
.contas-side, .clientes-side {
  width: 250px; border-left: 1px solid #e8eef2; background: #fafbfc;
  display: flex; flex-direction: column; padding: 14px 12px;
  position: relative;
}
.contas-side[hidden], .clientes-side[hidden] { display: none !important; }
.clientes-side-toggle {
  position: absolute; left: -12px; top: 48%;
  width: 22px; height: 22px; border-radius: 999px;
  border: 1px solid #d5dde3; background: #fff; color: #78be20;
  font-size: 14px; line-height: 1; cursor: pointer; z-index: 2;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.contas-side-head, .clientes-side-head {
  padding: 4px 8px 14px; border-bottom: 1px solid #eef2f5;
}
.contas-side-head strong { font-size: 16px; color: #1a1a1a; }
.clientes-side-head strong {
  font-size: 14px; color: #5f7d2a; font-weight: 800; line-height: 1.35;
  display: block; word-break: break-word; white-space: normal;
}
.clientes-side-doc {
  display: block; margin-top: 4px;
  font-size: 12px; color: #8a94a0; font-weight: 600;
}
.clientes-side-doc[hidden] { display: none !important; }
.side-detalhe { margin-top: 4px; font-size: 12px; color: #6b7280; line-height: 1.35; }
.contas-side-actions {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 0; flex: 1;
}
.contas-side-actions button,
.side-excluir {
  border: 0; background: transparent; color: #5f7d2a;
  font-weight: 700; font-size: 13px; text-align: left;
  padding: 9px 8px; cursor: pointer;
  display: flex; align-items: center; gap: 10px; position: relative;
}
.contas-side-actions .side-ico,
.side-excluir .side-ico { color: #78be20; width: 18px; text-align: center; }
.contas-side-actions button:hover,
.side-excluir:hover { background: #f4f9ea; border-radius: 8px; }
.with-badge .badge-count {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: #78be20; color: #fff; border-radius: 999px;
  font-size: 11px; font-style: normal; font-weight: 800;
  min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 5px;
}
.side-excluir { margin-top: auto; border-top: 1px solid #eef2f5; }
.omie-modal-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 18px; border-top: 1px solid #e8eef2; color: #6b7280; font-size: 12px;
}
.pager { display: flex; gap: 8px; align-items: center; }
.pager button {
  border: 1px solid #d5dde3; background: #f5f7f8; color: #9aa3ab;
  border-radius: 6px; padding: 6px 12px; cursor: not-allowed;
}
.pager button.is-active:not(:disabled),
.clientes-pager button:not(:disabled) {
  color: #5b6570;
  background: #fff;
  cursor: pointer;
}
.pager button:not(:disabled):hover {
  border-color: #78be20;
  color: #78be20;
}

/* ===== Modal Clientes e Fornecedores (lista) ===== */
.clientes-modal {
  width: min(1480px, 98vw);
  height: min(900px, 96vh);
}
.clientes-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 250px;
  min-height: 0;
  border-top: 1px solid #e8eef2;
}
.clientes-body:has(#clientesSide[hidden]) {
  grid-template-columns: 1fr;
}
.clientes-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.grid-group-bar {
  padding: 8px 14px;
  font-size: 12px;
  color: #9aa3ab;
  background: #f7f9fa;
  border-bottom: 1px dashed #d5dde3;
}
.clientes-table thead th {
  background: #f3f5f7;
  color: #5b6570;
  font-size: 11px;
  text-transform: none;
  border-bottom: 1px solid #dde3e8;
  border-right: 1px solid #e4e9ed;
}
.th-tools {
  color: #b0b8c0;
  font-size: 10px;
  font-weight: 600;
  margin-left: 4px;
}
.clientes-table .empty-row {
  padding: 28px 16px;
  color: #6b7280;
  text-align: center;
}
.clientes-pager .pager-page,
.clientes-pager .pager-size {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #6b7280;
  font-size: 12px;
}
.clientes-pager select {
  border: 1px solid #d5dde3;
  background: #fff;
  border-radius: 4px;
  padding: 4px 6px;
  color: #6b7280;
  font: inherit;
}
@media (max-width: 900px) {
  .contas-body, .clientes-body { grid-template-columns: 1fr; }
  .contas-side, .clientes-side {
    width: 100%; border-left: 0; border-top: 1px solid #e8eef2; max-height: 240px;
  }
}

/* ===== Modal Configurações ===== */
.config-modal {
  width: min(1100px, 96vw);
  height: min(760px, 94vh);
  color: #1a1a1a;
}
.config-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 8px;
}
.config-modal-head h2 {
  margin: 0; color: #1a73c7; font-size: 28px; font-weight: 700;
}
.config-close {
  border: 0; background: transparent; color: #1a73c7;
  font-weight: 700; cursor: pointer; font-size: 14px;
}
.config-identity {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 22px;
  padding: 8px 22px 16px;
  align-items: start;
}
.config-logo-box { text-align: center; }
.config-logo {
  width: 150px; height: 90px; border-radius: 8px;
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 28px;
  margin: 0 auto 8px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
}
.config-logo-link {
  border: 0; background: transparent; color: #1a73c7;
  font-size: 12px; cursor: pointer; text-decoration: underline;
}
.config-label { font-size: 13px; color: #6b7280; margin-bottom: 4px; }
.config-app-name {
  color: #1a73c7; font-weight: 700; font-size: 15px; line-height: 1.35;
  display: inline-block; max-width: 100%;
}
.config-app-name:hover { text-decoration: underline; }
.config-meta-links {
  display: flex; gap: 18px; margin-top: 12px; flex-wrap: wrap;
}
.config-meta-links a {
  color: #1a73c7; font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
}
.config-tabs {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 0 18px;
  padding: 0;
  background: #e9eef2;
  border: 1px solid #d7dee5;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  overflow: visible;
  position: relative;
}
.config-tabs::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: #d7dee5;
  pointer-events: none;
}
.config-tab {
  border: 0;
  background: transparent;
  color: #6b7280;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  padding: 11px 16px 12px;
  cursor: pointer;
  position: relative;
  z-index: 1;
  border-radius: 6px 6px 0 0;
  border-top: 3px solid transparent;
  margin-bottom: 0;
}
.config-tab:hover { color: #374151; background: rgba(255,255,255,.35); }
.config-tab.active {
  color: #1a1a1a;
  font-weight: 800;
  background: #fff;
  border-top-color: #1a73c7;
  z-index: 2;
  box-shadow: 1px 0 0 #d7dee5, -1px 0 0 #d7dee5;
}
.config-tab.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: #fff;
}
/* switches / painéis Configurações */
.config-toggle-grid { margin-bottom: 28px; }
.config-toggle-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.config-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}
.config-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.config-switch-ui {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #d7dee5;
  position: relative;
  flex-shrink: 0;
  transition: background .15s ease;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
}
.config-switch-ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: transform .15s ease;
}
.config-switch input:checked + .config-switch-ui {
  background: #1a73c7;
}
.config-switch input:checked + .config-switch-ui::after {
  transform: translateX(20px);
}
.config-switch-label {
  color: #1a1a1a;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}
.config-sections-row { margin-top: 8px; }
.config-section-title {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 800;
  color: #1a1a1a;
}
.config-resumo-block {
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.config-alert-row {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.config-alert {
  flex: 1;
  min-width: 260px;
  background: #fff4c6;
  border: 1px solid #f0e0a0;
  color: #5c4b12;
  font-size: 13px;
  font-weight: 600;
  padding: 12px 14px;
  border-radius: 4px;
}
.config-schedule {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #4b5563;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.config-schedule select {
  border: 1px solid #cfd8df;
  border-radius: 4px;
  padding: 6px 8px;
  font: inherit;
  background: #fff;
  color: #1a1a1a;
}
.config-inline-link {
  color: #1a73c7;
  font-size: 13px;
  font-weight: 700;
}
.config-inline-link:hover { text-decoration: underline; }
.config-body {
  flex: 1;
  overflow: auto;
  padding: 22px 28px 28px;
  margin: 0 18px 18px;
  border: 1px solid #d7dee5;
  border-top: 0;
  background: #fff;
  border-radius: 0 0 6px 6px;
}
.config-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.config-list {
  margin: 0; padding-left: 28px;
}
.config-list li {
  margin: 0 0 16px;
  color: #8aa0b5;
  font-size: 15px;
  font-weight: 700;
}
.config-list a {
  color: #1a73c7; font-weight: 700; font-size: 15px;
}
.config-list a:hover { text-decoration: underline; }
.config-sub {
  margin-top: 4px; color: #6b7280; font-size: 12px; font-weight: 500;
  padding-left: 0;
}
.config-sub strong { color: #333; font-weight: 700; }
.config-empty { color: #6b7280; font-size: 14px; margin: 12px 0; }

@media (max-width: 800px) {
  .config-identity, .config-cols { grid-template-columns: 1fr; }
}

/* ===== Incluir Cliente / Fornecedor ===== */
.incluir-cli-backdrop { z-index: 260; }
.incluir-cli-modal {
  width: min(1280px, 97vw);
  height: min(820px, 94vh);
  color: #1a1a1a;
}
.incluir-hint {
  margin: 0 22px 14px;
  color: #6b7280;
  font-size: 13px;
}
.incluir-wizard-grid {
  display: grid;
  grid-template-columns: minmax(420px, 580px) 1fr;
  gap: 16px;
  padding: 0 22px 22px;
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.incluir-wizard-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.incluir-card {
  position: relative;
  text-align: left;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #eef8df 0%, #f7fbee 55%, #e8f5d0 100%);
  padding: 16px 18px 18px;
  min-height: 108px;
  cursor: default;
  box-shadow: inset 0 0 0 1px rgba(120, 190, 32, .18);
  overflow: hidden;
}
.incluir-card-click { cursor: pointer; width: 100%; font: inherit; color: inherit; }
.incluir-card-click:hover { filter: brightness(0.98); box-shadow: inset 0 0 0 1px rgba(120, 190, 32, .35); }
.incluir-card-pill {
  display: inline-block;
  background: #78be20;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.incluir-card p {
  margin: 0;
  max-width: 70%;
  color: #447d12;
  font-size: 13px;
  line-height: 1.35;
}
.incluir-card-meta {
  position: absolute;
  top: 14px;
  right: 16px;
  text-align: right;
  font-size: 11px;
  color: #5a6b4a;
  line-height: 1.35;
}
.incluir-upgrade { color: #2f7d1a; font-weight: 700; font-size: 11px; }
.incluir-card-label {
  display: block;
  margin: 10px 0 6px;
  font-size: 12px;
  color: #447d12;
  font-weight: 600;
}
.incluir-search-row {
  display: flex;
  gap: 0;
  align-items: stretch;
  max-width: 520px;
}
.incluir-search-row input {
  flex: 1;
  border: 1px solid #cfd8c4;
  border-right: 0;
  border-radius: 6px 0 0 6px;
  padding: 10px 12px;
  font-size: 13px;
}
.incluir-search-btn {
  border: 0;
  background: #78be20;
  color: #fff;
  width: 42px;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
  font-size: 16px;
}
.incluir-card-art {
  position: absolute;
  right: 18px;
  bottom: 12px;
  font-size: 28px;
  font-weight: 800;
  color: rgba(120, 190, 32, .28);
  letter-spacing: 1px;
}
.incluir-card-art-google { font-style: italic; font-size: 22px; }
.incluir-card-art-kb { font-size: 36px; opacity: .55; }
.incluir-wizard-side { min-height: 120px; }

.incluir-step { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.incluir-step[hidden] { display: none !important; }

.incluir-cep-row {
  display: flex;
  gap: 14px;
  align-items: end;
  padding: 8px 22px 10px;
  flex-wrap: wrap;
}
.omie-float {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
}
.omie-float > span {
  font-size: 12px;
  color: #6b7280;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.omie-float input,
.omie-float select,
.omie-float textarea {
  border: 1px solid #d5dde3;
  border-radius: 6px;
  padding: 9px 10px;
  font-size: 13px;
  background: #fff;
  width: 100%;
  box-sizing: border-box;
}
.omie-float textarea { resize: vertical; }
.btn-omie-green {
  border: 0;
  background: #78be20;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 22px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  height: 40px;
}
.btn-omie-green:hover { filter: brightness(1.05); }
.incluir-manual-link {
  margin: 28px auto 8px;
  border: 0;
  background: transparent;
  color: #78be20;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  text-align: center;
  line-height: 1.35;
  display: block;
}
.incluir-manual-link small { font-weight: 500; color: #78be20; }
.incluir-back {
  border: 0; background: transparent; color: #6b7280;
  cursor: pointer; font-size: 13px; margin: 8px 22px 18px; align-self: flex-start;
}
.incluir-side-note {
  margin: 8px 22px; color: #8a5a00; background: #fff8e6;
  border: 1px solid #ffe0a3; border-radius: 8px; padding: 10px 12px; font-size: 13px;
}

.incluir-form-step { overflow: hidden; }
.incluir-form-layout {
  display: grid;
  grid-template-columns: 1fr 168px;
  flex: 1;
  min-height: 0;
  border-top: 1px solid #e8eef2;
}
.incluir-form-main {
  display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: auto;
  padding: 10px 16px 0;
}
.incluir-form-side {
  border-left: 1px solid #e8eef2;
  padding: 14px 10px;
  background: #fafbfc;
  display: flex;
  flex-direction: column;
  position: relative;
}
.incluir-side-toggle {
  position: absolute; left: -12px; top: 42%;
  width: 22px; height: 22px; border-radius: 999px;
  border: 1px solid #d5dde3; background: #fff; color: #78be20;
  font-size: 14px; line-height: 1; cursor: pointer; z-index: 2;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.incluir-form-actions {
  display: flex; flex-direction: column; gap: 2px; flex: 1;
}
.incluir-form-actions button,
.incluir-side-excluir,
.incluir-salvar {
  border: 0; background: transparent; color: #5f7d2a;
  font-weight: 700; font-size: 13px; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  text-align: left; padding: 9px 8px; width: 100%;
}
.incluir-form-actions button span,
.incluir-side-excluir span { color: #78be20; width: 18px; text-align: center; }
.incluir-form-actions button:hover,
.incluir-side-excluir:hover { background: #f4f9ea; border-radius: 8px; }
.incluir-side-excluir {
  margin-top: auto; border-top: 1px solid #eef2f5; padding-top: 12px;
}
.incluir-form-actions button[hidden],
.incluir-side-excluir[hidden] { display: none !important; }
.incluir-form-top {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: start;
  margin-bottom: 8px;
}
.incluir-avatar { text-align: center; }
.incluir-avatar-img {
  width: 64px; height: 64px; border-radius: 8px;
  background: #eef1f4; color: #9aa3ab;
  display: grid; place-items: center; font-size: 28px; margin: 0 auto 4px;
}
.incluir-avatar-img.is-code {
  background: #78be20;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
}
.incluir-link, .incluir-field-link {
  border: 0; background: transparent; color: #78be20;
  font-size: 12px; font-weight: 700; cursor: pointer; text-decoration: none;
}
.incluir-field-link { white-space: nowrap; }
.incluir-form-fields { display: flex; flex-direction: column; gap: 10px; }
.incluir-row {
  display: flex; gap: 12px; align-items: end; flex-wrap: wrap;
}
.incluir-row .flex-1 { flex: 1; min-width: 140px; }
.incluir-row .flex-2 { flex: 2; min-width: 200px; }
.incluir-row .flex-3 { flex: 3; min-width: 240px; }

.incluir-tabs {
  display: flex; gap: 2px; align-items: center;
  border-bottom: 1px solid #e5eaee;
  margin-top: 8px;
  overflow-x: auto;
  position: relative;
}
.incluir-tab {
  border: 0; background: transparent; color: #6b7280;
  font-size: 13px; font-weight: 600; white-space: nowrap;
  padding: 10px 10px 8px; cursor: pointer;
  border-bottom: 3px solid transparent;
}
.incluir-tab.active {
  color: #78be20; font-weight: 800;
  border-bottom-color: #78be20;
}
.incluir-mais-wrap { position: relative; }
.incluir-mais-menu {
  position: absolute; top: 100%; right: 0; z-index: 5;
  background: #fff; border: 1px solid #e5eaee; border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0,0,0,.12);
  min-width: 200px; padding: 6px;
}
.incluir-mais-menu[hidden] { display: none !important; }
.incluir-mais-menu button {
  display: block; width: 100%; text-align: left;
  border: 0; background: transparent; padding: 9px 10px;
  color: #333; font-size: 13px; cursor: pointer; border-radius: 6px;
}
.incluir-mais-menu button:hover { background: #f4f9ea; color: #78be20; }

.incluir-tab-body { padding: 14px 4px 8px; min-height: 220px; }
.incluir-pane[hidden] { display: none !important; }
.incluir-pane-intro { color: #6b7280; font-size: 13px; margin: 0 0 12px; line-height: 1.4; }
.incluir-pane-title { margin: 0 0 12px; color: #333; font-size: 14px; }
.incluir-empty { color: #8a94a0; font-size: 14px; margin: 8px 0; }
.incluir-check {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: #333; margin: 6px 12px 6px 0; cursor: pointer;
}
.incluir-checks { padding-top: 4px; }
.incluir-tags-bar {
  margin-top: auto;
  background: #fff8d6;
  border-top: 1px solid #f0e4a8;
  padding: 10px 12px 14px;
  display: flex; flex-direction: column; gap: 6px;
}
.incluir-tags-bar > span { font-size: 12px; color: #8a6d1d; font-weight: 600; }
.incluir-tags-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.incluir-tags-bar input {
  border: 1px solid #e6d98a; border-radius: 6px;
  padding: 8px 10px; font-size: 13px; background: #fffef6;
}
.incluir-toolbar-mini { display: flex; gap: 16px; margin-bottom: 10px; }

@media (max-width: 900px) {
  .incluir-wizard-grid { grid-template-columns: 1fr; }
  .incluir-form-layout { grid-template-columns: 1fr; }
  .incluir-form-side {
    border-left: 0; border-top: 1px solid #e8eef2;
    display: flex; justify-content: flex-end;
  }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes drift {
  from { background-position: 0 0; }
  to { background-position: 160px 80px; }
}

@media (max-width: 1100px) {
  .apps-grid, .invites-grid, .hub-cards { grid-template-columns: 1fr 1fr; }
  .setup-layout, .setup-layout.two-col { grid-template-columns: 1fr; }
  .resumo-grid { grid-template-columns: 1fr; }
  .card-saldo, .card-chart, .card-pagar, .card-receber, .card-atrasos {
    grid-column: auto; grid-row: auto;
  }
}
@media (max-width: 720px) {
  .apps-grid, .invites-grid, .hub-cards { grid-template-columns: 1fr; }
  .portal-nav { display: none; }
  .app-header .empresa { max-width: 30vw; }
  .card-pagar, .card-receber { grid-template-columns: 1fr; }
  .kpi-cats { border-left: 0; padding-left: 0; border-top: 1px solid rgba(255,255,255,.25); padding-top: 10px; }
}

/* ===== Importar Planilha Clientes ===== */
.importar-cli-backdrop { z-index: 270; }
.importar-cli-modal {
  width: min(920px, 96vw);
  height: auto;
  max-height: min(640px, 92vh);
  color: #1a1a1a;
}
.importar-cli-body {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px;
  padding: 8px 28px 32px;
  align-items: start;
  overflow: auto;
}
.importar-cli-excel {
  display: grid;
  place-items: start center;
  padding-top: 28px;
}
.importar-cli-intro {
  margin: 0 0 22px;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.45;
}
.importar-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}
.importar-step {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
  position: relative;
}
.importar-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #78be20;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  display: grid;
  place-items: center;
  margin-top: 8px;
  box-shadow: 0 2px 0 rgba(0,0,0,.08);
}
.importar-step-box {
  display: block;
  border-radius: 8px;
  padding: 14px 16px;
  color: #333;
  font-size: 14px;
  line-height: 1.45;
  background: #f3f6f3;
}
.importar-step-box strong { color: #1a1a1a; }
.importar-step-download {
  background: #e8f5cf;
  text-decoration: none;
  cursor: pointer;
  transition: filter .12s ease;
}
.importar-step-download:hover { filter: brightness(0.97); }
.importar-step-upload {
  background: #f4f9ea;
  border: 2px dashed #9ccc4a;
  cursor: pointer;
  min-height: 78px;
}
.importar-step-upload.is-dragover {
  background: #e8f5cf;
  border-color: #78be20;
}
.importar-file-name {
  display: block;
  margin-top: 10px;
  color: #447d12;
  font-weight: 700;
  font-size: 13px;
}
@media (max-width: 720px) {
  .importar-cli-body { grid-template-columns: 1fr; }
  .importar-cli-excel { padding-top: 0; justify-content: start; }
}

/* ===== Tema dia / noite ===== */
.theme-toggle .icon-sun[hidden],
.theme-toggle .icon-moon[hidden] { display: none !important; }
.theme-toggle[aria-pressed="true"] {
  color: #ffd666;
}

html[data-theme="night"] {
  --omie-bg: #0d151a;
  --omie-card: #162028;
  --omie-text: #e8eef2;
  --omie-muted: #9aa7b2;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 14px 34px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}
html[data-theme="night"] body { background: var(--omie-bg); color: var(--omie-text); }
html[data-theme="night"] .workspace,
html[data-theme="night"] .hub {
  background: #101820;
}
html[data-theme="night"] .sidebar { background: #0a1014; }
html[data-theme="night"] .page-title,
html[data-theme="night"] .hub-hello h1,
html[data-theme="night"] .setup-title,
html[data-theme="night"] h1, html[data-theme="night"] h2, html[data-theme="night"] h3 {
  color: var(--omie-text);
}
html[data-theme="night"] .page-sub,
html[data-theme="night"] .hub-hello p { color: var(--omie-muted); }

html[data-theme="night"] .card,
html[data-theme="night"] .setup-card,
html[data-theme="night"] .hub-card,
html[data-theme="night"] .omie-modal,
html[data-theme="night"] .config-modal,
html[data-theme="night"] .incluir-cli-modal,
html[data-theme="night"] .contas-side,
html[data-theme="night"] .config-body {
  background: var(--omie-card);
  color: var(--omie-text);
}
html[data-theme="night"] .omie-modal-backdrop { background: rgba(0, 0, 0, .72); }

html[data-theme="night"] .config-tabs {
  background: #1c2830;
  border-color: #2a3842;
}
html[data-theme="night"] .config-tabs::after { background: #2a3842; }
html[data-theme="night"] .config-tab { color: #9aa7b2; }
html[data-theme="night"] .config-tab.active {
  background: var(--omie-card);
  color: #fff;
  box-shadow: 1px 0 0 #2a3842, -1px 0 0 #2a3842;
}
html[data-theme="night"] .config-tab.active::after { background: var(--omie-card); }
html[data-theme="night"] .config-body { border-color: #2a3842; }
html[data-theme="night"] .config-switch-label,
html[data-theme="night"] .config-section-title { color: #e8eef2; }
html[data-theme="night"] .config-switch-ui { background: #3a4650; }
html[data-theme="night"] .config-alert {
  background: #3a3218;
  border-color: #5c4b12;
  color: #f0e0a0;
}
html[data-theme="night"] .config-schedule { color: #9aa7b2; }
html[data-theme="night"] .config-schedule select {
  background: #101820;
  border-color: #2a3842;
  color: #e8eef2;
}
html[data-theme="night"] .config-inline-link { color: #4db8ef; }

html[data-theme="night"] .contas-table th {
  background: #1a242c;
  color: #9aa7b2;
  border-bottom-color: #2a3842;
}
html[data-theme="night"] .contas-table td {
  color: #e8eef2;
  border-bottom-color: #243038;
}
html[data-theme="night"] .conta-row:hover,
html[data-theme="night"] .cliente-row:hover { background: #1e2a32; }
html[data-theme="night"] .conta-row.selected,
html[data-theme="night"] .cliente-row.selected { background: #243820; }

html[data-theme="night"] .omie-modal-head h2,
html[data-theme="night"] .omie-modal-close,
html[data-theme="night"] .btn-incluir { color: #8fd03a; }
html[data-theme="night"] .config-modal-head h2,
html[data-theme="night"] .config-close,
html[data-theme="night"] .config-app-name,
html[data-theme="night"] .config-logo-link,
html[data-theme="night"] .config-meta-links a,
html[data-theme="night"] .config-list a { color: #4db8ef; }

html[data-theme="night"] .omie-float > span { color: #9aa7b2; }
html[data-theme="night"] .omie-float input,
html[data-theme="night"] .omie-float select,
html[data-theme="night"] .omie-float textarea,
html[data-theme="night"] .incluir-search-row input,
html[data-theme="night"] .incluir-tags-bar input {
  background: #101820;
  border-color: #2a3842;
  color: #e8eef2;
}
html[data-theme="night"] .incluir-card {
  background: linear-gradient(135deg, #1a2a18 0%, #1e2818 55%, #243018 100%);
  box-shadow: inset 0 0 0 1px rgba(120, 190, 32, .22);
}
html[data-theme="night"] .incluir-hint,
html[data-theme="night"] .incluir-pane-intro,
html[data-theme="night"] .config-empty { color: #9aa7b2; }
html[data-theme="night"] .incluir-tabs { border-bottom-color: #2a3842; }
html[data-theme="night"] .incluir-tab { color: #9aa7b2; }
html[data-theme="night"] .incluir-form-side,
html[data-theme="night"] .contas-body,
html[data-theme="night"] .omie-modal-foot {
  border-color: #2a3842;
}
html[data-theme="night"] .incluir-tags-bar {
  background: #2a2410;
  border-top-color: #4a3f18;
}
html[data-theme="night"] .incluir-tags-bar span { color: #d4c07a; }
html[data-theme="night"] .pager button {
  background: #1a242c;
  border-color: #2a3842;
  color: #6b7780;
}
