:root {
  color-scheme: dark;
  --bg: #07111f;
  --bg-soft: #0b1627;
  --panel: rgba(15, 27, 46, 0.82);
  --panel-strong: #101d31;
  --panel-hover: #14243b;
  --line: rgba(148, 163, 184, 0.16);
  --line-strong: rgba(148, 163, 184, 0.28);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --primary: #5b7cfa;
  --primary-2: #7c5cff;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
  --radius: 18px;
  --radius-sm: 12px;
  --sidebar: 260px;
  --topbar: 78px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 0%, rgba(91, 124, 250, 0.14), transparent 34%),
    radial-gradient(circle at 85% 10%, rgba(124, 92, 255, 0.12), transparent 30%),
    var(--bg);
  color: var(--text);
}

button, input, select { font: inherit; }

button { cursor: pointer; }

.hidden { display: none !important; }

.boot-screen {
  min-height: 100vh;
  display: grid;
  place-content: center;
  grid-auto-flow: column;
  gap: 16px;
  align-items: center;
  color: var(--muted);
}

.boot-screen strong,
.boot-screen span {
  display: block;
}

.boot-screen strong {
  color: var(--text);
  font-size: 20px;
  margin-bottom: 4px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 10px 28px rgba(91, 124, 250, 0.28);
}

.brand-mark-lg {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  font-size: 18px;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 0.9fr) minmax(520px, 1.1fr);
}

.login-panel {
  padding: 56px clamp(32px, 6vw, 92px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 72px;
}

.eyebrow {
  margin: 0 0 2px;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--muted);
  font-weight: 700;
}

.login-brand h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.login-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.login-copy p {
  margin: 0 0 34px;
  max-width: 560px;
  line-height: 1.7;
  color: var(--muted);
  font-size: 16px;
}

.login-aside {
  position: relative;
  overflow: hidden;
  border-left: 1px solid var(--line);
  background:
    linear-gradient(160deg, rgba(91, 124, 250, 0.09), rgba(124, 92, 255, 0.03)),
    #0a1423;
  display: flex;
  align-items: flex-end;
  padding: 64px;
}

.aside-glow {
  position: absolute;
  width: 680px;
  height: 680px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 124, 250, 0.26), rgba(124, 92, 255, 0.05) 46%, transparent 70%);
  top: -220px;
  right: -180px;
  filter: blur(8px);
}

.aside-content {
  position: relative;
  max-width: 600px;
}

.aside-content h2 {
  font-size: clamp(42px, 6vw, 76px);
  letter-spacing: -0.06em;
  line-height: 0.98;
  margin: 22px 0;
}

.aside-content p {
  color: var(--muted);
  line-height: 1.7;
  max-width: 520px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(34, 197, 94, 0.25);
  background: rgba(34, 197, 94, 0.08);
  color: #bbf7d0;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.72);
}

.status-dot-muted {
  background: var(--muted-2);
  box-shadow: none;
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  color: var(--text);
  background: var(--panel-hover);
  transition: 160ms ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 12px 28px rgba(91, 124, 250, 0.25);
}

.btn-lg {
  min-height: 52px;
  padding: 0 20px;
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  align-self: flex-start;
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

.google-g {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #1f2937;
  background: white;
  font-weight: 900;
}

.form-message {
  min-height: 22px;
  color: #fecaca;
  margin-top: 16px;
  font-size: 13px;
}

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

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  padding: 22px 16px 18px;
  border-right: 1px solid var(--line);
  background: rgba(7, 17, 31, 0.94);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  z-index: 20;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 8px 24px;
}

.sidebar-brand-text strong,
.sidebar-brand-text span {
  display: block;
}

.sidebar-brand-text strong {
  font-size: 16px;
}

.sidebar-brand-text span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.sidebar-nav {
  display: grid;
  gap: 5px;
}

.nav-button {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-align: left;
  border-radius: 11px;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  gap: 11px;
  transition: 150ms ease;
}

.nav-button:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.06);
}

.nav-button.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(91, 124, 250, 0.18), rgba(124, 92, 255, 0.08));
  box-shadow: inset 2px 0 0 var(--primary);
}

.nav-icon {
  width: 20px;
  text-align: center;
  color: currentColor;
  opacity: 0.9;
}

