:root {
  --ink: #132b30;
  --muted: #64767a;
  --line: #dfe7e5;
  --soft-line: #eaf0ee;
  --paper: #ffffff;
  --canvas: #f5f7f5;
  --navy: #0d2a2f;
  --teal: #187b73;
  --teal-dark: #11645e;
  --teal-soft: #e4f2ef;
  --gold: #e9b960;
  --shadow: 0 12px 34px rgba(16, 48, 51, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

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

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10;
  display: flex;
  width: 258px;
  flex-direction: column;
  background: var(--navy);
  color: white;
  padding: 35px 24px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  color: white;
  text-decoration: none;
  padding: 0 9px 34px;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  transform: rotate(45deg);
}

.brand-mark span {
  position: absolute;
  width: 23px;
  height: 8px;
  border: 2px solid #7fc3b7;
  border-radius: 1px;
}

.brand-mark span:nth-child(1) { transform: translateY(-9px); }
.brand-mark span:nth-child(3) { transform: translateY(9px); }

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: "Manrope", sans-serif;
  font-size: 16px;
  letter-spacing: -0.2px;
}

.brand small {
  margin-top: 1px;
  color: #9fb7b8;
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding: 0 15px;
  border-radius: 7px;
  color: #adc0c1;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: 160ms ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: white;
}

.nav-item.active {
  background: #173e42;
  color: white;
}

.nav-item svg {
  width: 19px;
  fill: currentColor;
}

.sidebar-note {
  display: flex;
  gap: 11px;
  margin-top: auto;
  padding: 17px 13px;
  border: 1px solid rgba(141, 191, 186, 0.18);
  border-radius: 8px;
  background: rgba(126, 184, 178, 0.07);
}

.note-icon {
  display: grid;
  flex: 0 0 20px;
  height: 20px;
  place-items: center;
  border: 1px solid #75aaa6;
  border-radius: 50%;
  color: #9ed0ca;
  font-family: serif;
  font-size: 12px;
  font-weight: 700;
}

.sidebar-note p {
  margin: 0;
  color: #9db2b3;
  font-size: 11px;
  line-height: 1.55;
}

.profile {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 11px;
  margin-top: 21px;
  padding: 16px 5px 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: white;
  text-align: left;
}

.avatar {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border-radius: 50%;
  background: #d8c18a;
  color: #293d3d;
  font-size: 12px;
  font-weight: 700;
}

.profile-copy {
  min-width: 0;
  flex: 1;
}

.profile-copy strong,
.profile-copy small {
  display: block;
}

.profile-copy strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-copy small {
  margin-top: 3px;
  color: #8ea6a8;
  font-size: 10px;
}

.sign-out-link {
  color: #9eb4b5;
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
}

.sign-out-link:hover {
  color: white;
}

.main {
  min-height: 100vh;
  margin-left: 258px;
}

.topbar {
  display: flex;
  height: 68px;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
}

.breadcrumb {
  color: #31484c;
  font-size: 12px;
  font-weight: 600;
}

.breadcrumb span,
.breadcrumb b {
  color: #8b9b9d;
}

.breadcrumb b {
  padding: 0 9px;
  font-weight: 400;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.icon-button,
.mobile-menu {
  position: relative;
  border: 0;
  background: transparent;
}

.icon-button svg {
  width: 19px;
  fill: none;
  stroke: #587074;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.notification-dot {
  position: absolute;
  top: 3px;
  right: 2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #d89643;
  box-shadow: 0 0 0 2px white;
}

.help-link {
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: #587074;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.help-link:hover {
  color: var(--teal);
}

.sign-out-top {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.sign-out-top:hover {
  background: var(--teal);
  color: white;
}

.content {
  width: min(1100px, calc(100% - 72px));
  margin: 0 auto;
  padding: 48px 0 24px;
}

.welcome {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 33px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.75px;
}

.welcome h1 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(29px, 3vw, 39px);
  letter-spacing: -1.7px;
  line-height: 1.2;
}

.welcome > div > p:last-child {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.date-chip {
  margin-bottom: 2px;
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.55);
  color: #66777a;
  font-size: 11px;
  font-weight: 600;
}

.status-card {
  position: relative;
  display: flex;
  min-height: 144px;
  align-items: center;
  gap: 21px;
  padding: 27px 30px;
  overflow: hidden;
  border: 1px solid #d7e6e2;
  border-radius: 9px;
  background: linear-gradient(105deg, #f8fcfb, #ecf6f3);
  box-shadow: 0 7px 26px rgba(38, 91, 85, 0.05);
}

.status-card::after {
  position: absolute;
  top: -84px;
  right: 102px;
  width: 230px;
  height: 230px;
  border: 1px solid rgba(83, 151, 143, 0.08);
  border-radius: 50%;
  content: "";
}

.status-icon {
  display: grid;
  flex: 0 0 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 8px 18px rgba(24, 123, 115, 0.19);
}

.status-icon svg {
  width: 23px;
  fill: none;
  stroke: white;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.status-copy {
  z-index: 1;
  flex: 1;
}

.status-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: var(--teal);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.status-label span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #54b5a8;
}

.status-copy h2 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 20px;
  letter-spacing: -0.5px;
}

.status-copy p {
  margin: 7px 0 0;
  color: #6b7e80;
  font-size: 12px;
}

.button {
  display: inline-flex;
  min-height: 41px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
  transition: 160ms ease;
}

.button-primary {
  z-index: 1;
  background: var(--teal);
  color: white;
  box-shadow: 0 6px 16px rgba(24, 123, 115, 0.15);
}

.button-primary:hover:not(:disabled) {
  background: var(--teal-dark);
  transform: translateY(-1px);
}

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

.button-secondary {
  border-color: var(--line);
  background: white;
  color: #52666a;
}

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

.registry-section {
  margin-top: 39px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 15px;
}

.section-heading h2 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 21px;
  letter-spacing: -0.5px;
}

