@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Lato:wght@700;800&display=swap");

:root {
  --nx-teal: #063232;
  --nx-teal-deep: #042424;
  --nx-gold: #c9a227;
  --nx-text: #1b2b2b;
  --nx-muted: #667b7b;
  --nx-line: #e6e2d8;
  --nx-paper: #f7f4ee;
}

* { box-sizing: border-box; }

body.nx-portal {
  margin: 0;
  min-height: 100vh;
  font-family: "DM Sans", "Segoe UI", sans-serif;
  color: var(--nx-text);
  background: #fff;
}

.nx-contact {
  background: var(--nx-teal);
  color: #fff;
  font-size: 13px;
  padding: 8px 40px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.nx-contact a { color: #fff; text-decoration: none; }

.nx-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 40px;
  background: #fff;
  border-bottom: 1px solid var(--nx-line);
}

.nx-header img { height: 48px; display: block; }
.nx-header nav { display: flex; align-items: center; gap: 22px; }
.nx-header nav a {
  color: var(--nx-teal);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.nx-header nav a.active {
  color: var(--nx-gold);
}

.nx-header .nx-cta {
  background: var(--nx-teal);
  color: #fff !important;
  padding: 10px 18px;
  border-radius: 6px;
}

.nx-auth {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  min-height: calc(100vh - 118px);
}

.nx-visual {
  background: var(--nx-teal-deep);
  color: #fff;
  padding: 80px 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.nx-visual::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border: 80px solid rgba(201, 162, 39, 0.08);
  border-radius: 50%;
  right: -160px;
  bottom: -160px;
}

.nx-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--nx-gold);
  margin-bottom: 16px;
}

.nx-visual h1 {
  font-family: Lato, sans-serif;
  font-size: 42px;
  line-height: 1.15;
  margin: 0 0 18px;
  max-width: 520px;
  position: relative;
}

.nx-visual p {
  margin: 0;
  max-width: 460px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
  line-height: 1.7;
  position: relative;
}

.nx-points {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  position: relative;
}

.nx-points li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 14px 0;
  font-size: 15px;
}

.nx-points svg {
  flex: 0 0 20px;
  margin-top: 2px;
}

.nx-panel {
  background: var(--nx-paper);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.nx-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 12px;
  padding: 36px 32px 32px;
  border: 1px solid #efeae0;
}
.nx-guest-card { max-width: 480px; }
.nx-hint {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--nx-muted);
  line-height: 1.45;
}
.nx-honey {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
textarea {
  width: 100%;
  border: 1px solid var(--nx-line);
  border-radius: 6px;
  padding: 12px 14px;
  font: inherit;
  background: #fbfaf7;
  min-height: 110px;
  resize: vertical;
}
textarea:focus {
  outline: 2px solid rgba(6, 50, 50, 0.18);
  border-color: var(--nx-teal);
  background: #fff;
}

.nx-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: -8px 0 24px;
  border-bottom: 1px solid var(--nx-line);
}

.nx-tabs a {
  text-align: center;
  padding: 12px 8px 14px;
  text-decoration: none;
  color: var(--nx-muted);
  font-weight: 700;
}

.nx-tabs a.active {
  color: var(--nx-teal);
  box-shadow: inset 0 -2px 0 var(--nx-teal);
}

.nx-card h2 { display: none; }

label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nx-muted);
  margin: 14px 0 8px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="date"],
input[type="file"] {
  width: 100%;
  border: 1px solid var(--nx-line);
  border-radius: 6px;
  padding: 12px 14px;
  font: inherit;
  background: #fbfaf7;
}

input:focus {
  outline: 2px solid rgba(6, 50, 50, 0.18);
  border-color: var(--nx-teal);
  background: #fff;
}

.nx-btn {
  width: 100%;
  margin-top: 22px;
  border: 0;
  border-radius: 6px;
  padding: 13px 16px;
  background: var(--nx-teal);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}

.nx-btn:hover { background: #0a4545; }
.nx-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.nx-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  font-size: 14px;
}

.nx-row a,
.nx-switch a {
  color: var(--nx-teal);
  font-weight: 700;
  text-decoration: none;
}

