/* Auth & account pages */
.auth-page {
  min-height: calc(100vh - var(--ix-header-h));
  display: grid;
  place-items: center;
  padding: 48px 24px 80px;
}

.auth-shell {
  width: min(420px, 100%);
}

.auth-card {
  background: var(--ix-surface);
  border: 1px solid var(--ix-border);
  border-radius: var(--ix-radius-lg);
  padding: 36px 32px;
}

.auth-card h1 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.auth-card .subtitle {
  color: var(--ix-text-secondary);
  font-size: 15px;
  margin: 0 0 28px;
  line-height: 1.5;
}

.auth-form label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ix-text-secondary);
  margin-bottom: 8px;
}

.auth-form input {
  width: 100%;
  border: 1px solid var(--ix-border-strong);
  border-radius: var(--ix-radius);
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  background: var(--ix-bg-elevated);
  color: var(--ix-text);
  margin-bottom: 20px;
  transition: border-color 0.15s;
}

.auth-form input:focus {
  outline: none;
  border-color: var(--ix-accent);
}

.auth-form input::placeholder {
  color: var(--ix-text-tertiary);
}

.form-message {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.55;
  padding: 12px 14px;
  border-radius: var(--ix-radius);
}

.form-message.success {
  color: #6ee7b7;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.2);
}

.form-message.error {
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.2);
}

.form-message.info {
  color: var(--ix-text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--ix-border);
}

.form-message[hidden] { display: none; }

.auth-success-panel {
  text-align: center;
  padding: 8px 0;
}

.auth-success-panel svg {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  color: var(--ix-live);
}

.auth-footer {
  margin-top: 24px;
  font-size: 14px;
  color: var(--ix-text-tertiary);
  text-align: center;
}

.auth-footer a {
  color: var(--ix-accent);
  font-weight: 500;
}

.auth-footer a:hover { text-decoration: underline; }

/* Account dashboard */
.account-layout {
  max-width: var(--ix-max);
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.account-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
  margin-bottom: 32px;
}

.account-hero h1 {
  margin: 0 0 6px;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.account-email {
  color: var(--ix-text-secondary);
  font-size: 15px;
  margin: 0;
}

.account-actions-top {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.usage-banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: var(--ix-border);
  border: 1px solid var(--ix-border);
  border-radius: var(--ix-radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
}

.usage-stat {
  background: var(--ix-surface);
  padding: 20px 22px;
}

.usage-stat .label {
  font-family: var(--ix-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ix-text-tertiary);
  margin-bottom: 6px;
}

.usage-stat .value {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.usage-stat .value.large {
  font-size: 1.75rem;
  color: var(--ix-accent);
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.account-panel {
  background: var(--ix-surface);
  border: 1px solid var(--ix-border);
  border-radius: var(--ix-radius-lg);
  padding: 24px;
}

.account-panel h2 {
  margin: 0 0 16px;
  font-size: 14px;
  font-family: var(--ix-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ix-text-tertiary);
  font-weight: 500;
}

.account-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--ix-border);
  font-size: 14px;
}

.account-row:last-child { border-bottom: 0; }

.account-row .key { color: var(--ix-text-secondary); }
.account-row .val { font-weight: 500; text-align: right; }

.status-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

.status-pill.ok {
  color: var(--ix-live);
  background: var(--ix-live-dim);
}

.status-pill.warn {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
}

.status-pill.neutral {
  color: var(--ix-text-secondary);
  background: rgba(255,255,255,0.05);
}

.account-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--ix-border);
}

@media (max-width: 768px) {
  .account-hero { grid-template-columns: 1fr; }
  .account-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 28px 22px; }
}
