/* /account — Profile / Security / Usage tabs.
   Dark palette mirrors public_login/styles/main.css. */

:root {
  --bg: #1a1a2e;
  --bg-raised: #16213e;
  --bg-input: #222;
  --bg-card: #1f1f2e;
  --border: #2a2a45;
  --border-strong: #3a3a4a;
  --text: #ccc;
  --text-dim: #777;
  --text-bright: #fff;
  --accent: #007BFF;
  --accent-hover: #0069d9;
  --danger: #ff6b6b;
  --danger-hover: #e85c5c;
  --warn: #d4a017;
  --ok: #5fce8c;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  background-image: radial-gradient(ellipse at top, var(--bg-raised) 0%, var(--bg) 70%);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

#acctShell {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

#acctHeader {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
#acctHeader .back {
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
}
#acctHeader .back:hover { text-decoration: underline; }
#acctHeader h1 {
  font-size: 20px;
  margin: 0;
  flex-grow: 1;
  letter-spacing: -0.005em;
  color: var(--text-bright);
  font-weight: 600;
}
#acctHeader .dim { color: var(--text-dim); font-size: 13px; }

#acctTabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
#acctTabs .tab {
  background: none;
  border: none;
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
  color: var(--text-dim);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-family: inherit;
}
#acctTabs .tab:hover { color: var(--text-bright); }
#acctTabs .tab.active {
  color: var(--text-bright);
  border-bottom-color: var(--accent);
  font-weight: 500;
}

#acctMain {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 30px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2), 0 8px 24px rgba(0,0,0,0.3);
}

.tab-pane { display: none; }
.tab-pane.active { display: block; }

h2 {
  font-size: 16px;
  margin: 0 0 14px;
  color: var(--text-bright);
  font-weight: 600;
}
h2.danger { color: var(--danger); }

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 14px;
  color: var(--text);
}

input[type=text], input[type=email], input[type=password] {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-bright);
  background: #2a2a3a;
}
input::placeholder { color: var(--text-dim); }
input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0,123,255,0.2);
}

.hint { display: block; font-size: 12px; color: var(--text-dim); margin-top: 4px; font-weight: normal; }

button[type=submit], .btn {
  padding: 9px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
button[type=submit]:hover { background: var(--accent-hover); }
button[type=submit]:disabled { opacity: 0.5; cursor: wait; }

.btn-danger {
  padding: 9px 16px;
  background: var(--danger);
  color: #1a1a1a;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.btn-danger:hover { background: var(--danger-hover); }

.btn-secondary {
  padding: 9px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}
.btn-secondary:hover { background: #2a2a3a; color: var(--text-bright); }

.status {
  min-height: 20px;
  font-size: 13px;
  margin-top: 10px;
}
.status.error { color: var(--danger); }
.status.ok { color: var(--ok); }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

.dim { color: var(--text-dim); font-size: 13px; margin: 0 0 16px; }
.dim a { color: var(--accent); }

.usage-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.usage-bar {
  flex-grow: 1;
  height: 8px;
  background: #2a2a3a;
  border-radius: 4px;
  overflow: hidden;
}
.usage-fill {
  height: 100%;
  background: var(--accent);
  width: 0;
  transition: width 0.4s ease;
}
.usage-fill.warning { background: var(--warn); }
.usage-fill.danger  { background: var(--danger); }
.usage-label {
  font-size: 13px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  min-width: 130px;
  text-align: right;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 24px 26px;
  border-radius: 12px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}
.modal-card h2 { color: var(--danger); }
.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
}
code {
  background: #2a2a3a;
  color: var(--text-bright);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
}

@media (max-width: 540px) {
  #acctMain { padding: 20px 18px; }
  .row { grid-template-columns: 1fr; }
}
