:root {
  --bg: #edf1f5;
  --sidebar: #0b3d38;
  --sidebar-text: #e7f7f3;
  --sidebar-muted: #7dcebf;
  --surface: #ffffff;
  --line: #dbe3ea;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --danger: #dc2626;
  --radius: 10px;
  --sidebar-w: 248px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
}

button, input, select, textarea { font: inherit; }

button {
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease;
}

button:hover { background: var(--primary-dark); }
button.secondary { background: #475569; }
button.secondary:hover { background: #334155; }
button.danger { background: var(--danger); }
button.full { width: 100%; }

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, .12);
}

textarea { min-height: 96px; resize: vertical; }

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.hidden { display: none !important; }

/* Login — institucional, elegante, cores do sistema */
body.login-mode { overflow: hidden; }

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 22px;
  background: #06161a;
  overflow: hidden;
}

.login-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 60% at 8% 0%, rgba(45, 212, 191, .22), transparent 52%),
    radial-gradient(ellipse 70% 55% at 100% 100%, rgba(15, 118, 110, .45), transparent 48%),
    radial-gradient(ellipse 45% 40% at 70% 18%, rgba(20, 184, 166, .14), transparent 60%),
    linear-gradient(160deg, #06161a 0%, #0b2f2c 42%, #0a1f28 100%);
  animation: login-bg-shift 18s ease-in-out infinite alternate;
}
.login-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .28;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 75% 70% at 50% 45%, #000 15%, transparent 78%);
  pointer-events: none;
}

.login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
  opacity: .55;
}
.login-orb--a {
  width: 280px;
  height: 280px;
  left: -60px;
  top: 12%;
  background: rgba(45, 212, 191, .35);
  animation: login-orb-float 12s ease-in-out infinite;
}
.login-orb--b {
  width: 340px;
  height: 340px;
  right: -80px;
  bottom: -40px;
  background: rgba(13, 148, 136, .4);
  animation: login-orb-float 16s ease-in-out infinite reverse;
}
.login-orb--c {
  width: 160px;
  height: 160px;
  left: 42%;
  top: 8%;
  background: rgba(245, 200, 75, .12);
  animation: login-orb-float 10s ease-in-out infinite 1s;
}

@keyframes login-bg-shift {
  from { transform: scale(1) translate(0, 0); }
  to { transform: scale(1.045) translate(-1.2%, .8%); }
}
@keyframes login-orb-float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(18px, -22px); }
}

.login-shell {
  position: relative;
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: 1.12fr .88fr;
  gap: 0;
  border-radius: 24px;
  overflow: hidden;
  box-shadow:
    0 40px 90px rgba(0, 0, 0, .5),
    0 0 0 1px rgba(255, 255, 255, .12),
    inset 0 1px 0 rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: login-shell-in .7s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes login-shell-in {
  from { opacity: 0; transform: translateY(22px) scale(.97); }
  to { opacity: 1; transform: none; }
}

.login-hero {
  position: relative;
  padding: 48px 44px 36px;
  color: #ecfdf5;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 520px;
  background:
    linear-gradient(155deg, rgba(13, 148, 136, .5) 0%, rgba(8, 47, 44, .55) 48%, rgba(6, 22, 26, .35) 100%);
  overflow: hidden;
}
.login-hero::before {
  content: "";
  position: absolute;
  inset: auto -20% -30% auto;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 212, 191, .25), transparent 70%);
  pointer-events: none;
}
.login-hero > * { position: relative; z-index: 1; }

.login-kicker {
  margin: 0 0 22px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #99f6e4;
  animation: login-fade-up .7s ease .1s both;
}

.login-logo {
  width: 96px;
  height: 96px;
  object-fit: contain;
  margin-bottom: 22px;
  background: rgba(255, 255, 255, .1);
  border-radius: 22px;
  padding: 12px;
  box-shadow:
    0 12px 32px rgba(0, 0, 0, .28),
    inset 0 1px 0 rgba(255, 255, 255, .18);
  animation: login-fade-up .7s ease .18s both;
}

.login-title {
  margin: 0 0 12px;
  font-family: "Segoe UI Semibold", "Segoe UI", Candara, Calibri, sans-serif;
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -.03em;
  color: #f8fffc;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .25);
  animation: login-fade-up .7s ease .26s both;
}

.login-subtitle {
  margin: 0 0 28px;
  font-size: 14.5px;
  line-height: 1.55;
  color: #c5ebe4;
  max-width: 34ch;
  opacity: .95;
  animation: login-fade-up .7s ease .34s both;
}

.login-site {
  margin: -12px 0 22px;
  animation: login-fade-up .7s ease .38s both;
}

.site-link {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  font-family: inherit;
  text-decoration: none;
  transition: color .15s ease, background .15s ease, border-color .15s ease, transform .15s ease;
}

.site-link-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.2;
}

.site-link-url {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .01em;
  line-height: 1.2;
  opacity: .82;
}

.site-link--login {
  padding: 10px 14px;
  border-radius: 10px;
  color: #ecfdf5;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(153, 246, 228, .28);
}

.site-link--login:hover {
  color: #fff;
  background: rgba(153, 246, 228, .16);
  border-color: rgba(153, 246, 228, .5);
  transform: translateY(-1px);
}

.site-link--login .site-link-url {
  color: #99f6e4;
  opacity: 1;
}

.login-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  animation: login-fade-up .7s ease .42s both;
}
.login-points li {
  position: relative;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #d1fae5;
  letter-spacing: .01em;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(153, 246, 228, .22);
  border-radius: 999px;
}
.login-points li::before { content: none; }

.login-hero-foot {
  margin-top: auto;
  padding-top: 36px;
  opacity: .7;
  animation: login-fade-up .7s ease .5s both;
}
.login-strata {
  display: block;
  max-width: 168px;
  height: auto;
  filter: brightness(1.05);
}

@keyframes login-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.login-card {
  width: auto;
  max-width: none;
  padding: 44px 40px 32px;
  border-radius: 0;
  background:
    linear-gradient(180deg, #ffffff 0%, #f7fbfa 100%);
  box-shadow: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: login-fade-up .75s ease .2s both;
}

.login-card-head {
  margin-bottom: 22px;
}
.login-card-eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #0d9488;
}
.login-card-head h2 {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 750;
  color: #0f2926;
  letter-spacing: -.03em;
}
.login-card-head p {
  margin: 0;
  font-size: 13.5px;
  color: #64748b;
  line-height: 1.4;
}

.login-brand { display: none; }
.login-dev { display: none; }

.login-form .field {
  margin-bottom: 16px;
  opacity: 0;
  animation: login-field-in .85s cubic-bezier(.22, 1, .36, 1) both;
}
.login-form .field:nth-of-type(1) { animation-delay: .38s; }
.login-form .field:nth-of-type(2) { animation-delay: .52s; }
.login-form .remember-access {
  opacity: 0;
  animation: login-field-in .85s cubic-bezier(.22, 1, .36, 1) .66s both;
}
.login-form #login-enter {
  opacity: 0;
  animation: login-field-in .85s cubic-bezier(.22, 1, .36, 1) .78s both;
}

@keyframes login-field-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.login-form label {
  font-size: 12px;
  color: #334155;
  letter-spacing: .02em;
  font-weight: 650;
  margin-bottom: 6px;
  display: block;
  transition: color .25s ease;
}

.login-form .field:focus-within label {
  color: #0d9488;
}

#login-enter {
  min-height: 50px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
  border-radius: 14px;
  border: none;
  color: #fff;
  background: linear-gradient(180deg, #14b8a6 0%, #0d9488 55%, #0f766e 100%);
  box-shadow:
    0 10px 24px rgba(13, 148, 136, .32),
    inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .22s ease, box-shadow .22s ease, filter .22s ease;
}

#login-enter:hover {
  background: linear-gradient(180deg, #2dd4bf 0%, #0d9488 50%, #0f766e 100%);
  filter: brightness(1.03);
  transform: translateY(-2px);
  box-shadow:
    0 14px 28px rgba(13, 148, 136, .4),
    inset 0 1px 0 rgba(255, 255, 255, .28);
}

