:root {
  --bg: #111315;
  --shell: #17191b;
  --panel: #1d1f21;
  --panel-soft: #202325;
  --panel-strong: #0f1112;
  --line: #2d3134;
  --line-soft: rgba(255, 255, 255, 0.06);
  --ink: #f1f3f5;
  --muted: #8b949e;
  --accent: #18a7df;
  --accent-strong: #0e85b6;
  --accent-soft: rgba(24, 167, 223, 0.16);
  --success: #2f5218;
  --success-ink: #daf1b8;
  --warning: #504612;
  --warning-ink: #f4dc74;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  overflow: hidden;
  font-family: "Segoe UI Variable Text", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(61, 125, 255, 0.12), transparent 24%),
    radial-gradient(circle at 82% 16%, rgba(16, 167, 223, 0.08), transparent 18%),
    radial-gradient(circle at bottom right, rgba(91, 76, 255, 0.07), transparent 22%),
    linear-gradient(180deg, #0a0b0d 0%, #0e1012 48%, #111315 100%);
  background-attachment: fixed;
}

button,
input,
a {
  font: inherit;
}

body.auth-locked {
  overflow: hidden;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 32px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    radial-gradient(circle at 30% 22%, rgba(66, 121, 255, 0.1), transparent 18%),
    linear-gradient(180deg, #060708 0%, #090a0c 100%);
  background-size: 44px 44px, 44px 44px, auto, auto;
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease;
}

body.auth-locked .auth-gate {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.auth-card {
  width: min(100%, 420px);
  padding: 32px 38px 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(16, 16, 17, 0.98) 0%, rgba(12, 12, 13, 0.98) 100%);
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.auth-layout {
  width: min(100%, 1100px);
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 420px);
  align-items: center;
  gap: 72px;
}

.auth-hero {
  max-width: 460px;
  padding: 10px 0;
}

.auth-kicker {
  margin: 0 0 16px;
  color: #79d4f2;
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 700;
}

.auth-hero h1 {
  margin: 0;
  font-size: clamp(2.7rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
  font-weight: 700;
}

.auth-hero h1 span {
  display: block;
  margin-top: 4px;
  color: #5f89ff;
}

.auth-copy {
  max-width: 430px;
  margin: 24px 0 0;
  color: #989ca2;
  font-size: 0.98rem;
  line-height: 1.7;
}

.auth-card h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
}

.auth-field {
  display: grid;
  gap: 10px;
  margin-top: 26px;
}

.auth-field span {
  color: #8d9198;
  font-size: 0.9rem;
  font-weight: 600;
}

.auth-input-wrap {
  position: relative;
}

.auth-field input {
  width: 100%;
  height: 44px;
  padding: 0 48px 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  background: #1f1f20;
  color: #f0f2f4;
  outline: none;
  font-size: 0.95rem;
}

.auth-field input:focus {
  border-color: rgba(91, 145, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(72, 122, 228, 0.12);
}

.auth-eye-button {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #b9c1c9;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.auth-eye-button:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(93, 104, 114, 0.35);
  color: #eef4f8;
}

.auth-eye-button:focus-visible {
  outline: none;
  border-color: rgba(24, 167, 223, 0.55);
  box-shadow: 0 0 0 3px rgba(24, 167, 223, 0.12);
}

.eye-icon {
  position: relative;
  width: 18px;
  height: 18px;
  display: block;
}

.eye-icon::before,
.eye-icon::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.eye-icon::before {
  inset: 3px 1px;
  border: 2px solid currentColor;
  border-radius: 12px / 8px;
}

.eye-icon::after {
  top: 6px;
  left: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.auth-eye-button.is-visible .eye-icon::before {
  inset: 3px 1px;
}

.auth-eye-button.is-visible .eye-icon {
  color: #8de0ff;
}

.auth-eye-button.is-visible::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 2px;
  background: currentColor;
  transform: rotate(-35deg);
}

.auth-actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}

.auth-actions .primary-button {
  min-width: 132px;
}

.auth-submit-button {
  width: 100%;
  min-height: 42px;
  padding: 0 22px;
  border-radius: 12px;
  background: linear-gradient(180deg, #5b9bf2 0%, #4e8fe8 100%);
  color: #f8fbff;
  font-size: 0.96rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.auth-submit-button:hover:not(:disabled) {
  background: linear-gradient(180deg, #68a5f7 0%, #5896eb 100%);
  color: #ffffff;
}

.auth-message {
  min-height: 22px;
  margin: 18px 0 0;
  color: #8e9399;
  font-size: 0.94rem;
  line-height: 1.45;
  text-align: center;
}

.auth-message.error {
  color: #ff9a9a;
}

.auth-message.success {
  color: #aeeabf;
}

.app-shell {
  min-height: 100vh;
  height: 100vh;
  display: grid;
  grid-template-columns: 72px 0 1fr;
  transition: grid-template-columns 180ms ease;
  overflow: hidden;
}

body.auth-locked .app-shell {
  pointer-events: none;
  filter: blur(8px);
  user-select: none;
}

.app-shell.panel-open {
  grid-template-columns: 72px 360px 1fr;
}

.sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 18px 0;
  background: #141618;
  border-right: 1px solid var(--line);
}

.side-panel {
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: #121518;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.app-shell.panel-open .side-panel {
  opacity: 1;
  pointer-events: auto;
}

.side-panel-head {
  padding: 20px 18px 10px;
}

.side-panel-kicker {
  margin: 0 0 6px;
  color: #54779a;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

.side-panel-head h2 {
  margin: 0;
  font-size: 1.2rem;
}

.side-panel-copy {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.92rem;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #28b7f3 0%, #1695dd 100%);
  color: #00131d;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  box-shadow: 0 12px 28px rgba(26, 162, 238, 0.24);
}

.sidebar-nav,
.sidebar-footer {
  display: grid;
  gap: 18px;
}

.nav-item {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.nav-item span {
  position: relative;
  width: 16px;
  height: 16px;
  display: block;
  color: #90979f;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(24, 167, 223, 0.14);
  border-color: rgba(24, 167, 223, 0.28);
  transform: translateY(-1px);
}

.nav-item.active span,
.nav-item:hover span {
  color: #1bb4ef;
}

.nav-home span::before,
.nav-compare span::before,
.nav-options span::before,
.nav-home span::after,
.nav-compare span::after,
.nav-options span::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.nav-home span::before {
  left: 3px;
  right: 3px;
  bottom: 2px;
  height: 9px;
  border: 2px solid currentColor;
  border-radius: 2px;
  border-top: none;
}

.nav-home span::after {
  left: 50%;
  top: 1px;
  width: 9px;
  height: 9px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: translateX(-50%) rotate(45deg);
  background: transparent;
}

.nav-compare span::before {
  left: 1px;
  top: 2px;
  width: 6px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.nav-compare span::after {
  right: 1px;
  top: 2px;
  width: 6px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.nav-options span::before {
  inset: 2px;
  border: 2px solid currentColor;
  border-radius: 5px;
}

.nav-options span::after {
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  border: 2px solid currentColor;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #141618;
}

.app-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 18px 22px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.app-main::-webkit-scrollbar {
  display: none;
}

.view-panel {
  display: none;
}

.view-panel.is-active {
  display: block;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #1a1c1d;
  box-shadow: var(--shadow);
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.window-dots {
  display: flex;
  gap: 8px;
}

.window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3d4349;
}

.section-kicker {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar h1 {
  margin: 0;
  font-family: "Segoe UI Variable Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.top-pill,
.top-user {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  font-weight: 700;
}

.top-pill {
  background: #0d1116;
  color: #a9b7c6;
  border: 1px solid #1e2d3b;
}

.top-user {
  background: rgba(24, 167, 223, 0.12);
  color: #7dd8fb;
  border: 1px solid rgba(24, 167, 223, 0.12);
}

.top-lock-button {
  min-height: 38px;
  padding: 0 14px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1de38d;
  box-shadow: 0 0 10px rgba(29, 227, 141, 0.45);
}

.dashboard {
  margin-top: 18px;
}

.compare-view {
  margin-top: 18px;
}

.workspace-card,
.rail-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.workspace-card {
  padding: 22px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.workspace-card.dragover {
  border-color: rgba(24, 167, 223, 0.65);
  box-shadow: 0 0 0 3px rgba(24, 167, 223, 0.12), var(--shadow);
  background: linear-gradient(180deg, rgba(24, 167, 223, 0.06), rgba(24, 167, 223, 0.02)), var(--panel);
}

.compare-shell {
  display: grid;
  gap: 22px;
}

.compare-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.compare-title {
  margin: 6px 0 0;
  font-size: 1.45rem;
  font-weight: 700;
}

.compare-status {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.compare-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.compare-card,
.compare-table-card,
.compare-analysis-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #17191b 0%, #141617 100%);
}

.compare-card {
  overflow: hidden;
}

.compare-card-head {
  padding: 16px 18px 0;
}

.compare-label {
  margin: 0;
  color: #79d1eb;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
}

.compare-summary {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.compare-preview {
  min-height: 250px;
  margin: 16px 18px 18px;
  border: 1px dashed rgba(24, 167, 223, 0.22);
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(24, 167, 223, 0.12), transparent 26%),
    #121416;
  overflow: hidden;
}

.compare-preview img,
.compare-preview video {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: contain;
  background: #0e1011;
}

.compare-meta-list {
  display: grid;
  gap: 10px;
  padding: 0 18px 18px;
}

.compare-meta-item {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.compare-meta-name {
  color: #79d1eb;
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}

.compare-meta-value {
  color: #dbe4ec;
  line-height: 1.5;
  word-break: break-word;
}

.compare-table-head,
.compare-table-row {
  display: grid;
  grid-template-columns: minmax(140px, 0.9fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.compare-table-head {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.compare-table-body {
  display: grid;
}

.compare-table-row {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-soft);
}

.compare-table-row:last-child {
  border-bottom: none;
}

.compare-table-row.is-different {
  background: linear-gradient(90deg, rgba(24, 167, 223, 0.08), transparent 80%);
}

.compare-analysis-card {
  padding: 18px;
}

.compare-analysis-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 14px;
}

.compare-analysis-title {
  margin: 8px 0 0;
  font-size: 1.1rem;
}

.compare-analysis-copy {
  margin: 0;
  max-width: 520px;
  color: var(--muted);
  line-height: 1.5;
}

.compare-analysis-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.compare-analysis-item {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
}

.compare-analysis-name {
  color: #79d1eb;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}

.compare-analysis-verdict {
  font-size: 1rem;
  font-weight: 700;
}

.compare-analysis-verdict.is-probable {
  color: #f3df8a;
}

.compare-analysis-verdict.is-none {
  color: #b7d8bf;
}

.compare-analysis-verdict.is-unknown {
  color: #cfd7de;
}

.compare-analysis-detail {
  color: #dbe4ec;
  line-height: 1.55;
}

.compare-cell-label {
  color: #79d1eb;
  font-weight: 700;
}

.compare-cell-value {
  color: #dbe4ec;
  line-height: 1.5;
  word-break: break-word;
}

.compare-cell-value.is-different {
  color: #f1f6fa;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hidden-input {
  display: none;
}

.search-field {
  position: relative;
  flex: 1;
}

.search-field input {
  width: 100%;
  height: 48px;
  padding: 0 18px 0 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-strong);
  color: var(--ink);
  outline: none;
}

.search-field input::placeholder {
  color: #717983;
}

.search-field input:focus {
  border-color: rgba(24, 167, 223, 0.55);
  box-shadow: 0 0 0 3px rgba(24, 167, 223, 0.12);
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 18px;
  width: 16px;
  height: 16px;
  border: 2px solid #6d757e;
  border-radius: 50%;
  transform: translateY(-55%);
}

.search-icon::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 7px;
  height: 2px;
  background: #6d757e;
  transform: rotate(45deg);
  transform-origin: center;
}

.toolbar-actions {
  display: flex;
  gap: 10px;
}

.primary-button,
.secondary-button,
.ghost-button,
.download-link,
.row-download {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.primary-button,
.secondary-button,
.ghost-button {
  border: 1px solid transparent;
  cursor: pointer;
}

.primary-button {
  background: var(--accent);
  color: #031118;
  font-weight: 700;
}

.primary-button:hover:not(:disabled),
.secondary-button:hover:not(:disabled),
.ghost-button:hover:not(:disabled),
.download-link:hover,
.row-download:hover {
  transform: translateY(-1px);
}

.secondary-button {
  background: #2d4e19;
  color: #d8efb7;
  font-weight: 700;
}

.ghost-button {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.primary-button:hover:not(:disabled) {
  background: var(--accent-strong);
  color: #ffffff;
}

.secondary-button:hover:not(:disabled) {
  background: #3a6620;
}

.ghost-button:hover:not(:disabled) {
  border-color: #3e454d;
  background: rgba(255, 255, 255, 0.02);
}

button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.stats-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #202224 0%, #1b1d1f 100%);
}

.stat-card-wide {
  background: linear-gradient(180deg, rgba(24, 167, 223, 0.12), rgba(24, 167, 223, 0.04));
}

.stat-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.stat-value {
  margin: 10px 0 0;
  font-size: 2rem;
  font-weight: 800;
}

.stat-value-small {
  font-size: 1rem;
  line-height: 1.5;
  color: #9edff7;
}

.drop-hint {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px dashed rgba(24, 167, 223, 0.24);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(24, 167, 223, 0.05);
}

.batch-card {
  margin-top: 0;
  width: min(100%, 560px);
  justify-self: center;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #1b1d1f 0%, #17191b 100%);
}

.side-batch-card {
  width: 100%;
  justify-self: stretch;
}

.batch-kicker {
  margin: 0;
  text-align: center;
  color: #54779a;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

.batch-stepper {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.batch-button {
  min-width: 44px;
  padding: 0;
  font-size: 1.3rem;
  line-height: 1;
}

.batch-value {
  min-width: 68px;
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 0 16px;
  border: 1px solid var(--accent);
  border-radius: 12px;
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: 800;
  background: rgba(24, 167, 223, 0.08);
}

.batch-range-wrap {
  margin-top: 12px;
  display: flex;
  justify-content: center;
}

.batch-range-wrap input[type="range"] {
  width: min(320px, 100%);
  accent-color: #10c7e8;
}

.batch-summary {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(24, 167, 223, 0.24);
  border-radius: 12px;
  text-align: center;
  color: #9edff7;
  background: rgba(24, 167, 223, 0.05);
  font-weight: 700;
}

.workspace-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(340px, 0.7fr);
  gap: 18px;
  align-items: stretch;
}

.workspace-main-stack {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.workspace-side-stack {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.side-options-grid {
  grid-template-columns: 1fr;
  margin-top: 0;
  padding: 0 18px 18px;
  align-content: start;
  max-height: calc(100vh - 110px);
  overflow: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.side-options-grid .option-card-wide {
  grid-column: auto;
}

.side-options-grid::-webkit-scrollbar {
  display: none;
}

.option-card {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #14171a;
}

.option-card-wide {
  grid-column: span 2;
}

.option-title {
  margin: 0 0 16px;
  color: #54779a;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

.option-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}

.option-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.option-row label {
  color: #9eb2c7;
  font-size: 0.95rem;
}

.toggle-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #10c7e8;
  cursor: pointer;
}

.option-row select {
  min-width: 180px;
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #1a1e22;
  color: var(--ink);
}

.range-row {
  grid-template-columns: minmax(0, 160px) minmax(0, 1fr);
}

.range-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.range-wrap input[type="range"] {
  width: 100%;
  accent-color: #10c7e8;
}

.range-value {
  min-width: 24px;
  text-align: right;
  color: #10d7ff;
  font-size: 0.9rem;
  font-weight: 700;
}

.table-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-soft);
  overflow: hidden;
}

.table-head,
.table-row {
  display: grid;
  grid-template-columns: minmax(0, 2.3fr) 0.9fr 0.8fr 0.9fr 1fr 1fr;
  gap: 12px;
  align-items: center;
}

.table-head {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.table-body {
  min-height: 430px;
}

.empty-state {
  display: grid;
  place-items: center;
  padding: 34px 24px;
  color: var(--muted);
}

.table-row {
  padding: 18px;
  border-bottom: 1px solid var(--line-soft);
}

.table-row:last-child {
  border-bottom: none;
}

.row-name-block {
  min-width: 0;
}

.file-name,
.result-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-meta,
.result-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.file-type-badge,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.88rem;
}

.file-type-badge {
  background: var(--accent-soft);
  color: #7fddff;
}

.status-pill.pending {
  background: rgba(255, 202, 36, 0.16);
  color: #f2d45d;
}

.status-pill.done {
  background: var(--success);
  color: var(--success-ink);
}

.row-size,
.row-duration {
  color: #d4d7db;
}

.row-action {
  display: flex;
  justify-content: flex-start;
}

.row-action-text {
  color: var(--muted);
}

.row-download,
.download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(24, 167, 223, 0.22);
  background: rgba(24, 167, 223, 0.14);
  color: #8de0ff;
  font-weight: 700;
}
.console-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #17191b;
  overflow: hidden;
}

.side-console-card {
  min-height: 430px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.compact-console-card {
  min-height: 180px;
  height: auto;
  max-height: none;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.console-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.console-head h2 {
  margin: 0;
  font-size: 1rem;
}

.console-status {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.console-badge {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(24, 167, 223, 0.12);
  color: #8de0ff;
  font-size: 0.8rem;
  font-weight: 700;
}

.console-list {
  display: grid;
  gap: 0;
  max-height: 360px;
  overflow: auto;
}

.side-console-card .console-list {
  max-height: none;
  min-height: 0;
  flex: 1;
}

.compact-console-list {
  max-height: 180px;
  min-height: 0;
  flex: 0 0 auto;
  overflow: auto;
}

.audit-console-list {
  max-height: none;
  min-height: 0;
  flex: 1;
  overflow-x: hidden;
}

.console-item {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: #151719;
  min-width: 0;
}

.console-item:last-child {
  border-bottom: none;
}

.compact-console-item {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: #151719;
}

.compact-console-item:last-child {
  border-bottom: none;
}

.compact-console-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.compact-console-item .result-meta {
  margin: 0;
  white-space: nowrap;
}

.compact-console-item .console-details {
  margin: 6px 0 0;
  font-size: 0.84rem;
}

.console-item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.console-details {
  margin: 8px 0 0;
  color: #9aa4ae;
  font-size: 0.88rem;
  line-height: 1.5;
}

.console-technical {
  margin: 8px 0 0;
  color: #7ec9e7;
  font-size: 0.84rem;
  line-height: 1.5;
}

.console-log-pane {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #111315 0%, #141618 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
  min-width: 0;
}

.audit-log-pane {
  height: 100%;
}

.console-log-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.console-log-title {
  margin: 0;
  color: #e7edf3;
  font-size: 0.92rem;
  font-weight: 700;
}

.audit-log-meta {
  min-width: 0;
}

.audit-log-meta .result-name,
.audit-log-meta .result-meta {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audit-log-meta .result-meta {
  margin: 6px 0 0;
}

.console-log-grid {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.console-log-group {
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  min-width: 0;
}

.console-log-label {
  margin: 0;
  color: #8de0ff;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.console-log-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  min-width: 0;
}

.console-log-line {
  padding: 7px 9px;
  border-radius: 10px;
  font-size: 0.84rem;
  line-height: 1.45;
  color: #cdd6df;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.03);
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.console-log-line.removed {
  color: #ffc1c1;
  background: rgba(147, 45, 45, 0.14);
  border-color: rgba(255, 120, 120, 0.12);
}

.console-log-line.replaced {
  color: #ffe3a2;
  background: rgba(124, 92, 20, 0.14);
  border-color: rgba(255, 210, 92, 0.12);
}

.console-log-line.applied {
  color: #9fe7ff;
  background: rgba(24, 167, 223, 0.12);
  border-color: rgba(24, 167, 223, 0.12);
}

.console-log-line.empty {
  color: var(--muted);
}

@media (max-width: 860px) {
  .auth-layout {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .auth-hero {
    max-width: none;
    text-align: center;
  }

  .auth-copy {
    max-width: none;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar,
  .side-panel {
    display: none;
  }

  .topbar,
  .toolbar,
  .compare-toolbar,
  .console-item-top,
  .console-head,
  .console-log-head {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-actions,
  .topbar-right,
  .compare-toolbar-actions {
    flex-wrap: wrap;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .options-grid {
    grid-template-columns: 1fr;
  }

  .option-card-wide {
    grid-column: auto;
  }

  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .compare-grid,
  .compare-table-head,
  .compare-table-row {
    grid-template-columns: 1fr;
  }

  .compare-analysis-head {
    flex-direction: column;
  }

  .compare-analysis-list {
    grid-template-columns: 1fr;
  }

  .table-head {
    display: none;
  }

  .table-body {
    min-height: 0;
  }

  .table-row {
    grid-template-columns: 1fr;
  }

}
