:root {
  --bg: #07110c;
  --bg-soft: #0b1510;
  --panel: rgba(15, 24, 19, 0.88);
  --panel-strong: rgba(18, 30, 23, 0.96);
  --panel-muted: rgba(255, 255, 255, 0.03);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(1, 162, 0, 0.22);
  --text: #f4f8f5;
  --text-soft: #c3d1c8;
  --text-muted: #8ea195;
  --heading: #ffffff;
  --brand: #01a200;
  --brand-hover: #00c53a;
  --brand-deep: #007f24;
  --warning: #ffd27f;
  --danger: #e85d75;
  --success: #53d67a;
  --shadow-xl: 0 30px 80px rgba(0, 0, 0, 0.42);
  --shadow-lg: 0 18px 46px rgba(0, 0, 0, 0.34);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.22);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --max-width: 1240px;
  --blur: blur(18px);
  --transition: 220ms ease;
}

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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(1, 162, 0, 0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(0, 197, 58, 0.08), transparent 24%),
    linear-gradient(180deg, #08110d 0%, #09130f 18%, #07110c 100%);
  color: var(--text);
  line-height: 1.65;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.02)),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 79px,
      rgba(255, 255, 255, 0.015) 80px
    );
  opacity: 0.28;
  z-index: 0;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--text);
  transition:
    color var(--transition),
    opacity var(--transition),
    transform var(--transition),
    border-color var(--transition),
    background-color var(--transition),
    box-shadow var(--transition);
}

a:hover {
  color: #ffffff;
}

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

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(1, 162, 0, 0.7);
  outline-offset: 2px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  outline: none;
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    background-color var(--transition),
    transform var(--transition);
}

input::placeholder,
textarea::placeholder {
  color: #92a59a;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(1, 162, 0, 0.45);
  box-shadow: 0 0 0 4px rgba(1, 162, 0, 0.12);
  background: rgba(255, 255, 255, 0.07);
}

textarea {
  resize: vertical;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03));
}

select option,
select optgroup {
  background-color: #0f1713;
  color: #ffffff;
}

select option:checked {
  background-color: #01a200;
  color: #ffffff;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.container {
  position: relative;
  z-index: 1;
  width: min(var(--max-width), calc(100% - 2.5rem));
  margin: 0 auto;
}

.button-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 17, 12, 0.78);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-container {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  flex-shrink: 0;
}

.logo a {
  display: inline-flex;
  align-items: center;
}

.logo img {
  vertical-align: middle;
  filter: drop-shadow(0 6px 20px rgba(1, 162, 0, 0.22));
}

.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.nav a {
  position: relative;
  margin-left: 0;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  color: #e9f3ec;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.96rem;
  letter-spacing: 0.01em;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0.55rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--brand-hover));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--transition);
}

.nav a:hover::after,
.nav a.active::after,
.nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav a.active,
.nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 6.5rem 2rem 4.75rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 10%, rgba(1, 162, 0, 0.14), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 70%);
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.6rem, 5vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 800;
  color: var(--heading);
  text-shadow: 0 12px 35px rgba(0, 0, 0, 0.32);
}

.hero p {
  max-width: 840px;
  margin: 0 auto 2rem;
  font-size: clamp(1.06rem, 2vw, 1.28rem);
  color: var(--text-soft);
}

.hero strong {
  color: #ffffff;
}

/* Buttons / Links */
.cta-button,
.cta-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 52px;
  padding: 0.9rem 1.5rem;
  border: 1px solid rgba(1, 162, 0, 0.26);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(20, 204, 50, 0.95), rgba(1, 162, 0, 0.95));
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.01em;
  box-shadow:
    0 10px 28px rgba(1, 162, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    background var(--transition),
    filter var(--transition),
    opacity var(--transition);
}

.cta-button:hover,
.cta-link:hover {
  text-decoration: none;
  color: #ffffff;
  transform: translateY(-2px);
  background:
    linear-gradient(180deg, rgba(33, 224, 67, 0.98), rgba(0, 181, 36, 0.98));
  box-shadow:
    0 16px 34px rgba(1, 162, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.cta-button:active,
.cta-link:active {
  transform: translateY(0);
}

.hero .cta-button {
  margin: 0 auto;
}

.cta-button[disabled],
.cta-link[aria-disabled="true"] {
  opacity: 0.6;
  pointer-events: none;
}

.cta-button-secondary,
.cta-link.cta-button-secondary {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.cta-button-secondary:hover,
.cta-link.cta-button-secondary:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.06));
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

/* Shared premium panel styles */
.features,
.dashboard-section,
.legal-content.columns,
.legal-content.single-column,
.faq,
.comparison,
.legal-intro {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
    var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}

.features::before,
.dashboard-section::before,
.legal-content.columns::before,
.legal-content.single-column::before,
.faq::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.05),
    transparent 35%,
    transparent 65%,
    rgba(1, 162, 0, 0.05)
  );
}