.text-button {
  margin-bottom: 2px;
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid #95aaa7;
  background: transparent;
  color: #56736f;
  font-size: 11px;
  font-weight: 700;
}

.text-button:hover {
  color: var(--teal);
}

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

.table-header,
.database-row {
  display: grid;
  grid-template-columns: minmax(260px, 2.3fr) minmax(150px, 1.2fr) 1fr 74px;
  align-items: center;
  column-gap: 24px;
  padding: 0 27px;
}

.table-header {
  min-height: 44px;
  border-bottom: 1px solid var(--line);
  background: #fafbf9;
  color: #859294;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.1px;
}

.database-row {
  min-height: 74px;
  border-bottom: 1px solid var(--soft-line);
}

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

.database-name {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.database-icon,
.mini-database-icon {
  display: grid;
  flex: 0 0 35px;
  height: 35px;
  place-items: center;
  border-radius: 6px;
  background: var(--teal-soft);
  color: var(--teal);
}

.database-icon svg,
.mini-database-icon svg {
  width: 18px;
  fill: currentColor;
}

.database-name strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-tag {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 3px;
  background: #f0f3f0;
  color: #5f7072;
  font-size: 10px;
  font-weight: 600;
}

.updated-date {
  color: #657679;
  font-size: 11px;
}

.row-actions {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.more-button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #748689;
  font-size: 18px;
  letter-spacing: 1px;
}

.more-button:hover {
  background: #f0f5f3;
}

.action-menu {
  position: absolute;
  top: 30px;
  right: 0;
  z-index: 4;
  display: none;
  width: 118px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  box-shadow: 0 8px 25px rgba(20, 52, 54, 0.14);
}

.action-menu.open {
  display: grid;
}

.action-menu button {
  padding: 8px 9px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #506568;
  font-size: 11px;
  text-align: left;
}

.action-menu button:hover {
  background: #f2f6f5;
}

.action-menu .delete-action {
  color: #a85252;
}

.empty-state {
  padding: 54px 20px;
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin: 0 auto 13px;
  place-items: center;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal);
}

.empty-icon svg {
  width: 22px;
  fill: currentColor;
}

.empty-state h3 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 15px;
}

.empty-state p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.lower-grid {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 19px;
  margin-top: 22px;
}

.info-card,
.activity-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 8px 25px rgba(23, 53, 55, 0.045);
}

.info-card {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 23px;
}

.card-icon {
  display: grid;
  flex: 0 0 38px;
  height: 38px;
  place-items: center;
  border-radius: 6px;
}

.card-icon.teal {
  background: var(--teal-soft);
  color: var(--teal);
}

.card-icon svg {
  width: 18px;
  fill: currentColor;
}

.info-card h3,
.activity-card h3 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 14px;
}

.info-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.activity-card {
  padding: 20px 23px;
}

.activity-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--soft-line);
}

.activity-title .eyebrow {
  margin-bottom: 5px;
}

.activity-badge {
  padding: 4px 8px;
  border-radius: 10px;
  background: #f0f4f2;
  color: #738386;
  font-size: 9px;
  font-weight: 700;
}

.activity-item {
  position: relative;
  display: grid;
  grid-template-columns: 37px 1fr auto;
  align-items: center;
  gap: 12px;
  padding-top: 15px;
}

.activity-line {
  position: absolute;
  top: 0;
  left: 17px;
  width: 1px;
  height: 15px;
  background: #c6d9d5;
}

.mini-database-icon {
  width: 35px;
}

.activity-item strong {
  display: block;
  font-size: 11px;
}

.activity-item p,
.activity-item time {
  margin: 3px 0 0;
  color: #859295;
  font-size: 9px;
}

.activity-item time {
  align-self: start;
  margin-top: 4px;
}

footer {
  display: flex;
  justify-content: space-between;
  padding: 35px 2px 2px;
  color: #92a0a1;
  font-size: 9px;
}

