:root {
  --primary: #1E2649;
  --secondary: #ED1C23;
  --gray: #E7E6E6;
  --white: #FFFFFF;
  --surface: #FFFFFF;
  --surface-soft: #F4F6FB;
  --border: #DDE2EF;
  --text: #1E2649;
  --text-soft: #5E657E;
  --shadow: 0 22px 55px rgba(30, 38, 73, 0.18);
  --radius-xl: 24px;
  --radius-lg: 14px;
  --brandbar-height: 56px;
  --brandbar-offset: 72px;
  --brandbar-sidebar-width: 240px;
  --brandbar-sidebar-collapsed-width: 72px;
}

* {
  box-sizing: border-box;
}

html {
  margin: 0;
  min-height: 100%;
  background: transparent;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: "DM Sans", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--gray);
}

.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-shell {
  width: 100%;
  display: flex;
  justify-content: center;
}

.login-card {
  width: min(460px, 100%);
  background: var(--white);
  border: 1px solid #d8d8d8;
  border-radius: var(--radius-xl);
  padding: 34px;
  box-shadow: var(--shadow);
}

.logo-area {
  display: flex;
  justify-content: center;
  margin-bottom: 26px;
}

.logo-placeholder,
.logo-img {
  width: 52px;
  height: 52px;
  border-radius: 14px;
}

.logo-placeholder {
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--primary);
  box-shadow: 0 12px 24px rgba(30, 38, 73, 0.3);
}

.logo-placeholder .material-icons-round {
  font-size: 30px;
}

.logo-img {
  object-fit: contain;
  background: #fff;
  border: 1px solid #eceef5;
  padding: 6px;
}

.heading h1 {
  margin: 0 0 8px;
  font-family: "Sora", "DM Sans", sans-serif;
  font-size: clamp(1.5rem, 3vw, 1.8rem);
  color: var(--primary);
}

.heading p {
  margin: 0;
  color: var(--text-soft);
}

.flash-list {
  margin: 20px 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.flash {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 0.93rem;
}

.flash.error {
  background: rgba(237, 28, 35, 0.12);
  border-color: rgba(237, 28, 35, 0.22);
  color: #9b1016;
}

.flash.success {
  background: rgba(30, 38, 73, 0.1);
  border-color: rgba(30, 38, 73, 0.2);
  color: var(--primary);
}

.flash.info {
  background: rgba(30, 38, 73, 0.08);
  border-color: rgba(30, 38, 73, 0.18);
  color: var(--primary);
}

.form-group {
  display: grid;
  gap: 16px;
}

.field-wrap {
  display: grid;
  gap: 8px;
}

.field-wrap label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
}

.input-box {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  background: #fafafa;
  border: 1px solid #d2d2d2;
  border-radius: var(--radius-lg);
  padding: 0 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 38, 73, 0.14);
}

.input-box .material-icons-round {
  color: var(--primary);
  font-size: 20px;
}

.input-box input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  color: var(--text);
}

.input-box input::placeholder {
  color: #8f93a7;
}

.toggle-pw {
  border: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 4px;
}

.form-footer {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.remember-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.remember-label input {
  accent-color: var(--secondary);
}

.forgot-link,
.card-bottom a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.forgot-link:hover,
.card-bottom a:hover {
  color: var(--secondary);
}

.btn-login {
  margin-top: 18px;
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--secondary);
  color: var(--white);
  font-family: "Sora", "DM Sans", sans-serif;
  font-size: 0.98rem;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(237, 28, 35, 0.34);
}

.btn-login:active {
  transform: translateY(0);
}

.divider {
  margin: 20px 0 14px;
  text-align: center;
  color: #9599ad;
}

.card-bottom {
  text-align: center;
  color: var(--text-soft);
}

@media (max-width: 560px) {
  body {
    padding: 14px;
  }

  .login-card {
    padding: 24px;
    border-radius: 20px;
  }

  .form-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Dashboard */
.dashboard-body {
  display: block;
  min-height: 100vh;
  padding: var(--brandbar-offset) 20px 20px;
  background: #ffffff;
  transition: padding-left 0.2s ease;
}

.brandbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(221, 226, 239, 0.9);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 22px rgba(18, 26, 51, 0.08);
}

.brandbar-inner {
  width: 100%;
  margin: 0;
  padding: 0 clamp(8px, 1.2vw, 14px);
  min-height: var(--brandbar-height);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}

.brandbar-left {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 100%;
  justify-self: start;
}

.brandbar-center {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  justify-self: center;
}

.brandbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  height: 100%;
  justify-self: end;
}

.screen-menu {
  position: relative;
}

.screen-menu-button,
.brandbar-pin-button {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--primary);
  border-radius: 9px;
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(21, 30, 61, 0.08);
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.screen-menu-button:hover,
.brandbar-pin-button:hover {
  background: #f5f8ff;
  border-color: #c8d3ec;
}

.brandbar-left > .brandbar-pin-button {
  display: none;
}

.brandbar-pin-button svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brandbar-pin-button.is-active {
  color: #fff;
  border-color: transparent;
  background: var(--primary);
  box-shadow: 0 7px 16px rgba(30, 38, 73, 0.25);
}

.screen-dropdown-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 8px -8px -8px;
  padding: 10px 8px;
  border-top: 1px solid #e2e8f7;
  background: #f7faff;
  position: sticky;
  bottom: 0;
  z-index: 2;
}

.screen-dropdown-controls .brandbar-pin-button {
  display: inline-flex;
}

.screen-dropdown-controls .brandbar-pin-button::after {
  content: "";
  display: none;
}

.brandbar-theme-toggle {
  position: relative;
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid #d4dcf1;
  background: #ffffff;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

.brandbar-theme-toggle:hover {
  background: #f5f8ff;
  border-color: #c8d4ed;
}

.brandbar-theme-toggle-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.brandbar-theme-toggle-track {
  width: 34px;
  min-width: 34px;
  height: 20px;
  border-radius: 999px;
  background: #c8d2ea;
  position: relative;
  transition: background-color 0.16s ease;
}

.brandbar-theme-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 40, 0.32);
  transition: transform 0.16s ease;
}

.brandbar-theme-toggle-input:checked + .brandbar-theme-toggle-track {
  background: #5369a5;
}

.brandbar-theme-toggle-input:checked + .brandbar-theme-toggle-track .brandbar-theme-toggle-thumb {
  transform: translateX(14px);
}

.brandbar-theme-toggle-input:focus-visible + .brandbar-theme-toggle-track {
  outline: 3px solid rgba(30, 38, 73, 0.24);
  outline-offset: 2px;
}

.brandbar-theme-toggle-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.screen-dropdown-controls.has-theme-toggle {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.screen-dropdown-controls.has-theme-toggle .brandbar-theme-toggle {
  flex: 1 1 100%;
}

.menu-icon {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
}

.menu-icon span {
  display: block;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
}

.screen-menu-button:focus-visible,
.brandbar-pin-button:focus-visible {
  outline: 3px solid rgba(30, 38, 73, 0.2);
  outline-offset: 2px;
}

.screen-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 240px;
  min-width: 240px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 15px 30px rgba(21, 30, 61, 0.16);
  display: none;
  padding: 8px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1200;
  transition: width 0.2s ease;
}

.screen-dropdown.open {
  display: block;
}

.screen-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
}

.screen-dropdown a:hover {
  background: var(--surface-soft);
}

