/* Settings.css — Skyline AI Settings page */

:root {
  --bg-main:      #030914;
  --bg-card:      #071527;
  --bg-nav:       #051120;
  --cyan:         #00E5FF;
  --cyan-teal:    #00B4D8;
  --green:        #22C55E;
  --green-bg:     rgba(34, 197, 94, 0.12);
  --white:        #FFFFFF;
  --muted:        #94A3B8;
  --muted-light:  #8892B0;
  --muted-dark:   #64748B;
  --danger:       #EF4444;

  --border-faint: #0E2A47;
  --border-cyan:  rgba(0, 229, 255, 0.28);

  --nav-h:        88px;
  --content-max:  720px;
  --radius:       12px;
}

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

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-main);
  color: var(--white);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
  overflow-x: hidden;
}
body {
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 32px);
}

/* ============ BACKGROUND ============ */
.bg-sphere-top-right {
  position: fixed;
  top: -20%;
  right: -15%;
  width: 60vw;
  height: 60vw;
  max-width: 800px;
  max-height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(0, 229, 255, 0.18) 0%, rgba(0, 110, 255, 0.08) 40%, transparent 60%);
  box-shadow: inset -20px -20px 100px rgba(0, 229, 255, 0.12);
  pointer-events: none;
  z-index: -1;
}
.bg-sphere-bottom-left {
  position: fixed;
  bottom: -20%;
  left: -15%;
  width: 50vw;
  height: 50vw;
  max-width: 700px;
  max-height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(0, 57, 199, 0.10) 0%, transparent 60%);
  box-shadow: inset 20px 20px 80px rgba(0, 229, 255, 0.06);
  pointer-events: none;
  z-index: -1;
}
.bg-grid {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50vh;
  background-image:
    linear-gradient(rgba(108, 166, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108, 166, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  transform: perspective(500px) rotateX(60deg) translateY(100px) scale(2);
  pointer-events: none;
  z-index: -1;
  -webkit-mask-image: linear-gradient(to top, black 0%, transparent 80%);
          mask-image: linear-gradient(to top, black 0%, transparent 80%);
}

/* ============ SHELL ============ */
.shell {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 24px);
  position: relative;
  z-index: 1;
}

/* ============ HEADER ============ */
.site-header { padding: 30px 0 8px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}
.brand-logo { display: inline-flex; }
.skyline-s-logo { width: 66px; height: 62px; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name {
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--white);
}
.brand-sub {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 5px;
  color: var(--muted-dark);
  text-transform: uppercase;
}

/* ============ PAGE HEADING ============ */
.page-head {
  margin-top: 30px;
  margin-bottom: 24px;
}
.eyebrow {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-light);
  margin-bottom: 8px;
}
.page-title {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: var(--white);
}
.page-desc {
  font-size: 15px;
  color: var(--muted);
  margin: 0;
}

/* ============ SECTION ============ */
.section { margin-bottom: 22px; }

.section-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  padding: 0 4px;
}
.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: rgba(0, 229, 255, 0.08);
  color: var(--cyan);
  flex-shrink: 0;
}
.section-icon svg { width: 18px; height: 18px; }
.section-header-text { flex: 1; min-width: 0; }
.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  margin: 0 0 2px;
}
.section-desc {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

/* Plan & usage badge */
.plan-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--green-bg);
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  align-self: flex-start;
  margin-top: 4px;
}

/* ============ CARD ============ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-faint);
  border-radius: var(--radius);
  overflow: hidden;
}

/* ============ AVATAR BLOCK ============ */
.avatar-block {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px;
  flex-wrap: wrap;
}
.avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.avatar-circle {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: #04101F;
  border: 2px solid var(--cyan);
  color: var(--white);
  font-weight: 800;
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.5px;
  transition: background 0.3s ease;
}

/* ============ INFO ROW ============ */
.info-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
}
.info-icon {
  width: 32px; height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(0, 229, 255, 0.08);
  color: var(--cyan);
  flex-shrink: 0;
}
.info-icon svg { width: 16px; height: 16px; }
.info-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  flex-shrink: 0;
}
.info-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  margin-left: auto;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