.features > *,
.dashboard-section > *,
.legal-content.columns > *,
.legal-content.single-column > *,
.faq > * {
  position: relative;
  z-index: 1;
}

/* Features */
.features {
  text-align: center;
  padding: 3rem 2rem;
  overflow: hidden;
}

.features h2,
.dashboard-section h2,
.faq h2,
.legal-intro h1,
.comparison h2 {
  margin-top: 0;
  margin-bottom: 1.15rem;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.features h3,
.faq h3,
.legal-content.single-column h2,
.legal-column h2,
.zone-card h3 {
  color: #ffffff;
  font-size: 1.32rem;
  line-height: 1.25;
  margin-top: 0;
  margin-bottom: 1rem;
}

.features p,
.faq p,
.legal-intro p,
.legal-content.single-column p,
.legal-column p,
.dashboard-section p {
  color: var(--text-soft);
}

.features ul,
.legal-column ul,
.legal-content.single-column ul {
  padding: 0;
  margin: 2rem 0 0;
  list-style: none;
}

.features ul li,
.legal-column ul li,
.legal-content.single-column ul li {
  position: relative;
  margin: 0;
  padding: 1rem 0 1rem 1.75rem;
  color: var(--text-soft);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.features ul li::before,
.legal-column ul li::before,
.legal-content.single-column ul li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 1.45rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--brand-hover), var(--brand));
  box-shadow: 0 0 18px rgba(1, 162, 0, 0.5);
}

.features ul li:last-child,
.legal-column ul li:last-child,
.legal-content.single-column ul li:last-child {
  border-bottom: none;
}

.features form {
  text-align: left;
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  padding: 3rem 1rem 3.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

.footer-brand {
  max-width: 520px;
}

.footer-title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

.footer-tagline {
  margin: 0;
  color: var(--text-soft);
}

.footer-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1rem;
}

.footer-nav a {
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 600;
}

.footer-nav a:hover {
  text-decoration: none;
  color: #ffffff;
}

.footer-bottom {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

/* Legal pages */
.legal-content.columns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  padding: 2.25rem;
}

.legal-column {
  flex: 1 1 380px;
  max-width: 520px;
}

.legal-content.single-column {
  max-width: 860px;
  margin: 0 auto;
  padding: 2.5rem;
}

.legal-content.single-column h1,
.legal-content.single-column h2,
.legal-content.single-column p,
.legal-content.single-column ul,
.legal-content.single-column li {
  display: block;
  width: 100%;
  text-align: left;
}

.legal-content.single-column h1 {
  font-size: clamp(2rem, 3.2vw, 2.8rem);
  text-align: center;
  color: #ffffff;
  margin-bottom: 2rem;
}

.legal-intro {
  padding: 2rem;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  text-align: center;
}

/* Dashboard */
.dashboard-section {
  margin-top: 2rem;
  padding: 1.6rem;
}

.dashboard-subnav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.dashboard-subnav .cta-link,
.dashboard-subnav .cta-button {
  min-height: 48px;
}

.dashboard-section h2 {
  color: #ffffff;
}

/* Status messages */
.status-message,
#account-status-message,
#activity-status-message,
#password-status-message,
#billing-status-message,
#sessions-status-message,
#api-keys-status-message,
#register-message,
#login-message,
#forgot-password-message,
#reset-password-message,
#resend-verification-message,
#verify-email-message {
  padding: 0.95rem 1rem;
  border-radius: 14px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.status-message.success {
  color: var(--success);
  border-color: rgba(83, 214, 122, 0.28);
  background: rgba(83, 214, 122, 0.08);
}

.status-message.error {
  color: #ffb3b3;
  border-color: rgba(232, 93, 117, 0.28);
  background: rgba(232, 93, 117, 0.08);
}

.status-message.warning {
  color: var(--warning);
  border-color: rgba(255, 210, 127, 0.26);
  background: rgba(255, 210, 127, 0.08);
}

/* Comparison table */
.comparison {
  padding: 2rem;
  overflow-x: auto;
}

.comparison table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.015)),
    rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.comparison th,
.comparison td {
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
}

.comparison th {
  background:
    linear-gradient(180deg, rgba(20, 204, 50, 0.95), rgba(1, 162, 0, 0.95));
  color: #ffffff;
  font-weight: 700;
}

