:root {
  --bg: #12325f;
  --bg-2: #12325f;
  --bg-3: #12325f;
  --surface: #f8fafc;
  --surface-2: #eef3f8;
  --surface-3: #e6edf5;
  --text: #0f172a;
  --muted: #64748b;
  --text-inverse: #f8fafc;
  --primary: #0ea5e9;
  --primary-2: #2563eb;
  --accent: #f97316;
  --accent-2: #f59e0b;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #dc2626;
  --danger-2: #991b1b;
  --border: rgba(148, 163, 184, 0.24);
  --border-strong: rgba(148, 163, 184, 0.36);
  --shadow: 0 18px 42px rgba(2, 6, 23, 0.22);
  --shadow-soft: 0 10px 24px rgba(2, 6, 23, 0.14);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  background:
    radial-gradient(circle at 15% 0%, rgba(14, 165, 233, 0.16), transparent 28%),
    radial-gradient(circle at 95% 0%, rgba(249, 115, 22, 0.12), transparent 24%),
    linear-gradient(180deg, var(--bg), var(--bg-2) 42%, #0f172a 100%);
}

body.auth-page {
  display: grid;
  place-items: center;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 28px;
  background: linear-gradient(135deg, rgba(8, 17, 31, 0.96), rgba(17, 24, 39, 0.94));
  border-bottom: 1px solid rgba(96, 165, 250, 0.16);
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.26);
  backdrop-filter: blur(14px);
}

.topbar-left,
.user-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-inverse);
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  letter-spacing: 0.04em;
  background:
    linear-gradient(145deg, rgba(14, 165, 233, 1), rgba(37, 99, 235, 0.92)),
    linear-gradient(145deg, rgba(249, 115, 22, 0.86), rgba(245, 158, 11, 0.75));
  box-shadow: 0 18px 30px rgba(14, 165, 233, 0.24);
}

.brand-copy h1 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.15;
  color: var(--text-inverse);
}

.brand-copy p {
  margin: 4px 0 0;
  color: rgba(248, 250, 252, 0.72);
  font-size: 0.86rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-link {
  padding: 10px 13px;
  border-radius: 12px;
  color: rgba(248, 250, 252, 0.76);
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(14, 165, 233, 0.18);
  transform: translateY(-1px);
}

.user-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  min-width: 150px;
  padding: 9px 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(96, 165, 250, 0.18);
  color: var(--text-inverse);
  box-shadow: var(--shadow-soft);
}

.user-chip strong {
  font-size: 0.93rem;
  line-height: 1.1;
}

.user-chip small {
  color: rgba(248, 250, 252, 0.72);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.container {
  width: min(1280px, calc(100% - 32px));
  margin: 28px auto 56px;
}

.hero,
.page-head,
.panel,
.card,
.auth-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}

.hero,
.page-head,
.panel {
  padding: 24px;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(249, 115, 22, 0.08)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 252, 0.96));
  border-color: rgba(14, 165, 233, 0.15);
}

.hero-copy {
  display: grid;
  gap: 12px;
  max-width: 760px;
}

.hero-copy h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.1;
  color: #08111e;
}

.hero-copy p,
.page-head p,
.panel p,
.hint,
.login-hero p,
.empty {
  color: var(--muted);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.page-head h2,
.panel h3,
.card h3 {
  margin: 0 0 8px;
  color: #08111e;
}

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

.card {
  padding: 22px;
}

.metric {
  position: relative;
  overflow: hidden;
  min-height: 148px;
}

.metric::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 8px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--warning));
}

.metric::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -18px;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(249, 115, 22, 0.06));
}

.metric-icon {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(37, 99, 235, 0.12));
  color: var(--primary-2);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  border: 1px solid rgba(14, 165, 233, 0.18);
}

.metric span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.86rem;
}

.metric strong {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 2.1rem;
  line-height: 1.1;
  color: #08111e;
}

