:root {
  color-scheme: dark;
  font: 14px/1.5 Inter, "Segoe UI", system-ui, sans-serif;
  color: #edf0f7;
  background: #101217;
  --ink: #edf0f7;
  --muted: #a5adbd;
  --line: #303641;
  --surface: #181b22;
  --inset: #13161c;
  --raised: #232833;
  --accent: #acbafa;
  --accent-hover: #c3ceff;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, p { margin: 0; }
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.icon { display: block; width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 16px; font-weight: 720; letter-spacing: -.3px; white-space: nowrap; }
.brand-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 8px; color: #161c33; background: var(--accent); }
.brand-icon .icon { width: 17px; height: 17px; }
.button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--ink); font-weight: 650; white-space: nowrap; }
.button:hover:not(:disabled) { background: var(--raised); }
.button.primary { border-color: var(--accent); background: var(--accent); color: #161c33; }
.button.primary:hover:not(:disabled) { background: var(--accent-hover); }
.button .icon { width: 16px; height: 16px; }
.form-stack { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; min-width: 0; }
label { font-size: 13px; font-weight: 650; }
input:not([type="file"]) { width: 100%; min-width: 0; height: 42px; padding: 0 11px; border: 1px solid #3a4353; border-radius: 7px; color: var(--ink); background: var(--inset); font-size: 16px; }
input::placeholder { color: #909bad; }
input[type="file"] { width: 100%; min-width: 0; max-width: 100%; color: var(--muted); }
input::file-selector-button { min-height: 36px; padding: 6px 10px; margin-right: 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--inset); color: var(--ink); cursor: pointer; font: inherit; font-weight: 600; }
input::file-selector-button:hover { background: var(--raised); }
.hint { color: var(--muted); font-size: 12px; }
.notice { padding: 9px 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--inset); color: var(--muted); font-size: 13px; }
.notice:empty { display: none; }
.notice.error { border-color: #753e44; background: #2c1d23; color: #ffbac0; }
.notice.success { border-color: #365e50; background: #172923; color: #a6dec5; }

.login { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: auto 1fr; }
.login-header { min-height: 66px; display: flex; align-items: center; padding: 0 clamp(20px, 5vw, 58px); border-bottom: 1px solid var(--line); background: var(--inset); }
.login-main { width: min(100%, 440px); align-self: center; justify-self: center; padding: 28px 20px 82px; }
.login-card { padding: 30px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 28px #0003; }
.login-card h1, .page-title h1 { font-size: 27px; line-height: 1.2; font-weight: 700; letter-spacing: -.75px; }
.login-card > p { margin: 7px 0 24px; }
.password-control { position: relative; }
.password-control input { padding-right: 47px; }
.icon-button { position: absolute; top: 4px; right: 4px; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 5px; background: transparent; color: var(--muted); }
.icon-button:hover { background: var(--raised); color: var(--ink); }
.hide-icon, .revealed .show-icon { display: none; }
.revealed .hide-icon { display: block; }
.login-submit { margin-top: 4px; width: 100%; }
.back-link { display: flex; width: fit-content; align-items: center; gap: 8px; margin: 18px auto 0; font-size: 13px; color: var(--muted); }
.back-link .icon { width: 15px; height: 15px; }
.back-link:hover { color: var(--accent); }

.topbar { border-bottom: 1px solid var(--line); background: var(--inset); }
.topbar-inner { width: min(100%, 1080px); min-height: 64px; padding: 10px 28px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.top-actions form { margin: 0; }
.top-actions .button { min-height: 36px; }
.top-actions .sign-out { border-color: transparent; background: transparent; color: var(--muted); }
.main-content { width: min(100%, 1080px); padding: 36px 28px 48px; margin: 0 auto; }
.page-title { margin-bottom: 23px; }
.page-title p { margin-top: 5px; }
.settings-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.setting { display: grid; grid-template-columns: 184px minmax(0, 1fr); gap: 26px; padding: 23px 24px; scroll-margin: 24px; }
.setting + .setting { border-top: 1px solid var(--line); }
.setting-header h2 { display: flex; align-items: center; gap: 9px; font-size: 16px; line-height: 1.3; letter-spacing: -.2px; }
.setting-header h2 .icon { width: 17px; height: 17px; color: var(--accent); }
.setting-header p { margin-top: 6px; font-size: 13px; }
.profile-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 23px; align-items: start; }
.profile-columns > :last-child { padding-left: 23px; border-left: 1px solid var(--line); }
.inline-field { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 10px; }
.inline-field label, .inline-field .hint { grid-column: 1 / -1; }
.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-preview { min-height: 64px; display: flex; align-items: center; gap: 11px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--inset); }
.avatar { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; overflow: hidden; background: #2b3552; color: #d3dcff; font-weight: 700; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-preview strong { display: block; overflow-wrap: anywhere; font-size: 13px; }
.profile-preview p { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.verified-icon { display: inline-flex; vertical-align: -2px; align-items: center; justify-content: center; width: 14px; height: 14px; margin-left: 3px; color: #fff; background: #2872d0; border-radius: 50%; }
.verified-icon .icon { width: 11px; height: 11px; stroke-width: 2.5; }
.dropzone {
  position: relative; display: grid; place-items: center; min-height: 70px; padding: 12px;
  border: 1px dashed #5a657b; border-radius: 8px; background: var(--inset);
  color: var(--muted); text-align: center; font-weight: 500;
}
.dropzone strong { color: var(--accent); }
.dropzone:hover, .dropzone.dragging { border-color: var(--accent); background: var(--raised); }
.dropzone:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.dropzone input {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;
}
.dropzone input:disabled { cursor: wait; }
.crop-editor {
  display: grid; gap: 10px; padding: 13px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--inset);
}
.crop-title { font-weight: 650; }
#photo-crop {
  display: block; width: min(100%, 168px); height: auto; margin: 1px auto;
  border-radius: 50%; outline: 1px solid var(--line); background: var(--raised);
  cursor: grab; touch-action: none;
}
#photo-crop:active { cursor: grabbing; }
.crop-controls { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 5px 10px; align-items: center; }
.crop-controls input[type="range"] {
  height: 24px; padding: 0; margin: 0; border: 0; background: transparent; accent-color: var(--accent);
}
.video-empty { padding: 9px 11px; border: 1px dashed var(--line); border-radius: 7px; background: var(--inset); color: var(--muted); font-size: 13px; }
video { display: block; width: 100%; max-height: 280px; border-radius: 8px; background: var(--inset); }

@media (max-width: 850px) {
  .setting { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 600px) {
  .topbar-inner { padding: 9px 15px; }
  .top-actions { gap: 4px; }
  .top-actions .button { padding-inline: 8px; font-size: 12px; }
  .main-content { padding: 24px 15px 35px; }
  .page-title { margin-bottom: 18px; }
  .profile-columns { grid-template-columns: 1fr; gap: 17px; }
  .setting { padding: 17px; }
  .profile-columns > :last-child { padding: 16px 0 0; border: 0; border-top: 1px solid var(--line); }
  .inline-field { grid-template-columns: minmax(0, 1fr); }
  .inline-field .button { justify-self: start; margin-top: 3px; }
  .login-card { padding: 24px; }
  .login-main { padding-bottom: 45px; }
}