.project-navigation {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.sidebar-section-label {
  padding: 0 12px 9px;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 16px 8px 0;
}

.api-status {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.version {
  display: block;
  color: var(--muted-2);
  font-size: 11px;
  margin-top: 8px;
}

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

.topbar {
  min-height: var(--topbar);
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 17, 31, 0.84);
  backdrop-filter: blur(18px);
}

.project-switcher-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.project-switcher-wrap label {
  color: var(--muted);
  font-size: 12px;
}

.project-switcher {
  color: var(--text);
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 11px;
  min-width: 210px;
  height: 42px;
  padding: 0 38px 0 13px;
}

.topbar-spacer { flex: 1; }

.user-menu {
  display: flex;
  align-items: center;
  gap: 11px;
}

.user-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #334155, #1e293b);
  border: 1px solid var(--line-strong);
  font-weight: 700;
}

.user-info strong,
.user-info span { display: block; }

.user-info strong { font-size: 13px; }

.user-info span {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

.content {
  padding: 34px;
  max-width: 1580px;
  margin: 0 auto;
}

.page-header {
  display: flex;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
}

.page-header h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.page-header p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.grid {
  display: grid;
  gap: 18px;
}

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

.card {
  background: linear-gradient(180deg, rgba(17, 31, 52, 0.86), rgba(13, 24, 41, 0.86));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.metric-card {
  padding: 21px;
}

.metric-label {
  color: var(--muted);
  font-size: 12px;
}

.metric-value {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.05em;
  margin-top: 9px;
}

.metric-note {
  color: var(--muted-2);
  font-size: 11px;
  margin-top: 6px;
}

.card-section {
  padding: 24px;
}

.card-section h3 {
  margin: 0 0 8px;
  letter-spacing: -0.025em;
}

.card-section > p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.setup-card {
  border-color: rgba(91, 124, 250, 0.28);
  background:
    linear-gradient(135deg, rgba(91, 124, 250, 0.08), rgba(124, 92, 255, 0.04)),
    rgba(13, 24, 41, 0.9);
}

.setup-row {
  margin-top: 20px;
  display: grid;
  gap: 10px;
}

.code-field {
  border: 1px solid var(--line);
  background: rgba(2, 8, 23, 0.5);
  border-radius: 12px;
  padding: 14px;
  overflow-wrap: anywhere;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  color: #cbd5e1;
  font-size: 12px;
}

.notice {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(245, 158, 11, 0.26);
  background: rgba(245, 158, 11, 0.07);
  color: #fde68a;
  font-size: 13px;
  line-height: 1.6;
}

.empty-state {
  padding: 44px 28px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
}

.empty-state strong {
  display: block;
  color: var(--text);
  font-size: 18px;
  margin-bottom: 8px;
}

.table-shell {
  overflow: hidden;
}

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

.table-toolbar h3 { margin: 0; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.icon-button {
  border: 1px solid var(--line);
  background: var(--panel-strong);
  color: var(--text);
  border-radius: 10px;
  height: 40px;
  min-width: 40px;
}

.mobile-only { display: none; }

@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

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

  .login-aside { display: none; }
}

@media (max-width: 820px) {
  :root { --sidebar: 280px; }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 180ms ease;
    box-shadow: var(--shadow);
  }

  body.sidebar-open .sidebar { transform: translateX(0); }

  .main-column { grid-column: 1 / -1; }

  .mobile-only { display: inline-grid; place-items: center; }

  .topbar {
    padding-inline: 16px;
  }

  .user-info { display: none; }

  .project-switcher-wrap label { display: none; }

  .project-switcher { min-width: 150px; }

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

@media (max-width: 560px) {
  .grid-4,
  .grid-2 { grid-template-columns: 1fr; }

  .login-panel { padding: 34px 22px; }

  .login-brand { margin-bottom: 54px; }

  .login-copy h2 { font-size: 38px; }

  .page-header {
    flex-direction: column;
  }

  .topbar { gap: 10px; }

  .project-switcher { min-width: 130px; max-width: 42vw; }

  .btn-ghost { padding-inline: 12px; }
}


/* ===== M02+ — módulos completos do painel ===== */

.btn-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
  border: 1px solid rgba(239, 68, 68, 0.24);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.18);
}