.metric p {
  position: relative;
  z-index: 1;
  margin: 10px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.panel {
  display: grid;
  gap: 10px;
}

.grid-two {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr 1.3fr;
}

.detail-box {
  display: grid;
  gap: 10px;
}

.form-card label,
.filters label,
.login-form label {
  display: block;
  margin-bottom: 14px;
  font-weight: 700;
  color: #0f172a;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  margin-top: 7px;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.36);
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

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

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(14, 165, 233, 0.8);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease, background 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(2, 6, 23, 0.16);
}

.button.small {
  padding: 10px 14px;
  font-size: 0.92rem;
}

.button.primary {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
}

.button.ghost {
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  border-color: rgba(148, 163, 184, 0.34);
  box-shadow: none;
}

.button.ghost:hover {
  background: rgba(241, 245, 249, 0.98);
}

.button.accent {
  background: linear-gradient(135deg, #f97316, #f59e0b);
}

.button.danger {
  background: linear-gradient(135deg, var(--danger), var(--danger-2));
}

.button[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.filters {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.filter-actions {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 14px;
}

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

th,
td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(180deg, #0f172a, #111827);
  color: #f8fafc;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

tbody tr:hover {
  background: rgba(14, 165, 233, 0.04);
}

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

.table-action,
.action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(14, 165, 233, 0.24);
  background: rgba(14, 165, 233, 0.08);
  color: #0f4c81;
  font-weight: 800;
  font-size: 0.88rem;
  transition: transform 0.15s ease, background 0.15s ease;
}

.table-action:hover,
.action-link:hover {
  background: rgba(14, 165, 233, 0.14);
  transform: translateY(-1px);
}

.tag,
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  white-space: nowrap;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.tag {
  background: var(--surface-2);
  color: #0f172a;
}

.status-liberado,
.status-liberada,
.status-ativo {
  background: rgba(22, 163, 74, 0.14);
  color: #15803d;
  border-color: rgba(22, 163, 74, 0.2);
}

.status-aprovada {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
  border-color: rgba(34, 197, 94, 0.22);
}

.status-em-análise,
.status-em-analise,
.status-em-elaboração,
.status-em-elaboracao,
.status-em-revisao {
  background: rgba(245, 158, 11, 0.16);
  color: #a16207;
  border-color: rgba(245, 158, 11, 0.2);
}

.status-aguardando-aprovacao {
  background: rgba(14, 165, 233, 0.14);
  color: #0f4c81;
  border-color: rgba(14, 165, 233, 0.2);
}

.status-rejeitada,
.status-obsoleta,
.status-pausado,
.status-encerrado,
.status-cancelado,
.status-cancelada,
.status-inativo {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
  border-color: rgba(220, 38, 38, 0.16);
}

.status-bloqueado {
  background: rgba(249, 115, 22, 0.14);
  color: #c2410c;
  border-color: rgba(249, 115, 22, 0.22);
}

.status-default {
  background: rgba(14, 165, 233, 0.12);
  color: #0f4c81;
  border-color: rgba(14, 165, 233, 0.18);
}

.status-file-visualizavel {
  background: rgba(22, 163, 74, 0.14);
  color: #15803d;
  border-color: rgba(22, 163, 74, 0.22);
}

.status-file-pacote {
  background: rgba(249, 115, 22, 0.14);
  color: #c2410c;
  border-color: rgba(249, 115, 22, 0.22);
}

.status-file-cad {
  background: rgba(59, 130, 246, 0.14);
  color: #1d4ed8;
  border-color: rgba(59, 130, 246, 0.22);
}

.status-file-derivado3d {
  background: rgba(14, 165, 233, 0.16);
  color: #0369a1;
  border-color: rgba(14, 165, 233, 0.24);
}

.status-file-baixar {
  background: rgba(100, 116, 139, 0.16);
  color: #475569;
  border-color: rgba(100, 116, 139, 0.22);
}

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

.empty-state {
  text-align: center;
}

.empty-state.compact {
  padding: 26px 20px;
}

.empty-illustration {
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: var(--shadow-soft);
}

.flash-list {
  margin-bottom: 18px;
  display: grid;
  gap: 10px;
}

.flash {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: var(--shadow-soft);
}

.flash-success {
  border-color: rgba(22, 163, 74, 0.28);
  background: rgba(22, 163, 74, 0.08);
}

.flash-danger {
  border-color: rgba(220, 38, 38, 0.28);
  background: rgba(220, 38, 38, 0.08);
}

.detail-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

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

.dashboard-grid {
  margin-bottom: 20px;
}

.mini-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.mini-list li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(248, 250, 252, 0.82);
}

.mini-list li strong {
  display: block;
  margin-bottom: 4px;
  color: #08111e;
}

.mini-list li p,
.mini-list-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.mini-list-empty {
  padding: 14px;
  border-radius: 14px;
  border: 1px dashed rgba(148, 163, 184, 0.32);
}

.callout-banner {
  margin-bottom: 18px;
  background:
    linear-gradient(135deg, rgba(249, 115, 22, 0.12), rgba(14, 165, 233, 0.08)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
  border-color: rgba(249, 115, 22, 0.18);
}

.callout-banner strong {
  display: block;
  margin-bottom: 8px;
  color: #7c2d12;
}

.callout-banner p {
  margin: 0;
}

.warning-banner {
  margin-bottom: 18px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(249, 115, 22, 0.08)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
  border-color: rgba(245, 158, 11, 0.24);
}

.warning-banner strong {
  display: block;
  margin-bottom: 8px;
  color: #92400e;
}

.warning-banner p {
  margin: 0;
}

.workflow-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.workflow-actions form {
  margin: 0;
}

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

.audit-filters {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.document-filters,
.structure-filters {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.embedded-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.embedded-form .full {
  grid-column: 1 / -1;
}

.inline-select-form {
  margin: 0;
}

.inline-select-form select {
  min-height: 38px;
  margin-top: 0;
  padding: 8px 10px;
}

.network-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 1fr);
  gap: 22px;
  overflow-x: auto;
  padding: 10px 4px 8px;
}

.network-column {
  position: relative;
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 240px;
}

.network-column::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 56px;
  bottom: 18px;
  width: 2px;
  background: linear-gradient(180deg, rgba(14, 165, 233, 0.35), rgba(37, 99, 235, 0.08));
}

.network-root-column::before {
  display: none;
}

.network-column-label {
  display: inline-flex;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.16);
  color: #0f4c81;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.network-column-stack {
  display: grid;
  gap: 14px;
}

.network-node {
  position: relative;
  padding: 18px 18px 16px;
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 250, 0.96));
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.network-node::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 50%;
  width: 14px;
  height: 2px;
  background: rgba(14, 165, 233, 0.28);
}

