.account-page {
  background: #0f172a;
  min-height: 100vh;
}

.account-page .header {
  position: sticky;
  z-index: 200;
}

.nav-active {
  color: #fff !important;
  font-weight: 700;
}

.account-main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.75rem 5vw 3rem;
}

.account-lead {
  color: #cbd5e1;
  line-height: 1.65;
  font-size: 0.95rem;
}

.account-lead strong {
  color: #f8fafc;
}

/* ——— Auth layout ——— */
.auth-layout {
  display: grid;
  grid-template-columns: 1fr min(440px, 100%);
  gap: 2.5rem;
  align-items: start;
}

.auth-aside h1 {
  font-size: clamp(1.65rem, 4vw, 2.15rem);
  margin-bottom: 0.75rem;
}

.auth-benefits {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.auth-benefits li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.92rem;
  color: #e2e8f0;
}

.auth-benefit-icon {
  flex-shrink: 0;
  width: 1.75rem;
  text-align: center;
}

.auth-card {
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 22px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.auth-card-head {
  margin-bottom: 1.25rem;
}

.auth-card-head h2 {
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.auth-card-head p {
  font-size: 0.88rem;
  color: #94a3b8;
  margin: 0;
}

.auth-stepper {
  display: flex;
  gap: 0.35rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}

.auth-stepper--two .auth-step {
  flex: 1;
}

.auth-step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(148, 163, 184, 0.2);
}

.auth-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.2);
  font-size: 0.7rem;
  flex-shrink: 0;
}

.auth-step.active {
  color: #93c5fd;
  border-bottom-color: #3b82f6;
}

.auth-step.active span {
  background: #2563eb;
  color: #fff;
}

.auth-step.done {
  color: #86efac;
  border-bottom-color: rgba(134, 239, 172, 0.4);
}

.auth-step.done span {
  background: rgba(34, 197, 94, 0.25);
  color: #86efac;
}

.auth-step-hint {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 0.25rem;
}

.auth-step-hint strong {
  color: #e2e8f0;
  word-break: break-all;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.auth-form .field,
.dash-card .field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.auth-form .field span,
.dash-card .field span {
  font-size: 0.82rem;
  font-weight: 600;
  color: #cbd5e1;
}

.auth-form input,
.dash-card input {
  width: 100%;
  padding: 0.75rem 0.95rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.75);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-form input::placeholder {
  color: #64748b;
}

.auth-form input:focus,
.dash-card input:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.password-field {
  position: relative;
  display: block;
  width: 100%;
}

.password-field input {
  padding-right: 2.85rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.45rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.password-toggle:hover {
  color: #e2e8f0;
  background: rgba(148, 163, 184, 0.12);
}

.password-toggle:focus-visible {
  outline: none;
  color: #e2e8f0;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.45);
}

.password-toggle-icon {
  display: block;
}

.password-toggle-icon--hide {
  display: none;
}

.password-toggle.is-visible .password-toggle-icon--show {
  display: none;
}

.password-toggle.is-visible .password-toggle-icon--hide {
  display: block;
}

.auth-form-actions {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  margin-top: 0.25rem;
}

.auth-form-actions .btn-primary {
  flex: 1;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.auth-card-foot {
  margin-top: 1.25rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  text-align: center;
}

.auth-card-foot p {
  font-size: 0.88rem;
  color: #94a3b8;
  margin: 0.35rem 0;
}

.auth-link {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: 600;
  color: #93c5fd;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-link:hover {
  color: #bfdbfe;
}

.field-checkbox {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #94a3b8;
}

.field-checkbox input {
  width: auto;
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.field-checkbox a {
  color: #93c5fd;
}

.form-msg {
  font-size: 0.85rem;
  margin: 0;
}
.form-msg.ok { color: #86efac; }
.form-msg.err { color: #fca5a5; }

.btn-outline {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.45);
  color: #e2e8f0;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
}

.btn-outline.btn-sm {
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
}

/* ——— Dashboard ——— */
.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.dash-header h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 0.35rem;
}

.tier-badge {
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.85rem;
  background: rgba(37, 99, 235, 0.25);
  border: 1px solid rgba(147, 197, 253, 0.45);
  color: #fde047;
}

.tier-badge.pro_plus {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.35), rgba(37, 99, 235, 0.35));
}

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

.dash-card {
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 20px;
  padding: 1.5rem;
}

.dash-card--wide {
  grid-column: 1 / -1;
}

.dash-card h2 {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.dash-card-desc {
  font-size: 0.88rem;
  color: #94a3b8;
  margin-bottom: 1rem;
}

.dash-card .auth-form,
#profile-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.sub-meta {
  font-size: 0.9rem;
  color: #e2e8f0;
  margin-bottom: 0.75rem;
}

.sub-limits {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: #cbd5e1;
}

.sub-limits li {
  padding: 0.25rem 0;
}

.sub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.plan-picker {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.plan-tile {
  position: relative;
  padding: 1.15rem;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.28);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.plan-tile--plus {
  border-color: rgba(147, 197, 253, 0.45);
  background: linear-gradient(160deg, rgba(37, 99, 235, 0.18), rgba(15, 23, 42, 0.55));
}

.plan-tile-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.2);
  color: #fde047;
}

.plan-tile-head h3 {
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.plan-tile-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: #f8fafc;
}

.plan-tile-price small {
  font-size: 0.75rem;
  font-weight: 500;
  color: #94a3b8;
}

.plan-tile-features {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
  font-size: 0.82rem;
  color: #cbd5e1;
}

.plan-tile-features li {
  padding: 0.2rem 0 0.2rem 1rem;
  position: relative;
}

.plan-tile-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #86efac;
  font-weight: 700;
}