.screen-nav-group {
  margin-bottom: 2px;
}

.screen-nav-group-toggle {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: inherit;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.screen-nav-group-toggle:hover,
.screen-nav-group.open .screen-nav-group-toggle {
  background: var(--surface-soft);
}

.screen-nav-group-toggle:focus-visible {
  outline: 3px solid rgba(30, 38, 73, 0.2);
  outline-offset: 2px;
}

.screen-nav-chevron {
  margin-left: auto;
  width: 14px;
  min-width: 14px;
  height: 14px;
  color: #5e6c90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.16s ease;
}

.screen-nav-chevron svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.screen-nav-group.open .screen-nav-chevron {
  transform: rotate(180deg);
}

.screen-nav-group-items {
  display: none;
  padding-left: 12px;
}

.screen-nav-group.open .screen-nav-group-items {
  display: block;
}

.screen-nav-subitem {
  font-weight: 500;
}

.screen-nav-icon {
  width: 32px;
  min-width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #edf2ff;
  color: #2d3f78;
  display: none;
  align-items: center;
  justify-content: center;
}

.screen-nav-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.screen-nav-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.brandbar-anchored .screen-nav-icon {
  display: inline-flex;
}

body.brandbar-anchored .screen-dropdown {
  display: block;
  position: fixed;
  top: var(--brandbar-height);
  bottom: 0;
  left: 0;
  width: var(--brandbar-sidebar-width);
  min-width: var(--brandbar-sidebar-width);
  max-height: none;
  background: #f4f7ff;
  padding: 8px;
  border-radius: 0;
  border-top: 0;
  border-left: 0;
  border-right-color: #d6dff3;
  border-bottom: 0;
  box-shadow: 10px 0 26px rgba(22, 31, 63, 0.1);
  overflow-y: auto;
  overflow-x: hidden;
}

body.brandbar-anchored .screen-dropdown-controls {
  border-top-color: #d6dff3;
  background: #eaf0ff;
}

body.brandbar-anchored .screen-dropdown-controls.has-theme-toggle {
  flex-direction: column;
  align-items: stretch;
}

body.brandbar-anchored:not(.brandbar-sidebar-collapsed) .screen-dropdown-controls .brandbar-pin-button {
  width: 100%;
  min-width: 0;
  height: 38px;
  justify-content: flex-start;
  padding: 0 12px;
  gap: 10px;
  border-radius: 10px;
}

body.brandbar-anchored:not(.brandbar-sidebar-collapsed) .screen-dropdown-controls .brandbar-pin-button::after {
  content: "Desfixar";
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
}

body.brandbar-anchored .screen-dropdown a {
  border-radius: 10px;
  margin-bottom: 2px;
  padding: 11px 12px;
  font-weight: 600;
  color: var(--text);
}

body.brandbar-anchored .screen-dropdown a:last-child {
  margin-bottom: 0;
}

body.brandbar-anchored .screen-nav-group-toggle {
  border-radius: 10px;
  margin-bottom: 2px;
  padding: 11px 12px;
  font-weight: 600;
  color: var(--text);
}

body.brandbar-anchored .screen-nav-group-toggle:hover,
body.brandbar-anchored .screen-nav-group.open .screen-nav-group-toggle {
  background: #dfe8ff;
}

body.brandbar-anchored .screen-nav-group-items {
  padding-left: 8px;
}

body.brandbar-anchored .screen-nav-subitem {
  padding-left: 10px;
  font-weight: 500;
}

body.brandbar-anchored .screen-dropdown a:hover {
  background: #dfe8ff;
}

body.brandbar-anchored .screen-nav-icon {
  background: #d7e4ff;
  color: #2d3f78;
}

body.brandbar-anchored.brandbar-sidebar-collapsed .screen-dropdown {
  width: var(--brandbar-sidebar-collapsed-width);
  min-width: var(--brandbar-sidebar-collapsed-width);
}

body.brandbar-anchored.brandbar-sidebar-collapsed .screen-dropdown-controls {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

body.brandbar-anchored.brandbar-sidebar-collapsed .screen-dropdown-controls .brandbar-pin-button {
  width: 42px;
  min-width: 42px;
  height: 36px;
  padding: 0;
  justify-content: center;
}

body.brandbar-anchored.brandbar-sidebar-collapsed .brandbar-theme-toggle {
  flex: 0 0 auto;
  width: 42px;
  min-width: 42px;
  min-height: 36px;
  padding: 0;
  justify-content: center;
}

body.brandbar-anchored.brandbar-sidebar-collapsed .brandbar-theme-toggle-label {
  display: none;
}

body.brandbar-anchored.brandbar-sidebar-collapsed .screen-dropdown a {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

body.brandbar-anchored.brandbar-sidebar-collapsed .screen-nav-group-toggle {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

body.brandbar-anchored.brandbar-sidebar-collapsed .screen-nav-chevron {
  display: none;
}

body.brandbar-anchored.brandbar-sidebar-collapsed .screen-nav-group-items {
  display: none !important;
}

body.brandbar-anchored.brandbar-sidebar-collapsed .screen-nav-label {
  display: none;
}

body.brandbar-anchored.brandbar-sidebar-collapsed .screen-nav-icon {
  margin: 0;
}

@media (min-width: 1100px) {
  body.brandbar-anchored.dashboard-body {
    padding-left: calc(var(--brandbar-sidebar-width) + 30px);
  }

  body.brandbar-anchored.clientes-body {
    padding-left: calc(var(--brandbar-sidebar-width) + 18px);
  }

  body.brandbar-anchored.brandbar-sidebar-collapsed.dashboard-body {
    padding-left: calc(var(--brandbar-sidebar-collapsed-width) + 30px);
  }

  body.brandbar-anchored.brandbar-sidebar-collapsed.clientes-body {
    padding-left: calc(var(--brandbar-sidebar-collapsed-width) + 18px);
  }
}

.brandbar-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 8px;
  border-radius: 10px;
  line-height: 1;
  text-decoration: none;
  color: var(--primary);
  transition: background-color 0.16s ease;
}

.brandbar-logo:hover {
  background: rgba(30, 38, 73, 0.06);
}

.brandbar-logo img {
  display: block;
  width: auto;
  height: 30px;
  object-fit: contain;
}

.user-menu {
  position: relative;
}

.user-avatar {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 12px rgba(21, 30, 61, 0.22);
  cursor: pointer;
}

.user-avatar:focus-visible {
  outline: 3px solid rgba(30, 38, 73, 0.25);
  outline-offset: 2px;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 210px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 15px 30px rgba(21, 30, 61, 0.16);
  display: none;
  overflow: hidden;
}

.user-dropdown.open {
  display: block;
}

.user-dropdown-meta {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.user-dropdown-meta strong,
.user-dropdown-meta small {
  display: block;
}

.user-dropdown-meta small {
  margin-top: 3px;
  color: var(--text-soft);
}

.user-dropdown a {
  display: block;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
}

.user-dropdown a:hover {
  background: var(--surface-soft);
}

.dashboard-page {
  max-width: 1080px;
  margin: 0 auto;
}

.dashboard-body .flash-list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: grid;
  gap: 8px;
}

.dashboard-body .flash {
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.95rem;
  border: 1px solid transparent;
}

.dashboard-body .flash.info {
  color: #1e2649;
  background: rgba(30, 38, 73, 0.09);
  border-color: rgba(30, 38, 73, 0.15);
}

.dashboard-body .flash.success {
  color: #135127;
  background: rgba(44, 145, 78, 0.11);
  border-color: rgba(44, 145, 78, 0.18);
}

.dashboard-body .flash.error {
  color: #9f1318;
  background: rgba(237, 28, 35, 0.12);
  border-color: rgba(237, 28, 35, 0.2);
}

.dashboard-main {
  min-height: calc(100vh - 120px);
}

.dashboard-shortcuts {
  border: 1px solid #e1e6f3;
  border-radius: 16px;
  background: #f8fafe;
  box-shadow: 0 10px 22px rgba(30, 38, 73, 0.07);
  padding: 18px;
}

.dashboard-shortcuts h1 {
  margin: 0;
  color: var(--primary);
  font-size: 1.22rem;
  line-height: 1.15;
}

.dashboard-shortcuts p {
  margin: 6px 0 16px;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.dashboard-shortcut-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.dashboard-shortcut-card {
  border: 1px solid #d9e1f2;
  border-radius: 12px;
  background: #ffffff;
  min-height: 104px;
  padding: 12px;
  text-decoration: none;
  color: var(--text);
  display: grid;
  gap: 10px;
  align-content: center;
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.dashboard-shortcut-card:hover {
  border-color: #b9c6e3;
  box-shadow: 0 10px 16px rgba(30, 38, 73, 0.09);
  transform: translateY(-1px);
}

.dashboard-shortcut-card:focus-visible {
  outline: 3px solid rgba(30, 38, 73, 0.22);
  outline-offset: 2px;
}

.dashboard-shortcut-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #eef2fb;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dashboard-shortcut-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.9;
  fill: none;
}

.dashboard-shortcut-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
}

.profile-card {
  border: 1px solid #e1e6f3;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 10px 22px rgba(30, 38, 73, 0.07);
  padding: 18px 20px;
  max-width: 620px;
  margin: 0 auto;
  font-size: 0.92rem;
}

.profile-card h1 {
  margin: 0;
  color: var(--primary);
  font-size: 1.32rem;
  font-weight: 600;
  line-height: 1.2;
}

.profile-card p {
  margin: 4px 0 16px;
  color: var(--text-soft);
  font-size: 0.88rem;
}

.profile-form {
  display: grid;
  gap: 12px;
}

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

.profile-field {
  display: grid;
  gap: 5px;
}

.profile-field label {
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 600;
}

.profile-field input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #d8deef;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--text);
  background: #ffffff;
}

.profile-field input:focus {
  outline: none;
  border-color: #495990;
  box-shadow: 0 0 0 2px rgba(30, 38, 73, 0.12);
}

.profile-field input[readonly] {
  background: #f6f8fd;
  color: #687191;
}

.profile-actions {
  padding-top: 2px;
}

.btn-profile-save {
  border: 0;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--secondary);
  color: #fff;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-profile-save:hover {
  box-shadow: 0 8px 16px rgba(237, 28, 35, 0.2);
}

@media (max-width: 768px) {
  :root {
    --brandbar-height: 52px;
    --brandbar-offset: 66px;
    --brandbar-sidebar-width: 220px;
    --brandbar-sidebar-collapsed-width: 68px;
  }

  .dashboard-body {
    padding: 12px;
    padding-top: var(--brandbar-offset);
  }

  .brandbar-inner {
    min-height: var(--brandbar-height);
    padding: 0 8px;
  }

  .profile-row {
    grid-template-columns: 1fr;
  }

  .profile-card {
    padding: 14px;
  }

  .dashboard-shortcuts {
    padding: 14px;
  }

  .dashboard-shortcut-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-shortcut-card {
    min-height: 96px;
    padding: 10px;
  }
}

/* Clientes */
.clientes-body {
  background: #f7f9fd;
  padding: var(--brandbar-offset) 8px 20px;
  transition: padding-left 0.2s ease;
}

.clientes-page {
  max-width: none;
  width: 100%;
  margin: 0;
}

.clientes-main {
  display: grid;
  gap: 6px;
}

.clientes-toolbar {
  border: 1px solid #dbe3f5;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 18px rgba(30, 38, 73, 0.06);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
}

.clientes-toolbar h1 {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1;
  color: var(--primary);
  white-space: nowrap;
  flex: 0 0 auto;
}

.clientes-search,
.clientes-page-size {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.clientes-search label,
.clientes-page-size label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}

.clientes-search {
  margin-left: 16px;
  min-width: 420px;
  flex: 1 0 520px;
}

.clientes-page-size {
  min-width: 170px;
}

.clientes-search input,
.clientes-page-size select {
  border: 1px solid #d6deef;
  border-radius: 8px;
  min-height: 32px;
  padding: 0 9px;
  font-family: inherit;
  font-size: 0.8rem;
  color: var(--text);
  background: #fff;
}

.clientes-search input {
  min-width: 340px;
}

.clientes-search input:focus,
.clientes-page-size select:focus {
  outline: none;
  border-color: #4a5b92;
  box-shadow: 0 0 0 2px rgba(30, 38, 73, 0.12);
}

.clientes-pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex: 0 0 auto;
}

