/* ==========================================================================
   Qolari Ops — design system próprio
   Sidebar escura (#101418), conteúdo claro, acento teal (#0F766E).
   Escala de espaço de 8px, raios de 8px, tipografia Inter/sistema.
   ========================================================================== */

:root {
  --bg: #f3f6f6;
  --surface: #ffffff;
  --surface-muted: #f8fafa;
  --surface-strong: #edf2f1;
  --border: #dde5e4;
  --border-strong: #c9d5d3;

  --text: #17201f;
  --text-secondary: #52605e;
  --text-muted: #6b7a78;

  --accent: #0f766e;
  --accent-hover: #0b5f58;
  --accent-soft: #e6f4f2;
  --accent-softer: #f0f9f7;

  --sidebar: #101418;
  --sidebar-surface: #171d22;
  --sidebar-border: rgba(255, 255, 255, 0.08);
  --sidebar-text: #e7edec;
  --sidebar-muted: #93a09e;

  --danger: #b42318;
  --danger-strong: #912018;
  --danger-soft: #fef3f2;
  --danger-border: #fecdca;

  --warning: #b54708;
  --warning-soft: #fffaeb;
  --warning-border: #fedf89;

  --success: #067647;
  --success-soft: #ecfdf3;
  --success-border: #abefc6;

  --info: #175cd3;
  --info-soft: #eff8ff;
  --info-border: #b2ddff;

  --radius: 8px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 10px 30px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 24px 64px rgba(16, 24, 40, 0.2);

  --font: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Menlo, Consolas, monospace;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 40px;
  --space-8: 48px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

html.dialog-open {
  overflow: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-login {
  background: #f4f6f7;
}

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

button {
  color: inherit;
}

a {
  color: var(--accent);
}

img {
  max-width: 100%;
}

h1,
h2,
h3,
h4,
p {
  overflow-wrap: break-word;
}

::selection {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sidebar :focus-visible {
  outline-color: #5eead4;
}

.app-root {
  min-height: 100vh;
}

.boot-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  min-height: 100vh;
  color: var(--text-muted);
  font-size: 13px;
}

.noscript-message {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 400;
  padding: 12px 16px;
  border: 1px solid var(--danger-border);
  border-radius: var(--radius);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 13px;
  text-align: center;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  display: block;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 300;
  padding: 10px 16px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 16px;
}

/* --------------------------------------------------------------------------
   Shell / sidebar
   -------------------------------------------------------------------------- */

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  height: 100vh;
  overflow-y: auto;
  padding: var(--space-5) var(--space-4);
  background: var(--sidebar);
  color: var(--sidebar-text);
}

.brand {
  display: flex;
  align-items: center;
  padding: 0 var(--space-2);
  min-height: 40px;
}

.brand-full {
  display: block;
  width: 176px;
  height: auto;
}

.brand-mark {
  display: none;
  width: 36px;
  height: 36px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-label {
  padding: 0 var(--space-3) var(--space-2);
  color: #74827f;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 40px;
  padding: 9px var(--space-3);
  border-radius: var(--radius);
  color: #b9c4c2;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-link::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: transparent;
  transition: background 0.15s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.nav-link[aria-current="page"] {
  background: rgba(15, 118, 110, 0.2);
  color: #fff;
}

.nav-link[aria-current="page"]::before {
  background: #5eead4;
}

.nav-link .icon {
  opacity: 0.92;
}

.nav-text {
  min-width: 0;
}

.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px solid var(--sidebar-border);
}

.session-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 10px var(--space-3);
  border: 1px solid var(--sidebar-border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.session-role {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #e6edeb;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.session-email {
  overflow: hidden;
  color: var(--sidebar-muted);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: #98a2b3;
}

.role-dot.role-ops {
  background: #2dd4bf;
}

.role-dot.role-support {
  background: #60a5fa;
}

.role-dot.role-finance {
  background: #fbbf24;
}

.btn.btn-sidebar {
  justify-content: flex-start;
  width: 100%;
  min-height: 38px;
  border-color: rgba(255, 255, 255, 0.14);
  background: transparent;
  color: #dbe4e2;
}

.btn.btn-sidebar:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.main {
  min-width: 0;
}

.main:focus {
  outline: none;
}

.content {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-6) 64px;
}

/* --------------------------------------------------------------------------
   Cabeçalho de página
   -------------------------------------------------------------------------- */

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-5);
  margin-bottom: var(--space-5);
}

