/* ========================================================================== */
/*  GLOBAL THEME + TOKENS                                                      */
/* ========================================================================== */
:root {
  --bg: #0a0a0a;
  --bg-light: #111111;
  --bg-muted: #161616;

  --text: #fbf2f2;
  --text-muted: #b8b8b8;
  --text-light: #fbf2f2;

  --primary: #ff7e29;
  --primary-light: #ff7e29;
  --primary-dark: #ff7e29;

  --danger: #cc0000;
  --danger-dark: #990000;

  --outline: rgba(255, 255, 255, 0.12);
  --card: #121212;

  --radius: 12px;
  --radius-lg: 16px;

  --font-main: 'Inter', system-ui, sans-serif;
}

/* ========================================================================== */
/*  RESET + BASE                                                               */
/* ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-muted {
  background: var(--bg-light);
}

/* ========================================================================== */
/*  HEADER                                                                     */
/* ========================================================================== */
.site-header {
  background: var(--bg-light);
  border-bottom: 1px solid var(--outline);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  height: 75px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-img {
  height: 104px;
  padding-top: 10px;
}

.nav-desktop {
  display: flex;
  gap: 1.4rem;
}

.nav-desktop a {
  color: var(--text-muted);
  font-weight: 500;
}

.nav-desktop a:hover {
  color: var(--primary-light);
  text-shadow: 0 0 10px #ff660040;
}

/* ========================================================================== */
/*  MOBILE NAV                                                                 */
/* ========================================================================== */
.nav-toggle {
  display: none;
  width: 34px;
  height: 22px;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
}

.nav-toggle span {
  position: absolute;
  width: 100%;
  height: 3px;
  background: var(--primary);
}

.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { bottom: 0; }
/* (your HTML has 3 spans — leaving it as-is is fine) */

.nav-mobile {
  display: none;
  flex-direction: column;
  background: var(--bg-light);
  padding: 1rem;
  border-bottom: 1px solid var(--outline);
}

.nav-mobile a {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--outline);
}

.nav-mobile.open {
  display: flex;
}

@media (max-width: 820px) {
  .nav-desktop { display: none; }
  .nav-toggle { display: block; }

  .logo-img {
    height: 68px;
    padding-top: 4px;
  }

  .header-inner {
    height: 68px;
  }
}

