:root {
  --navy: #0b1f3a;
  --navy-2: #12355f;
  --blue: #1f6feb;
  --blue-soft: #eef4ff;
  --teal: #18a999;
  --gold: #c99a2e;
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #172033;
  --muted: #64748b;
  --border: #dbe3ef;
  --danger: #b42318;
  --danger-soft: #fff1f0;
  --success: #027a48;
  --success-soft: #ecfdf3;
  --warning: #b54708;
  --warning-soft: #fff7ed;
  --shadow: 0 18px 50px rgba(11, 31, 58, 0.12);
  --sidebar-width: 286px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(31, 111, 235, 0.10), transparent 34%),
    linear-gradient(135deg, #f8fbff 0%, var(--bg) 100%);
  color: var(--text);
}

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

button {
  border: none;
  cursor: pointer;
}

a {
  color: inherit;
}

.hidden {
  display: none !important;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
}

.eyebrow.danger {
  color: var(--danger);
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: #ffffff;
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -1px;
  flex: 0 0 auto;
}

/* Loading / blocked */

.loading-screen,
.blocked-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
}

.loader-card,
.blocked-card {
  width: min(520px, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 34px;
  box-shadow: var(--shadow);
}

.loader-card .brand-mark,
.blocked-card .brand-mark {
  margin-bottom: 22px;
}

.loader-card h1,
.blocked-card h1 {
  margin: 0;
  color: var(--navy);
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.loader-card p,
.blocked-card p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.blocked-actions {
  margin-top: 22px;
}

.blocked-actions a {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  padding: 0 18px;
  background: var(--blue);
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
}

/* Shell */

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

/* Sidebar */

.sidebar {
  min-height: 100vh;
  background: linear-gradient(180deg, var(--navy) 0%, #08172c 100%);
  color: #ffffff;
  padding: 22px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  align-self: start;
}

.sidebar-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-brand .brand-mark {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.sidebar-brand strong {
  display: block;
  font-size: 15px;
  line-height: 1.2;
}

.sidebar-brand span {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 700;
}

.sidebar-nav {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  overflow-y: auto;
  padding-right: 2px;
}

.nav-item {
  width: 100%;
  min-height: 44px;
  border-radius: 14px;
  background: transparent;
  color: rgba(255, 255, 255, 0.76);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  text-align: left;
  font-weight: 800;
  font-size: 14px;
}

.nav-item span {
  width: 24px;
  display: inline-grid;
  place-items: center;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav-item.active {
  background: rgba(31, 111, 235, 0.34);
  color: #ffffff;
  box-shadow: inset 3px 0 0 var(--teal);
}

.nav-item.locked {
  display: none;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  gap: 12px;
}

.profile-mini {
  display: grid;
  gap: 4px;
}

.profile-mini strong {
  font-size: 14px;
  overflow-wrap: anywhere;
}

.profile-mini span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 700;
}

.logout-button {
  min-height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.10);
  color: #ffffff;
  font-weight: 800;
}

.logout-button:hover {
  background: rgba(255, 255, 255, 0.16);
}

/* Main */

.main-panel {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
}

.topbar h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(32px, 4vw, 48px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.topbar p:not(.eyebrow) {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
  max-width: 760px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.status-pill {
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
  box-shadow: 0 10px 24px rgba(11, 31, 58, 0.06);
}

.status-dot {
  width: 9px;
  height: 9px;
  background: var(--success);
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(2, 122, 72, 0.10);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--blue-soft);
  color: var(--navy);
  font-weight: 900;
  font-size: 18px;
}

/* Profile strip */

.profile-strip {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr 1fr 0.8fr;
  gap: 12px;
  margin-bottom: 18px;
}

.profile-strip article {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 10px 24px rgba(11, 31, 58, 0.05);
}

.profile-strip span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 900;
  margin-bottom: 8px;
}

.profile-strip strong {
  display: block;
  font-size: 14px;
  color: var(--text);
  overflow-wrap: anywhere;
}

/* Views */

.view {
  display: none;
}

.view.active {
  display: block;
}

/* Cards / grids */

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

.metric-card,
.panel-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 14px 36px rgba(11, 31, 58, 0.08);
}

.metric-card {
  padding: 20px;
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 900;
  margin-bottom: 12px;
}

.metric-card strong {
  display: block;
  color: var(--navy);
  font-size: 42px;
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.metric-card p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.content-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
}

.panel-card {
  padding: 22px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.panel-header h2 {
  margin: 0;
  color: var(--navy);
  font-size: 24px;
  letter-spacing: -0.04em;
}

.panel-header p:not(.eyebrow) {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.panel-header button,
.primary-button {
  min-height: 42px;
  border-radius: 14px;
  background: var(--blue);
  color: #ffffff;
  padding: 0 16px;
  font-weight: 900;
  white-space: nowrap;
}

.panel-header button:hover,
.primary-button:hover {
  filter: brightness(0.96);
}

/* Lists */

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

.list-row {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #f8fbff;
  padding: 14px;
  display: grid;
  gap: 4px;
}

.list-row strong {
  color: var(--text);
  font-size: 14px;
}

.list-row span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border-radius: 999px;
  padding: 0 12px;
  background: var(--blue-soft);
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
}

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

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

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

/* Module content */

.module-content {
  display: grid;
  gap: 12px;
}

.empty-state {
  border: 1px dashed var(--border);
  border-radius: 18px;
  padding: 22px;
  background: #f8fbff;
  color: var(--muted);
  line-height: 1.55;
}

.empty-state strong {
  display: block;
  color: var(--text);
  margin-bottom: 6px;
}

.permission-note {
  border-radius: 16px;
  padding: 14px;
  background: var(--warning-soft);
  color: var(--warning);
  font-weight: 800;
  line-height: 1.45;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #ffffff;
}

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

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

.data-table th {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  background: #f8fbff;
}

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

.data-table td strong {
  color: var(--text);
}

.badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--blue-soft);
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
}

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

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

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

/* Forms prepared for next block */

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

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

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

.form-field label {
  color: var(--text);
  font-weight: 900;
  font-size: 13px;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 12px;
  outline: none;
  background: #ffffff;
  color: var(--text);
  font-size: 14px;
}

.form-field textarea {
  min-height: 110px;
  padding-top: 12px;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(31, 111, 235, 0.10);
}

/* Mobile */

@media (max-width: 1060px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, var(--sidebar-width));
    z-index: 40;
    transform: translateX(-102%);
    transition: transform 0.2s ease;
  }

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

  .main-panel {
    padding: 20px;
  }

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

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

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

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

@media (max-width: 680px) {
  .main-panel {
    padding: 16px;
  }

  .topbar {
    align-items: flex-start;
  }

  .topbar h1 {
    font-size: 34px;
  }

  .status-pill {
    display: none;
  }

  .profile-strip,
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .panel-card {
    padding: 18px;
    border-radius: 20px;
  }

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

  .panel-header button {
    width: 100%;
  }

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

https://cardoso-narciso-sig.pages.dev/app.html?v=17b