/* ============ ROW ============ */
.row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  padding: 16px 20px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
  text-decoration: none;
}
.row:hover {
  background: rgba(0, 229, 255, 0.04);
}
.row-static {
  cursor: default;
}
.row-static:hover {
  background: transparent;
}
.row-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(0, 229, 255, 0.08);
  color: var(--cyan);
  flex-shrink: 0;
}
.row-icon svg { width: 18px; height: 18px; }

.row-label {
  flex: 1;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--white);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row-value {
  font-size: 13.5px;
  color: var(--muted);
  margin-right: 4px;
}
.row-chevron {
  color: var(--cyan);
  flex-shrink: 0;
}

/* Row with subtitle (email notifications) */
.row-with-subtitle {
  align-items: flex-start;
}
.row-with-subtitle .row-icon {
  margin-top: 2px;
}
.row-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.row-sublabel {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 400;
  white-space: normal;
  line-height: 1.4;
}

/* ============ DIVIDER ============ */
.divider {
  height: 1px;
  background: var(--border-faint);
  margin: 0 20px;
}

/* ============ TOGGLE ============ */
.toggle {
  display: inline-flex;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 4px;
}
.toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-track {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #1a2b45;
  position: relative;
  transition: background 0.2s ease;
}
.toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #64748B;
  transition: all 0.2s ease;
}
.toggle input:checked + .toggle-track {
  background: rgba(0, 229, 255, 0.25);
}
.toggle input:checked + .toggle-track .toggle-knob {
  left: 23px;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.7);
}

/* ============ METRICS (Plan & usage) ============ */
.metrics {
  display: flex;
  align-items: center;
  padding: 20px;
  gap: 16px;
}
.metric {
  flex: 1;
  min-width: 0;
}
.metric-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
}
.metric-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1;
}
.metric-divider {
  width: 1px;
  height: 40px;
  background: var(--border-faint);
  flex-shrink: 0;
}

/* ============ BUTTONS ============ */
.btn-outline,
.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: transparent;
  border: 1px solid var(--cyan);
  border-radius: 8px;
  color: var(--cyan);
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn-outline:hover {
  background: rgba(0, 229, 255, 0.08);
}
.btn-outline svg,
.btn-danger svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-danger {
  border-color: rgba(239, 68, 68, 0.55);
  color: var(--danger);
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.08);
  border-color: var(--danger);
}

.btn-full {
  display: flex;
  width: calc(100% - 40px);
  margin: 16px 20px;
  justify-content: center;
}

/* Cards with a full-width button at the bottom */
.card > .btn-full {
  margin: 16px 20px 20px;
  width: calc(100% - 40px);
}

/* Bottom action buttons outside cards */
#deleteAccountBtn {
  margin: 0 0 10px;
  width: 100%;
  padding: 14px 16px;
  font-size: 14.5px;
}
#logoutBtn {
  margin: 0 0 20px;
  width: 100%;
  padding: 14px 16px;
  font-size: 14.5px;
}
#deleteAccountBtn svg,
#logoutBtn svg {
  width: 18px;
  height: 18px;
}

/* ============ SKELETON ============ */
@keyframes skeleton-pulse {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 0.85; }
}

.skeleton {
  background: linear-gradient(
    90deg,
    rgba(0, 229, 255, 0.06) 0%,
    rgba(0, 229, 255, 0.14) 50%,
    rgba(0, 229, 255, 0.06) 100%
  );
  background-size: 200% 100%;
  border-color: transparent !important;
  color: transparent !important;
  animation: skeleton-pulse 1.4s ease-in-out infinite;
  border-radius: 6px;
}

.skeleton-text {
  display: inline-block;
  min-width: 80px;
  height: 14px;
  vertical-align: middle;
  border-radius: 4px;
}

.avatar-circle.skeleton {
  border-radius: 50%;
  border: 2px solid transparent !important;
}

/* ============ FOOTER ============ */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 0 30px;
  font-size: 13px;
  color: var(--muted-dark);
}
.site-footer .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--muted-dark);
  opacity: 0.5;
}