.page-heading {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.eyebrow-light {
  color: #5eead4;
}

.page-header h1 {
  margin: 0 0 6px;
  color: #101828;
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.page-description {
  max-width: 720px;
  margin: 0;
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.header-actions {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding-top: 22px;
}

/* --------------------------------------------------------------------------
   Botões, campos e badges
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.btn .icon {
  width: 16px;
  height: 16px;
}

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

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.1);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-secondary {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text-secondary);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--border-strong);
  background: var(--surface-muted);
  color: var(--text);
}

.btn-ghost {
  color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--surface-strong);
  color: var(--text);
}

.btn-danger {
  border-color: var(--danger-border);
  background: var(--surface);
  color: var(--danger);
}

.btn-danger:hover:not(:disabled) {
  background: var(--danger-soft);
  border-color: #fda29b;
}

.btn-danger-solid {
  background: var(--danger);
  color: #fff;
}

.btn-danger-solid:hover:not(:disabled) {
  background: var(--danger-strong);
}

.btn-small {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.btn-block {
  width: 100%;
  min-height: 42px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.icon-btn:hover {
  background: var(--surface-strong);
  color: var(--text);
}

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

.field-grow {
  flex: 1 1 240px;
  min-width: 210px;
}

.field > label,
.field-label {
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.field input,
.field select,
.field textarea,
.input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea,
textarea.input {
  min-height: 104px;
  padding: 10px 12px;
  line-height: 1.5;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder,
.input::placeholder {
  color: #98a2b3;
}

.field input:hover,
.field select:hover,
.field textarea:hover,
.input:hover {
  border-color: var(--border-strong);
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible,
.input:focus-visible {
  border-color: var(--accent);
}

.field select {
  padding-right: 32px;
  cursor: pointer;
}

.input-with-icon {
  position: relative;
}

.input-with-icon > .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
  transform: translateY(-50%);
}

.input-with-icon input {
  padding-left: 38px;
}

.input-with-action {
  position: relative;
}

.input-with-action input {
  padding-right: 46px;
}

.input-action {
  position: absolute;
  top: 50%;
  right: 5px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transform: translateY(-50%);
}

.input-action:hover {
  background: var(--surface-strong);
  color: var(--text);
}

.field-hint {
  margin: 0;
  color: var(--text-muted);
  font-size: 11.5px;
  line-height: 1.45;
}

.field-error {
  margin: 0;
  color: var(--danger);
  font-size: 12px;
  font-weight: 500;
}

.required-mark {
  color: var(--danger);
}

.form-alert {
  margin: 0 0 var(--space-3);
  padding: 10px 12px;
  border: 1px solid var(--danger-border);
  border-radius: var(--radius);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 12.5px;
  line-height: 1.45;
}

.edit-form {
  padding-top: 18px;
}

.edit-form[aria-busy="true"] {
  opacity: 0.75;
}

.edit-intro {
  margin: 0 0 var(--space-4);
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4) var(--space-4);
}

.field-wide {
  grid-column: 1 / -1;
}

.edit-extras {
  margin: var(--space-5) 0 0;
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.edit-extras legend {
  padding: 0 4px;
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px var(--space-4);
}

.check-field {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
}

.check-field input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex: none;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.drawer-edit-btn {
  margin-right: auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.badge-dot {
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}

.badge-neutral {
  background: #f2f4f7;
  color: #475467;
}

.badge-warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge-success {
  background: var(--success-soft);
  color: var(--success);
}

.badge-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge-info {
  background: var(--info-soft);
  color: var(--info);
}

.badge-strong {
  background: #f2f4f7;
  color: #344054;
}

.badge-accent {
  background: var(--accent-soft);
  color: var(--accent);
}

.mono {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: -0.01em;
}

.muted {
  color: var(--text-muted);
}

.small {
  font-size: 12px;
}

.nowrap {
  white-space: nowrap;
}

.spinner {
  width: 14px;
  height: 14px;
  flex: none;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  opacity: 0.85;
}

/* --------------------------------------------------------------------------
   Dashboard
   -------------------------------------------------------------------------- */

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(176px, 1fr));
  gap: var(--space-4);
}

.metric-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.metric-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
}