.clientes-pagination button {
  border: 1px solid #cfd9ef;
  background: #fff;
  color: var(--text);
  border-radius: 8px;
  min-height: 32px;
  padding: 0 9px;
  font-size: 0.78rem;
  cursor: pointer;
}

.clientes-pagination button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-clientes-new {
  border: 0;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--secondary);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
}

.btn-clientes-new:hover {
  box-shadow: 0 8px 16px rgba(237, 28, 35, 0.2);
}

.btn-clientes-export {
  border: 1px solid #cad4eb;
  background: #ffffff;
  color: #435282;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
}

.btn-clientes-export svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.btn-clientes-export:hover {
  background: #f3f6ff;
  border-color: #b8c5e5;
}

.clientes-feedback {
  margin: 0;
  min-height: 0;
  font-size: 0.8rem;
  color: transparent;
}

.clientes-feedback:empty {
  display: none;
}

.clientes-feedback.success {
  color: #145a2a;
}

.clientes-feedback.error {
  color: #9d171c;
}

.clientes-table-card {
  border: 1px solid #dbe3f5;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 18px rgba(30, 38, 73, 0.06);
}

.clientes-table-wrap {
  width: 100%;
  overflow-x: auto;
}

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

.clientes-table thead th {
  text-align: left;
  font-size: 0.66rem;
  letter-spacing: 0.02em;
  color: #546086;
  background: #f4f7ff;
  border-bottom: 1px solid #dbe3f5;
  padding: 7px 8px;
  white-space: nowrap;
}

.clientes-table tbody td {
  border-bottom: 1px solid #edf1fb;
  padding: 7px 8px;
  font-size: 0.76rem;
  color: var(--text);
}

.clientes-table tbody tr:hover {
  background: #f9fbff;
}

.clientes-page-summary {
  margin: 2px 2px 0;
  text-align: right;
  color: #5e6784;
  font-size: 0.74rem;
  white-space: nowrap;
}

.clientes-loading-row,
.clientes-empty-row {
  text-align: center;
  color: #6f7997;
}