.nx-legal {
  margin-top: 28px;
  font-size: 13px;
  color: var(--nx-muted);
}
.nx-legal a {
  color: var(--nx-teal);
  font-weight: 700;
  text-decoration: none;
}
.nx-agree {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 18px 0 4px;
  padding: 12px 14px;
  border: 1px solid var(--nx-line);
  border-radius: 8px;
  background: #fbfaf7;
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--nx-text);
  line-height: 1.45;
  cursor: pointer;
}
.nx-agree input {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin: 1px 0 0;
  accent-color: var(--nx-teal);
  cursor: pointer;
}
.nx-agree a {
  color: var(--nx-teal);
  font-weight: 700;
  text-decoration: none;
}
.nx-msg { margin-top: 12px; font-size: 14px; min-height: 1.2em; font-weight: 600; }
.nx-msg[hidden] { display: none !important; min-height: 0; margin: 0; }
.nx-msg.error { color: #b42318; }
.nx-msg.ok { color: #067647; }

.nx-app-wrap { background: var(--nx-paper); min-height: calc(100vh - 118px); }
.nx-app { max-width: 1000px; margin: 0 auto; padding: 40px 20px 72px; }
.nx-app h1 { color: var(--nx-teal); margin: 0 0 8px; font-family: Lato, sans-serif; font-size: 26px; font-weight: 700; }
.nx-app .lead { color: var(--nx-muted); margin: 0 0 24px; }
.nx-who { font-size: 13px; color: var(--nx-muted); }
.nx-section-title {
  margin: 28px 0 8px;
  color: var(--nx-teal);
  font-family: Lato, sans-serif;
  font-size: 18px;
}
.nx-dash-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 24px;
}
.nx-dash-nav button {
  border: 1px solid var(--nx-line);
  background: #fff;
  color: var(--nx-teal);
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
}
.nx-dash-nav button.active {
  background: var(--nx-teal);
  color: #fff;
  border-color: var(--nx-teal);
}
.nx-wide { max-width: none; }
.nx-app .nx-card h2 {
  display: block;
  margin: 0 0 20px;
  font-size: 22px;
  color: var(--nx-teal);
}
.nx-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
}
.nx-span-2 { grid-column: 1 / -1; }
.nx-tab[hidden],
#spouse-fields[hidden] { display: none !important; }
.nx-btn-inline { width: auto; min-width: 220px; }
select {
  width: 100%;
  border: 1px solid var(--nx-line);
  border-radius: 6px;
  padding: 12px 14px;
  font: inherit;
  background: #fbfaf7;
}
.nx-profile {
  display: grid;
  grid-template-columns: 1.1fr 1.6fr 1fr;
  gap: 12px;
  margin: 8px 0 8px;
}
.nx-profile article {
  background: #fff;
  border: 1px solid var(--nx-line);
  border-radius: 10px;
  padding: 16px 18px;
}
.nx-profile span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nx-muted);
  margin-bottom: 6px;
}
.nx-profile strong {
  font-size: 15px;
  color: var(--nx-teal);
  overflow-wrap: anywhere;
}

.nx-files { margin-top: 24px; display: grid; gap: 10px; }
.nx-file {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--nx-line);
  background: #fff;
  border-radius: 10px;
  padding: 14px 16px;
}

.nx-file button,
.nx-file a {
  font-size: 13px;
  color: var(--nx-teal);
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
}