.metric-icon .icon {
  width: 19px;
  height: 19px;
}

.metric-icon-accent {
  background: var(--accent-soft);
  color: var(--accent);
}

.metric-icon-success {
  background: var(--success-soft);
  color: var(--success);
}

.metric-icon-warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.metric-icon-info {
  background: var(--info-soft);
  color: var(--info);
}

.metric-icon-neutral {
  background: #f2f4f7;
  color: #475467;
}

.metric-value {
  margin: 0;
  color: #101828;
  font-size: 28px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.metric-label {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.metric-note {
  margin: 2px 0 0;
  color: var(--text-muted);
  font-size: 11.5px;
}

.health-card {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  flex-wrap: wrap;
  margin-top: var(--space-5);
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.health-heading {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: 1 1 250px;
  min-width: 0;
}

.health-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent);
}

.health-icon .icon {
  width: 19px;
  height: 19px;
}

.health-heading h2 {
  margin: 0;
  color: #101828;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.health-summary {
  margin: 2px 0 0;
  color: var(--text-muted);
  font-size: 11.5px;
  line-height: 1.4;
}

.health-stats {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  flex-wrap: wrap;
  margin: 0;
}

.health-stat dt {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.health-stat dd {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.health-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  margin-left: auto;
}

.health-refresh {
  color: var(--text-muted);
  font-size: 10.5px;
  white-space: nowrap;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.9fr);
  gap: var(--space-5);
  margin-top: var(--space-5);
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 18px 20px 0;
}

.panel-header h2 {
  margin: 0;
  color: #101828;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.panel-header p {
  margin: 3px 0 0;
  color: var(--text-muted);
  font-size: 12px;
}

.panel-body {
  padding: 10px 20px 16px;
}

.activity-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
  border-bottom: 0;
}

.activity-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: var(--radius);
  background: var(--surface-muted);
  color: var(--text-muted);
}

.activity-icon .icon {
  width: 16px;
  height: 16px;
}

.activity-main {
  flex: 1;
  min-width: 0;
}

.activity-title {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
}

.activity-title strong {
  font-weight: 650;
}

.activity-meta {
  margin: 3px 0 0;
  color: var(--text-muted);
  font-size: 11.5px;
  line-height: 1.4;
}

.activity-meta .mono {
  font-size: 10.5px;
}

.mini-role {
  flex: none;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}

.mini-role.role-ops {
  background: var(--accent-soft);
  color: var(--accent);
}

.mini-role.role-support {
  background: var(--info-soft);
  color: var(--info);
}

.mini-role.role-finance {
  background: var(--warning-soft);
  color: var(--warning);
}

.mini-role.role-neutral {
  background: #f2f4f7;
  color: #475467;
}

.access-panel .panel-body {
  padding-top: 14px;
}

.access-role {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
}

.access-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent);
}

.access-mark.role-support {
  background: var(--info-soft);
  color: var(--info);
}

.access-mark.role-finance {
  background: var(--warning-soft);
  color: var(--warning);
}

.access-role strong {
  display: block;
  color: #101828;
  font-size: 13px;
  font-weight: 650;
}

.access-role p {
  margin: 3px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.capability-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: var(--space-4) 0 0;
  list-style: none;
}

.capability-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 12.5px;
  line-height: 1.45;
}

.capability-list .icon {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  color: var(--success);
}

.shortcut-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: var(--space-4);
  padding-top: var(--space-2);
  border-top: 1px solid var(--border);
}

.shortcut {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 8px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
}

.shortcut:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.shortcut-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
}