.th-sort {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.th-sort-icon {
  display: inline-block;
  min-width: 8px;
  font-size: 0.58rem;
  color: #a1abc8;
}

.th-sort.active {
  color: #354272;
}

.th-sort.active .th-sort-icon {
  color: #4a5b92;
}

.clientes-status {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 600;
}

.clientes-status.is-active {
  background: rgba(44, 145, 78, 0.12);
  color: #1d7a3f;
}

.clientes-status.is-inactive {
  background: rgba(190, 77, 34, 0.12);
  color: #a4542a;
}

.clientes-status.is-blocked {
  background: rgba(237, 28, 35, 0.12);
  color: #9f1318;
}

.table-actions-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-table-edit {
  border: 1px solid #cad4eb;
  background: #fff;
  color: var(--primary);
  min-height: 24px;
  border-radius: 8px;
  padding: 0 8px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-table-edit:hover {
  background: #f3f6ff;
}

.btn-table-toggle {
  border: 1px solid #cad4eb;
  background: #fff;
  color: #2f3f76;
  min-height: 24px;
  border-radius: 8px;
  padding: 0 8px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-table-toggle:hover {
  background: #f3f6ff;
}

.btn-table-toggle.danger {
  border-color: rgba(237, 28, 35, 0.3);
  color: #9f1318;
  background: rgba(237, 28, 35, 0.08);
}

.btn-table-toggle.danger:hover {
  background: rgba(237, 28, 35, 0.13);
}

.btn-table-toggle:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.usuario-form-help {
  font-size: 0.75rem;
  color: #5f6a8c;
}

body.modal-open {
  overflow: hidden;
}

.cliente-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(17, 25, 53, 0.46);
}

.cliente-modal-overlay.open {
  display: flex;
}

.cliente-modal {
  width: min(980px, 100%);
  border-radius: 14px;
  border: 1px solid #d2dbef;
  background: #fff;
  box-shadow: 0 24px 42px rgba(17, 25, 53, 0.24);
  max-height: calc(100vh - 36px);
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.cliente-modal-header {
  border-bottom: 1px solid #e2e8f7;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cliente-modal-header h2 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--primary);
}

.cliente-modal-close {
  border: 1px solid #d3dbee;
  background: #fff;
  color: var(--text);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
}

.cliente-form {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 0;
}

.cliente-form-alert {
  margin: 10px 14px 0;
  min-height: 18px;
  font-size: 0.84rem;
  color: transparent;
}

.cliente-form-alert.info {
  color: #204a9a;
}

.cliente-form-alert.success {
  color: #19663a;
}

.cliente-form-alert.error {
  color: #9c1a1e;
}

.cliente-form-grid {
  min-height: 0;
  overflow-y: auto;
  padding: 12px 14px;
  display: grid;
  gap: 12px;
}

.cliente-form-section {
  border: 1px solid #e2e8f7;
  border-radius: 10px;
  background: #fbfcff;
  padding: 10px;
  display: grid;
  gap: 10px;
}

.cliente-section-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #2a3663;
  letter-spacing: 0.01em;
}

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

.cliente-field {
  display: grid;
  gap: 4px;
}

.cliente-field-wide {
  grid-column: span 2;
}

.cliente-field label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--primary);
}

.cliente-field input,
.cliente-field select,
.cliente-field textarea {
  width: 100%;
  border: 1px solid #d6deef;
  border-radius: 8px;
  min-height: 36px;
  padding: 0 10px;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text);
  background: #fff;
}

.cliente-field textarea {
  padding-top: 8px;
  min-height: 84px;
  resize: vertical;
}

.cliente-field input:focus,
.cliente-field select:focus,
.cliente-field textarea:focus {
  outline: none;
  border-color: #4a5b92;
  box-shadow: 0 0 0 2px rgba(30, 38, 73, 0.12);
}

