:root {
  --bg: #171f26;
  --text: rgba(250, 252, 255, 0.85);
  --dim: rgb(131, 139, 143);
  --fill: rgba(49, 60, 71, 0.5);
  --line: rgb(49, 60, 71);
  --circle: rgba(40, 56, 71, 0.5);
  --accent: #e61e1e;
  --accent-text: #ff5a5a;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
svg { flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: rgba(230, 30, 30, 0.45); }

.tw-skip {
  position: absolute; left: -9999px; top: 16px;
  padding: 8px 16px; border-radius: 999px; background: var(--accent); color: #fff; z-index: 60;
}
.tw-skip:focus { left: 16px; }

.tw-frame { display: flex; width: 100%; max-width: 1284px; margin: 0 auto; }
.tw-aside { display: none; width: 224px; flex-shrink: 0; }
.tw-aside-inner {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; padding-bottom: 24px;
}
.tw-column { display: flex; flex-direction: column; flex: 1; min-width: 0; padding: 0 16px; }
.tw-desktop-top { display: none; height: 72px; flex-shrink: 0; }
.tw-content { flex: 1; min-width: 0; }

@media (min-width: 769px) {
  .tw-aside { display: block; }
  .tw-column { padding: 0 32px; }
  .tw-desktop-top { display: block; }
  .tw-mobile-top { display: none !important; }
}

.tw-logo { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; line-height: 1; }
.tw-logo svg { width: 28px; height: 28px; color: var(--accent); }
.tw-dim { color: var(--dim); }
.tw-aside .tw-logo { margin-top: 32px; height: 40px; padding-left: 24px; }

.tw-nav { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; padding-left: 12px; }
.tw-nav-link {
  display: flex; align-items: center; gap: 12px;
  width: 212px; height: 40px; padding: 0 20px;
  border: 1px solid transparent; border-radius: 999px;
  font-size: 16px; font-weight: 600; line-height: 24px;
  transition: background-color 0.15s;
}
.tw-nav-link svg { width: 20px; height: 20px; }
.tw-nav-link:hover { background: var(--fill); }
.tw-nav-link.tw-cta { background: var(--accent); color: #fff; }
.tw-nav-link.tw-cta:hover { filter: brightness(1.1); }
.tw-nav-link.is-current { background: var(--fill); color: var(--accent-text); }

.tw-mobile-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 70px; }
.tw-menu { position: relative; }
.tw-menu summary {
  display: flex; align-items: center; gap: 6px; height: 46px; padding: 0 24px;
  border: 1px solid var(--line); border-radius: 32px;
  font-size: 16px; font-weight: 600; cursor: pointer; list-style: none;
}
.tw-menu summary::-webkit-details-marker { display: none; }
.tw-menu summary svg { width: 20px; height: 20px; }
.tw-menu[open] summary { background: var(--fill); }
.tw-menu-pop {
  position: absolute; right: 0; top: calc(100% + 20px); z-index: 50;
  width: 320px; max-width: calc(100vw - 32px); max-height: calc(100vh - 96px); overflow-y: auto;
  padding: 4px; border: 1px solid var(--line); border-radius: 20px; background: var(--bg);
  box-shadow: 0 8px 32px rgb(13, 22, 31);
}
.tw-menu-pop a {
  display: flex; align-items: center; gap: 8px; width: auto; height: 60px; padding: 0 16px;
  border: 0; border-radius: 16px; font-size: 16px; font-weight: 600;
}
.tw-menu-pop a:hover { background: var(--fill); }
.tw-menu-pop .tw-nav-link.tw-cta { background: none; color: var(--accent-text); }

.tw-title { margin-top: 8px; font-size: 20px; font-weight: 650; line-height: 24px; }
@media (min-width: 769px) { .tw-title { margin-top: 32px; } }

.tw-tabs { display: flex; gap: 8px; margin-top: 18px; }
.tw-tab {
  display: flex; align-items: center; height: 42px; padding: 0 16px;
  border: 1px solid transparent; border-radius: 20px;
  font-size: 16px; font-weight: 600; line-height: 24px; transition: background-color 0.15s;
}
.tw-tab:hover { background: var(--fill); }
.tw-tab.is-current { background: var(--fill); color: var(--accent-text); }

.tw-form-col { width: 100%; max-width: 505px; margin-top: 39px; }
.tw-lead { font-size: 16px; font-weight: 500; line-height: 24px; color: var(--dim); }
.tw-strong { color: var(--text); font-weight: 600; }
.tw-form { margin-top: 0; }
.tw-lead + .tw-form, .tw-lead + .tw-error { margin-top: 24px; }
.tw-field + .tw-field { margin-top: 24px; }
.tw-field label { display: block; margin-bottom: 5px; font-size: 16px; font-weight: 500; line-height: 24px; }
.tw-field input {
  width: 100%; height: 48px; padding: 0 15px;
  border: 0; border-radius: 24px; background: var(--fill); color: var(--text);
  font: inherit; font-size: 16px;
}
.tw-field input:focus { outline: none; box-shadow: 0 0 0 2px var(--accent); }
.tw-hint { margin-top: 8px; font-size: 14px; font-weight: 500; color: var(--dim); }

.tw-error {
  margin-bottom: 24px; padding: 12px 16px;
  border: 1px solid rgba(230, 30, 30, 0.3); border-radius: 16px; background: rgba(230, 30, 30, 0.1);
  color: #ffd9d9; font-size: 14px; line-height: 20px;
}

.tw-forgot { margin-top: 8px; text-align: right; }
.tw-forgot a, .tw-back a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 600; color: var(--accent-text); }
.tw-forgot a:hover, .tw-back a:hover { text-decoration: underline; }
.tw-back { margin-top: 8px; text-align: center; }

.tw-btn-primary {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 48px; margin-top: 24px; padding: 0 24px;
  border: 0; border-radius: 999px; background: var(--accent); color: #fff;
  font: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
}
.tw-btn-primary:hover { filter: brightness(1.1); }
.tw-forgot + .tw-btn-primary { margin-top: 8px; }
.tw-mt { margin-top: 24px; }

.divider { display: flex; align-items: center; gap: 12px; margin: 24px 0; }
.divider span:not(.divider-label) { flex: 1; height: 1px; background: var(--fill); }
.divider-label { font-size: 14px; color: var(--dim); }
.oauth-buttons { display: flex; flex-direction: column; gap: 8px; }
.btn-secondary {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 24px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(32, 43, 54, 0.24);
  font-size: 16px; font-weight: 600; transition: background-color 0.15s;
}
.btn-secondary:hover { background: var(--fill); }

.tw-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 64px 0 24px -20px; max-width: 1036px; }
.tw-links a {
  display: flex; align-items: center; height: 40px; padding: 0 20px;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 16px; font-weight: 600; line-height: 24px; color: var(--dim);
  transition: all 250ms ease-in-out;
}
.tw-links a:hover { background: rgba(40, 56, 71, 0.7); }
@media (min-width: 769px) {
  .tw-links { margin-top: 96px; }
  .tw-links a { border-color: transparent; }
  .tw-links a:hover {
    background: transparent; border-color: var(--line);
    box-shadow: 0 8px 32px rgb(13, 22, 31); color: var(--text);
  }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; }
}