.network-root-column .network-node::before {
  display: none;
}

.network-node-root {
  background:
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.14), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 250, 252, 0.97));
  border-color: rgba(249, 115, 22, 0.18);
}

.network-node-kicker {
  display: inline-block;
  margin-bottom: 10px;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.network-node h4 {
  margin: 0 0 8px;
  font-size: 1.02rem;
  color: #08111e;
}

.network-node p {
  margin: 0 0 14px;
  color: #64748b;
  line-height: 1.5;
}

.network-node-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  color: #475569;
  font-size: 0.88rem;
}

.network-node-actions {
  display: flex;
  justify-content: flex-start;
}

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

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

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

.field-group {
  display: grid;
  gap: 10px;
}

.field-group h4,
.section-title {
  margin: 0 0 4px;
  font-size: 1rem;
  color: #08111e;
}

.section-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.wide {
  max-width: 100%;
}

.auth-shell {
  width: min(1120px, calc(100% - 32px));
  padding: 28px 0;
}

.auth-card {
  overflow: hidden;
  padding: 0;
  border-color: rgba(96, 165, 250, 0.12);
  background:
    linear-gradient(135deg, rgba(6, 14, 26, 0.98), rgba(15, 23, 42, 0.96));
  color: var(--text-inverse);
  box-shadow: 0 32px 70px rgba(2, 6, 23, 0.45);
}