.cliente-cnpj-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.cliente-cnpj-row button {
  border: 1px solid #cad4eb;
  background: #f8faff;
  color: var(--primary);
  border-radius: 8px;
  min-height: 36px;
  padding: 0 10px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.cliente-cnpj-row button:hover {
  background: #eff3ff;
}

.cliente-cnpj-row button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.cliente-field-checkbox {
  display: flex;
  align-items: end;
}

.cliente-field-checkbox label {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
}

.cliente-field-checkbox input {
  width: 16px;
  height: 16px;
  min-height: 0;
  accent-color: var(--secondary);
}

.cliente-modal-footer {
  border-top: 1px solid #e2e8f7;
  padding: 10px 14px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.btn-secondary,
.btn-primary {
  border-radius: 8px;
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-secondary {
  border: 1px solid #cad4eb;
  background: #fff;
  color: var(--text);
}

.btn-secondary:hover {
  background: #f6f8fe;
}

.btn-primary {
  border: 0;
  background: var(--secondary);
  color: #fff;
}

.btn-primary:hover {
  box-shadow: 0 8px 14px rgba(237, 28, 35, 0.2);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.bins-modal-compact {
  width: min(1080px, 96vw);
  max-height: calc(100vh - 22px);
}

.bins-modal-compact .cliente-modal-header {
  padding: 8px 12px;
}

.bins-modal-compact .cliente-modal-header h2 {
  font-size: 0.96rem;
}

.bins-modal-body {
  grid-template-rows: auto auto 1fr auto auto;
  gap: 8px;
  padding: 8px 10px 10px;
  overflow-y: auto;
}

.bins-modal-body .clientes-feedback {
  margin: 0 2px;
  min-height: 16px;
  font-size: 0.78rem;
}

.bins-toolbar-compact {
  padding: 6px 8px;
  gap: 8px;
  align-items: end;
}

.bins-toolbar-compact h3 {
  margin: 0;
  font-size: 0.8rem;
  white-space: nowrap;
}

.bins-toolbar-compact .clientes-search {
  margin-left: 0;
  min-width: 220px;
  max-width: 360px;
}

.bins-toolbar-compact .clientes-search label,
.bins-toolbar-compact .clientes-page-size label {
  font-size: 0.68rem;
}

.bins-toolbar-compact .clientes-search input,
.bins-toolbar-compact .clientes-page-size select {
  min-height: 30px;
  padding: 0 8px;
  font-size: 0.78rem;
}

.bins-toolbar-compact .clientes-pagination button,
.bins-toolbar-compact .btn-clientes-new {
  min-height: 30px;
  padding: 0 10px;
  font-size: 0.74rem;
}

.bins-modal-compact .clientes-table-card {
  padding: 6px 8px;
}

.bins-table-compact thead th {
  padding: 8px 9px;
  font-size: 0.69rem;
}

.bins-table-compact tbody td {
  padding: 8px 9px;
  font-size: 0.77rem;
}

.bins-table-compact .btn-table-edit,
.bins-table-compact .btn-table-toggle {
  min-height: 26px;
  padding: 0 8px;
  font-size: 0.72rem;
}

.bins-modal-compact .clientes-page-summary {
  margin: 0 2px 4px;
  font-size: 0.74rem;
}

.bins-editor-form {
  grid-template-rows: auto auto;
  border-top: 1px dashed #d8e0f2;
  padding-top: 8px;
}

.bins-editor-form .cliente-form-alert {
  margin: 0 0 6px;
  font-size: 0.76rem;
}

.bins-editor-form .cliente-form-section {
  padding: 8px;
  gap: 8px;
}

.bins-editor-form .cliente-section-title {
  font-size: 0.76rem;
}

.bins-editor-form .cliente-section-grid {
  grid-template-columns: 1fr 1fr 140px;
  gap: 8px;
}

.bins-editor-form .cliente-field-wide {
  grid-column: span 1;
}

.bins-editor-form .cliente-field label {
  font-size: 0.7rem;
}

.bins-editor-form .cliente-field input,
.bins-editor-form .cliente-field select {
  min-height: 30px;
  padding: 0 8px;
  font-size: 0.78rem;
}

.bins-editor-form .cliente-modal-footer {
  border-top: 0;
  padding: 8px 0 0;
}

.bins-editor-form .btn-secondary,
.bins-editor-form .btn-primary {
  min-height: 30px;
  padding: 0 12px;
  font-size: 0.75rem;
}

@media (max-width: 980px) {
  .bins-toolbar-compact {
    flex-wrap: wrap;
  }

  .bins-toolbar-compact .clientes-search {
    min-width: 180px;
    flex-basis: 260px;
  }

  .bins-editor-form .cliente-section-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .clientes-toolbar {
    align-items: center;
    padding: 8px;
  }

  .clientes-search {
    margin-left: 8px;
    min-width: 340px;
    flex-basis: 420px;
  }

  .cliente-section-grid {
    grid-template-columns: 1fr;
  }

  .cliente-field-wide {
    grid-column: auto;
  }
}

@media (max-width: 768px) {
  .clientes-body {
    padding: var(--brandbar-offset) 6px 10px;
  }
}

/* ===== Searchable Select ===== */

.ss-wrapper {
  position: relative;
  width: 100%;
}

.ss-input {
  width: 100%;
  border: 1px solid #d6deef;
  border-radius: 8px;
  min-height: 36px;
  padding: 0 28px 0 10px;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text);
  background: #fff;
  cursor: pointer;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.ss-input:focus {
  outline: none;
  border-color: #4a5b92;
  box-shadow: 0 0 0 2px rgba(30, 38, 73, 0.12);
  cursor: text;
}

.ss-arrow {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  color: #7a85a3;
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.15s;
  line-height: 1;
  user-select: none;
}

.ss-open .ss-arrow {
  transform: translateY(-50%) rotate(180deg);
}

.ss-wrapper.ss-open {
  z-index: 9999;
}

.ss-dropdown {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 4px;
  background: #fff;
  border: 1px solid #d6deef;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(30, 38, 73, 0.14);
  max-height: 220px;
  overflow-y: auto;
  z-index: 9999;
}

.ss-dropdown.ss-above {
  top: auto;
  bottom: 100%;
  margin-top: 0;
  margin-bottom: 4px;
}

.ss-option {
  padding: 7px 10px;
  font-size: 0.82rem;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ss-option:hover,
.ss-option.ss-highlighted {
  background: #eff3ff;
}

.ss-option.ss-selected {
  font-weight: 600;
  color: var(--primary);
}

.ss-option.ss-disabled {
  opacity: 0.45;
  cursor: default;
}

.ss-no-results {
  padding: 10px;
  font-size: 0.8rem;
  color: #999;
  text-align: center;
}

/* Dentro de toolbar-field e cliente-field */
.toolbar-field .ss-input,
.clientes-search .ss-input,
.clientes-page-size .ss-input {
  min-height: 32px;
  font-size: 0.82rem;
}

.bins-toolbar-compact .ss-input {
  min-height: 30px;
  padding: 0 26px 0 8px;
  font-size: 0.78rem;
}

.bins-editor-form .ss-input {
  min-height: 30px;
  padding: 0 26px 0 8px;
  font-size: 0.78rem;
}

/* Dark mode */
body.theme-dark {
  --primary: #dbe4ff;
  --secondary: #ff6168;
  --surface: #121c30;
  --surface-soft: #182641;
  --border: #304361;
  --text: #e8efff;
  --text-soft: #aebbd7;
  --shadow: 0 22px 55px rgba(0, 0, 0, 0.48);
}

body.theme-dark,
body.theme-dark.dashboard-body,
body.theme-dark.clientes-body {
  color: var(--text);
  background: #0e1a2f;
}

body.theme-dark .brandbar {
  border-bottom-color: rgba(63, 85, 120, 0.78);
  background: rgba(11, 20, 35, 0.94);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

body.theme-dark .brandbar-logo:hover {
  background: rgba(214, 226, 255, 0.08);
}

body.theme-dark .screen-menu-button,
body.theme-dark .brandbar-pin-button,
body.theme-dark .btn-clientes-export,
body.theme-dark .btn-secondary,
body.theme-dark .btn-table-edit,
body.theme-dark .btn-table-toggle,
body.theme-dark .cliente-modal-close,
body.theme-dark .cp-bulk-bar button,
body.theme-dark .cp-tab-btn,
body.theme-dark .col-visibility-btn {
  background: #172740;
  border-color: #355076;
  color: var(--text);
}

body.theme-dark .screen-menu-button:hover,
body.theme-dark .brandbar-pin-button:hover,
body.theme-dark .btn-clientes-export:hover,
body.theme-dark .btn-secondary:hover,
body.theme-dark .btn-table-edit:hover,
body.theme-dark .btn-table-toggle:hover,
body.theme-dark .cliente-modal-close:hover,
body.theme-dark .cp-bulk-bar button:hover,
body.theme-dark .cp-tab-btn:hover,
body.theme-dark .col-visibility-btn:hover {
  background: #1f3557;
  border-color: #4d6e9d;
}

body.theme-dark .cp-tab-btn.active {
  border-color: #5d7fb5;
  background: #274069;
  color: #f0f4ff;
}

body.theme-dark .menu-icon span {
  background: #f2f6ff;
  box-shadow: 0 0 0 1px rgba(10, 16, 29, 0.18);
}

body.theme-dark .brandbar-pin-button.is-active {
  background: #3d538a;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.42);
}

body.theme-dark .screen-menu-button,
body.theme-dark .brandbar-pin-button {
  color: #f4f8ff;
}

body.theme-dark .screen-dropdown a:hover .screen-nav-icon {
  background: #2b4a75;
  border-color: #5f81b9;
  color: #ffffff;
}

body.theme-dark .user-avatar {
  background: #27466f;
  border-color: #7898ca;
  color: #f5f9ff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.44);
}

body.theme-dark .user-avatar:hover {
  background: #2f5486;
  border-color: #98b7e1;
}

body.theme-dark .user-avatar:focus-visible {
  outline: 3px solid rgba(152, 183, 225, 0.5);
}

body.theme-dark .screen-dropdown {
  border-color: #304361;
  background: #121f35;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.42);
}

body.theme-dark.brandbar-anchored .screen-dropdown {
  background: #101d32;
  border-right-color: #324b6d;
  box-shadow: 12px 0 28px rgba(0, 0, 0, 0.38);
}

body.theme-dark .screen-dropdown a {
  color: var(--text);
}

body.theme-dark .screen-dropdown a:hover {
  background: #1f3354;
}

body.theme-dark .screen-nav-group-toggle {
  color: var(--text);
}

body.theme-dark .screen-nav-group-toggle:hover,
body.theme-dark .screen-nav-group.open .screen-nav-group-toggle {
  background: #1f3354;
}

body.theme-dark .screen-nav-chevron {
  color: #9eb3d8;
}

body.theme-dark .screen-nav-icon {
  background: #223a5f;
  border: 1px solid #3f5b87;
  color: #f0f5ff;
  box-shadow: inset 0 0 0 1px rgba(12, 20, 35, 0.22);
}

body.theme-dark .screen-dropdown-controls {
  border-top-color: #324b6d;
  background: #0f1b2f;
}

body.theme-dark .brandbar-theme-toggle {
  background: #172740;
  border-color: #355076;
  color: var(--text);
}

body.theme-dark .brandbar-theme-toggle:hover {
  background: #1f3557;
  border-color: #4d6e9d;
}

body.theme-dark .brandbar-theme-toggle-track {
  background: #4b5f86;
}

body.theme-dark .brandbar-theme-toggle-input:checked + .brandbar-theme-toggle-track {
  background: #6f8fcc;
}

body.theme-dark .brandbar-theme-toggle-thumb {
  background: #ecf2ff;
}

body.theme-dark .user-dropdown {
  border-color: #304361;
  background: #121f35;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.42);
}

body.theme-dark .user-dropdown-meta {
  border-bottom-color: #304361;
}

body.theme-dark .user-dropdown-meta small {
  color: #a6b5d8;
}

body.theme-dark .user-dropdown a {
  color: var(--text);
}

body.theme-dark .user-dropdown a:hover {
  background: #1f3354;
}

body.theme-dark .dashboard-shortcuts,
body.theme-dark .dashboard-shortcut-card,
body.theme-dark .profile-card,
body.theme-dark .clientes-toolbar,
body.theme-dark .clientes-table-card,
body.theme-dark .cliente-modal,
body.theme-dark .cliente-form-section,
body.theme-dark .col-visibility-dropdown,
body.theme-dark .apontamento-card,
body.theme-dark .cp-bulk-bar {
  border-color: #304361;
  background: #122038;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.32);
}

body.theme-dark .dashboard-shortcut-card {
  background: #14233d;
}

body.theme-dark .dashboard-shortcut-card:hover {
  border-color: #5a78ac;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.34);
}

body.theme-dark .dashboard-shortcut-icon {
  background: #1d3150;
  color: #dbe5ff;
}

body.theme-dark .dashboard-shortcut-label,
body.theme-dark .dashboard-shortcuts h1,
body.theme-dark .profile-card h1,
body.theme-dark .clientes-toolbar h1,
body.theme-dark .cliente-modal-header h2,
body.theme-dark .cliente-section-title,
body.theme-dark .toolbar-field label,
body.theme-dark .clientes-search label,
body.theme-dark .clientes-page-size label,
body.theme-dark .profile-field label,
body.theme-dark .cliente-field label {
  color: #dee7ff;
}

body.theme-dark .dashboard-shortcuts p,
body.theme-dark .profile-card p,
body.theme-dark .clientes-page-summary,
body.theme-dark .usuario-form-help,
body.theme-dark .clientes-loading-row,
body.theme-dark .clientes-empty-row {
  color: #aab8d8;
}

body.theme-dark .clientes-search input,
body.theme-dark .clientes-page-size select,
body.theme-dark .profile-field input,
body.theme-dark .cliente-field input,
body.theme-dark .cliente-field select,
body.theme-dark .cliente-field textarea,
body.theme-dark .toolbar-field input,
body.theme-dark .toolbar-field select,
body.theme-dark .cp-filter-row input,
body.theme-dark .cp-filter-row select,
body.theme-dark .cliente-cnpj-row button,
body.theme-dark .input-box,
body.theme-dark .input-box input,
body.theme-dark .ss-input,
body.theme-dark .ss-dropdown {
  border-color: #355076;
  background: #101d32;
  color: var(--text);
}

body.theme-dark .input-box .material-icons-round,
body.theme-dark .toggle-pw {
  color: #dbe6ff;
}

body.theme-dark .clientes-search input::placeholder,
body.theme-dark .profile-field input::placeholder,
body.theme-dark .cliente-field input::placeholder,
body.theme-dark .cliente-field textarea::placeholder,
body.theme-dark .toolbar-field input::placeholder,
body.theme-dark .cp-filter-row input::placeholder,
body.theme-dark .input-box input::placeholder,
body.theme-dark .ss-input::placeholder {
  color: #8fa2cb;
}

body.theme-dark .clientes-search input:focus,
body.theme-dark .clientes-page-size select:focus,
body.theme-dark .profile-field input:focus,
body.theme-dark .cliente-field input:focus,
body.theme-dark .cliente-field select:focus,
body.theme-dark .cliente-field textarea:focus,
body.theme-dark .toolbar-field input:focus,
body.theme-dark .toolbar-field select:focus,
body.theme-dark .cp-filter-row input:focus,
body.theme-dark .cp-filter-row select:focus,
body.theme-dark .input-box:focus-within,
body.theme-dark .ss-input:focus {
  border-color: #6b8bc4;
  box-shadow: 0 0 0 2px rgba(107, 139, 196, 0.24);
}

body.theme-dark .ss-arrow {
  color: #9db1d9;
}

body.theme-dark .ss-option {
  color: var(--text);
}

body.theme-dark .ss-option:hover,
body.theme-dark .ss-option.ss-highlighted {
  background: #1d3150;
}

body.theme-dark .ss-option.ss-selected {
  color: #dce7ff;
}

body.theme-dark .ss-no-results {
  color: #9db1d9;
}

body.theme-dark .profile-field input[readonly] {
  background: #152741;
  color: #b2c2e1;
}

body.theme-dark .clientes-table thead th,
body.theme-dark .cp-table th {
  background: #172840;
  color: #c0cdea;
  border-bottom-color: #304361;
}

body.theme-dark .clientes-table tbody td,
body.theme-dark .cp-table th,
body.theme-dark .cp-table td {
  border-color: #2a3d5a;
  color: var(--text);
}

body.theme-dark .clientes-table tbody tr:hover,
body.theme-dark .cp-table tr:hover,
body.theme-dark .col-visibility-dropdown label:hover {
  background: #1d3150;
}

body.theme-dark .cp-table th.col-check {
  background: #172840;
}

body.theme-dark .cp-table tr.selected {
  background: #243d64;
}

body.theme-dark .th-sort-icon {
  color: #8da1cb;
}

body.theme-dark .th-sort.active {
  color: #dce7ff;
}

body.theme-dark .th-sort.active .th-sort-icon {
  color: #a8c0ed;
}

body.theme-dark .clientes-status.is-active {
  background: rgba(60, 190, 111, 0.2);
  color: #8de7b0;
}

body.theme-dark .clientes-status.is-inactive {
  background: rgba(255, 148, 82, 0.2);
  color: #ffc08f;
}

body.theme-dark .clientes-status.is-blocked {
  background: rgba(255, 97, 104, 0.2);
  color: #ffb0b5;
}

body.theme-dark .cliente-modal-header,
body.theme-dark .cliente-modal-footer {
  border-color: #304361;
}

body.theme-dark .cliente-cnpj-row button:hover {
  background: #1f3557;
}

body.theme-dark .cliente-field-checkbox label {
  color: #d4e1ff;
}

body.theme-dark .cliente-modal-overlay {
  background: rgba(5, 10, 20, 0.68);
}

body.theme-dark .cliente-form-alert.info {
  color: #91b5ff;
}

body.theme-dark .cliente-form-alert.success,
body.theme-dark .clientes-feedback.success {
  color: #91e5b3;
}

body.theme-dark .cliente-form-alert.error,
body.theme-dark .clientes-feedback.error {
  color: #ffb0b5;
}

body.theme-dark .clientes-feedback.info {
  color: #a9c2f2;
}

body.theme-dark .cp-table td input[type="checkbox"],
body.theme-dark .col-visibility-dropdown input[type="checkbox"],
body.theme-dark .cliente-field-checkbox input {
  accent-color: #90aef0;
}

/* Dark mode gaps for auxiliary modules */
body.theme-dark .clientes-pagination button {
  background: #172740;
  border-color: #355076;
  color: var(--text);
}

body.theme-dark .clientes-pagination button:hover:not(:disabled) {
  background: #1f3557;
  border-color: #4d6e9d;
}

body.theme-dark .aux-tabs-strip {
  border-color: #304361;
  background: #122038;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.32);
}

body.theme-dark .aux-tab-btn {
  background: #172740;
  border-color: #355076;
  color: var(--text);
}

body.theme-dark .aux-tab-btn:hover {
  background: #1f3557;
  border-color: #4d6e9d;
}

body.theme-dark .aux-tab-btn.active {
  border-color: #5d7fb5;
  background: #274069;
  color: #f0f4ff;
}

body.theme-dark .aux-multicheck-grid,
body.theme-dark .aux-uf-grid,
body.theme-dark .aux-imposto-config-item {
  border-color: #355076;
  background: #101d32;
}

body.theme-dark .aux-field-help,
body.theme-dark .modal-note {
  color: #9db1d9;
}

body.theme-dark .aux-iframe-panel {
  border-color: #304361;
  background: #122038;
}

body.theme-dark .aux-iframe-panel iframe {
  background: #101d32;
}

body.theme-dark .btn-table-danger {
  border-color: rgba(255, 118, 123, 0.55);
  color: #ffc2c5;
  background: rgba(255, 97, 104, 0.16);
}

body.theme-dark .btn-table-danger:hover:not(:disabled) {
  background: rgba(255, 97, 104, 0.24);
  border-color: rgba(255, 132, 137, 0.68);
}

body.theme-dark .turno-weekly-wrap {
  border-color: #304361;
  background: #122038;
}

body.theme-dark .turno-weekly-table th,
body.theme-dark .turno-weekly-table td {
  border-bottom-color: #2a3d5a;
  color: var(--text);
}

body.theme-dark .turno-weekly-table thead th {
  color: #c0cdea;
  background: #172840;
  border-bottom-color: #304361;
}

body.theme-dark .turno-weekly-table tbody tr.is-off {
  background: #182b47;
  color: #9db1d9;
}

body.theme-dark .turno-weekly-time {
  border-color: #355076;
  background: #101d32;
  color: var(--text);
}

body.theme-dark .turno-weekly-time:focus {
  border-color: #6b8bc4;
  box-shadow: 0 0 0 2px rgba(107, 139, 196, 0.24);
}

body.theme-dark .turno-weekly-time:disabled {
  background: #152741;
  color: #9db1d9;
}

body.theme-dark .turno-weekly-help {
  color: #9db1d9;
}

body.theme-dark .projeto-checkbox-empty,
body.theme-dark .cliente-combobox-empty,
body.theme-dark .cliente-combobox-item .item-doc {
  color: #9db1d9;
}

body.theme-dark .projeto-caracteristica-group {
  border-color: #355076;
  background: #101d32;
}

body.theme-dark .projeto-caracteristica-group h4,
body.theme-dark #natureza-operacao-list label,
body.theme-dark .cliente-combobox-item .item-nome {
  color: #dce7ff;
}

body.theme-dark #natureza-operacao-list {
  border-color: #355076;
  background: #101d32;
}

body.theme-dark #natureza-operacao-list .cliente-field-checkbox {
  border-bottom-color: #2a3d5a;
}

body.theme-dark .cliente-combobox-list {
  background: #122038;
  border-color: #355076;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

body.theme-dark .cliente-combobox-item {
  border-bottom-color: #2a3d5a;
}

body.theme-dark .cliente-combobox-item:hover,
body.theme-dark .cliente-combobox-item.focused {
  background: #1d3150;
}

body.theme-dark .ap-filter-summary,
body.theme-dark .ap-gantt-note,
body.theme-dark .ap-modal-meta {
  color: #9db1d9;
}

body.theme-dark .ap-filter-select-all,
body.theme-dark .ap-funcionario-check-item,
body.theme-dark .gantt-name,
body.theme-dark .gantt-extra-col,
body.theme-dark .ap-lote-employee,
body.theme-dark .ap-lote-select-all {
  color: #dce7ff;
}

body.theme-dark .ap-filter select {
  border-color: #355076;
  background: #101d32;
  color: var(--text);
}

body.theme-dark .ap-filter select:focus,
body.theme-dark .ap-filter .ss-input:focus {
  border-color: #6b8bc4;
  box-shadow: 0 0 0 2px rgba(107, 139, 196, 0.24);
}

body.theme-dark .ap-funcionario-checklist,
body.theme-dark .ap-lote-employees {
  border-color: #355076;
  background: #101d32;
}

body.theme-dark .btn-table-create {
  border-color: rgba(60, 190, 111, 0.45);
  background: rgba(60, 190, 111, 0.18);
  color: #9aebba;
}

body.theme-dark .btn-table-create:hover:not(:disabled) {
  background: rgba(60, 190, 111, 0.28);
}

body.theme-dark .gantt-legend {
  color: #b5c6ea;
}

body.theme-dark .gantt-container {
  border-color: #304361;
  background: #122038;
}

body.theme-dark .gantt-scale {
  color: #b5c6ea;
}

body.theme-dark .gantt-scale-track,
body.theme-dark .gantt-track {
  background: #182b47;
  border-color: #304361;
}

body.theme-dark .gantt-mark {
  border-left-color: #3d557b;
}

body.theme-dark .gantt-mark-label {
  color: #b5c6ea;
  background: #122038;
}

body.theme-dark .gantt-name small {
  color: #9db1d9;
}

body.theme-dark.cp-embed-body {
  background: #0e1a2f;
}

.cp-empty-note {
  font-size: 0.82rem;
  color: #6f7997;
}

body.theme-dark .cp-empty-note {
  color: #9db1d9;
}

body.theme-dark .filter-btn,
body.theme-dark .views-btn {
  background: #172740;
  border-color: #355076;
  color: var(--text);
}

body.theme-dark .filter-btn:hover,
body.theme-dark .views-btn:hover {
  background: #1f3557;
  border-color: #4d6e9d;
}

body.theme-dark .tool-modal {
  background: #122038;
  border-color: #304361;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.42);
}

body.theme-dark .tool-modal-header {
  border-bottom-color: #304361;
  background: #172840;
}

body.theme-dark .tool-modal-header h3,
body.theme-dark .filter-title,
body.theme-dark .views-dropdown-header,
body.theme-dark .views-order-title,
body.theme-dark .cp-selection-summary .summary-strong,
body.theme-dark .cp-estrutura-meta {
  color: #dce7ff;
}

body.theme-dark .tool-modal-close {
  background: #172740;
  border-color: #355076;
  color: var(--text);
}

body.theme-dark .tool-modal-close:hover {
  background: #1f3557;
  border-color: #4d6e9d;
}

body.theme-dark .filter-rule select,
body.theme-dark .filter-rule input,
body.theme-dark .col-visibility-tools input,
body.theme-dark .views-save-section input {
  border-color: #355076;
  background: #101d32;
  color: var(--text);
}

body.theme-dark .filter-rule button {
  border-color: rgba(255, 118, 123, 0.55);
  color: #ffc2c5;
  background: rgba(255, 97, 104, 0.16);
}

body.theme-dark .filter-rule button:hover {
  background: rgba(255, 97, 104, 0.24);
  border-color: rgba(255, 132, 137, 0.68);
}

body.theme-dark .filter-actions button,
body.theme-dark .col-visibility-tools button,
body.theme-dark .views-actions-section button,
body.theme-dark .cp-selection-summary button {
  border-color: #355076;
  background: #172740;
  color: var(--text);
}

body.theme-dark .filter-actions button:hover,
body.theme-dark .col-visibility-tools button:hover,
body.theme-dark .views-actions-section button:hover,
body.theme-dark .cp-selection-summary button:hover {
  background: #1f3557;
  border-color: #4d6e9d;
}

body.theme-dark .filter-actions .btn-apply,
body.theme-dark .views-save-section button {
  border-color: #5d7fb5;
  background: #274069;
  color: #f0f4ff;
}

body.theme-dark .filter-actions .btn-apply:hover,
body.theme-dark .views-save-section button:hover {
  background: #335282;
  border-color: #7ea1da;
}

body.theme-dark .col-vis-item,
body.theme-dark .view-col-order-item {
  border-bottom-color: #2a3d5a;
}

body.theme-dark .col-vis-item:hover,
body.theme-dark .view-item:hover,
body.theme-dark .view-col-order-item:hover {
  background: #1d3150;
}

body.theme-dark .col-vis-item.dragging,
body.theme-dark .view-item.active,
body.theme-dark .view-col-order-item.dragging {
  background: #243d64;
}

body.theme-dark .col-vis-item.drag-over,
body.theme-dark .view-col-order-item.drag-over {
  outline-color: #6b8bc4;
  background: #28456e;
}

body.theme-dark .col-vis-handle,
body.theme-dark .view-col-order-handle,
body.theme-dark .view-item-actions button {
  color: #9db1d9;
}

body.theme-dark .views-list-empty,
body.theme-dark .views-order-note {
  color: #9db1d9;
}

body.theme-dark .view-item-name,
body.theme-dark .view-col-order-label {
  color: var(--text);
}

body.theme-dark .view-item-actions button:hover {
  background: #2a446f;
  color: #dce7ff;
}

body.theme-dark .view-item-actions button.view-delete:hover {
  background: rgba(255, 97, 104, 0.24);
  color: #ffb0b5;
}

body.theme-dark .views-dropdown-header,
body.theme-dark .views-save-section,
body.theme-dark .views-actions-section,
body.theme-dark .views-order-section {
  border-color: #304361;
}

body.theme-dark .views-order-list {
  border-color: #304361;
  background: #101d32;
}

body.theme-dark .views-order-toggle {
  border-color: #355076;
  background: #172840;
  color: var(--text);
}

body.theme-dark .views-order-toggle:hover {
  background: #1f3557;
  border-color: #4d6e9d;
}

body.theme-dark .views-order-chevron {
  color: #9db1d9;
}

body.theme-dark .view-col-order-item.is-hidden .view-col-order-label {
  color: #8fa3cb;
}

body.theme-dark .view-col-order-badge {
  border-color: #355076;
  background: #172740;
  color: #b8caec;
}

body.theme-dark .cp-selection-summary {
  background: #1a2e4c;
  border-color: #36527a;
  color: var(--text);
}

body.theme-dark .cp-selection-summary .summary-chip {
  background: #122038;
  border-color: #36527a;
  color: var(--text);
}

body.theme-dark .cp-estrutura-note {
  color: #dce7ff;
  background: #1b3152;
  border-color: #36527a;
}

/* --- Apontamentos de Producao dark mode --- */

body.theme-dark .apx-tab {
  border-color: #355076;
  background: #172740;
  color: var(--text);
}
body.theme-dark .apx-tab:hover {
  background: #1f3557;
}
body.theme-dark .apx-tab.is-active {
  border-color: #5d7fb5;
  background: #274069;
  color: #dbe4ff;
}

body.theme-dark .apx-step-card {
  border-color: #304361;
  background: #121c30;
}
body.theme-dark .apx-step-title {
  color: #dbe4ff;
}
body.theme-dark .apx-step-hint {
  color: #8ea4c8;
}

body.theme-dark .apx-time-step {
  border-color: #304361;
  background: #172740;
}
body.theme-dark .apx-time-step small {
  color: #8ea4c8;
}
body.theme-dark .apx-time-step strong {
  color: #dbe4ff;
}
body.theme-dark .apx-time-step span {
  color: #aebbd7;
}
body.theme-dark .apx-time-step:hover {
  background: #1f3557;
}
body.theme-dark .apx-time-step.is-active {
  border-color: #5d7fb5;
  background: #274069;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.35);
}

body.theme-dark .apx-rule-hint {
  color: #8ea4c8;
}

body.theme-dark .apx-check-all-label {
  color: var(--text);
}
body.theme-dark .apx-check-all-label input {
  accent-color: #5d7fb5;
}
body.theme-dark .apx-item-count {
  color: #8ea4c8;
}
body.theme-dark .apx-item-check-list {
  border-color: #304361;
  background: #172740;
}
body.theme-dark .apx-item-check-row {
  color: var(--text);
}
body.theme-dark .apx-item-check-row:hover {
  background: #1f3557;
}
body.theme-dark .apx-item-check-row input {
  accent-color: #5d7fb5;
}

body.theme-dark .apx-product-chip {
  border-color: #304361;
  background: #172740;
  color: #aebbd7;
}

body.theme-dark .apx-qr-card {
  background: #121c30;
  border-color: #304361;
}
body.theme-dark .apx-qr-head,
body.theme-dark .apx-qr-foot {
  border-color: #304361;
  background: #0e1a2f;
}
body.theme-dark .apx-qr-head h3 {
  color: #dbe4ff;
}
body.theme-dark .apx-qr-status {
  color: #8ea4c8;
}
body.theme-dark .apx-qr-video-wrap {
  border-color: #304361;
  background: #0a1220;
}

/* --- Programacoes de Producao dark mode --- */

body.theme-dark .pg-step-card h2 {
  color: #dbe4ff;
}
body.theme-dark .pg-step-hint {
  color: #8ea4c8;
}
body.theme-dark .pg-info-chip {
  border-color: #304361;
  background: #172740;
  color: #aebbd7;
}
body.theme-dark .pg-items-list li {
  border-bottom-color: #304361;
}

body.theme-dark .pg-modal-overlay {
  background: rgba(5, 10, 20, 0.7);
}
body.theme-dark .pg-modal {
  border-color: #304361;
  background: #121c30;
}
body.theme-dark .pg-modal-head,
body.theme-dark .pg-modal-foot {
  border-color: #304361;
  background: #0e1a2f;
}
body.theme-dark .pg-modal-head h3 {
  color: #dbe4ff;
}
body.theme-dark .pg-modal-body {
  background: #121c30;
}

body.theme-dark .pg-timeline-step {
  border-color: #304361;
  background: #172740;
}
body.theme-dark .pg-timeline-step strong {
  color: #dbe4ff;
}
