.settings-hero {
    background-color: #0F172A; /* rich navy blue */
    color: #F3F4F6; /* rich navy blue for contrast */
    padding: 10rem 2rem 4rem;
    position: relative;
    overflow: hidden;
}

.settings-hero-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
}

.settings-hero h1 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1rem;
    color: #F3F4F6;
}

.settings-hero p {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    color: #F3F4F6;
}

/* Remove stray About Us styles and duplicate blocks */

/* ===== Grid Layout ===== */
.settings-grid { max-width: 1200px; margin: 2rem auto; padding: 0 1rem; display: grid; grid-template-columns: 320px 1fr; gap: 1.25rem; align-items: start; }
@media (max-width: 900px){ .settings-grid { grid-template-columns: 1fr; } }

/* Two-column form rows that collapse on mobile */
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px){ .form-row-2 { grid-template-columns: 1fr; } }

/* Left: Category Cards */
.settings-nav { display: grid; grid-template-columns: 1fr; gap: 1rem; align-content: start; }
.nav-group-label { margin: .5rem 0 .25rem; font-size: .9rem; font-weight: 900; text-transform: uppercase; letter-spacing: .4px; color: #64748b; }
.nav-card { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: .75rem; row-gap: 2px; align-items: center; padding: 1rem; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; box-shadow: 0 6px 16px rgba(10,34,80,0.06); cursor: pointer; text-align: left; }
.nav-card .nav-icon { grid-row: 1 / span 2; width: 40px; height: 40px; display: grid; place-items: center; background: #f0f6ff; border-radius: 10px; }
.nav-card .nav-title { font-weight: 800; color: #0f172a; }
.nav-card .nav-sub { color: #6b7280; font-size: .9rem; }
.nav-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(10,34,80,0.12); }
.nav-card.active { outline: 2px solid #006da0; outline-offset: 2px; }

/* Right: Panels */
.settings-panels { display: grid; gap: 1rem; grid-column: 2; grid-row: 1; }
.panel { display: none; }
.panel.active { display: block; }

/* Support card under nav */
.support-card { margin: 1.5rem auto; padding: 1rem; background: #ffffff; border: 1px solid #e5e7eb; border-radius: 12px; box-shadow: 0 6px 16px rgba(10,34,80,0.06); display: grid; gap: .5rem; max-width: 1200px; text-align: center; }
.support-text { margin: 0; color: #475569; }

/* Toggle switches for Notifications */
.notify-form { display: grid; gap: .75rem; }
.notify-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .75rem; padding: .5rem 0; border-bottom: 1px solid #eef2ff; }
.notify-row:last-child { border-bottom: 0; }
.notify-text { display: grid; gap: 2px; }
.notify-label { font-weight: 800; color: #0f172a; }
.notify-help { margin: 0; font-size: .9rem; color: #6b7280; }
.notify-actions { display: flex; justify-content: flex-end; margin-top: .5rem; }

.toggle { position: relative; width: 46px; height: 26px; display: inline-block; }
.toggle input { display: none; }
.toggle .slider { position: absolute; inset: 0; background: #e5e7eb; border-radius: 999px; transition: background .2s ease; }
.toggle .slider::before { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s ease; }
.toggle input:checked + .slider { background: #006da0; }
.toggle input:checked + .slider::before { transform: translateX(20px); }

/* Outline button variant */
.btn-outline { background: #fff; color: #1f2937; border: 1px solid #e5e7eb; }
.btn-outline:hover { background: #f9fafb; }

.settings-container form {
  margin-bottom: 2rem;
  padding: 1rem;
  border: 1px solid #eee;
  border-radius: 8px;
  background: #fff;
}

.settings-container h3 {
  margin-top: 0;
}

.form-group {
  display: flex;
  flex-direction: column;       /* stack label above input */
  align-items: flex-start;      /* align items to the left */
  margin-bottom: 1.5rem;
}


label {
  display: block;
  text-align: left;
  margin-bottom: 0.4rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: #1f2937;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  display: block;
  width: 100%;
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: #f9fafb;
  box-sizing: border-box;
  transition: border-color 0.2s ease-in-out;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
  border-color: #6495ed; /* ReRoute blue */
  outline: none;
  box-shadow: 0 0 0 3px rgba(100, 149, 237, 0.2);
}

/* Smaller input variant used in settings */
.input-small { padding: 0.5rem 0.7rem; font-size: 0.95rem; border-radius: 8px; }

/* Tighten panel padding on small screens for better fit */
@media (max-width: 640px){
  .settings-section { padding: 1.25rem 0.75rem; }
  .nav-card { grid-template-columns: 32px 1fr; padding: 0.75rem; }
}

/* Billing (key/value rows) and Notifications panel mobile spacing */
@media (max-width: 640px){
  .kv__row { grid-template-columns: 1fr !important; gap: 4px; }
  .settings-card { padding: 16px; }
  .notify-row { grid-template-columns: 1fr; align-items: start; }
}

/* Optional: better focus style */
input:focus {
  border-color: #4687f2;
  outline: none;
}

button.danger {
  background: #d9534f;
  color: white;
}

.settings-box.danger-zone {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 2rem 1rem;
  margin: 2rem auto;
  max-width: 100%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
  gap: 1rem;
}

.settings-box.danger-zone form {
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
}

.settings-box.danger-zone form {
  margin: 0;
}

.settings-box.danger-zone h3 {
  margin-bottom: 0.25rem;
}

.settings-box.danger-zone p {
  margin-bottom: 0.5rem;
}

.settings-box h3 {
  margin-bottom: 0.25rem;
  font-size: 1.25rem;
}

.settings-box p {
  color: #666;
  margin-bottom: 1.5rem;
}

.settings-section {
  text-align: left ;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 2rem 1rem;
  margin: 2rem auto;
  max-width: 100%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

/* Flattened wrapper for sections that already contain their own cards */
.settings-section--flat {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 1.25rem auto;
}

.button-row {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.btn {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
}

.btn-primary {
  margin-top: 1rem;
  background: #007bff;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  border-radius: 6px;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: #2d2c72;
}

.btn-secondary {
  background-color: #17a2b8;
  color: white;

}

.btn-danger {
  background-color: #dc3545;
  color: white;
}

.btn-danger:hover {
  background-color: #330005;
}

/* Pill option for buttons */
.btn-pill { border-radius: 999px; padding-left: 1rem; padding-right: 1rem; }

/* Hover polish for cards */
.settings-card:hover { box-shadow: 0 14px 32px rgba(10,34,80,0.12); }

/* ==========================
   Settings Card (Subscription)
   ========================== */
.settings-card {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji';
  background: #ffffff;
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.settings-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.settings-card__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
}

.settings-card__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.settings-card__actions--footer {
  margin-top: 1rem;
  justify-content: flex-end;
}

/* Key/Value rows */
.kv__row {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: center;
  gap: 0.75rem;
  padding: 6px 0;
}

.kv__label {
  color: #6b7280; /* muted */
  font-size: 0.9rem;
}

.kv__value {
  color: #111827;
  font-size: 1rem;
}

/* Lightweight toast */
.toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 24px;
  background: #111827;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.18);
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 2000;
}
.toast-success { background: #059669; }
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

.plan-name {
  font-size: 1.1rem;
  font-weight: 700;
}

/* Status pills */
.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1;
}
.pill--ok { background: #16a34a; color: #fff; }
.pill--warn { background: #dc2626; color: #fff; }
.pill--info { background: #2563eb; color: #fff; }

/* Buttons in card */
.settings-card .btn-primary {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 8px;
  transition: background 0.15s ease;
}
.settings-card .btn-primary:hover { background: #1e40af; }

.settings-card .btn-danger {
  background: #dc2626;
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 8px;
  transition: background 0.15s ease;
}
.settings-card .btn-danger:hover { background: #b91c1c; }

.settings-card .btn-primary[aria-disabled="true"],
.settings-card .btn-primary[data-disabled="true"] {
  opacity: 0.6;
  pointer-events: none;
}

/* Responsive */
@media (max-width: 640px) {
  .settings-card__head { flex-direction: column; align-items: stretch; }
  .settings-card__actions { display: grid; grid-template-columns: 1fr; }
  .settings-card__actions .btn, .settings-card__actions form { width: 100%; }
  .settings-card__actions a.btn, .settings-card__actions button.btn { width: 100%; }
  .kv__row { grid-template-columns: 1fr; align-items: start; }
}