.comparison tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.015);
}

/* FAQ */
.faq {
  padding: 2rem;
  color: var(--text-soft);
}

.faq-item {
  margin-bottom: 1rem;
}

.faq-btn {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  color: #ffffff;
  padding: 1rem 1.1rem;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  font-size: 1.03rem;
  font-weight: 600;
  transition:
    background-color var(--transition),
    border-color var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
}

.faq-btn:hover {
  background: rgba(1, 162, 0, 0.12);
  border-color: rgba(1, 162, 0, 0.22);
  transform: translateY(-1px);
}

.faq-content {
  display: none;
  padding: 1rem 1.15rem;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 3px solid var(--brand);
  margin-top: 0.7rem;
  border-radius: 16px;
}

.faq-content ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 1rem 0 0;
}

.faq-content li {
  color: var(--text-soft);
  margin-bottom: 0.5rem;
}

.faq-item.active .faq-content {
  display: block;
}

.faq-item.active .faq-btn {
  background: rgba(1, 162, 0, 0.16);
  border-color: rgba(1, 162, 0, 0.26);
  color: #fff;
}

/* Utility spacing */
.comparison,
.faq {
  max-width: 1100px;
  margin: 0 auto;
}

.features,
.dashboard-section,
.legal-content.columns,
.legal-content.single-column,
.faq,
.comparison {
  margin-bottom: 2rem;
}

/* Lists and form styling */
.zone-list,
#records-list,
#sessions-list,
#api-keys-list,
.stack-list,
.activity-list,
.billing-invoices-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.zone-entry {
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    border-color var(--transition),
    background-color var(--transition);
}

.zone-entry:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

form label {
  color: #f4f8f5;
  font-weight: 600;
  letter-spacing: 0.01em;
}

form p {
  margin-top: 0;
}

/* Verification banner */
#verification-banner {
  display: inline-block;
  padding: 0.9rem 1.1rem;
  border-radius: 999px;
  background: rgba(255, 210, 127, 0.09);
  border: 1px solid rgba(255, 210, 127, 0.18);
  color: var(--warning);
  font-weight: 600;
}

#verification-banner a {
  color: var(--brand-hover);
  font-weight: 700;
  text-decoration: none;
}

#verification-banner a:hover {
  text-decoration: underline;
}

/* Dashboard workspace */
.dashboard-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.zone-header-card,
.zone-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.015)),
    rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 20px;
  padding: 1.25rem;
  box-shadow: var(--shadow-md);
}

.zone-header-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.zone-header-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.zone-header-actions .cta-button {
  width: auto;
  min-height: 48px;
}

.zone-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.key-value-list {
  display: grid;
  gap: 0.7rem;
  color: var(--text-soft);
}

.key-value-list strong {
  color: #ffffff;
}

.stack-list li {
  padding: 0.8rem 0.9rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 0.7rem;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.agent-status-list {
  display: grid;
  gap: 0.75rem;
}

.agent-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.agent-status-row strong {
  color: #ffffff;
  overflow-wrap: anywhere;
}

.agent-status-detail {
  margin-top: -0.35rem;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-soft);
  font-size: 0.94rem;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: capitalize;
}

.pill-success {
  background: rgba(83, 214, 122, 0.12);
  border-color: rgba(83, 214, 122, 0.24);
  color: var(--success);
}

.pill-warning {
  background: rgba(255, 210, 127, 0.12);
  border-color: rgba(255, 210, 127, 0.24);
  color: var(--warning);
}

.pill-danger {
  background: rgba(232, 93, 117, 0.12);
  border-color: rgba(232, 93, 117, 0.24);
  color: #ffb3b3;
}

/* Billing */
.billing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.billing-summary-card {
  min-height: 100%;
}

.billing-note-box,
.billing-actions-note {
  margin-top: 1rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  background: rgba(1, 162, 0, 0.07);
  border: 1px solid rgba(1, 162, 0, 0.14);
  color: var(--text-soft);
}

.billing-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.billing-actions-grid .cta-button {
  width: 100%;
  min-height: 52px;
}

.billing-invoices-list {
  display: grid;
  gap: 0.85rem;
}

.billing-invoice-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.05rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  flex-wrap: wrap;
}

.billing-invoice-main {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
  flex: 1 1 420px;
}

.billing-invoice-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.billing-invoice-top strong {
  color: #ffffff;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.billing-invoice-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
  color: var(--text-soft);
  font-size: 0.95rem;
  word-break: break-word;
}

.billing-invoice-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.billing-invoice-actions .cta-button {
  width: auto;
  min-width: 150px;
}