#login-enter:active {
  transform: translateY(0);
}

.login-form input {
  min-height: 48px;
  padding: 12px 14px;
  font-size: 14.5px;
  border-radius: 14px;
  border: 1px solid #d7e3e0;
  background: #f3faf8;
  transition:
    border-color .28s ease,
    box-shadow .28s ease,
    background .28s ease,
    transform .28s cubic-bezier(.22, 1, .36, 1);
}

.login-form input:hover {
  border-color: #b6d4ce;
  transform: translateY(-1px);
}

.login-form input:focus {
  background: #fff;
  border-color: #0d9488;
  box-shadow:
    0 0 0 5px rgba(13, 148, 136, .18),
    0 10px 22px rgba(13, 148, 136, .12);
  outline: none;
  transform: translateY(-2px) scale(1.01);
}

.login-form .password-wrap {
  transition: transform .28s cubic-bezier(.22, 1, .36, 1);
}
.login-form .field:focus-within .password-wrap {
  transform: translateY(-2px);
}
.login-form .field:focus-within .password-wrap input:focus {
  transform: scale(1.01);
}

.login-form .remember-access {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 2px 0 18px;
  font-size: 12.5px;
  color: #64748b;
  font-weight: 500;
  line-height: 1.35;
}

.login-form .remember-access input {
  width: auto;
  min-height: 0;
  margin-top: 2px;
  accent-color: #0d9488;
}

.login-foot {
  margin: 24px 0 0;
  text-align: center;
  font-size: 11px;
  color: #94a3b8;
  letter-spacing: .08em;
  text-transform: uppercase;
}

@media (max-width: 820px) {
  .login-shell {
    grid-template-columns: 1fr;
    max-width: 440px;
  }
  .login-hero {
    padding: 28px 24px 20px;
    text-align: center;
    align-items: center;
    min-height: 0;
  }
  .login-subtitle { max-width: none; }
  .login-site { display: flex; justify-content: center; }
  .site-link--login { align-items: center; text-align: center; }
  .login-logo { margin-left: auto; margin-right: auto; }
  .login-points { justify-content: center; }
  .login-hero-foot { padding-top: 20px; display: flex; justify-content: center; }
  .login-card { padding: 28px 24px 24px; }
  .login-bg { animation: none; }
  .login-orb { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .login-bg,
  .login-orb,
  .login-shell,
  .login-kicker,
  .login-logo,
  .login-title,
  .login-subtitle,
  .login-site,
  .login-points,
  .login-hero-foot,
  .login-card,
  .login-form .field,
  .login-form .remember-access,
  .login-form #login-enter {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .login-form input,
  .login-form .password-wrap {
    transition: none !important;
  }
}

.password-wrap {
  position: relative;
  display: block;
  width: 100%;
}

.password-wrap input {
  width: 100%;
  padding-right: 52px !important;
}

.password-wrap input::-ms-reveal,
.password-wrap input::-ms-clear,
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
  display: none;
}

.password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 !important;
  margin: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: none;
  font-weight: 400;
  line-height: 1;
}

.password-toggle:hover {
  color: #fff;
  background: var(--primary-dark);
}

.password-toggle svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: block;
  pointer-events: none;
}

.password-toggle svg.hidden { display: none; }

.login-form .password-wrap input {
  padding: 11px 52px 11px 12px;
  font-size: 14px;
}

.login-form button[type="submit"] {
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  font-size: 15px;
}

.login-error {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 13px;
  display: none;
}

.login-error.show { display: block; }

/* App shell */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  z-index: 40;
  background: linear-gradient(180deg, #0f4c46 0%, #0b3d38 55%, #082f2b 100%);
  color: var(--sidebar-text);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  box-shadow: 4px 0 24px rgba(2, 20, 18, .28);
}

.main {
  grid-column: 2;
  min-width: 0;
  margin-left: 0;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(159, 212, 196, 0.35) transparent;
}

.menu::-webkit-scrollbar {
  width: 6px;
}

.menu::-webkit-scrollbar-track {
  background: transparent;
}

.menu::-webkit-scrollbar-thumb {
  background: rgba(159, 212, 196, 0.35);
  border-radius: 999px;
}

.menu::-webkit-scrollbar-thumb:hover {
  background: rgba(159, 212, 196, 0.55);
}

.menu::-webkit-scrollbar-button {
  display: none;
  height: 0;
  width: 0;
}

.sidebarDev {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  margin-top: auto;
  padding: 8px 4px 6px;
  flex: 0 0 auto;
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  background: var(--sidebar);
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.license-seal-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 6px 0 14px;
  padding: 0 10px;
  box-sizing: border-box;
}

.license-seal-wrap.hidden { display: none; }

.license-banner {
  margin: 0 16px 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: linear-gradient(90deg, #fff7e6, #ffe8c2);
  border: 1px solid #e8c47a;
  color: #5c4314;
  font-size: 14px;
}
.license-banner.hidden { display: none; }
.license-banner-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.license-banner-btn {
  padding: 6px 12px !important;
  font-size: 13px !important;
  background: #b45309 !important;
  border-color: #b45309 !important;
}
.license-banner-hint { opacity: .9; }

/* Selo circular — verde do sistema + borda/texto dourados */
.license-seal,
button.license-seal {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 124px !important;
  height: 124px !important;
  min-height: 124px !important;
  max-width: 124px;
  margin: 0 auto;
  padding: 0 !important;
  border: none !important;
  border-radius: 50% !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  cursor: pointer;
  color: #f5c84b;
  font-weight: 700;
}

.license-seal:hover,
button.license-seal:hover {
  transform: scale(1.03);
  background: transparent !important;
  filter: brightness(1.06);
}

.license-seal-ring {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 124px;
  height: 124px;
  gap: 4px;
  border-radius: 50% !important;
  border: 4px solid currentColor !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .18),
    0 6px 18px rgba(0, 0, 0, .28) !important;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, .14), transparent 42%),
    radial-gradient(circle at 50% 55%, #0f4c46 0%, #0b3d38 55%, #072824 100%) !important;
  text-align: center;
  line-height: 1.15;
  padding: 10px 8px;
  box-sizing: border-box;
}

.license-seal-title {
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
  opacity: .95;
  max-width: 100px;
  color: inherit;
}