.shortcut-icon .icon {
  width: 15px;
  height: 15px;
}

.shortcut-arrow {
  width: 15px;
  height: 15px;
  margin-left: auto;
  color: #98a2b3;
}

.dashboard-state {
  grid-column: 1 / -1;
}

.is-loading {
  opacity: 0.55;
  transition: opacity 0.15s ease;
}

.skeleton-table {
  width: 100%;
  border-collapse: collapse;
}

.skeleton-table td {
  padding: 11px 0;
}

/* --------------------------------------------------------------------------
   Tabelas e paginação
   -------------------------------------------------------------------------- */

.table-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.table-toolbar {
  display: flex;
  align-items: flex-end;
  gap: var(--space-3);
  flex-wrap: wrap;
  padding: var(--space-4);
  border-bottom: 1px solid var(--border);
}

.table-toolbar .field {
  min-width: 155px;
}

.table-toolbar .result-count {
  margin-left: auto;
}

.toolbar-heading {
  margin: 0;
  align-self: center;
  color: #101828;
  font-size: 14px;
  font-weight: 650;
}

.toolbar-note {
  color: var(--text-muted);
  font-size: 11px;
}

.result-count {
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
}

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

.data-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  font-size: 13px;
}

#audit-table .data-table {
  min-width: 980px;
}

