:root {
  --ink: #111111;
  --ink-2: #444444;
  --ink-3: #7a7a7f;
  --surface: #ffffff;
  --surface-2: #f5f5f7;
  --surface-3: #e6e6eb;
  --line: #d8d8de;
  --accent: #7a1025;
  --green-bg: #e9f6ee;
  --radius-md: 14px;
  --radius-lg: 22px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "DM Sans", system-ui, sans-serif;
  font-weight: 300;
  color: var(--ink);
  background: var(--surface-2);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(420px, 1.08fr);
}

.brand-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  padding: 34px;
  display: grid;
  align-content: space-between;
  border-right: 1px solid var(--line);
  color: var(--surface);
  background: var(--ink);
}

.brand-video {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(0, 0, 0, 0.32);
}

.topbar,
.panel-head.inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.wordmark {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-logo {
  width: 48px;
  height: 48px;
  filter: invert(1);
}

.eyebrow,
.kicker,
.panel-head p,
label span,
.message {
  color: var(--ink-3);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.statement {
  max-width: 620px;
  padding: 8vh 0 0;
}

.statement h1 {
  margin: 0;
  font-size: clamp(3rem, 7vw, 6.8rem);
  line-height: 0.92;
  font-weight: 300;
  letter-spacing: 0;
}

.workspace {
  padding: 34px;
  display: grid;
  gap: 18px;
  align-content: start;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.panel {
  width: min(100%, 760px);
  padding: 28px;
}

.auth-panel {
  margin-top: 0;
}

.panel-head h2 {
  margin: 4px 0 0;
  line-height: 1.08;
  font-weight: 400;
  letter-spacing: 0;
}

.panel-head h2 {
  font-size: 1.8rem;
}

.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin: 24px 0;
  background: var(--surface-2);
  border: 1px solid var(--surface-3);
  border-radius: var(--radius-md);
}

.tab {
  border: 0;
  border-radius: 10px;
  padding: 8px 16px;
  color: var(--ink-2);
  background: transparent;
  cursor: pointer;
}

.tab.active {
  color: var(--surface);
  background: var(--ink);
}

form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
}

input {
  width: 100%;
  border: 1.5px solid var(--surface-3);
  border-radius: var(--radius-md);
  padding: 14px 15px;
  color: var(--ink);
  background: var(--surface);
  outline: none;
  transition: border-color 0.18s var(--ease);
}

input:focus {
  border-color: var(--ink);
}

.primary-action,
.quiet-button {
  min-height: 46px;
  border: 0;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform 0.12s var(--ease), background 0.18s var(--ease);
}

.primary-action {
  margin-top: 8px;
  color: var(--surface);
  background: var(--ink);
  font-weight: 500;
}

.quiet-button {
  min-height: 38px;
  padding: 0 14px;
  color: var(--ink-2);
  background: var(--surface-2);
}

button:active {
  transform: scale(0.98);
}

.message {
  min-height: 20px;
  margin: 16px 0 0;
  text-transform: none;
  letter-spacing: 0;
}

.message.error {
  color: var(--accent);
}

.legal-note {
  margin: 14px 0 0;
  color: var(--ink-3);
  font-size: 0.86rem;
  line-height: 1.5;
}

.legal-note a {
  color: var(--ink);
  font-weight: 500;
}

.hidden,
[hidden] {
  display: none !important;
}

.idea-dashboard {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 356px minmax(0, 1fr);
  background: #f7f7f7;
}

.idea-sidebar {
  min-height: calc(100vh - 28px);
  margin: 14px;
  padding: 24px;
  display: grid;
  align-content: space-between;
  border-radius: 18px;
  background: #ececec;
}

.idea-sidebar-main {
  display: grid;
  gap: 42px;
}

.idea-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 1.8rem;
  font-weight: 600;
}

.idea-brand img {
  width: 32px;
  height: 32px;
}

.new-workspace-link {
  width: max-content;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 15px;
  border: 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.new-workspace-link span {
  font-size: 1.5rem;
  font-weight: 300;
  transform: translateY(-1px);
}

.new-workspace-link strong {
  font-size: 1rem;
  font-weight: 600;
}

.workspace-list-panel {
  display: grid;
  gap: 20px;
}

.workspace-list-panel > p {
  margin: 0;
  color: #b1b1b1;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.workspace-list {
  display: grid;
  gap: 8px;
}

.workspace-item {
  min-height: 48px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 12px;
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: default;
}

.workspace-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1rem;
  font-weight: 600;
}

.workspace-item:hover {
  background: #e4e4e4;
}

.empty-workspaces {
  margin: 0;
  color: var(--ink-3);
  font-size: 0.95rem;
}

.idea-account-area {
  position: relative;
  display: grid;
  gap: 10px;
}

.idea-account-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 36px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
}

.avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--surface);
  background: var(--ink);
  font-size: 0.85rem;
  font-weight: 600;
}

.idea-account-card strong,
.idea-account-card span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.idea-account-card strong {
  font-size: 1rem;
  font-weight: 600;
}

.idea-account-card span {
  margin-top: 2px;
  color: var(--ink-3);
  font-size: 0.9rem;
}

.icon-button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 12px;
  color: var(--ink-2);
  background: transparent;
  cursor: pointer;
}

.icon-button:hover {
  background: #e2e2e2;
}

.idea-account-menu {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #d8d8d8;
  border-radius: 16px;
  background: #f4f4f4;
}

.idea-account-menu button {
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--accent);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.idea-account-menu button:hover {
  background: #e8e8e8;
}

.idea-main {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px;
}

.validate-panel {
  width: min(100%, 560px);
  display: grid;
  gap: 20px;
  transform: translateY(-24px);
}

.validate-panel h1 {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: clamp(2.6rem, 4vw, 3.7rem);
  line-height: 0.98;
  font-weight: 600;
  text-align: center;
  text-wrap: balance;
}

.validate-panel input {
  min-height: 64px;
  border: 1px solid #dedede;
  border-radius: 10px;
  padding: 0 18px;
  font-size: 1rem;
  background: #fbfbfb;
}

.validate-panel button {
  min-height: 64px;
  border: 0;
  border-radius: 10px;
  color: var(--surface);
  background: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s var(--ease), background 0.18s var(--ease);
}

.validate-panel button:active,
.new-workspace-link:active,
.icon-button:active {
  transform: scale(0.96);
}

.validate-message {
  min-height: 22px;
  margin: 0;
  color: var(--ink-3);
  text-align: center;
}

@media (max-width: 920px) {
  .auth-shell,
  .idea-dashboard {
    grid-template-columns: 1fr;
  }

  .brand-panel {
    min-height: auto;
    gap: 54px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .idea-sidebar {
    min-height: auto;
    margin: 12px;
    gap: 64px;
  }

  .statement h1 {
    font-size: 3.4rem;
  }
}

@media (max-width: 620px) {
  .brand-panel,
  .workspace,
  .idea-main,
  .idea-sidebar {
    padding: 20px;
  }

  .panel {
    padding: 20px;
  }

  .idea-main {
    min-height: 70vh;
    place-items: start center;
  }

  .validate-panel {
    transform: none;
    padding-top: 64px;
  }

  .validate-panel h1 {
    font-size: 2.6rem;
  }
}