/* DNSSEC / code panels */
.dnssec-card {
  border-color: rgba(1, 162, 0, 0.14);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.dnssec-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.dnssec-subtext {
  margin: 0.4rem 0 0;
  color: var(--text-soft);
  max-width: 760px;
}

.dnssec-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.dnssec-actions .cta-button {
  width: auto;
  min-height: 48px;
}

.dnssec-layout {
  display: grid;
  grid-template-columns: 1.05fr 1.2fr;
  gap: 1rem;
}

.dnssec-panel {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  padding: 1rem;
}

.dnssec-panel h4 {
  margin: 0 0 0.9rem;
  font-size: 1rem;
  color: #ffffff;
}

.dnssec-note-box {
  margin-top: 1rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  background: rgba(1, 162, 0, 0.07);
  border: 1px solid rgba(1, 162, 0, 0.14);
  color: var(--text-soft);
}

.dnssec-empty-state {
  padding: 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-soft);
}

.dnssec-empty-state p {
  margin: 0;
}

.dnssec-ds-grid {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.dnssec-ds-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.dnssec-ds-row span {
  color: var(--text-soft);
}

.dnssec-ds-row strong {
  color: #ffffff;
  word-break: break-word;
  text-align: right;
  overflow-wrap: anywhere;
}

.dnssec-digest-box {
  position: relative;
  padding: 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.dnssec-digest-label {
  margin-bottom: 0.6rem;
  color: var(--text-soft);
  font-weight: 600;
}

.dnssec-digest-box code {
  display: block;
  white-space: normal;
  word-break: break-all;
  overflow-wrap: anywhere;
  overflow-x: auto;
  color: #ffffff;
  font-size: 0.96rem;
  line-height: 1.6;
}

.dnssec-copy-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.dnssec-copy-actions .cta-button {
  width: auto;
}

.dnssec-registrar-note {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: rgba(255, 210, 127, 0.08);
  border: 1px solid rgba(255, 210, 127, 0.14);
  color: var(--warning);
}

/* Records area */
.records-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.records-toolbar-controls {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  max-width: 100%;
}

.records-toolbar-controls input,
.records-toolbar-controls select {
  min-width: 180px;
}

.record-form-grid,
.record-form-grid-wide,
.record-edit-grid {
  display: grid;
  gap: 0.85rem;
}

.record-form-grid {
  grid-template-columns: 1fr 180px 1.3fr;
}

.record-form-grid-wide,
.record-edit-grid {
  grid-template-columns:
    minmax(160px, 1fr)
    minmax(120px, 160px)
    minmax(220px, 1.25fr)
    minmax(110px, 140px)
    minmax(140px, 180px);
}

.record-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.05rem;
  margin-bottom: 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  flex-wrap: wrap;
}

.record-item-info {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  flex: 1 1 420px;
}

.record-item-heading {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.record-item-heading strong {
  color: #ffffff;
  overflow-wrap: anywhere;
}

.record-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  color: var(--text-soft);
  font-size: 0.95rem;
  word-break: break-word;
}

.record-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.record-actions .cta-button {
  width: auto;
  min-width: 110px;
}

.record-edit-form {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.record-edit-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.record-edit-actions .cta-button {
  width: auto;
  min-width: 110px;
}

/* API keys */
#api-key-secret-panel {
  border: 1px solid rgba(1, 162, 0, 0.28);
  box-shadow:
    0 16px 34px rgba(1, 162, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

#api-key-secret-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.96rem;
  line-height: 1.65;
  letter-spacing: 0.01em;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(1, 162, 0, 0.22);
  border-radius: 16px;
  padding: 1rem;
  word-break: break-all;
  overflow-wrap: anywhere;
}

.api-key-edit-form {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.api-key-edit-form .record-form-grid-wide {
  grid-template-columns: minmax(220px, 1.2fr) minmax(220px, 1fr);
}

.api-key-edit-form .cta-button {
  width: auto;
  min-width: 120px;
}

#api-keys-list .zone-card {
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    border-color var(--transition),
    background-color var(--transition);
}

#api-keys-list .zone-card:hover {
  transform: translateY(-2px);
  border-color: rgba(1, 162, 0, 0.18);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
}

#api-keys-empty-message {
  padding: 1rem 0 0.25rem;
}

#dashboard-view-api-keys .record-actions {
  justify-content: flex-start;
}

#dashboard-view-api-keys .record-item-meta span {
  padding: 0.2rem 0;
}

#dashboard-view-api-keys .record-item-heading strong {
  font-size: 1.05rem;
}