/* ========================================================================== */
/*  FOOTER                                                                     */
/* ========================================================================== */
.site-footer {
  padding: 3rem 0;
  background: var(--bg-light);
  border-top: 1px solid var(--outline);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-links a {
  color: var(--primary-light);
}

/* ------------------------------ */
/*   MOBILE FOOTER COMPACT MODE   */
/* ------------------------------ */
@media (max-width: 820px) {
  .site-footer {
    padding: 1.6rem 0;
  }

  .footer-inner {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }

  .footer-left .logo-img {
    height: 48px;
    padding-top: 0;
    margin: 0 auto;
  }

  .footer-links {
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 0.9rem;
  }

  .footer-meta {
    font-size: 0.85rem;
    opacity: 0.65;
  }
}

/* ========================================================================== */
/*  BUTTONS                                                                    */
/* ========================================================================== */
.btn {
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
}

.btn-primary {
  background: var(--primary);
  color: #000;
}

.btn-primary:hover {
  box-shadow: 0 0 18px #ff660030;
}

.btn-ghost {
  color: var(--primary-light);
  opacity: 0.85;
}

.btn-ghost:hover {
  opacity: 1;
  text-shadow: 0 0 10px #ff660030;
}

.btn-outline {
  border: 1px solid var(--outline);
  color: var(--primary-light);
}

.btn-outline:hover {
  border-color: var(--primary);
  box-shadow: 0 0 18px #ff660030;
}

/* ========================================================================== */
/*  GLOBAL LINKS — FINAL, CORRECT SCHEME                                       */
/* ========================================================================== */
a {
  color: var(--primary-light);
  text-decoration: none;
  transition: 0.25s ease;
}

a:hover {
  color: yellow;
  text-shadow: 0 0 10px #ff660030;
}

/* ========================================================================== */
/*  CODE BLOCKS                                                                */
/* ========================================================================== */
.code-block {
  background: #111;
  border: 1px solid var(--outline);
  padding: 1.2rem 1.4rem;
  border-radius: var(--radius-lg);
  font-family: monospace;
  font-size: 0.95rem;
  box-shadow: 0 0 12px #ff660015;
}

/* ========================================================================== */
/*  TOAST NOTIFICATIONS (RESTORED)                                             */
/* ========================================================================== */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 14px 20px;
  border-radius: 10px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(-20px);
  transition: 0.35s ease;
  z-index: 99999;
  box-shadow: 0 0 20px rgba(0,0,0,0.4);
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-info {
  background: var(--bg-muted);
  color: var(--text);
}

.toast-success {
  background: var(--primary);
  color: #000;
}

.toast-error {
  background: var(--danger);
  color: #fff;
}

/* ========================================================================== */
/*  CONFIRM MODAL (RESTORED)                                                   */
/* ========================================================================== */
.confirm-overlay {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(0, 0, 0, 0.6);
  z-index: 100000;
}

.confirm-modal {
  background: var(--card);
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
}

/* --------------------------------- */
/*   MOBILE HEADER ACTIONS           */
/* --------------------------------- */
@media (max-width: 820px) {
  .desktop-actions {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .nav-mobile {
    padding: 1rem 1.25rem;
  }

  .mobile-divider {
    height: 1px;
    background: var(--outline);
    margin: 0.75rem 0;
  }

  .mobile-login {
    padding: 0.7rem 0;
    color: var(--primary-light);
    text-align: left;
  }

  .mobile-cta {
    margin-top: 0.75rem;
    width: 100%;
    text-align: center;
  }
}

/* ------------------------------------------------------------ */
/*   GLOBAL TABS (used by Docs + Home)                           */
/* ------------------------------------------------------------ */
.tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.tab {
  padding: 0.5rem 1rem;
  background: var(--bg-light);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text-muted);
  transition: 0.2s ease;
}

.tab:hover {
  border-color: var(--primary);
}

.tab.active {
  background: var(--primary);
  color: #000;
}

@media (max-width: 820px) {
  .docs-layout {
    flex-direction: column;
    gap: 2rem;
  }

  .docs-copy,
  .docs-code {
    max-width: 100%;
  }
}

@media (max-width: 820px) {
  .tabs {
    gap: 0.5rem;
  }

  .tab {
    flex: 1;
    text-align: center;
    padding: 0.65rem 0;
    font-size: 0.9rem;
  }
}

@media (max-width: 820px) {
  .code-block {
    font-size: 0.85rem;
    padding: 1rem;
    white-space: pre-wrap;
    word-break: break-word;
  }
}

/* ===================================================================== */
/*   ACCOUNT SETTINGS — MATCH SIGNUP LOOK & FEEL                          */
/* ===================================================================== */

/* Card layout */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.settings-card {
  background: var(--card);
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  box-shadow: 0 0 18px #ff660015;
}

.settings-card h2 {
  margin-bottom: 0.4rem;
}

.settings-card p {
  margin-bottom: 1.4rem;
  color: var(--text-muted);
}

/* ===================================================================== */
/*   FORM STYLES (aligned with signup)                                    */
/* ===================================================================== */

.settings-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.35rem;
}

/* Labels */
.settings-form label {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
}

/* Inputs */
.settings-form input {
  width: 100%;
  padding: 0.85rem 0.9rem;
  border-radius: var(--radius);
  background: var(--bg-muted);
  border: 1px solid var(--outline);
  color: var(--text);
  font-size: 0.95rem;
}

.settings-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px #ff660055;
  outline: none;
}

/* Buttons — smaller (force override) */
.settings-form button.btn-primary,
.settings-form .btn-primary,
.danger-zone button.btn-danger,
.danger-zone .btn-danger {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  padding: 0.65rem 0.9rem !important;
  font-size: 0.88rem !important;
  line-height: 1.1 !important;
  border-radius: var(--radius) !important;
  display: inline-flex !important;
  justify-content: center;
  align-items: center;
}

/* If your HTML uses .full-width, kill it here */
.settings-form .full-width,
#deleteAccountBtn.full-width {
  width: auto !important;
  max-width: none !important;
}

/* Make them visually compact */
.settings-form .btn-primary {
  margin-top: 0.6rem;
}

.danger-zone {
  border-color: rgba(255, 0, 0, 0.35);
}

.danger-zone .btn-danger {
  margin-top: 0.75rem;
  background: var(--danger);
  color: #fff;
}

.danger-zone .btn-danger:hover {
  background: var(--danger-dark);
}

/* ===================================================================== */
/*   MOBILE REFINEMENTS                                                   */
/* ===================================================================== */
@media (max-width: 820px) {
  .dashboard-content {
    padding: 1.75rem 1.25rem;
  }

  .settings-grid {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
  }

  .settings-form label {
    width: 92vw;
    max-width: 320px;
    margin: 0 auto;
  }

  .settings-form button.btn-primary,
  .settings-form .btn-primary,
  .danger-zone button.btn-danger,
  .danger-zone .btn-danger {
    width: 180px !important;
    max-width: 180px !important;
    margin-left: auto;
    margin-right: auto;
  }
}