.btn-sm {
  padding: 7px 10px;
  font-size: 12px;
  border-radius: 9px;
}

.badge-success {
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.24);
  background: rgba(34, 197, 94, 0.08);
}

.badge-warning {
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.24);
  background: rgba(245, 158, 11, 0.08);
}

.badge-danger {
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.24);
  background: rgba(239, 68, 68, 0.08);
}

.badge-muted {
  color: var(--muted);
  background: rgba(148, 163, 184, 0.06);
}

.dashboard-split {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.75fr);
  gap: 18px;
  margin-top: 18px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-heading h3 {
  margin: 4px 0 0;
}

.activity-list {
  display: grid;
  gap: 2px;
}

.activity-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

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

.activity-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 12px rgba(91, 124, 250, 0.5);
}

.activity-main strong,
.activity-main span {
  display: block;
}

.activity-main strong {
  font-size: 13px;
}

.activity-main span,
.activity-row time {
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}

.mini-info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.mini-info.vertical {
  grid-template-columns: 1fr;
}

.mini-info > div {
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(2, 8, 23, 0.28);
}

.mini-info span,
.mini-info strong,
.mini-info code {
  display: block;
}

.mini-info span {
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 5px;
}

.mini-info strong,
.mini-info code {
  font-size: 13px;
  overflow-wrap: anywhere;
}

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

.project-card {
  padding: 22px;
  transition: transform 160ms ease, border-color 160ms ease;
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: rgba(91, 124, 250, 0.35);
}

.project-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.project-symbol {
  min-width: 48px;
  height: 48px;
  padding: 0 10px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, rgba(91, 124, 250, 0.22), rgba(124, 92, 255, 0.12));
  border: 1px solid rgba(91, 124, 250, 0.22);
}

.project-card h3 {
  font-size: 20px;
  margin: 20px 0 8px;
  letter-spacing: -0.03em;
}

.project-card > p {
  color: var(--muted);
  line-height: 1.55;
  min-height: 48px;
}

.project-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 20px 0;
}

.project-meta span {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(2, 8, 23, 0.2);
}

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