.modal {
  width: min(520px, calc(100% - 32px));
  padding: 0;
  border: 0;
  border-radius: 10px;
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(10, 38, 41, 0.25);
}

.help-modal {
  width: min(660px, calc(100% - 32px));
  max-height: min(760px, calc(100vh - 38px));
  padding: 30px;
  overflow: auto;
  border: 0;
  border-radius: 10px;
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(10, 38, 41, 0.25);
}

.help-modal::backdrop {
  background: rgba(8, 29, 32, 0.55);
  backdrop-filter: blur(3px);
}

.help-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.help-modal-header h2 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 25px;
  letter-spacing: -0.7px;
}

.help-intro {
  margin: 11px 0 23px;
  color: var(--muted);
  font-size: 12px;
}

.help-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--line);
}

.help-list section {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  padding: 17px 18px;
  background: white;
}

.help-list section > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 9px;
  font-weight: 800;
}

.help-list h3 {
  margin: 1px 0 4px;
  font-family: "Manrope", sans-serif;
  font-size: 12px;
}

.help-list p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.help-support {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 7px;
  background: #f1f6f4;
}

.help-support strong {
  font-size: 11px;
}

.help-support p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.help-support a {
  flex: 0 0 auto;
  color: var(--teal);
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 520px) {
  .help-modal { padding: 23px; }
  .help-support { align-items: flex-start; flex-direction: column; }
}

.modal::backdrop {
  background: rgba(8, 29, 32, 0.55);
  backdrop-filter: blur(3px);
}

.modal form {
  padding: 29px;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.modal-header h2 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 23px;
  letter-spacing: -0.7px;
}

.close-button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #f0f4f2;
  color: #637679;
  font-size: 22px;
  line-height: 1;
}

.modal-intro {
  margin: 14px 0 22px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.modal label {
  display: block;
  margin-top: 17px;
  color: #344c50;
  font-size: 11px;
  font-weight: 700;
}

.modal label span {
  color: #b65b55;
}

.modal input,
.modal textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 12px 13px;
  border: 1px solid #d7e1df;
  border-radius: 5px;
  outline: none;
  color: var(--ink);
  font-size: 13px;
  resize: vertical;
  transition: 150ms ease;
}

.modal input:focus,
.modal textarea:focus {
  border-color: #65a49e;
  box-shadow: 0 0 0 3px rgba(46, 133, 124, 0.09);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 27px;
}

.declaration-quote {
  padding: 16px 17px;
  border-left: 3px solid var(--teal);
  background: #edf6f4;
  color: #214b4c;
  font-family: "Manrope", sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.validation-message {
  margin: 7px 0 0;
  color: #a65752;
  font-size: 10px;
  opacity: 0;
  transition: 150ms ease;
}

.validation-message.visible {
  opacity: 1;
}

.declaration-note {
  margin-top: 17px;
  padding: 12px 14px;
  border: 1px solid #e4e8dd;
  border-radius: 5px;
  background: #fafaf5;
  color: #697675;
  font-size: 10px;
  line-height: 1.55;
}

.toast {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-radius: 7px;
  background: #123a3d;
  color: white;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 15px 35px rgba(9, 35, 37, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(15px);
  transition: 200ms ease;
}

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

.toast-check {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border-radius: 50%;
  background: #5eafa5;
  font-size: 12px;
}

.mobile-menu {
  display: none;
}

@media (max-width: 900px) {
  .sidebar {
    width: 220px;
  }

  .main {
    margin-left: 220px;
  }

  .topbar {
    padding: 0 26px;
  }

  .content {
    width: calc(100% - 42px);
  }

  .table-header,
  .database-row {
    grid-template-columns: 1.8fr 1fr 72px;
  }

  .table-header span:nth-child(3),
  .updated-date {
    display: none;
  }
}

@media (max-width: 700px) {
  .sidebar {
    display: none;
  }

  .main {
    margin-left: 0;
  }

  .topbar {
    height: 60px;
    padding: 0 20px;
  }

  .mobile-menu {
    display: grid;
    gap: 4px;
  }

  .mobile-menu span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--ink);
  }

  .breadcrumb {
    display: none;
  }

  .content {
    width: calc(100% - 30px);
    padding-top: 29px;
  }

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

  .date-chip {
    display: none;
  }

  .status-card {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 23px;
  }

  .status-copy {
    flex: 1 1 calc(100% - 75px);
  }

  .status-card .button {
    width: 100%;
  }

  .table-header {
    display: none;
  }

  .database-row {
    grid-template-columns: 1fr 32px;
    gap: 14px;
    padding: 18px;
  }

  .database-name {
    grid-column: 1;
  }

  .field-tag {
    grid-column: 1;
    margin-left: 48px;
  }

  .row-actions {
    grid-column: 2;
    grid-row: 1;
  }

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

  footer {
    gap: 12px;
  }
}