/* ============ BOTTOM NAV ============ */
.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(5, 17, 32, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border-faint);
  z-index: 100;
  border-radius: 20px 20px 0 0;
}
@media (min-width: 900px) {
  .bottom-nav {
    left: 50%; right: auto;
    transform: translateX(-50%);
    width: min(620px, 88%);
    border: 1px solid var(--border-faint);
    border-bottom: 0;
  }
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 0 12px;
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  position: relative;
}
.nav-item svg {
  width: 24px;
  height: 24px;
  color: var(--muted);
  transition: color 0.18s ease;
}
.nav-item:hover svg,
.nav-item:hover { color: var(--cyan); }
.nav-item.active { color: var(--cyan); }
.nav-item.active svg {
  color: var(--cyan);
  filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.55));
}
.nav-item .active-bar {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.7);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 640px) {
  .site-header { padding: 22px 0 6px; }
  .skyline-s-logo { width: 48px; height: 46px; }
  .brand-name { font-size: 20px; }
  .brand-sub { font-size: 10px; letter-spacing: 4px; }
  .page-head { margin-top: 20px; }
  .avatar-block { padding: 16px; gap: 14px; }
  .avatar-circle { width: 64px; height: 64px; font-size: 18px; }
  .info-row { padding: 14px 16px; gap: 10px; }
  .info-label { font-size: 12.5px; }
  .info-value { font-size: 13px; }
  .row { padding: 14px 16px; gap: 12px; }
  .row-icon { width: 32px; height: 32px; }
  .row-icon svg { width: 16px; height: 16px; }
  .row-label { font-size: 14px; }
  .row-value { font-size: 12.5px; }
  .divider { margin: 0 16px; }
  .metrics { padding: 16px; gap: 12px; }
  .metric-value { font-size: 22px; }
  .btn-full { width: calc(100% - 32px); margin: 14px 16px; }
  .card > .btn-full { margin: 14px 16px 16px; width: calc(100% - 32px); }
}

@media (max-width: 480px) {
  .avatar-block {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
  .plan-badge {
    display: none;
  }
}

@media (max-width: 400px) {
  .nav-item { font-size: 11px; }
  .nav-item svg { width: 22px; height: 22px; }
  .metric-value { font-size: 20px; }
  .metric-label { font-size: 11.5px; }
  }

/* ============================================================
   DELETE ACCOUNT MODAL
   ============================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(5, 7, 10, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modal-fade-in 0.2s ease;
}

.modal-overlay[hidden] {
  display: none !important;
}

@keyframes modal-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-card {
  background: #0b1017;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  padding: 24px;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  animation: modal-slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-slide-up {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Close (X) button */
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: #8B949E;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #ffffff;
}

/* Header */
.modal-header {
  margin-bottom: 16px;
  padding-right: 24px;
}

.modal-title {
  font-size: 20px;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
}

/* Body */
.modal-body {
  margin-bottom: 24px;
}

.modal-desc {
  font-size: 14px;
  color: #c9d6f5;
  line-height: 1.5;
  margin: 0 0 8px 0;
}

.modal-desc strong {
  color: #ffffff;
}

.modal-list {
  margin: 0;
  padding-left: 20px;
  color: #c9d6f5;
  font-size: 14px;
  line-height: 1.6;
}

.modal-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  margin-top: 16px;
  margin-bottom: 8px;
}

.modal-input {
  width: 100%;
  padding: 12px 14px;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 8px;
  color: #ffffff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.modal-input:focus {
  border-color: #58a6ff;
}

.modal-input::placeholder {
  color: #8B949E;
}

/* ⭐ NEW: Hint text under Google confirm input */
.modal-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: #8B949E;
  line-height: 1.5;
}

.modal-hint strong {
  color: #58a6ff;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* ⭐ NEW: Hidden blocks must stay hidden */
#deletePasswordBlock[hidden],
#deleteConfirmBlock[hidden] {
  display: none !important;
}

.modal-error {
  margin-top: 8px;
  font-size: 13px;
  color: #f87171;
  font-weight: 500;
}

/* Footer Buttons */
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.modal-btn {
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.modal-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.modal-btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.modal-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
}

.modal-btn-danger {
  background: #da3633;
  color: #ffffff;
}

.modal-btn-danger:hover {
  background: #f85149;
  }
