:root {
  --ink: #0a0f0d;
  --ink-2: #101815;
  --ink-3: #16201c;
  --accent: #10b981;
  --accent-bright: #5effc3;
  --line: rgba(180, 255, 220, 0.12);
  --line-strong: rgba(180, 255, 220, 0.24);
  --text: #eaf3ef;
  --text-dim: #9db4ac;
  --text-faint: #6c8079;
  --danger: #f87171;
  --danger-bg: rgba(248, 113, 113, 0.12);
  --ok-bg: rgba(16, 185, 129, 0.14);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background: var(--ink);
  color: var(--text);
  font-family: "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
}
.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }

.card {
  width: 380px;
  max-width: calc(100vw - 40px);
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 34px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.card.wide { width: 640px; }
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 17px;
}
.brand em { font-style: normal; color: var(--accent); }
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lang-switch { display: flex; gap: 4px; }
.lang-switch a {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-faint);
  text-decoration: none;
  padding: 3px 6px;
  border-radius: 6px;
}
.lang-switch a:hover { color: var(--text); }
.lang-switch a.active { color: var(--accent-bright); background: var(--ok-bg); }
h1 { font-size: 19px; margin: 0; }
p.lead { color: var(--text-dim); font-size: 14px; margin: 0; }
.error { color: var(--danger); font-size: 13px; margin: 0; background: var(--danger-bg); padding: 10px 12px; border-radius: 8px; }
.notice { color: var(--accent-bright); font-size: 13px; margin: 0; background: var(--ok-bg); padding: 10px 12px; border-radius: 8px; }

label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-dim); }
input[type="text"], input[type="email"], input[type="password"] {
  background: var(--ink-3);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}
input:focus, button:focus-visible, a.btn:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 1px;
}
button, a.btn {
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  border-radius: 9px;
  padding: 12px;
  border: none;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: block;
}
.btn-primary { background: var(--accent); color: #04160f; }
.btn-ghost { background: transparent; border: 1px solid var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-danger { background: transparent; border: 1px solid rgba(248, 113, 113, 0.4); color: var(--danger); }
.btn-danger:hover { border-color: var(--danger); background: var(--danger-bg); }
button:disabled { opacity: 0.55; cursor: default; }

.status-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 4px 10px; border-radius: 999px; font-weight: 600; }
.status-badge.ok { background: var(--ok-bg); color: var(--accent-bright); }
.status-badge.pending { background: var(--danger-bg); color: var(--danger); }
.account-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); margin: 4px 0 0; }
.divider { text-align: center; color: var(--text-faint); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.foot-links { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-faint); }
.foot-links a { color: var(--accent-bright); text-decoration: none; }

.consent-user { display: flex; align-items: center; gap: 10px; background: var(--ink-3); border-radius: 10px; padding: 12px 14px; font-size: 13.5px; }
.consent-user .avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #04160f; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }

/* ---------- profile: large avatar + crop modal ---------- */
.avatar-section { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.avatar-wrap { position: relative; width: 96px; height: 96px; }
.avatar-lg {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--accent);
  color: #04160f;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 32px;
  overflow: hidden;
}
.avatar-lg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-lg { cursor: pointer; }
.avatar-lg:hover { filter: brightness(0.85); }
.avatar-lg:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; }
.avatar-edit-btn {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #04160f;
  display: grid;
  place-items: center;
  padding: 0;
  border: 2px solid var(--ink-2);
}
.avatar-edit-btn:hover { background: var(--accent-bright); }
.account-email-row { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--text-dim); max-width: 100%; min-width: 0; }
.account-email-row span { overflow-wrap: anywhere; min-width: 0; }

.crop-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: grid;
  place-items: center;
  z-index: 100;
  padding: 20px;
}
.crop-modal {
  width: 340px;
  max-width: 100%;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.crop-modal h2 { font-size: 16px; margin: 0; }
.crop-viewport-wrap { touch-action: none; cursor: grab; }
.crop-viewport-wrap:active { cursor: grabbing; }
.crop-viewport-wrap canvas { display: block; border-radius: 50%; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.crop-hint { font-size: 12px; color: var(--text-faint); margin: 0; text-align: center; }
.crop-actions { display: flex; gap: 10px; width: 100%; }
.crop-actions button { flex: 1; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); padding: 8px 10px; border-bottom: 1px solid var(--line-strong); }
td { padding: 10px; border-bottom: 1px solid var(--line); word-break: break-all; }
.key-cell { font-family: "IBM Plex Mono", monospace; font-size: 11.5px; color: var(--text-dim); }
textarea { background: var(--ink-3); border: 1px solid var(--line-strong); border-radius: 8px; padding: 10px 12px; color: var(--text); font-family: "IBM Plex Mono", monospace; font-size: 12.5px; width: 100%; min-height: 70px; }