.login-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(380px, 0.9fr);
  min-height: 640px;
}

.login-panel > * {
  min-width: 0;
}

.login-panel .auth-brand {
  align-items: flex-start;
}

.auth-visual {
  padding: 54px 50px;
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.28), transparent 34%),
    radial-gradient(circle at bottom right, rgba(249, 115, 22, 0.2), transparent 30%),
    linear-gradient(180deg, rgba(8, 17, 31, 0.94), rgba(6, 14, 26, 0.98));
  display: grid;
  align-content: center;
  gap: 34px;
  position: relative;
}

.login-hero {
  display: grid;
  gap: 14px;
  max-width: 460px;
}

.login-eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: rgba(248, 250, 252, 0.82);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-hero h1 {
  margin: 0;
  font-size: clamp(2.3rem, 4vw, 3.25rem);
  line-height: 0.98;
  color: var(--text-inverse);
}

.login-hero p {
  margin: 0;
  max-width: 440px;
  color: rgba(248, 250, 252, 0.8);
  font-size: 1rem;
  line-height: 1.7;
}

.login-support-copy {
  max-width: 470px;
}

.login-features {
  display: grid;
  gap: 12px;
  max-width: 470px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.login-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: rgba(248, 250, 252, 0.88);
  backdrop-filter: blur(8px);
}

.login-feature strong {
  min-width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.3), rgba(37, 99, 235, 0.24));
  color: #fff;
  font-size: 0.78rem;
}

.login-feature span {
  line-height: 1.55;
}

.login-form-wrap {
  padding: 42px 38px;
  display: grid;
  align-content: center;
  gap: 18px;
  background:
    linear-gradient(180deg, rgba(245, 247, 250, 0.98), rgba(238, 243, 248, 0.98));
  color: #0f172a;
}

.login-form-card {
  padding: 28px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.1);
}

.login-form-head {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.login-form-head h2 {
  margin: 0;
  font-size: 1.7rem;
  line-height: 1.05;
  color: #08111e;
}

.login-form-head p {
  margin: 0;
  color: #64748b;
}

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

.login-form label {
  display: block;
  margin-bottom: 0;
  font-weight: 700;
  color: #0f172a;
  font-size: 0.92rem;
}

.login-form input {
  min-height: 42px;
  margin-top: 8px;
  padding: 10px 13px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.96);
}

.login-form .button {
  min-height: 44px;
  margin-top: 6px;
  border-radius: 12px;
  font-size: 0.96rem;
  box-shadow: 0 14px 24px rgba(37, 99, 235, 0.22);
}

.settings-tabs {
  display: flex;
  gap: 10px;
  padding: 14px;
  margin-bottom: 18px;
}

.tab-link {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: rgba(15, 23, 42, 0.72);
  background: rgba(248, 250, 252, 0.92);
  font-weight: 800;
}

.tab-link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border-color: transparent;
  box-shadow: var(--shadow-soft);
}

.config-sections {
  display: grid;
  gap: 18px;
}

.user-inline-form,
.user-reset-form {
  margin-top: 10px;
}

.user-inline-form {
  display: block;
}

.user-inline-form summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.user-inline-form summary::-webkit-details-marker {
  display: none;
}

.user-inline-form[open] summary {
  margin-bottom: 12px;
}

.user-inline-grid,
.user-reset-grid {
  display: grid;
  gap: 8px;
  align-items: center;
}

.user-inline-grid {
  grid-template-columns: 1.1fr 1.4fr 0.8fr 0.8fr 1fr auto;
}

.user-reset-grid {
  grid-template-columns: 1fr auto;
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: 700;
}

.inline-actions {
  display: flex;
  justify-content: flex-end;
}

.user-inline-grid input,
.user-inline-grid select,
.user-reset-grid input {
  margin-top: 0;
}

.path-picker {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.path-picker input {
  flex: 1;
  min-width: 260px;
}

.path-preview {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.9));
  color: #fff;
}