.license-seal-brand {
  font-size: 15px;
  letter-spacing: .16em;
  margin: 2px 0;
  font-weight: 800;
  color: inherit;
  line-height: 1;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

.license-seal-sub {
  font-size: 11px;
  letter-spacing: .03em;
  font-weight: 700;
  opacity: 1;
  max-width: 100px;
  line-height: 1.2;
  padding-top: 0;
  color: inherit;
}

.license-seal--trial { color: #f5c84b; }
.license-seal--active { color: #6ee7b7; }
.license-seal--expired { color: #fca5a5; }

.license-seal-panel {
  display: flex;
  justify-content: center;
  margin: 8px 0 22px;
  padding: 8px 12px;
}

.license-seal-panel .license-seal,
.license-seal-panel button.license-seal {
  width: 168px !important;
  height: 168px !important;
  min-height: 168px !important;
  max-width: 168px;
  cursor: default;
}

.license-seal-panel .license-seal-ring {
  width: 168px;
  height: 168px;
  gap: 6px;
  border-width: 5px !important;
  padding: 14px;
}

.license-seal-panel .license-seal-title {
  font-size: 12px;
  max-width: 140px;
}

.license-seal-panel .license-seal-brand {
  font-size: 22px;
  letter-spacing: .18em;
}

.license-seal-panel .license-seal-sub {
  font-size: 14px;
  max-width: 140px;
}

.strataDev {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 4px 0 2px;
  padding: 4px 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.strataDevLabel {
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #cbd5e1;
  opacity: 1;
  font-weight: 700;
}

.strataDevLogo {
  display: block;
  max-width: 220px;
  max-height: 60px;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0;
  mix-blend-mode: normal;
  filter: none;
}

.devBadge,
#devFloat.devBadge {
  display: block;
  width: 100%;
  text-align: center;
  margin: 0;
  padding: 2px 0 0;
  font-size: 10px;
  color: #c5d9ed;
  opacity: .88;
}

.appVersion {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 10px;
  color: #8fb4d8;
  margin: 3px 0 0;
  padding: 0;
  letter-spacing: .06em;
}

.brand {
  padding: 10px 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  margin-bottom: 4px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.brand-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  background: transparent;
  border: 0;
  border-radius: 12px;
  box-shadow: none;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35));
  padding: 0;
  mix-blend-mode: normal;
}

.brand-copy {
  min-width: 0;
}

.brand strong {
  display: block;
  font-size: 15px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand span {
  display: block;
  font-size: 12px;
  color: var(--sidebar-muted);
  margin-top: 4px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .45);
  padding: 0 8px;
}

.menu-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}

.menu-group .menu-label {
  margin-top: 4px;
  margin-bottom: 2px;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.pager span {
  color: var(--muted);
  font-size: 13px;
}

.empty-search {
  padding: 28px 20px;
  text-align: center;
  color: var(--text);
}

.empty-search strong {
  display: block;
  font-size: 15px;
  margin-bottom: 8px;
}

.empty-search p {
  margin: 6px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.result-list {
  display: flex;
  flex-direction: column;
}

.result-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--text);
  text-align: left;
  box-shadow: none;
  cursor: pointer;
  min-height: 0;
}

.result-row:hover {
  background: #ecfdf5;
}

.result-row:last-child {
  border-bottom: none;
}

.result-row--code.is-selected {
  background: #ecfdf5;
  border-color: #99f6e4;
}
.result-row--code.is-selected .result-code {
  color: #0f766e;
}
.result-row--code {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 10px 14px;
}

.result-list--busca .result-head--busca,
.result-row--busca {
  display: grid;
  grid-template-columns: 120px minmax(140px, 1.1fr) minmax(0, 1.4fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 10px 14px;
  box-sizing: border-box;
}
.result-list--busca .result-head--busca,
.result-row--busca-actions {
  grid-template-columns: 100px minmax(120px, 1.1fr) minmax(0, 1.2fr) auto;
}
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.result-actions button {
  padding: 6px 10px !important;
  font-size: 12px !important;
  min-height: 0 !important;
  white-space: nowrap;
}
.result-head--busca {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}
.result-row--busca {
  margin: 0;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--text);
  text-align: left;
  box-shadow: none;
  cursor: pointer;
}
.result-row--busca:hover { background: #ecfdf5; }
.result-row--busca .result-tipo {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-dark, #0f766e);
}
.result-row--busca .result-code {
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.result-row--busca .result-go {
  font-size: 13px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  justify-self: stretch;
  text-align: left;
}
.busca-resumo {
  margin: 0 0 10px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--primary-dark, #0f766e);
  background: #ecfdf5;
  border: 1px solid #99f6e4;
  border-radius: 8px;
}
@media (max-width: 720px) {
  .result-list--busca .result-head--busca,
  .result-row--busca {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .result-head--busca { display: none; }
}

.result-row--rich {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 14px 16px;
  align-items: center;
}

.result-list--rich {
  max-height: 58vh;
  overflow: auto;
}

.result-row--rich .result-go {
  font-size: 12px;
  font-weight: 800;
  color: var(--primary-dark, #0f766e);
  white-space: nowrap;
}

.wb-empty-novo {
  margin-top: 14px;
  display: inline-flex;
}

.result-row--code .result-go {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-dark, #0f766e);
  text-transform: lowercase;
}

.result-list--codes {
  max-height: 52vh;
  overflow: auto;
}

.result-code {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary-dark, #0f766e);
  word-break: break-all;
}

.result-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.result-main strong {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-main small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-go {
  color: var(--muted);
  font-size: 22px;
  font-weight: 400;
  text-align: center;
}

@media (max-width: 640px) {
  .result-row {
    grid-template-columns: 88px minmax(0, 1fr) 20px;
    gap: 8px;
    padding: 10px 12px;
  }
}


.menu button {
  text-align: left;
  background: transparent;
  color: var(--sidebar-text);
  border: none;
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 500;
  box-shadow: none;
}

.menu button:hover { background: rgba(255, 255, 255, .08); }
.menu button.active {
  background: rgba(255, 255, 255, .14);
  font-weight: 600;
}

.menu-divider {
  height: 1px;
  margin: 8px 4px;
  background: rgba(255, 255, 255, .1);
}

.menu button.menu-account {
  background: #475569;
  font-weight: 600;
}

.menu button.menu-account:hover {
  background: #334155;
}

.menu-icon {
  display: inline-block;
  width: 20px;
  margin-right: 6px;
  opacity: .85;
}

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.topbar h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}

.topbar-heading {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.topbar-congregacao {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-dark);
  line-height: 1.3;
}

.topbar-congregacao.hidden {
  display: none;
}

.topbar-site {
  margin: 0;
}

.site-link--topbar {
  flex-direction: row;
  align-items: baseline;
  gap: 8px;
  color: var(--primary);
}

.site-link--topbar .site-link-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary-dark);
}

.site-link--topbar .site-link-url {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  opacity: 1;
}

.site-link--topbar:hover {
  color: var(--primary-dark);
}

.site-link--topbar:hover .site-link-label {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-link--topbar:hover .site-link-url {
  color: var(--primary);
}

.user-chip {
  font-size: 13px;
  color: var(--primary-dark);
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: #ecfdf5;
  border: 1px solid #99f6e4;
}

.workspace { padding: 20px 24px 32px; }

.panel.hidden { display: none; }

.panel-body {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.notice {
  background: #ecfdf5;
  border: 1px solid #99f6e4;
  color: #115e59;
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  line-height: 1.5;
}

.muted { color: var(--muted); font-size: 13px; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.card .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  font-weight: 700;
}

.card .value {
  font-size: 28px;
  font-weight: 800;
  margin-top: 8px;
  color: var(--primary-dark);
}

.card .value.money-card {
  font-size: 20px;
  line-height: 1.25;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.panel-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: #fafbfc;
}

.panel-box h3 { margin: 0 0 10px; font-size: 16px; }
.smart-box { margin-top: 16px; }

.donut-layout {
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr;
  gap: 18px;
  align-items: center;
}

.donut-wrap {
  position: relative;
  display: grid;
  place-items: center;
}

.donut-chart {
  width: min(280px, 100%);
  aspect-ratio: 1;
  overflow: visible;
}

.donut-track {
  fill: none;
  stroke: #e2e8f0;
  stroke-width: 34;
}

.donut-segment {
  fill: none;
  stroke-width: 34;
  stroke-linecap: butt;
  transition: stroke-width .15s ease, filter .15s ease;
  cursor: pointer;
}

.donut-segment:hover {
  stroke-width: 40;
  filter: drop-shadow(0 3px 5px rgba(15, 23, 42, .2));
}

.donut-center-title,
.donut-center-value {
  text-anchor: middle;
  dominant-baseline: middle;
  fill: var(--text);
}

.donut-center-title {
  font-size: 14px;
  font-weight: 700;
}

.donut-center-value {
  font-size: 24px;
  font-weight: 900;
  fill: var(--primary-dark);
}

.donut-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 12px;
}

.legend-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
}

.legend-item:hover {
  background: #f1f5f9;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.legend-name {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
}

.legend-item strong {
  font-size: 12px;
}

.chart-tooltip {
  position: fixed;
  z-index: 10001;
  max-width: 260px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #0f172a;
  color: #fff;
  font-size: 12px;
  line-height: 1.35;
  pointer-events: none;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .2);
}

.health-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.health-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.health-grid span {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-dark);
}

.health-grid small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.insight-list {
  display: grid;
  gap: 10px;
}

.insight {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--primary);
  border-radius: 8px;
  background: #fff;
}