.data-table th {
  padding: 10px var(--space-4);
  border-bottom: 1px solid var(--border);
  background: #f8fafa;
  color: #667085;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td {
  padding: 11px var(--space-4);
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-row {
  cursor: pointer;
  transition: background 0.12s ease;
}

.data-row:hover {
  background: #f8fbfa;
}

.data-row:focus-visible {
  outline-offset: -2px;
  background: var(--accent-softer);
}

.data-row-static {
  cursor: default;
}

.data-row-static:hover {
  background: transparent;
}

.actions-cell {
  text-align: right !important;
  white-space: nowrap;
}

.cell-title {
  display: block;
  max-width: 320px;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-sub {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.4;
}

.cell-number {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cell-number .cell-sub {
  font-weight: 400;
}

.table-state-cell {
  padding: 0 !important;
}

.table-state-cell .state-card {
  padding: 44px 24px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.person-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.avatar {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  overflow: hidden;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 700;
}

.avatar-lg {
  width: 44px;
  height: 44px;
  font-size: 13px;
}

.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.message-preview {
  display: block;
  max-width: 300px;
  overflow: hidden;
  color: var(--text-secondary);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reason-cell {
  display: block;
  max-width: 320px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  padding: 12px var(--space-4);
  border-top: 1px solid var(--border);
}

.pagination-info {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
}

.pagination-info strong {
  color: var(--text-secondary);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.page-controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.page-numbers {
  display: flex;
  align-items: center;
  gap: 2px;
}

.page-btn {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--border-strong);
  background: var(--surface-muted);
  color: var(--text);
}

.page-btn.is-current {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-arrow .icon {
  width: 14px;
  height: 14px;
}

.page-gap {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 32px;
  color: var(--text-muted);
  font-size: 12px;
}

/* --------------------------------------------------------------------------
   Estados
   -------------------------------------------------------------------------- */

.state-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-muted);
  text-align: center;
}

.state-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}

.state-icon .icon {
  width: 21px;
  height: 21px;
}

.state-card h3 {
  margin: 0;
  color: #101828;
  font-size: 14px;
  font-weight: 650;
}

.state-card p {
  max-width: 420px;
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.state-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: var(--space-4);
}

.state-card-error {
  border-color: var(--danger-border);
  background: #fffcfc;
}

.state-card-error .state-icon {
  background: var(--danger-soft);
  color: var(--danger);
}

/* --------------------------------------------------------------------------
   Drawer de detalhe
   -------------------------------------------------------------------------- */

.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(16, 20, 24, 0.46);
  animation: fade-in 0.16s ease-out;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  width: min(640px, 92vw);
  height: 100vh;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: slide-in 0.22s cubic-bezier(0.22, 0.8, 0.3, 1);
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: 20px var(--space-5);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.drawer-heading {
  flex: 1;
  min-width: 0;
}

.drawer-heading h2 {
  margin: 0;
  color: #101828;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.drawer-subtitle {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.drawer-close {
  margin-top: -4px;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 4px var(--space-5) 28px;
}

.drawer-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  flex-wrap: wrap;
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--border);
  background: #fbfcfc;
}

.drawer-note {
  margin: 0 auto 0 0;
  color: var(--text-muted);
  font-size: 12px;
}

.detail-section {
  padding: 20px 0;
  border-top: 1px solid var(--border);
}

.detail-section:first-child {
  padding-top: 18px;
  border-top: 0;
}

.detail-section h3 {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
  margin: 0;
}

.detail-item {
  min-width: 0;
}

.detail-item dt {
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.detail-item dd {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.detail-wide {
  grid-column: 1 / -1;
}

.detail-block {
  margin-top: var(--space-4);
}

.detail-block h4 {
  margin: 0;
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 7px 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text-secondary);
  font-size: 11.5px;
}

.bool {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
}

.bool .icon {
  width: 14px;
  height: 14px;
}

.bool.is-yes {
  color: var(--success);
}

.bool.is-no {
  color: var(--text-muted);
}

.advertiser-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.advertiser-info {
  min-width: 0;
}

.advertiser-info strong {
  display: block;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
}

.advertiser-info p {
  margin: 3px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
}

.section-heading h3 {
  margin-bottom: 12px;
}

.section-count {
  color: var(--text-muted);
  font-size: 11.5px;
}

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

.media-card {
  margin: 0;
}

.media-frame {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.media-fallback {
  color: #98a2b3;
}

.media-fallback .icon {
  width: 26px;
  height: 26px;
}

.media-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-type {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(16, 20, 24, 0.78);
  color: #fff;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.media-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 1;
  border-color: transparent;
  background: rgba(16, 20, 24, 0.82);
  color: #fff;
  box-shadow: 0 1px 4px rgba(16, 24, 40, 0.24);
}

.media-remove:hover:not(:disabled) {
  border-color: transparent;
  background: var(--danger);
  color: #fff;
}

.media-remove .icon {
  width: 13px;
  height: 13px;
}

.detail-description {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.65;
}

/* --------------------------------------------------------------------------
   Chat
   -------------------------------------------------------------------------- */

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.message {
  max-width: 86%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.message-buyer {
  align-self: flex-start;
  border-left: 3px solid var(--accent);
}

.message-advertiser {
  align-self: flex-end;
  background: var(--surface-strong);
  border-color: var(--border-strong);
}

.message-unknown {
  max-width: 100%;
  align-self: stretch;
  border-left: 3px solid var(--accent);
  background: var(--surface-muted);
}

.message-last {
  margin-top: 10px;
}

.message-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  justify-content: space-between;
  margin-bottom: 4px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.message-meta time {
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

.message p {
  margin: 0;
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.5;
}

.message-unread {
  display: inline-block;
  margin-top: 6px;
  color: var(--danger);
  font-size: 10px;
  font-weight: 600;
}

.message-skeleton {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 78%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.message-skeleton + .message-skeleton {
  align-self: flex-end;
}

.inline-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--info-border);
  border-radius: var(--radius);
  background: var(--info-soft);
  color: var(--text-secondary);
}

.inline-notice-icon {
  flex: none;
  color: var(--info);
}

.inline-notice strong {
  display: block;
  color: #101828;
  font-size: 12.5px;
  font-weight: 650;
}

.inline-notice p {
  margin: 3px 0 0;
  font-size: 12px;
  line-height: 1.5;
}

.last-message-quote {
  margin: 10px 0 0;
  padding: 8px 10px;
  border-left: 3px solid var(--info);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(255, 255, 255, 0.6);
  color: var(--text-secondary);
  font-size: 12px;
  font-style: normal;
  line-height: 1.5;
}

.inline-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px 12px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 12.5px;
}

.inline-empty p {
  margin: 0;
}

.inline-empty .icon {
  width: 17px;
  height: 17px;
}

/* --------------------------------------------------------------------------
   Financeiro
   -------------------------------------------------------------------------- */

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.summary-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.summary-card.skeleton-card > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.summary-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: var(--radius);
}

.summary-icon .icon {
  width: 19px;
  height: 19px;
}

.summary-value {
  margin: 0;
  color: #101828;
  font-size: 20px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.summary-label {
  margin: 2px 0 0;
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
}

.summary-note {
  margin: 1px 0 0;
  color: var(--text-muted);
  font-size: 10.5px;
}

/* --------------------------------------------------------------------------
   Modal de motivo
   -------------------------------------------------------------------------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: var(--space-5);
  background: rgba(16, 20, 24, 0.52);
  animation: fade-in 0.16s ease-out;
}

.modal {
  width: min(480px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.18s cubic-bezier(0.22, 0.8, 0.3, 1);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 20px var(--space-5) 0;
}

.modal-header h2 {
  margin: 0;
  color: #101828;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.modal-description {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.modal-body {
  padding: 18px var(--space-5) 4px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  flex-wrap: wrap;
  padding: 18px var(--space-5) 20px;
}

/* --------------------------------------------------------------------------
   Toasts
   -------------------------------------------------------------------------- */

.toast-region {
  position: fixed;
  right: auto;
  bottom: 20px;
  left: 50%;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: min(420px, calc(100vw - 32px));
  pointer-events: none;
  transform: translateX(-50%);
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: #101418;
  color: #f8fafc;
  box-shadow: var(--shadow-md);
  pointer-events: auto;
  animation: toast-in 0.18s ease-out;
}

.toast-icon {
  flex: none;
  margin-top: 1px;
  color: #5eead4;
}

.toast-icon .icon {
  width: 17px;
  height: 17px;
}

.toast-text {
  flex: 1;
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
}

.toast-close {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #98a2b3;
  cursor: pointer;
}

.toast-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.toast-close .icon {
  width: 14px;
  height: 14px;
}

.toast-success {
  border-left-color: #12b76a;
}

.toast-success .toast-icon {
  color: #6ce9a6;
}

.toast-error {
  border-left-color: #f04438;
}

.toast-error .toast-icon {
  color: #fda29b;
}

.toast-info {
  border-left-color: #2e90fa;
}

.toast-out {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

/* --------------------------------------------------------------------------
   Skeleton
   -------------------------------------------------------------------------- */

.skeleton {
  display: inline-block;
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(90deg, #e9efee 25%, #f6f9f8 37%, #e9efee 63%);
  background-size: 400% 100%;
  animation: shimmer 1.35s ease infinite;
}

.skeleton-card {
  gap: 10px;
}

.metric-card.skeleton-card {
  display: flex;
  flex-direction: column;
}

/* --------------------------------------------------------------------------
   Login
   -------------------------------------------------------------------------- */

.login-shell {
  display: grid;
  grid-template-columns: minmax(380px, 44%) minmax(0, 1fr);
  min-height: 100vh;
}

.login-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 44px 48px;
  background:
    radial-gradient(circle at 88% 8%, rgba(15, 118, 110, 0.3), transparent 42%),
    radial-gradient(circle at 8% 92%, rgba(15, 118, 110, 0.16), transparent 36%),
    #101418;
  color: #f8fafc;
}

.login-brand::before {
  content: "";
  position: absolute;
  top: -150px;
  right: -170px;
  width: 440px;
  height: 440px;
  border: 1px solid rgba(94, 234, 212, 0.14);
  border-radius: 50%;
}

.login-brand::after {
  content: "";
  position: absolute;
  bottom: -150px;
  left: -110px;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(94, 234, 212, 0.1);
  border-radius: 50%;
}

.login-brand > * {
  position: relative;
  z-index: 1;
}

.login-brand-top {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-logo {
  width: 196px;
  height: auto;
}

.login-kicker {
  padding-left: 2px;
  color: #8fa09d;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.login-brand-copy {
  max-width: 430px;
  padding: 42px 0;
}

.login-brand h1 {
  margin: 0 0 18px;
  color: #f8fafc;
  font-size: clamp(34px, 4.1vw, 46px);
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.login-lead {
  max-width: 400px;
  margin: 0;
  color: #b7c3c0;
  font-size: 14px;
  line-height: 1.65;
}

.login-points {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.login-points li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #d5dedc;
  font-size: 12.5px;
  line-height: 1.45;
}

.login-points .icon {
  width: 17px;
  height: 17px;
  flex: none;
  margin-top: 1px;
  color: #5eead4;
}

.login-brand-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--sidebar-border);
  color: #8fa09d;
  font-size: 11px;
}

.status-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: #2dd4bf;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.12);
}

.login-main {
  display: grid;
  place-items: center;
  padding: 48px 32px;
  background: #f4f6f7;
}

.login-card {
  width: 100%;
  max-width: 420px;
}

.login-card h2 {
  margin: 0 0 6px;
  color: #101828;
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.login-sub {
  margin: 0 0 28px;
  color: var(--text-muted);
  font-size: 13.5px;
}

.login-card form .field {
  margin-bottom: 17px;
}

.login-card .btn-block {
  margin-top: 4px;
}

.demo-block {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.demo-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: 10px;
}

.demo-heading h3 {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 650;
}

.demo-heading span {
  color: var(--text-muted);
  font-size: 10.5px;
}

.demo-accounts {
  display: grid;
  gap: 8px;
}

.demo-account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.demo-account:hover {
  border-color: var(--accent);
  background: var(--accent-softer);
}

.demo-account-main {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.demo-role {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.demo-role strong {
  font-weight: 650;
}

.demo-email {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-account-side {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.demo-account code {
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface-muted);
  color: var(--text-secondary);
  font-family: var(--mono);
  font-size: 10px;
}

.demo-use {
  color: var(--accent);
  font-size: 11px;
  font-weight: 650;
}

.demo-note {
  margin: 9px 0 0;
  color: var(--text-muted);
  font-size: 10.5px;
  line-height: 1.45;
}

.login-legal {
  margin: 22px 0 0;
  color: #98a2b3;
  font-size: 10.5px;
  line-height: 1.5;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Animações
   -------------------------------------------------------------------------- */

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: 0 0;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slide-in {
  from {
    transform: translateX(24px);
    opacity: 0.6;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes modal-in {
  from {
    transform: translateY(8px) scale(0.99);
    opacity: 0.6;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes toast-in {
  from {
    transform: translateY(-6px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* --------------------------------------------------------------------------
   Responsivo
   -------------------------------------------------------------------------- */

@media (max-width: 1180px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .content {
    padding: 28px 28px 56px;
  }
}

@media (max-width: 1100px) {
  .data-table th,
  .data-table td {
    padding-right: 12px;
    padding-left: 12px;
  }

  #listing-table .data-table,
  #user-table .data-table,
  #chat-table .data-table,
  #finance-table .data-table {
    table-layout: fixed;
  }

  #listing-table .data-table th:nth-child(1) { width: 30%; }
  #listing-table .data-table th:nth-child(2) { width: 12%; }
  #listing-table .data-table th:nth-child(3) { width: 14%; }
  #listing-table .data-table th:nth-child(4) { width: 19%; }
  #listing-table .data-table th:nth-child(5) { width: 13%; }
  #listing-table .data-table th:nth-child(6) { width: 12%; }

  #user-table .data-table th:nth-child(1) { width: 32%; }
  #user-table .data-table th:nth-child(2) { width: 18%; }
  #user-table .data-table th:nth-child(3) { width: 14%; }
  #user-table .data-table th:nth-child(4) { width: 12%; }
  #user-table .data-table th:nth-child(5) { width: 13%; }
  #user-table .data-table th:nth-child(6) { width: 11%; }

  #chat-table .data-table th:nth-child(1) { width: 29%; }
  #chat-table .data-table th:nth-child(2) { width: 11%; }
  #chat-table .data-table th:nth-child(3) { width: 10%; }
  #chat-table .data-table th:nth-child(4) { width: 25%; }
  #chat-table .data-table th:nth-child(5) { width: 13%; }
  #chat-table .data-table th:nth-child(6) { width: 12%; }

  #finance-table .data-table th:nth-child(1) { width: 30%; }
  #finance-table .data-table th:nth-child(2) { width: 22%; }
  #finance-table .data-table th:nth-child(3) { width: 15%; }
  #finance-table .data-table th:nth-child(4) { width: 15%; }
  #finance-table .data-table th:nth-child(5) { width: 18%; }
}

@media (max-width: 1024px) {
  .app-shell {
    grid-template-columns: 224px minmax(0, 1fr);
  }

  .sidebar {
    padding: 20px 12px;
  }

  .nav-link::before {
    left: -12px;
  }

  .brand {
    padding: 0 6px;
  }

  .brand-full {
    width: 160px;
  }

  .content {
    padding: 24px 24px 48px;
  }

  .page-header h1 {
    font-size: 24px;
  }

  .login-brand {
    padding: 36px;
  }

  .login-main {
    padding: 40px 28px;
  }

  .login-brand-copy {
    padding: 30px 0;
  }

  .login-points {
    margin-top: 24px;
  }
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .sidebar {
    align-items: center;
    gap: 16px;
    padding: 16px 10px;
  }

  .brand {
    padding: 0;
  }

  .brand-full {
    display: none;
  }

  .brand-mark {
    display: block;
  }

  .nav {
    width: 100%;
  }

  .nav-label {
    display: none;
  }

  .nav-link {
    justify-content: center;
    padding: 10px 0;
  }

  .nav-link::before {
    left: -10px;
  }

  .nav-text {
    display: none;
  }

  .sidebar-footer {
    width: 100%;
    align-items: center;
    padding-top: 12px;
  }

  .session-card {
    display: none;
  }

  .btn.btn-sidebar {
    justify-content: center;
    padding: 0;
  }

  .btn.btn-sidebar .nav-text {
    display: none;
  }

  .header-actions {
    padding-top: 18px;
  }

  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-brand {
    min-height: auto;
    padding: 28px 32px;
  }

  .login-brand-copy {
    padding: 22px 0 4px;
  }

  .login-brand h1 {
    margin-bottom: 10px;
    font-size: 32px;
  }

  .login-lead,
  .login-points {
    display: none;
  }

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

  .login-main {
    padding: 36px 24px 48px;
  }
}

@media (max-width: 760px) {
  .page-header {
    flex-direction: column;
    gap: 12px;
  }

  .header-actions {
    width: 100%;
    padding-top: 0;
  }

  .header-actions .btn {
    flex: 1;
  }

  .table-toolbar {
    align-items: stretch;
  }

  .table-toolbar .field,
  .table-toolbar .field-grow {
    flex: 1 1 100%;
    min-width: 0;
  }

  .table-toolbar .btn {
    flex: 1;
  }

  .table-toolbar .result-count {
    width: 100%;
    margin-left: 0;
  }

  .pagination {
    justify-content: center;
  }

  .pagination-info {
    width: 100%;
    text-align: center;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-wide {
    grid-column: auto;
  }

  .form-grid,
  .check-grid {
    grid-template-columns: 1fr;
  }

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

  .health-card {
    align-items: flex-start;
  }

  .health-side {
    align-items: flex-start;
    margin-left: 0;
  }

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

  .drawer {
    width: 100vw;
  }

  .drawer-header,
  .drawer-body,
  .drawer-footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .toast-region {
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    transform: none;
  }

  .summary-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .content {
    padding: 20px 16px 40px;
  }

  .metric-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .modal-overlay {
    padding: 12px;
  }

  .modal-footer {
    flex-direction: column-reverse;
  }

  .modal-footer .btn {
    width: 100%;
  }

  .drawer-footer .btn {
    flex: 1;
  }

  .demo-account {
    align-items: flex-start;
  }

  .demo-account-side {
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
  }

  .login-brand {
    padding: 24px;
  }

  .login-card h2 {
    font-size: 26px;
  }
}

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