.path-label {
  display: block;
  margin-bottom: 8px;
  color: rgba(248, 250, 252, 0.72);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.path-value,
.metric-path {
  display: block;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.92rem;
  line-height: 1.6;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.metric-path {
  margin-top: 4px;
  color: #08111e;
}

.path-browser {
  display: grid;
  gap: 16px;
}

.path-browser-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

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

.path-item {
  display: block;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: #fff;
  color: #0f172a;
}

.path-item:hover {
  border-color: var(--primary);
  background: rgba(14, 165, 233, 0.05);
}

.inline-toggle {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: rgba(14, 165, 233, 0.05);
}

.inline-toggle input {
  width: auto;
  margin: 0;
}

.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.68);
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}

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

.modal-card {
  width: min(520px, 100%);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border-radius: 20px;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: 0 28px 52px rgba(2, 6, 23, 0.34);
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
  flex-wrap: wrap;
}

.footer {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 24px;
  display: flex;
  justify-content: space-between;
  color: rgba(248, 250, 252, 0.72);
  font-size: 0.92rem;
}

.badge-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.action-link,
.table-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(14, 165, 233, 0.18);
  background: rgba(14, 165, 233, 0.08);
  color: #0f4c81;
  font-weight: 800;
  font-size: 0.88rem;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.action-link:hover,
.table-action:hover {
  background: rgba(14, 165, 233, 0.14);
  transform: translateY(-1px);
}

.table-inline-hint {
  margin: 8px 0 0;
  max-width: 280px;
}

.preview-head {
  margin-bottom: 20px;
}

.preview-meta-grid {
  margin-bottom: 20px;
}

.preview-card {
  padding: 18px;
}

.preview-panel {
  display: grid;
  gap: 16px;
}

.preview-frame-wrap,
.preview-image-wrap {
  min-height: 72vh;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: linear-gradient(180deg, #0f172a, #111827);
}

.preview-frame {
  width: 100%;
  height: 72vh;
  border: 0;
  display: block;
}

.preview-image-wrap {
  display: grid;
  place-items: center;
  padding: 18px;
}

.preview-image {
  width: 100%;
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 14px;
}

.preview-message {
  padding: 28px;
  border-radius: 20px;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  background: rgba(248, 250, 252, 0.88);
}

.preview-message h3 {
  margin-top: 0;
}

.viewer3d-stage {
  width: 100%;
  height: 72vh;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.9);
  background: radial-gradient(circle at top, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 1));
}

.viewer3d-status {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.06);
  color: #334155;
  font-weight: 700;
}

.viewer3d-status.is-error {
  background: rgba(220, 38, 38, 0.08);
  color: #b91c1c;
}

.viewer3d-help {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  color: var(--muted);
}

.zip-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
  padding: 6px;
}

.zip-list-item {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(248, 250, 252, 0.82);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.88rem;
}

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

@media (max-width: 980px) {
  .grid-two,
  .filters,
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }

  .detail-sections,
  .audit-filters,
  .document-filters,
  .structure-filters,
  .embedded-form {
    grid-template-columns: 1fr 1fr;
  }

  .hero,
  .page-head {
    flex-direction: column;
    align-items: flex-start;
  }

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

@media (max-width: 720px) {
  .topbar {
    padding: 16px;
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-left,
  .user-area {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .container,
  .footer {
    width: min(100% - 20px, 1280px);
  }

  .cards,
  .grid-two,
  .filters,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .detail-sections,
  .audit-filters,
  .document-filters,
  .structure-filters,
  .embedded-form {
    grid-template-columns: 1fr;
  }

  .mini-list li {
    flex-direction: column;
  }

  .hero,
  .page-head,
  .panel,
  .card {
    padding: 18px;
  }

  .hero-copy h2 {
    font-size: 1.55rem;
  }

  .nav {
    justify-content: flex-start;
  }

  .viewer3d-stage,
  .preview-frame,
  .preview-frame-wrap,
  .preview-image-wrap {
    min-height: 56vh;
    height: 56vh;
  }
}