.project-meta small {
  color: var(--muted-2);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.project-meta strong {
  font-size: 12px;
  margin-top: 4px;
}

.project-actions {
  display: flex;
  gap: 8px;
}

.project-id-pill {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 10px;
}

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

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

.data-table th,
.data-table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.data-table th {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  background: rgba(2, 8, 23, 0.18);
}

.data-table tbody tr:hover {
  background: rgba(148, 163, 184, 0.025);
}

.data-table td strong,
.data-table td small {
  display: block;
}

.data-table td small {
  color: var(--muted);
  margin-top: 4px;
}

.data-table code {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  color: #cbd5e1;
}

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

.table-actions .btn + .btn {
  margin-left: 5px;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.compact-input {
  height: 36px;
  min-width: 240px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(2, 8, 23, 0.32);
  color: var(--text);
  outline: 0;
}

.compact-input:focus {
  border-color: rgba(91, 124, 250, 0.55);
}

.key-button {
  border: 0;
  background: transparent;
  padding: 0;
  color: #c7d2fe;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  text-align: left;
}

.key-button:hover {
  color: white;
  text-decoration: underline;
}

.details-code {
  max-width: 360px;
  display: inline-block;
  white-space: normal;
  overflow-wrap: anywhere;
  color: var(--muted) !important;
}

.form-page {
  max-width: 980px;
}

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

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

.field {
  display: grid;
  gap: 7px;
}

.field > span {
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(2, 8, 23, 0.42);
  color: var(--text);
  border-radius: 11px;
  padding: 11px 12px;
  outline: 0;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.field input,
.field select {
  min-height: 42px;
}

.field textarea {
  resize: vertical;
  min-height: 92px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(91, 124, 250, 0.62);
  box-shadow: 0 0 0 3px rgba(91, 124, 250, 0.08);
}

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

.check-field {
  grid-template-columns: auto 1fr;
  align-items: center;
  align-content: center;
  padding-top: 22px;
}

.check-field input {
  width: 18px;
  height: 18px;
  min-height: unset;
  accent-color: var(--primary);
}

.form-page-footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(1, 6, 18, 0.76);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-card {
  width: min(560px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: #0d192b;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.5);
}

.modal-wide {
  width: min(820px, 100%);
}

.modal-header {
  padding: 22px 24px 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.03em;
}

.modal-header p {
  color: var(--muted);
  margin: 6px 0 0;
  font-size: 12px;
}

.modal-close {
  font-size: 22px;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  border-top: 1px solid var(--line);
}

.modal-confirm .modal-footer {
  border-top: 0;
  padding-top: 0;
}

.toast-host {
  position: fixed;
  z-index: 1400;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.toast {
  min-width: 260px;
  max-width: 420px;
  padding: 13px 15px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: #111f34;
  color: var(--text);
  box-shadow: var(--shadow);
  transform: translateY(12px);
  opacity: 0;
  transition: 180ms ease;
  font-size: 13px;
}

.toast-show {
  transform: translateY(0);
  opacity: 1;
}

.toast-success {
  border-color: rgba(34, 197, 94, 0.24);
}

.toast-danger {
  border-color: rgba(239, 68, 68, 0.32);
  color: #fecaca;
}

.loading-panel {
  min-height: 320px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  color: var(--muted);
}

.spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid rgba(148, 163, 184, 0.15);
  border-top-color: var(--primary);
  animation: spin 700ms linear infinite;
}

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

.error-state {
  min-height: 220px;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  gap: 16px;
  color: #fecaca;
}

.notice-danger {
  border-color: rgba(239, 68, 68, 0.28);
  background: rgba(239, 68, 68, 0.07);
  color: #fecaca;
}

.empty-state span {
  display: block;
}

.empty-action {
  margin-top: 18px;
}

.license-result {
  display: grid;
  gap: 16px;
}

.license-key-box {
  padding: 18px;
  border-radius: 13px;
  border: 1px solid rgba(91, 124, 250, 0.34);
  background: rgba(91, 124, 250, 0.08);
  color: #e0e7ff;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: clamp(16px, 3vw, 22px);
  font-weight: 800;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

.license-action-summary {
  display: grid;
  gap: 10px;
}

.license-action-summary > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.license-action-summary span {
  color: var(--muted);
  font-size: 12px;
}

.action-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

@media (max-width: 1250px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-split {
    grid-template-columns: 1fr;
  }
}

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

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

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

  .project-meta {
    grid-template-columns: 1fr;
  }

  .toolbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .compact-input {
    min-width: 0;
    width: 100%;
  }

  .modal-backdrop {
    padding: 12px;
  }

  .modal-card {
    max-height: calc(100vh - 24px);
  }

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

  .mini-info {
    grid-template-columns: 1fr;
  }

  .activity-row {
    grid-template-columns: 10px 1fr;
  }

  .activity-row time {
    grid-column: 2;
  }
}


/* ===== Simulador de ativação ===== */

.simulator-grid {
  align-items: start;
}

.simulator-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}

.simulator-result {
  min-height: 360px;
  max-height: 520px;
  overflow: auto;
  margin: 18px 0 0;
  padding: 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(2, 8, 23, 0.52);
  color: #dbeafe;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .simulator-actions {
    flex-direction: column;
  }

  .simulator-actions .btn {
    width: 100%;
  }

  .simulator-result {
    min-height: 260px;
  }
}


/* ===== v0.6.0 — campos, tooltips, permissões e administradores ===== */

.nav-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 20px;
}

.nav-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.user-avatar {
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.user-avatar.has-photo {
  color: transparent;
  background-color: #1e293b;
}

.field-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 20px;
}

.help-tip {
  position: relative;
  width: 17px;
  height: 17px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
  cursor: help;
  outline: 0;
  user-select: none;
}

.help-tip:hover,
.help-tip:focus {
  color: #fff;
  border-color: rgba(91, 124, 250, 0.58);
  background: rgba(91, 124, 250, 0.12);
}

.help-tip::after {
  content: attr(data-tip);
  position: absolute;
  z-index: 1600;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translate(-50%, 4px);
  width: max-content;
  max-width: min(320px, 76vw);
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #07111f;
  color: #dbeafe;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.38);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: 120ms ease;
}

.help-tip:hover::after,
.help-tip:focus::after {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.money-input {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(2, 8, 23, 0.42);
  overflow: hidden;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.money-input:focus-within {
  border-color: rgba(91, 124, 250, 0.62);
  box-shadow: 0 0 0 3px rgba(91, 124, 250, 0.08);
}

.money-input > span {
  padding: 0 0 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.money-input input {
  min-height: 40px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.field-locked {
  opacity: 0.62;
}

.field input:disabled,
.field select:disabled,
.field textarea:disabled {
  cursor: not-allowed;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.72);
  border-style: dashed;
}

.field input[readonly] {
  color: var(--muted);
  background: rgba(15, 23, 42, 0.5);
  cursor: default;
}

.plan-lock-note {
  display: block;
  min-height: 18px;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.plan-note-locked {
  color: #c7d2fe;
}

.permission-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 9px;
}

.permission-all {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.permission-all input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.permissions-grid,
.permission-projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.permission-projects {
  max-height: 250px;
  overflow: auto;
  padding-right: 4px;
}

.permission-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(2, 8, 23, 0.25);
  color: #cbd5e1;
  font-size: 12px;
  transition: 120ms ease;
}

.permission-check:hover {
  border-color: rgba(91, 124, 250, 0.32);
}

.permission-check input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin-top: 1px;
  accent-color: var(--primary);
}

.permission-check span,
.permission-check strong,
.permission-check small {
  display: block;
}

.permission-check small {
  color: var(--muted);
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.muted-box {
  grid-column: 1 / -1;
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 11px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.master-admin-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  border-color: rgba(91, 124, 250, 0.3);
  background:
    linear-gradient(135deg, rgba(91, 124, 250, 0.09), rgba(124, 92, 255, 0.035)),
    rgba(13, 24, 41, 0.9);
}

.admin-avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: #1e293b;
  font-weight: 800;
}

.master-avatar {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: white;
}

.admin-main {
  min-width: 0;
}

.admin-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.admin-main > span,
.admin-main > small {
  display: block;
}

.admin-main > span {
  color: #cbd5e1;
  font-size: 12px;
  margin-top: 5px;
}

.admin-main > small {
  color: var(--muted);
  margin-top: 5px;
}

@media (max-width: 760px) {
  .permissions-grid,
  .permission-projects {
    grid-template-columns: 1fr;
  }

  .permission-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .help-tip::after {
    left: 0;
    transform: translate(0, 4px);
  }

  .help-tip:hover::after,
  .help-tip:focus::after {
    transform: translate(0, 0);
  }
}


/* ===== v0.7.0 — integração GSL-v1 ===== */

.integration-summary {
  margin-bottom: 18px;
}

.integration-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 18px;
}

.integration-controls h3 {
  margin: 6px 0 7px;
}

.integration-controls p {
  margin: 0;
  color: var(--muted);
  max-width: 760px;
  line-height: 1.55;
}

.integration-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.integration-platform {
  min-width: 260px;
}

.integration-identity {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.integration-identity > div {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(2, 8, 23, 0.25);
}

.integration-identity span,
.integration-identity strong,
.integration-identity code {
  display: block;
}

.integration-identity span {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.integration-identity strong,
.integration-identity code {
  font-size: 12px;
  overflow-wrap: anywhere;
}

.integration-document-card {
  overflow: hidden;
}

.integration-contract {
  margin: 0;
  padding: 22px;
  max-height: 68vh;
  overflow: auto;
  border-top: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(2, 8, 23, 0.48), rgba(2, 8, 23, 0.3)),
    rgba(2, 8, 23, 0.4);
  color: #dbeafe;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
  .integration-controls {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .integration-actions {
    justify-content: flex-start;
  }

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

@media (max-width: 760px) {
  .integration-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .integration-actions .btn,
  .integration-platform {
    width: 100%;
  }

  .integration-identity {
    grid-template-columns: 1fr;
  }

  .integration-contract {
    max-height: none;
    font-size: 10.5px;
  }
}


/* ===== v0.8.0 — trial centralizado e código de integração ===== */

.integration-code-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.integration-code-card h3 {
  margin: 7px 0 6px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(20px, 2.4vw, 30px);
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

.integration-code-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  max-width: 760px;
}

@media (max-width: 760px) {
  .integration-code-card {
    align-items: stretch;
    flex-direction: column;
  }

  .integration-code-card .btn {
    width: 100%;
  }
}