.plan-tile.is-current {
  border-color: rgba(134, 239, 172, 0.5);
}

.plan-tile.is-current .btn {
  opacity: 0.55;
  pointer-events: none;
}

.plan-tile .btn-block {
  width: 100%;
  justify-content: center;
  margin-top: auto;
}

.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.cap-item {
  padding: 1rem;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.cap-icon {
  font-size: 1.35rem;
  display: block;
  margin-bottom: 0.45rem;
}

.cap-item h3 {
  font-size: 0.92rem;
  margin-bottom: 0.3rem;
}

.cap-item p {
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.45;
}

.apps-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: #e2e8f0;
}

.apps-list li {
  margin-bottom: 0.4rem;
}

.legal-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.legal-links-list a {
  display: block;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.08);
  color: #93c5fd;
  text-decoration: none;
  font-size: 0.9rem;
}

.legal-links-list a:hover {
  background: rgba(148, 163, 184, 0.14);
}

.sub-legal-note {
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.45;
}

.sub-legal-note a {
  color: #93c5fd;
}

.footer--compact {
  padding: 1.5rem 5vw;
}

.footer--compact .footer-inner {
  justify-content: center;
  text-align: center;
}

.btn-ghost.btn-sm {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #e2e8f0;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

@media (max-width: 800px) {
  .auth-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .auth-aside {
    text-align: center;
  }

  .auth-benefits {
    align-items: center;
  }

  .auth-card {
    padding: 1.35rem 1.15rem;
  }

  .auth-step {
    font-size: 0;
  }

  .auth-step span {
    font-size: 0.7rem;
  }

  .dash-grid { grid-template-columns: 1fr; }
  .capabilities-grid { grid-template-columns: 1fr; }
  .plan-picker { grid-template-columns: 1fr; }
}

/* Dashboard tabs + notifications + entities */
.dash-header-actions { display: flex; align-items: center; gap: 0.75rem; }
.dash-notif-btn {
  position: relative; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35); background: rgba(30, 41, 59, 0.85);
  color: #e2e8f0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.dash-notif-btn:hover { border-color: rgba(96, 165, 250, 0.55); color: #fff; }
.dash-notif-badge {
  position: absolute; top: -4px; right: -4px; min-width: 1.15rem; height: 1.15rem; padding: 0 0.28rem;
  border-radius: 999px; background: #2563eb; color: #fff; font-size: 0.68rem; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.dash-notif-panel {
  margin: -0.5rem 0 1.25rem; padding: 1rem 1.1rem; border-radius: 16px;
  background: rgba(30, 41, 59, 0.92); border: 1px solid rgba(96, 165, 250, 0.35);
}
.dash-notif-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.dash-notif-panel-head h2 { margin: 0; font-size: 1.05rem; }
.dash-notif-empty { color: #94a3b8; font-size: 0.9rem; margin: 0; }
.dash-notif-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.55rem; max-height: 320px; overflow: auto; }
.dash-notif-item { padding: 0.75rem 0.85rem; border-radius: 12px; background: rgba(15, 23, 42, 0.55); border: 1px solid rgba(148, 163, 184, 0.2); }
.dash-notif-item.is-read { opacity: 0.62; }
.dash-notif-item-top { display: flex; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.25rem; }
.dash-notif-item-top time { color: #64748b; font-size: 0.75rem; white-space: nowrap; }
.dash-notif-item p { margin: 0 0 0.4rem; color: #cbd5e1; font-size: 0.88rem; }
.dash-notif-item a { color: #93c5fd; font-size: 0.85rem; font-weight: 600; }

.dash-tabs {
  display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.25rem;
  padding: 0.35rem; border-radius: 14px; background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.22);
}
.dash-tab {
  border: 0; background: transparent; color: #94a3b8; font: inherit; font-weight: 700; font-size: 0.88rem;
  padding: 0.55rem 0.9rem; border-radius: 10px; cursor: pointer;
}
.dash-tab:hover { color: #e2e8f0; background: rgba(148, 163, 184, 0.1); }
.dash-tab.active { color: #fff; background: rgba(37, 99, 235, 0.35); box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.35); }
.dash-tab-panel { animation: dashFade 0.2s ease; }
@keyframes dashFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.profile-form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem 1rem;
}
.profile-form-grid .field--span2 { grid-column: 1 / -1; }
.profile-form-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; align-items: center; }
.dash-section-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: 0.25rem; flex-wrap: wrap; }
.dash-section-head .dash-card-desc { margin-bottom: 0; }
.field-inline { display: flex; flex-wrap: wrap; gap: 0.65rem; align-items: center; margin: 0.75rem 0 1rem; }
.field-inline > span { color: #94a3b8; font-size: 0.85rem; font-weight: 600; }
.entity-select, .entity-form select, .dash-card select {
  width: 100%; min-width: 220px; padding: 0.7rem 0.85rem; border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.3); background: rgba(15, 23, 42, 0.65); color: #f8fafc; font: inherit;
}
.entity-list { display: flex; flex-direction: column; gap: 0.65rem; margin-top: 0.75rem; }
.entity-empty { color: #94a3b8; font-size: 0.9rem; margin: 0.5rem 0; }
.entity-card {
  display: flex; justify-content: space-between; gap: 1rem; align-items: center; flex-wrap: wrap;
  padding: 0.9rem 1rem; border-radius: 14px; background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.22);
}
.entity-card h3 { margin: 0 0 0.25rem; font-size: 1rem; }
.entity-card p { margin: 0; color: #94a3b8; font-size: 0.85rem; }
.entity-card-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.entity-form {
  margin-top: 1.1rem; padding: 1rem 1.1rem; border-radius: 14px;
  background: rgba(15, 23, 42, 0.55); border: 1px solid rgba(96, 165, 250, 0.28);
}
.entity-form h3 { margin: 0 0 0.85rem; font-size: 1rem; }
.entity-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem 1rem; }
.entity-form-actions { display: flex; gap: 0.65rem; margin-top: 1rem; flex-wrap: wrap; }
.btn-danger-text { color: #fca5a5 !important; }

@media (max-width: 720px) {
  .profile-form-grid, .entity-form-grid { grid-template-columns: 1fr; }
  .dash-tabs { gap: 0.25rem; }
  .dash-tab { flex: 1 1 calc(50% - 0.25rem); text-align: center; font-size: 0.8rem; padding: 0.5rem 0.45rem; }
}