.insight.alto { border-left-color: #dc2626; }
.insight.medio { border-left-color: #f59e0b; }

.insight strong {
  min-width: 0;
  font-size: 14px;
}

.insight span {
  font-weight: 900;
  color: var(--primary-dark);
}

.insight small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.steps { margin: 0; padding-left: 18px; line-height: 1.7; }
.stack-btns { display: flex; flex-direction: column; gap: 8px; }

.toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 14px;
  padding: 12px;
  background: #fafbfc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.field { min-width: 160px; }
.field.grow { flex: 1; min-width: 220px; }
.field.full { grid-column: 1 / -1; }
.grid-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.table-wrap {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.table th, .table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.table th {
  background: #f1f5f9;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  position: sticky;
  top: 0;
}

.table tbody tr:hover { background: #f8fafc; }
.table tbody tr.row-open {
  cursor: pointer;
}
.table tbody tr.row-open:hover {
  background: #ecfdf5;
}
.table tbody tr.row-open:focus {
  outline: 2px solid rgba(13, 148, 136, .35);
  outline-offset: -2px;
}
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.list-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.list-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}

.list-panel-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

.list-panel-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.list-panel-body {
  padding: 0;
}

.list-panel-body .table-wrap {
  border: none;
  border-radius: 0;
}

.ficha-meta {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.collapsible {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.collapse-head {
  width: 100%;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 0;
  background: #f8fafc;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.collapse-head:hover {
  background: #eef2f7;
}

.collapse-icon {
  font-size: 16px;
  color: var(--primary-dark);
}

.collapse-title {
  min-width: 0;
  font-size: 15px;
  font-weight: 800;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.collapse-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.collapse-body {
  padding: 12px;
}

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
  backdrop-filter: blur(2px);
}

.modal-mask.open { display: flex; }

.confirm-delete-mask {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(8, 20, 24, .62);
  backdrop-filter: blur(3px);
}
.confirm-delete-box {
  width: min(440px, 100%);
  background: #fff;
  border-radius: 16px;
  padding: 22px 22px 18px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, .35);
  border: 1px solid #fecaca;
}
.confirm-delete-box h3 {
  margin: 0 0 10px;
  font-size: 18px;
  color: #991b1b;
}
.confirm-delete-detail {
  margin: 0 0 10px;
  font-size: 14px;
  color: #334155;
  line-height: 1.45;
}
.confirm-delete-warn {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 13px;
}
.confirm-delete-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 13.5px;
  color: #0f172a;
  font-weight: 600;
  cursor: pointer;
}
.confirm-delete-check input {
  width: auto;
  min-height: 0;
  margin-top: 2px;
  accent-color: #b91c1c;
}
.confirm-delete-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}
.confirm-delete-actions .danger:disabled {
  opacity: .45;
  cursor: not-allowed;
  filter: grayscale(.3);
}

.modal-box {
  width: min(480px, 100%);
  max-height: min(90vh, 720px);
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, .28);
  border: 1px solid rgba(15, 23, 42, .06);
}

.modal-box.compact { width: min(420px, 100%); }

.modal-box.ficha-modal {
  width: min(720px, 100%);
}

.modal-box.permissions-modal {
  width: min(760px, 100%);
}

.modal-box.permissions-modal .modal-body {
  max-height: calc(90vh - 64px);
  overflow: auto;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

.modal-title { font-size: 16px; font-weight: 700; color: #0f172a; line-height: 1.3; }
.modal-close { background: #64748b; flex-shrink: 0; }
.modal-body { padding: 18px; }

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-stack .field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-stack .field label {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.form-stack input,
.form-stack select,
.form-stack textarea {
  width: 100%;
}

.modal-actions {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  justify-content: flex-end;
  flex-wrap: wrap;
}

.caps-hint {
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: #b45309;
}

.caps-hint.hidden { display: none; }

.remember-access {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #334155;
  margin: 4px 0 0;
}

.remember-access input { width: auto; }

.qr-modal { text-align: center; }
.qr-image {
  width: 200px;
  height: 200px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.perm-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.perm-item {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.perm-item input { width: auto; }

#toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: #1e293b;
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 10000;
}

#toast.show { opacity: 1; }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .grid-2, .grid-form, .perm-grid, .health-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .menu { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
  .menu-label, .menu-divider { grid-column: 1 / -1; }
  .donut-layout { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; gap: 10px; flex-direction: column; }
  .workspace { padding: 12px; }
  .panel-body { padding: 14px; }
  .row-actions button { flex: 1 1 120px; }
  .table { min-width: 560px; }
}

@media (max-height: 760px) and (min-width: 901px) {
  .sidebar { padding: 10px; gap: 6px; }
  .brand { padding: 6px 8px 8px; }
  .menu button { padding: 8px 10px; }
}

.badge { display:inline-block; margin-left:6px; padding:2px 6px; border-radius:999px; font-size:11px; font-weight:800; }
.badge.warn { background:#fff7ed; color:#c2410c; border:1px solid #fed7aa; }


@media (max-width: 720px) {
  body { overflow-x: hidden; }
  button { padding: 9px 12px; }
  .login-screen { padding: 14px; align-items: flex-start; overflow: auto; }
  .login-card { margin-top: 18px; padding: 22px 18px; }
  .sidebar { padding: 12px; gap: 10px; }
  .brand { grid-template-columns: 38px minmax(0, 1fr); }
  .brand-logo { width: 48px; height: 48px; }
  .menu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .menu button { min-height: 44px; padding: 9px 10px; line-height: 1.2; }
  .menu-icon { width: 16px; margin-right: 4px; }
  .topbar { padding: 14px; }
  .topbar h1 { font-size: 18px; line-height: 1.25; }
  .user-chip { max-width: 100%; white-space: normal; line-height: 1.25; }
  .workspace { padding: 10px; }
  .panel-body { border-radius: 8px; padding: 12px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .card { padding: 10px; }
  .card .value { font-size: 22px; }
  .toolbar { display: grid; grid-template-columns: 1fr; gap: 10px; padding: 10px; }
  .field, .field.grow { min-width: 0; }
  .row-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row-actions button { width: 100%; }
  .modal-mask { align-items: stretch; padding: 8px; }
  .modal-box, .modal-box.compact { width: 100%; max-height: calc(100vh - 16px); border-radius: 10px; }
  .modal-head { padding: 12px; }
  .modal-body { padding: 12px; }
  .collapse-head { grid-template-columns: 18px minmax(0, 1fr); }
  .collapse-count { grid-column: 2; }
  .table { min-width: 520px; }
}

@media (max-width: 420px) {
  .menu { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .row-actions { grid-template-columns: 1fr; }
  .qr-image { width: 160px; height: 160px; }
  .table { min-width: 480px; }
}

.item-congregacao-cards {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.item-congregacao-card {
  text-align: left;
  color: var(--text);
  cursor: pointer;
  box-shadow: none;
}

.item-congregacao-card,
.item-congregacao-card:hover {
  background: var(--surface);
}

.item-congregacao-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, .12);
}

.item-congregacao-card .muted {
  margin-top: 4px;
}

/* main-page-button-tuning */
.toolbar button,
.row-actions button,
.stack-btns button {
  padding: 8px 12px;
  min-height: 36px;
  font-size: 13px;
  line-height: 1.15;
  white-space: nowrap;
}

.row-actions {
  gap: 6px;
  align-items: center;
}

.table .row-actions {
  flex-wrap: nowrap;
}

.table .row-actions button {
  min-width: 74px;
}

.toolbar {
  gap: 10px;
}

.toolbar .field {
  min-width: 150px;
}

@media (max-width: 720px) {
  .toolbar button,
  .row-actions button,
  .stack-btns button {
    white-space: normal;
    min-height: 44px;
    padding: 10px 14px;
  }

  .table .row-actions {
    flex-wrap: wrap;
  }

  body.skin-pro .menu {
    display: flex;
    flex-direction: column;
  }

  body.skin-pro .menu .nav-btn {
    width: 100%;
    min-height: 44px;
  }
}

/* ?? Hub (lista oculta + amostra + modal) ?? */
.hub-page {
  display: flex;
  justify-content: center;
  padding: 8px 0 24px;
}
.hub-card {
  width: min(720px, 100%);
  background: #fff;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 14px;
  padding: 28px 28px 22px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}
.hub-kicker {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-dark, #0f766e);
}
.hub-title {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}
.hub-desc {
  margin: 0 0 10px;
  color: #475569;
  font-size: 14px;
  line-height: 1.45;
}
.hub-meta {
  margin: 0 0 18px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
}
.hub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
.hub-preview-codes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.hub-code-chip {
  margin: 0;
  padding: 8px 12px;
  border: 1px solid #99f6e4;
  border-radius: 999px;
  background: #f0fdfa;
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: none;
  min-height: 0;
}
.hub-code-chip:hover {
  background: #ccfbf1;
}
.hub-preview-note {
  margin: 12px 0 0;
  font-size: 12px;
}
.finder-hint { margin: 0 0 10px; font-size: 13px; }
.finder-hits { margin-top: 8px; }
.ficha-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line, #e2e8f0);
}

.hub-placa-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 4px 0 14px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 10px;
}
.hub-placa-opts .field { margin: 0; min-width: 160px; }

/* ===== Layout 2 DESATIVADO (quebrava com muitos menus) =====
   Mantido so por referencia; nao altera :root nem o app atual. */
.layout-top-DISABLED-placeholder { display: none; }

/* Cores base do sistema (restauradas) */
:root {
  --bg: #edf1f5;
  --sidebar: #0b3d38;
  --sidebar-text: #e7f7f3;
  --sidebar-muted: #7dcebf;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --surface: #ffffff;
  --line: #dbe3ea;
  --text: #0f172a;
  --muted: #64748b;
  --sidebar-w: 248px;
}

/* Master-Detail */
.md-filters { margin-bottom: 0; }
.md-cmd {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 10px 0;
  padding: 10px 12px;
  background: #ecfdf5;
  border: 1px solid #99f6e4;
  border-radius: 10px;
}
.md-cmd .md-sel {
  margin-right: auto;
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 13px;
}
.md-split {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.95fr);
  gap: 12px;
  align-items: stretch;
  min-height: 420px;
}
.md-panel {
  background: #fff;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 360px;
}
.md-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line, #e2e8f0);
}
.md-panel-head h2 {
  margin: 0;
  font-size: 14px;
}
.md-panel-head span {
  color: var(--muted);
  font-size: 12px;
}
.md-panel-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.md-table-wrap {
  overflow: auto;
  flex: 1;
  max-height: min(58vh, 560px);
}
.md-table {
  width: 100%;
  border-collapse: collapse;
}
.md-table th,
.md-table td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line, #e2e8f0);
  font-size: 13px;
  white-space: nowrap;
}
.md-table th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  z-index: 1;
}
.md-table tr { cursor: pointer; }
.md-table tr:hover:not(.is-selected) { background: #f8fafc; }
.md-table tr.is-selected { background: #ecfdf5; }
.md-table .md-col-sel { width: 36px; }
.md-table .md-col-act { width: 88px; }
.md-table .md-row-edit {
  padding: 5px 8px;
  font-size: 11px;
}
.md-table.dense-table th,
.md-table.dense-table td {
  padding: 6px 8px;
  font-size: 12px;
}
.md-pager { margin: 0; padding: 8px 10px; border-top: 1px solid var(--line, #e2e8f0); background: #fafbfc; }
.md-detail {
  padding: 12px;
  overflow: auto;
  flex: 1;
  min-height: 0;
}
.md-detail-panel { min-height: 360px; }
.md-empty {
  margin: 40px auto;
  text-align: center;
  color: var(--muted);
  max-width: 280px;
}
.md-empty strong {
  display: block;
  color: var(--text);
  margin-bottom: 6px;
  font-size: 14px;
}
.md-empty span {
  display: block;
  font-size: 12px;
  line-height: 1.4;
}
.md-empty-tips {
  text-align: left;
  margin: 14px 0 12px;
  padding: 0 0 0 18px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}
.md-empty-tips li { margin: 4px 0; }
.md-empty [data-wb-ask-tip] {
  margin-top: 4px;
}
.md-ficha-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line, #e2e8f0);
}
.md-ficha-title {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
}
.md-ficha--locked {
  background: #f8fafc;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px;
  padding: 12px;
  min-height: calc(100% - 8px);
}
.md-ficha--locked .md-ro,
.md-ficha--locked input.md-ro,
.md-ficha--locked textarea.md-ro {
  background: #eef2f7 !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
  cursor: default !important;
  box-shadow: none !important;
  pointer-events: none;
}
.md-ficha--locked label {
  color: #475569;
}
.md-ficha-body .modal-actions {
  position: sticky;
  bottom: 0;
  background: #fff;
  padding-top: 10px;
}

/* Confer?ncia campo */
.cf-kpis { margin: 12px 0; }
.cf-field-flow {
  max-width: 480px;
  margin: 8px auto 24px;
  background: #fff;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 14px;
  padding: 22px 20px;
  text-align: center;
}
.cf-field-flow h2 { margin: 0 0 4px; font-size: 18px; }
.cf-field-flow .muted { color: var(--muted); margin: 0; }
.cf-code-input {
  width: 100%;
  margin: 14px 0;
  padding: 14px 12px !important;
  font-size: 22px !important;
  font-weight: 700;
  letter-spacing: .06em;
  text-align: center;
  border: 2px solid var(--primary) !important;
  border-radius: 12px !important;
}
.cf-current {
  text-align: left;
  background: #f8fafc;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
  min-height: 64px;
}
.cf-current strong { display: block; margin-bottom: 4px; }
.cf-current small { color: var(--muted); }
.cf-status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.cf-status-grid button { min-height: 44px; }

@media (max-width: 1100px) {
  .md-split { grid-template-columns: 1fr; }
  .app.layout-top .sidebar { align-items: flex-start; }
}

/* ===== H?brido Drawer + Tela cheia ===== */
.ficha-layer {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  visibility: hidden;
}
.ficha-layer.open {
  pointer-events: auto;
  visibility: visible;
}
.ficha-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .42);
  opacity: 0;
  transition: opacity .18s ease;
}
.ficha-layer.open .ficha-mask { opacity: 1; }
.ficha-drawer {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(520px, 100%);
  background: #fff;
  box-shadow: -12px 0 40px rgba(15, 23, 42, .22);
  display: flex;
  flex-direction: column;
  transform: translateX(104%);
  transition: transform .2s ease, width .2s ease;
}
.ficha-layer.open .ficha-drawer { transform: translateX(0); }
.ficha-layer.is-full .ficha-drawer {
  width: min(960px, 100%);
}
.ficha-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line, #e2e8f0);
  background: #f8fafc;
  flex-shrink: 0;
}
.ficha-drawer-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  min-width: 0;
}
.ficha-drawer-tools {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.ficha-drawer-tools button {
  padding: 7px 10px;
  font-size: 12px;
}
.ficha-drawer-body {
  padding: 14px 16px 20px;
  overflow: auto;
  flex: 1;
  min-height: 0;
}
.ficha-drawer-body .modal-actions {
  position: sticky;
  bottom: 0;
  background: #fff;
  padding-top: 12px;
  margin-top: 8px;
  border-top: 1px solid var(--line, #e2e8f0);
}
.md-summary-code {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 6px;
}
.md-summary-tip { font-size: 14px; margin-bottom: 4px; }
.md-summary-extra { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.md-summary .muted { color: var(--muted); font-size: 12px; line-height: 1.45; }

@media (max-width: 720px) {
  .ficha-drawer,
  .ficha-layer.is-full .ficha-drawer { width: 100%; }
}

.app.layout-top .topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.app.layout-top .app-build {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: .04em;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

/* ===== Skin profissional: sidebar esquerda limpa ===== */
body.skin-pro {
  --bg: #edf1f5;
  --sidebar: #0b3d38;
  --sidebar-text: #e7f7f3;
  --sidebar-muted: #7dcebf;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --surface: #ffffff;
  --line: #dbe3ea;
  --text: #0f172a;
  --muted: #64748b;
  --sidebar-w: 248px;
}

body.skin-pro .app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

body.skin-pro .sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  height: 100vh;
  max-height: 100vh;
  background: linear-gradient(180deg, #0f4c46 0%, #0b3d38 55%, #082f2b 100%);
  color: var(--sidebar-text);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  z-index: 40;
  box-shadow: 4px 0 24px rgba(2, 20, 18, .28);
}

body.skin-pro .main {
  grid-column: 2;
  min-width: 0;
  background: var(--bg);
}

body.skin-pro .brand {
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: 4px;
  padding: 8px 8px 14px;
  grid-template-columns: 56px minmax(0, 1fr);
}

body.skin-pro .brand-logo {
  width: 56px;
  height: 56px;
  background: transparent;
  border-radius: 12px;
  padding: 0;
  box-shadow: none;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35));
}

body.skin-pro .brand strong { color: #fff; font-size: 15px; }
body.skin-pro .brand span { color: var(--sidebar-muted); }

body.skin-pro .menu {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(125, 206, 191, .35) transparent;
  padding-right: 2px;
}

body.skin-pro .menu-label {
  color: rgba(125, 206, 191, .75);
  font-size: 10px;
  letter-spacing: .1em;
  margin-top: 8px;
}

body.skin-pro .menu button {
  color: var(--sidebar-text);
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 13px;
}

body.skin-pro .menu button:hover {
  background: rgba(255,255,255,.08);
}

body.skin-pro .menu button.active {
  background: rgba(15, 118, 110, .55);
  box-shadow: inset 3px 0 0 #5eead4;
  font-weight: 700;
}

body.skin-pro .menu-account {
  background: rgba(255,255,255,.08) !important;
}

body.skin-pro .sidebarDev {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 10px;
  background: transparent;
}

body.skin-pro .license-seal,
body.skin-pro button.license-seal {
  width: 124px !important;
  height: 124px !important;
  min-height: 124px !important;
  max-width: 124px;
  border-radius: 50% !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

body.skin-pro .license-seal-ring {
  width: 124px !important;
  height: 124px !important;
  border-radius: 50% !important;
  border: 4px solid currentColor !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .18),
    0 6px 18px rgba(0, 0, 0, .28) !important;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, .14), transparent 42%),
    radial-gradient(circle at 50% 55%, #0f4c46 0%, #0b3d38 55%, #072824 100%) !important;
}

body.skin-pro .license-seal-brand {
  font-size: 15px;
  color: inherit !important;
}

body.skin-pro .license-seal-title,
body.skin-pro .license-seal-sub {
  color: inherit !important;
  font-size: inherit;
}

body.skin-pro .license-seal-sub {
  font-size: 11px;
}

body.skin-pro .license-seal--trial { color: #f5c84b !important; }
body.skin-pro .license-seal--active { color: #6ee7b7 !important; }
body.skin-pro .license-seal--expired { color: #fca5a5 !important; }

body.skin-pro.op-layout .license-seal,
body.skin-pro.op-layout button.license-seal {
  background: transparent !important;
  border: none !important;
  border-radius: 50% !important;
  box-shadow: none !important;
}

body.skin-pro.op-layout .license-seal:hover,
body.skin-pro.op-layout button.license-seal:hover {
  background: transparent !important;
}

body.skin-pro .strataDevLogo {
  max-width: 220px;
  max-height: 60px;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

body.skin-pro .topbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 14px 20px;
  box-shadow: 0 1px 0 rgba(15,23,42,.03);
}

body.skin-pro .topbar h1 {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -.02em;
}

body.skin-pro .workspace {
  padding: 16px 20px 28px;
}

body.skin-pro .user-chip {
  background: #ecfdf5;
  color: #0f766e;
  border: 1px solid #99f6e4;
}

body.skin-pro .app-build {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

body.skin-pro .topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

body.skin-pro .notice {
  background: #f0fdfa;
  border-color: #99f6e4;
}

body.skin-pro .card,
body.skin-pro .list-panel,
body.skin-pro .md-panel {
  border-radius: 12px;
  border-color: var(--line);
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}

/* Desliga restos do layout-top quebrado quando skin-pro estiver ativo */
body.skin-pro .app.layout-top,
body.skin-pro #app-shell.layout-top {
  display: grid !important;
  grid-template-columns: var(--sidebar-w) 1fr !important;
  grid-template-rows: none !important;
}

.ficha-drawer-head {
  background: linear-gradient(90deg, #0f766e, #0d9488) !important;
  border-bottom: 0 !important;
  color: #fff !important;
}
.ficha-drawer-title { color: #fff !important; }
.ficha-drawer-tools .secondary {
  background: rgba(255,255,255,.18) !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,.35) !important;
}
.ficha-drawer {
  width: min(560px, 100%) !important;
  border-left: 4px solid #14b8a6;
}
.ficha-layer.is-full .ficha-drawer {
  width: min(980px, 100%) !important;
}


.md-cmd {
  background: #0f172a !important;
  border-color: #1e293b !important;
}
.md-cmd .md-sel { color: #5eead4 !important; }
.md-cmd button[data-wb-editar],
.md-cmd button[data-wb-novo] {
  background: #0d9488 !important;
}
.md-detail-panel {
  border: 2px solid #99f6e4 !important;
  background: #f0fdfa !important;
}
.md-detail-panel .md-panel-head {
  background: #ccfbf1 !important;
}

body.skin-pro .main,
.app .main {
  background: #f4f6f9 !important;
}
body.skin-pro .topbar,
.app .topbar {
  border-top: 0;
}

/* ===== Conteúdo verde · menu (sidebar) azul ===== */
body.skin-pro.op-layout {
  --bg: #f4f6f9;
  --sidebar: #1b2433;
  --sidebar-text: #e8edf5;
  --sidebar-muted: #8b97ab;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --menu-accent: #2563eb;
  --surface: #ffffff;
  --line: #e3e8ef;
  --text: #1e293b;
  --muted: #64748b;
  --sidebar-w: 236px;
  --ap-accent: #0d9488;
  font-family: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

body.skin-pro.op-layout .sidebar {
  background: #1b2433 !important;
  box-shadow: 1px 0 0 #121826 !important;
  padding: 12px 10px !important;
}

body.skin-pro.op-layout .brand {
  border-bottom: 1px solid rgba(255,255,255,.1) !important;
  padding: 10px 8px 14px !important;
  margin-bottom: 8px !important;
  grid-template-columns: 58px minmax(0, 1fr) !important;
  gap: 12px !important;
}
body.skin-pro.op-layout .brand-logo {
  width: 58px !important;
  height: 58px !important;
  border-radius: 12px !important;
  background: transparent !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35));
}
body.skin-pro.op-layout .brand strong {
  color: #fff !important;
  font-size: 15px !important;
  letter-spacing: -.02em;
}
body.skin-pro.op-layout .brand span {
  color: #a8b4c8 !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body.skin-pro.op-layout .menu-label {
  color: #6b778c !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: .12em !important;
  text-transform: uppercase;
  margin: 12px 8px 6px !important;
}

body.skin-pro.op-layout .menu button {
  color: #c9d3e3 !important;
  border-radius: 8px !important;
  padding: 9px 10px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  border: 0 !important;
  background: transparent !important;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
}
body.skin-pro.op-layout .menu button .menu-icon {
  width: 18px;
  opacity: .85;
  color: #8b97ab;
}
body.skin-pro.op-layout .menu button:hover {
  background: rgba(255,255,255,.06) !important;
  color: #fff !important;
}
body.skin-pro.op-layout .menu button.active {
  background: rgba(37, 99, 235, .22) !important;
  color: #fff !important;
  box-shadow: inset 3px 0 0 var(--menu-accent, #2563eb) !important;
  font-weight: 650 !important;
}
body.skin-pro.op-layout .menu button.active .menu-icon { color: #60a5fa; }
body.skin-pro.op-layout .menu-account {
  background: rgba(255,255,255,.04) !important;
  margin-top: 2px;
}
body.skin-pro.op-layout .menu-divider {
  border-color: rgba(255,255,255,.08) !important;
  margin: 10px 6px !important;
}

body.skin-pro.op-layout .sidebarDev {
  opacity: 1;
  transform: none;
  padding-top: 12px !important;
}
body.skin-pro.op-layout .strataDev {
  background: transparent !important;
  border: none !important;
  padding: 4px 0 !important;
}
body.skin-pro.op-layout .strataDevLabel {
  color: #e2e8f0 !important;
  opacity: 1 !important;
}
body.skin-pro.op-layout .strataDevLogo {
  max-width: 220px !important;
  max-height: 60px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
}
body.skin-pro.op-layout .appVersion,
body.skin-pro.op-layout .devBadge {
  color: #c5d0e0 !important;
  opacity: 1 !important;
}

body.skin-pro.op-layout .topbar {
  background: #fff !important;
  border-bottom: 1px solid #e3e8ef !important;
  border-top: 0 !important;
  padding: 12px 18px !important;
  box-shadow: 0 1px 0 rgba(15,23,42,.03);
}
body.skin-pro.op-layout .topbar h1 {
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  letter-spacing: -.02em;
}
body.skin-pro.op-layout .user-chip {
  background: #ecfdf5 !important;
  color: #0f766e !important;
  border: 1px solid #99f6e4 !important;
  border-radius: 999px !important;
  font-weight: 600;
}
body.skin-pro.op-layout .app-build {
  background: #f1f5f9 !important;
  color: #64748b !important;
  border: 1px solid #e2e8f0 !important;
}

body.skin-pro.op-layout button:not(.secondary):not(.danger):not(.ghost):not(.password-toggle):not(.menu-account):not([data-panel]):not(.license-seal) {
  background: #0f766e;
}
body.skin-pro.op-layout button:not(.secondary):not(.danger):not(.ghost):not(.password-toggle):not(.menu-account):not([data-panel]):not(.license-seal):hover {
  background: #115e59;
}
body.skin-pro.op-layout button.secondary {
  background: #fff !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
}
body.skin-pro.op-layout button.secondary:hover {
  background: #f8fafc !important;
}

body.skin-pro.op-layout .card {
  background: #fff;
  border: 1px solid #e3e8ef;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
body.skin-pro.op-layout .card .label {
  color: #0f766e;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
body.skin-pro.op-layout .card .value {
  color: #115e59;
  font-weight: 750;
}

body.skin-pro.op-layout .panel-body,
body.skin-pro.op-layout .panel-box,
body.skin-pro.op-layout .list-panel {
  background: #fff;
  border: 1px solid #e3e8ef;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}

body.skin-pro.op-layout .ficha-drawer-head {
  background: linear-gradient(90deg, #0f766e, #0d9488) !important;
}
body.skin-pro.op-layout .ficha-drawer {
  border-left: 4px solid #0d9488 !important;
}

body.skin-pro.op-layout .op-cmd {
  background: #ecfdf5 !important;
  border-color: #99f6e4 !important;
}
body.skin-pro.op-layout .op-cmd .sel { color: #0f766e !important; }
body.skin-pro.op-layout .op-table-wrap tr.sel { background: #ecfdf5 !important; }
body.skin-pro.op-layout .op-thumb {
  background: linear-gradient(135deg, #ccfbf1, #99f6e4) !important;
  color: #0f766e;
}
body.skin-pro.op-layout .chip.ok { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
body.skin-pro.op-layout .chip.warn { background: #ffedd5; color: #c2410c; border-color: #fed7aa; }
body.skin-pro.op-layout .cf-code-input { border-color: #0d9488; }
body.skin-pro.op-layout .quick-ops button {
  background: #fff;
  color: #1e293b;
  border: 1px solid #e3e8ef;
  border-radius: 10px;
  font-weight: 650;
}
body.skin-pro.op-layout .quick-ops button:hover {
  border-color: #0d9488;
  color: #0f766e;
}
body.skin-pro.op-layout .quick-ops button:first-child {
  background: #0f766e;
  color: #fff;
  border-color: #0f766e;
}

body.skin-pro.op-layout input:focus,
body.skin-pro.op-layout select:focus,
body.skin-pro.op-layout textarea:focus {
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, .18);
}

/* Campo / utilitários */
.nav-toggle { display: none; }
.nav-close { display: none; }
.nav-backdrop { display: none; }
.cf-toolbar { flex-wrap: wrap; gap: 8px; align-items: end; }
.cf-foto, .it-foto {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  margin-bottom: 8px;
}
.it-foto-row { display: grid; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--line);
  background: #fff;
}
.chip.ok { background: #d1fae5; color: #047857; border-color: #a7f3d0; }
.chip.warn { background: #ffedd5; color: #c2410c; border-color: #fed7aa; }
.tabs-inline { display: flex; flex-wrap: wrap; gap: 8px; }
.cf-field-flow {
  max-width: 520px;
  margin: 12px auto 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.cf-code-input {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .04em;
  text-align: center;
  padding: 14px;
  border: 2px solid var(--primary);
  border-radius: 12px;
  margin: 12px 0;
}
.cf-status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.cf-status-grid button { min-height: 48px; }
.cf-current { text-align: left; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 10px; }

body.skin-pro.op-layout .menu-group { margin-bottom: 2px; }
body.skin-pro.op-layout .workspace { padding: 14px 16px 24px; }
body.skin-pro.op-layout .md-split,
body.skin-pro.op-layout .op-split {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .95fr);
  gap: 12px;
  min-height: calc(100vh - 150px);
}
body.skin-pro.op-layout .op-list,
body.skin-pro.op-layout .op-detail {
  background: #fff;
  border: 1px solid #e3e8ef;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
body.skin-pro.op-layout .op-list-head,
body.skin-pro.op-layout .op-detail-head {
  padding: 11px 14px;
  border-bottom: 1px solid #e3e8ef;
  background: #fafbfc;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
body.skin-pro.op-layout .op-list-head h2,
body.skin-pro.op-layout .op-detail-head h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}
body.skin-pro.op-layout .op-cmd {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  margin-bottom: 8px;
}
body.skin-pro.op-layout .op-cmd .sel {
  margin-right: auto;
  font-weight: 700;
  font-size: 12px;
}
body.skin-pro.op-layout .op-filters {
  display: grid;
  grid-template-columns: 1fr 1.4fr auto auto;
  gap: 8px;
  align-items: end;
  margin-bottom: 8px;
  background: #fff;
  border: 1px solid #e3e8ef;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
body.skin-pro.op-layout .op-table-wrap { overflow: auto; flex: 1; }
body.skin-pro.op-layout .op-table-wrap table { width: 100%; border-collapse: collapse; }
body.skin-pro.op-layout .op-table-wrap th,
body.skin-pro.op-layout .op-table-wrap td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid #eef2f6;
  font-size: 13px;
  white-space: nowrap;
}
body.skin-pro.op-layout .op-table-wrap th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #64748b;
  background: #fafbfc;
  position: sticky;
  top: 0;
  font-weight: 700;
}
body.skin-pro.op-layout .op-table-wrap tr { cursor: pointer; }
body.skin-pro.op-layout .op-table-wrap tr:hover:not(.sel) { background: #f8fafc; }
body.skin-pro.op-layout .op-detail-body { padding: 14px; overflow: auto; flex: 1; }
body.skin-pro.op-layout .op-thumb {
  width: 100%;
  height: 128px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
}
body.skin-pro.op-layout .quick-ops {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
body.skin-pro.op-layout .quick-ops button { min-height: 42px; font-size: 12px; }

@media (max-width: 720px) {
  .nav-toggle { display: inline-flex !important; }
  body.nav-open .nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 35; }
  body.skin-pro .app { grid-template-columns: 1fr !important; }
  body.skin-pro .sidebar {
    transform: translateX(-105%);
    transition: transform .2s ease;
  }
  body.nav-open.skin-pro .sidebar { transform: translateX(0); }
  body.skin-pro .main { grid-column: 1; }
  body.skin-pro.op-layout .op-split,
  body.skin-pro.op-layout .md-split { grid-template-columns: 1fr; }
  body.skin-pro.op-layout .op-filters { grid-template-columns: 1fr; }
  body.skin-pro.op-layout .quick-ops { grid-template-columns: 1fr 1fr; }
}

/* Notebook / monitor estreito (Win10 1366x768) e tablet: menu gaveta */
@media (max-width: 1100px) {
  .nav-toggle { display: inline-flex !important; }
  .brand { grid-template-columns: 48px minmax(0, 1fr) auto; }
  .nav-close {
    display: inline-flex !important;
    min-height: 36px;
    align-items: center;
    padding: 6px 10px;
    font-size: 12px;
  }
  body.nav-open .nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 35; }
  body.skin-pro .app,
  body.skin-pro .app.layout-top,
  body.skin-pro #app-shell.layout-top {
    grid-template-columns: 1fr !important;
  }
  body.skin-pro .sidebar {
    transform: translateX(-105%);
    transition: transform .2s ease;
    width: min(86vw, 300px);
  }
  body.nav-open.skin-pro .sidebar { transform: translateX(0); }
  body.skin-pro .main { grid-column: 1; }
  body.nav-open .main { pointer-events: none; }
  body.nav-open .sidebar { pointer-events: auto; z-index: 40; }
  .topbar {
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
  }
  .topbar-heading { min-width: 0; flex: 1; }
  .table { min-width: 480px; }
}


.timeline { border-left: 2px solid #bfdbfe; margin: 6px 0 0 6px; padding-left: 12px; }
.timeline .ev { margin-bottom: 10px; position: relative; font-size: 12px; }
.timeline .ev::before {
  content: ""; position: absolute; left: -16px; top: 4px; width: 8px; height: 8px;
  border-radius: 50%; background: #2563eb; border: 2px solid #fff;
}
.timeline small { color: var(--muted); }

/* Scan QR / leitor */
.scan-overlay {
  position: fixed; inset: 0; z-index: 12000;
  background: rgba(15, 23, 42, .72);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.scan-card {
  width: min(440px, 100%);
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0,0,0,.35);
}
.scan-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 10px 12px; border-bottom: 1px solid #e2e8f0;
}
.scan-video {
  display: block; width: 100%; aspect-ratio: 3/4; max-height: 58vh;
  object-fit: cover; background: #0f172a;
}
.scan-hint { margin: 0; padding: 8px 12px; font-size: 12px; }
.scan-actions { padding: 0 12px 12px; display: flex; gap: 8px; }
.scan-field-row { display: flex; gap: 8px; align-items: stretch; }
.scan-field-row input { flex: 1; min-width: 0; }
.scan-field-row button { flex: 0 0 auto; white-space: nowrap; }

@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr !important; }
  .toolbar.action-bar-end, .row-actions, .pkg-actions {
    flex-wrap: wrap; gap: 8px;
  }
  .toolbar.action-bar-end button, .pkg-actions button { width: 100%; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .modal-box, .ficha-drawer { max-width: 100vw; }
  .scan-video { max-height: 52vh; }
  .topbar-heading h1 { font-size: 16px; }
  .login-shell { padding: 12px; }
  .panel-box .grid-2 { gap: 8px; }
}

@media (max-width: 420px) {
  .user-chip { max-width: 42vw; overflow: hidden; text-overflow: ellipsis; }
  .app-build { display: none; }
}

.list-limit-ctrl {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--muted, #64748b);
  white-space: nowrap;
}
.list-limit-input {
  width: 72px;
  min-width: 64px;
  padding: 4px 6px;
  border: 1px solid var(--line, #cbd5e1);
  border-radius: 6px;
  font-size: 13px;
}
.list-limit-note {
  font-size: 11px;
  font-weight: 700;
  color: #c2410c;
  white-space: normal;
}
.pager-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pager-nav button {
  padding: 4px 10px;
  font-size: 12px;
}
.pager-nav button[disabled] {
  opacity: .45;
  cursor: default;
}
.md-pager, .pager, .op-list-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  justify-content: space-between;
}

.grid-form .field > label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

button.linkish {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--primary-dark, #0f766e);
  font-size: 11px;
  font-weight: 700;
  padding: 0;
  margin: 0;
  cursor: pointer;
  box-shadow: none;
  min-height: 0;
  line-height: 1.2;
  white-space: nowrap;
}

button.linkish:hover {
  text-decoration: underline;
  background: transparent;
}

button.linkish.secondary {
  color: #64748b;
}

@media (max-width: 720px) {
  .md-split, .op-split { grid-template-columns: 1fr !important; }
  /* No celular a lista vem primeiro; a ficha fica logo abaixo dela */
  .md-detail-panel { order: 0; max-height: none; min-height: 200px; overflow: auto; }
  .md-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .op-filters { grid-template-columns: 1fr !important; }
  .op-cmd, .md-cmd { display: flex; flex-wrap: wrap; gap: 8px; }
  .op-cmd button, .md-cmd button { flex: 1 1 auto; min-height: 40px; }
  .wb-toolbar.md-filters { flex-direction: column; align-items: stretch; }
  .ficha-drawer { width: 100% !important; max-width: 100vw; }
  .scan-overlay { padding: 8px; align-items: flex-end; }
  .list-limit-ctrl { width: 100%; justify-content: flex-end; }
  .pager-nav { width: 100%; justify-content: space-between; }
  .pager-nav button { flex: 1 1 auto; min-height: 38px; }
  body.nav-open .main { pointer-events: none; }
  body.nav-open .sidebar { pointer-events: auto; z-index: 40; }
}

/* Central de Ajuda */
.topbar-help {
  min-height: 34px;
  padding: 6px 12px;
  font-weight: 700;
}
.help-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.help-title { margin: 0 0 4px; font-size: 1.35rem; }
.help-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.help-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.help-steps { display: grid; gap: 10px; }
.help-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px;
  background: #fff;
}
.help-step-n {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary, #0d9488);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.help-faq-item {
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 8px;
  background: #fff;
}
.help-faq-item summary {
  cursor: pointer;
  font-weight: 650;
}
.help-faq-item p { margin: 8px 0 4px; color: #475569; }
.help-tips { margin: 0; padding-left: 18px; }
.help-tips li { margin-bottom: 8px; }
.help-iframe {
  width: 100%;
  min-height: 70vh;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px;
  background: #fff;
}
@media (max-width: 720px) {
  .help-iframe { min-height: 55vh; }
}

@media (max-width: 720px) {
  input, select, textarea, button {
    font-size: 16px !important;
  }
  .ficha-drawer-tools,
  .modal-actions,
  .ficha-footer,
  .row-actions {
    flex-wrap: wrap;
    gap: 8px;
  }
  .ficha-drawer-body .row-actions button,
  .modal-actions button {
    min-height: 44px;
    flex: 1 1 46%;
  }
  .login-form #login-enter {
    min-height: 48px;
    width: 100%;
  }
  .op-table-wrap {
    -webkit-overflow-scrolling: touch;
  }
}

/* Celular: login compacto, sem zoom iOS, menu gaveta e topbar em uma linha */
@media (max-width: 720px) {
  html, body { min-height: 100vh; min-height: 100dvh; }
  input, select, textarea,
  .login-form input {
    font-size: 16px !important;
  }
  .login-screen {
    padding: 10px 10px calc(14px + env(safe-area-inset-bottom, 0px));
  }
  .login-hero {
    min-height: 0;
    padding: 16px 16px 10px;
  }
  .login-kicker { margin-bottom: 10px; }
  .login-logo {
    width: 64px;
    height: 64px;
    padding: 8px;
    margin-bottom: 10px;
    border-radius: 16px;
  }
  .login-title { font-size: 22px; }
  .login-subtitle { font-size: 13px; margin-bottom: 8px; }
  .login-points,
  .login-hero-foot { display: none; }
  .login-card { margin-top: 10px; padding: 18px 16px 16px; }
  .topbar {
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: center !important;
    gap: 8px !important;
    padding: 10px 12px !important;
  }
  .topbar-heading { flex: 1; min-width: 0; }
  .topbar-site { display: none; }
  .app-build { display: none; }
  .nav-toggle {
    min-height: 44px;
    min-width: 44px;
    padding: 8px 12px;
  }
  body.skin-pro .sidebar {
    width: min(86vw, 300px);
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
  }
  #toast {
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
}

body.low-power .login-bg,
body.low-power .login-orb,
body.win10 .login-bg,
body.win10 .login-orb {
  animation: none !important;
}
body.low-power .login-orb,
body.win10 .login-orb { display: none; }
body.low-power .sidebar,
body.win10 .sidebar { transition: none !important; }