.nx-admin { max-width: 1180px; }
.nx-admin-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 200px));
  gap: 12px;
  margin: 0 0 24px;
}
.nx-admin-stats article {
  background: #fff;
  border: 1px solid var(--nx-line);
  border-radius: 10px;
  padding: 14px 16px;
}
.nx-admin-stats span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nx-muted);
  margin-bottom: 6px;
}
.nx-admin-stats strong {
  font-size: 22px;
  color: var(--nx-teal);
}
.nx-table-toolbar {
  max-width: 360px;
  margin-bottom: 8px;
}
.nx-table-wrap { overflow-x: auto; }
.nx-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}
.nx-table th,
.nx-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--nx-line);
  font-size: 14px;
  vertical-align: top;
}
.nx-table th {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nx-muted);
  background: #fbfaf7;
}
.nx-table tbody tr:hover { background: #f7f4ee; }
.nx-table-name {
  background: none;
  border: 0;
  padding: 0;
  color: var(--nx-teal);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.nx-back {
  border: 1px solid var(--nx-line);
  background: #fff;
  color: var(--nx-teal);
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
  margin: 0 0 16px;
}
.nx-status {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  background: #efeae0;
  color: var(--nx-teal);
}
.nx-delete-btn {
  border: 1px solid #f0c4c0;
  background: #fff;
  color: #b42318;
  border-radius: 6px;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.nx-delete-btn:hover { background: #fff5f4; }
.nx-delete-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.nx-btn-danger { background: #b42318; }
.nx-btn-danger:hover { background: #912018; }
.nx-modal {
  position: fixed;
  inset: 0;
  background: rgba(6, 50, 50, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 80;
  padding: 24px;
}
.nx-modal[hidden] { display: none !important; }
.nx-modal-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}
.nx-modal-card h2 {
  margin: 0 0 10px;
  color: var(--nx-teal);
  font-family: Lato, "DM Sans", sans-serif;
  font-size: 22px;
}
.nx-modal-card p {
  margin: 0 0 8px;
  color: var(--nx-muted);
  line-height: 1.55;
  font-size: 15px;
}
.nx-modal-card .nx-back { margin: 0; }
#list-panel[hidden],
#detail-panel[hidden] {
  display: none !important;
}
.nx-dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}
.nx-dl div {
  border: 1px solid var(--nx-line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fbfaf7;
}
.nx-dl span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nx-muted);
  margin-bottom: 6px;
}
.nx-dl strong {
  color: var(--nx-teal);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.nx-notice {
  max-width: 640px;
  margin: 72px auto;
  padding: 0 24px 80px;
  text-align: center;
}
.nx-notice h1 {
  font-family: Lato, "DM Sans", sans-serif;
  color: var(--nx-teal);
  font-size: 32px;
  margin: 0 0 16px;
}
.nx-notice p {
  color: var(--nx-muted);
  font-size: 18px;
  line-height: 1.6;
  margin: 0 0 28px;
}
.nx-notice .nx-btn {
  display: inline-block;
  width: auto;
  min-width: 180px;
  margin-top: 0;
  text-decoration: none;
}

.nx-blog-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  max-width: none;
}
.nx-blog-toolbar h1 {
  margin: 0;
  font-family: Lato, "DM Sans", sans-serif;
  font-size: 26px;
  color: var(--nx-teal);
}
.nx-icon-btn {
  width: 42px;
  height: 42px;
  margin: 0;
  border: 1px solid var(--nx-line);
  border-radius: 8px;
  background: #fff;
  color: var(--nx-teal);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nx-icon-btn:hover { background: #f7f4ee; }
.nx-icon-btn.danger { color: #b42318; }
.nx-icon-plus {
  background: var(--nx-teal);
  color: #fff;
  border-color: var(--nx-teal);
  font-size: 26px;
}
.nx-icon-plus:hover { background: #0a4545; color: #fff; }
.nx-blog-form {
  border: 1px solid var(--nx-line);
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 20px;
  background: #fbfaf7;
}
.nx-blog-form label {
  display: block;
  margin: 12px 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--nx-muted);
}
.nx-blog-form label:first-of-type { margin-top: 0; }
.nx-blog-form textarea {
  width: 100%;
  border: 1px solid var(--nx-line);
  border-radius: 6px;
  padding: 12px 14px;
  font: inherit;
  background: #fff;
  resize: vertical;
}
.nx-blog-form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
}
.nx-blog-form-actions .nx-btn { margin-top: 0; }
.nx-table-blog { min-width: 0; }
.nx-blog-row-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

@media (max-width: 900px) {
  .nx-contact,
  .nx-header { padding-left: 20px; padding-right: 20px; }
  .nx-auth { grid-template-columns: 1fr; }
  .nx-visual { padding: 40px 24px 32px; min-height: auto; }
  .nx-visual h1 { font-size: 32px; }
  .nx-profile { grid-template-columns: 1fr; }
  .nx-form-grid { grid-template-columns: 1fr; }
  .nx-span-2 { grid-column: 1; }
  .nx-dl { grid-template-columns: 1fr; }
}