/* API page */
#api-quick-nav {
  margin-top: 0;
}

#api-search-status {
  color: var(--text-soft);
}

#api-endpoint-search {
  min-width: min(420px, 100%);
}

#api-quick-nav .dashboard-subnav .cta-link {
  width: auto;
}

#api-quick-nav .records-toolbar-controls {
  width: 100%;
}

#api-quick-nav .records-toolbar-controls input {
  max-width: 520px;
}

/* Activity */
.activity-item {
  padding: 1rem 1.05rem;
  margin-bottom: 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
}

.activity-item:last-child {
  margin-bottom: 0;
}

.activity-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.45rem;
  flex-wrap: wrap;
}

.activity-top strong {
  color: #ffffff;
  overflow-wrap: anywhere;
}

.activity-top span {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.activity-description {
  color: var(--text-soft);
  overflow-wrap: anywhere;
}

#account-activity-list .activity-item {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.08);
}

#account-activity-list .activity-item:hover {
  border-color: rgba(1, 162, 0, 0.18);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

/* Diagnostics */
#setup-check-content,
#delegation-check-content,
#health-check-content,
#sync-status-content,
#propagation-content {
  min-height: 72px;
}

#propagation-content .stack-list,
#delegation-check-content .stack-list,
#sync-status-content .stack-list {
  margin-top: 0.65rem;
}

/* Responsive */
@media (max-width: 1100px) {
  .record-form-grid-wide,
  .record-edit-grid,
  .billing-actions-grid {
    grid-template-columns: 1fr 1fr;
  }

  .api-key-edit-form .record-form-grid-wide {
    grid-template-columns: 1fr;
  }

  .dnssec-layout,
  .billing-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .container {
    width: min(var(--max-width), calc(100% - 1.5rem));
  }

  .nav-container {
    min-height: auto;
    padding: 0.9rem 0;
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    width: 100%;
    gap: 0.45rem;
  }

  .nav a {
    padding: 0.72rem 0.9rem;
  }

  .hero {
    padding: 5rem 1rem 3.75rem;
  }

  .features,
  .dashboard-section,
  .legal-content.columns,
  .legal-content.single-column,
  .faq,
  .comparison,
  .legal-intro {
    border-radius: 20px;
  }

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

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

@media (max-width: 700px) {
  .records-toolbar-controls {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .records-toolbar-controls input,
  .records-toolbar-controls select,
  .records-toolbar-controls .cta-button {
    width: 100%;
    min-width: 0;
  }

  .record-form-grid-wide,
  .record-edit-grid,
  .billing-actions-grid {
    grid-template-columns: 1fr;
  }

  .record-actions,
  .billing-invoice-actions {
    width: 100%;
    justify-content: stretch;
  }

  .record-actions .cta-button,
  .billing-invoice-actions .cta-button {
    width: 100%;
  }

  .record-edit-actions .cta-button,
  .api-key-edit-form .cta-button {
    width: 100%;
  }

  .dnssec-actions {
    width: 100%;
    flex-direction: column;
  }

  .dnssec-actions .cta-button {
    width: 100%;
  }

  .dnssec-copy-actions .cta-button {
    width: 100%;
  }

  .dnssec-ds-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .dnssec-ds-row strong {
    text-align: left;
  }

  .billing-invoice-top,
  .billing-invoice-meta,
  .agent-status-row,
  .activity-top {
    align-items: flex-start;
    flex-direction: column;
  }

  #dashboard-view-api-keys .record-actions {
    width: 100%;
    justify-content: stretch;
  }

  #dashboard-view-api-keys .record-actions .cta-button {
    width: 100%;
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  body {
    line-height: 1.55;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .cta-button,
  .cta-link {
    width: 100%;
  }

  .button-row {
    flex-direction: column;
    align-items: stretch;
  }

  .footer-nav {
    flex-direction: column;
    gap: 0.6rem;
  }

  .features,
  .dashboard-section,
  .legal-content.single-column,
  .faq,
  .comparison,
  .legal-intro {
    padding: 1.2rem;
  }

  .comparison table {
    min-width: 640px;
  }

  .zone-header-actions {
    width: 100%;
  }

  .zone-header-actions .cta-button {
    width: 100%;
  }

  .record-item,
  .billing-invoice-item,
  .zone-header-card {
    align-items: flex-start;
  }

  .dashboard-subnav {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-subnav .cta-link,
  .dashboard-subnav .cta-button {
    width: 100%;
  }

  #api-quick-nav .dashboard-subnav .cta-link {
    width: 100%;
  }

  #logoutButton {
    margin-left: 0 !important;
  }
}