:root {
  --bg:#0b0f12; --card:#12181d; --text:#e9eef3;
  --muted:#9fb0bf; --brand:#27c04b; --accent:#1ea0ff;
  --border:#1e252c; --shadow:0 4px 16px rgba(0,0,0,.25);
  --radius:14px;
}

*{box-sizing:border-box;margin:0;padding:0}
body {
  font-family: system-ui, Roboto, Inter, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main {
  flex: 1;
  width: 100%;
  max-width: 600px;
  margin: 20px auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* HEADER */
.header {
  position: sticky;
  top: 0;
  background: rgba(10,14,17,0.9);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo { width: 36px; height: 36px; border-radius: 8px; }
.brand-text { font-weight: 700; }
.dev-tag { color: var(--brand); margin-left: 6px; font-weight: 600; }
.auth-area { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.user-box { display: flex; align-items: center; gap: 8px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border); cursor: pointer; }
#userName { cursor: pointer; }

/* BUTTONS */
.btn {
  background: #1a2129;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 500;
}
.btn.primary { background: var(--brand); color: #041205; border-color: #1bb53f; font-weight: 700; }
.btn.full { width: 100%; justify-content: center; }
.btn.small { padding: 6px 10px; font-size: 14px; }

/* CARD */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.card.center { text-align: center; }

/* FORM */
.form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
label { display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
input, select, textarea {
  background: #0f151a;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 10px 12px;
  font-size: 15px;
}
small { color: var(--muted); font-size: 12px; }
textarea { resize: vertical; }

.divider {
  height: 1px;
  background: var(--border);
  margin: 10px 0;
}

/* PROGRESS */
.progress {
  margin-top: 8px;
  height: 12px;
  background: #0f151a;
  border: 1px solid var(--border);
  border-radius: 999px;
  position: relative;
}
.progress .bar {
  background: linear-gradient(90deg, var(--brand), var(--accent));
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width .2s ease;
}
.progress span, #progressText {
  position: absolute;
  top: -22px;
  right: 0;
  font-size: 12px;
  color: var(--muted);
}

/* APP LIST */
.app-list {
  display: grid;
  gap: 10px;
}
.app-card {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  background: #0f151a;
}
.app-card img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
}
.app-card .info {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.app-card .info small { color: var(--muted); }

/* FOOTER */
.footer {
  text-align: center;
  padding: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}

/* RESPONSIVE */
@media (min-width: 700px) {
  .header { flex-direction: row; justify-content: space-between; }
}

/* -------------------------
   ACCOUNT DIALOG + SLIDES
-------------------------- */
.account-dialog {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  color: var(--text);
  padding: 0;
  max-width: 480px;
  width: 95vw;
  box-shadow: var(--shadow);

  /* FIX: center the popup */
  margin: auto;
  position: fixed;
  top: 50%;
  left: 50%;
  right: 50%;
  transform: translate(-50%, -50%);
}


.account-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.account-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.account-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 8px 10px 12px;
  border-bottom: 1px solid var(--border);
}

.account-tab {
  flex: 1;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #0f151a;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
}
.account-tab.active {
  background: var(--brand);
  color: #041205;
  border-color: #1bb53f;
  font-weight: 600;
}

.account-body {
  overflow: hidden;
  padding: 0 0 12px;
}
.account-inner {
  display: flex;
  width: 200%;
  transition: transform .25s ease;
}

/* slides */
.account-panel {
  width: 50%;
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.account-panel h3 {
  margin-bottom: 4px;
}

.account-panel .note {
  font-size: 12px;
  color: var(--muted);
}

/* slide transforms */
#accountBody.tab-personal .account-inner {
  transform: translateX(0%);
}
#accountBody.tab-developer .account-inner {
  transform: translateX(-50%);
}

/* dialog focus */
.account-dialog::backdrop {
  background: rgba(0,0,0,0.6);
}
