:root {
  --bg: #eef3fb;
  --panel: rgba(255, 255, 255, 0.72);
  --ink: #1f2329;
  --subtle: #5e6775;
  --line: rgba(20, 24, 33, 0.09);
  --accent: #0a84ff;
  --accent-strong: #0066cc;
  --error: #c23b31;
  --shadow: 0 30px 80px rgba(28, 42, 74, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Hiragino Sans GB", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 18%, rgba(81, 132, 255, 0.26), transparent 22%),
    radial-gradient(circle at 82% 12%, rgba(140, 198, 255, 0.32), transparent 24%),
    radial-gradient(circle at 70% 85%, rgba(255, 176, 120, 0.2), transparent 22%),
    linear-gradient(180deg, #edf3fb 0%, #dfe9f7 100%);
}

.page {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 56px;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.auth-page::before,
.auth-page::after {
  content: "";
  position: absolute;
  inset: auto;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.48;
  pointer-events: none;
}

.auth-page::before {
  top: -120px;
  left: -80px;
  background: rgba(74, 144, 226, 0.34);
}

.auth-page::after {
  right: -100px;
  bottom: -120px;
  background: rgba(255, 179, 102, 0.28);
}

.auth-card {
  width: min(460px, 100%);
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.46);
  box-shadow: var(--shadow);
  backdrop-filter: blur(28px) saturate(145%);
  -webkit-backdrop-filter: blur(28px) saturate(145%);
  position: relative;
  z-index: 1;
}

.auth-card-mac {
  overflow: hidden;
}

.auth-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
  padding: 14px 10px 8px;
}

.auth-brand {
  flex: 0 0 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.auth-logo {
  flex: 0 0 auto;
  width: 78px;
  height: 78px;
  object-fit: contain;
  background: transparent;
  filter: drop-shadow(0 8px 14px rgba(33, 98, 162, 0.1));
}

.auth-group-name {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  color: #1f2329;
  letter-spacing: 0.04em;
  text-align: center;
}

.auth-title-group {
  min-width: 0;
  padding-top: 10px;
}

.auth-kicker {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0.02em;
  color: #2b5ea7;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 0 4px;
  color: var(--subtle);
  font-size: 14px;
}

.topbar-meta {
  min-height: 21px;
}

.topbar-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.warn-text {
  color: var(--error);
}

.hero {
  padding: 28px 30px;
  border: 1px solid rgba(32, 32, 32, 0.08);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 250, 242, 0.96), rgba(245, 235, 220, 0.92));
  box-shadow: var(--shadow);
}

.hero.compact {
  padding-bottom: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-top: 4px;
}

h2 {
  font-size: 22px;
}

.subtitle {
  margin: 12px 0 0;
  color: var(--subtle);
  line-height: 1.7;
}

.panel {
  margin-top: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 250, 242, 0.92);
  box-shadow: var(--shadow);
}

.error-panel {
  border-color: rgba(162, 61, 47, 0.24);
  background: rgba(255, 243, 241, 0.95);
}

.success-panel {
  border-color: rgba(28, 138, 130, 0.18);
  background: rgba(240, 252, 249, 0.96);
}

.report-form {
  display: grid;
  gap: 16px;
}

.auth-form {
  gap: 18px;
  padding: 0 10px 10px;
}

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

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

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 20px rgba(103, 126, 167, 0.08);
}

.check-item input[type="checkbox"] {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

.check-item span {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink);
}

label span {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--subtle);
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea,
input[type="file"] {
  width: 100%;
  padding: 15px 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 20px rgba(103, 126, 167, 0.08);
  font-size: 16px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

input[type="text"]::placeholder,
input[type="password"]::placeholder,
input[type="number"]::placeholder,
textarea::placeholder {
  color: #8e97a7;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus,
input[type="file"]:focus {
  border-color: rgba(10, 132, 255, 0.55);
  box-shadow:
    0 0 0 4px rgba(10, 132, 255, 0.12),
    0 14px 30px rgba(103, 126, 167, 0.12);
  background: rgba(255, 255, 255, 0.9);
}

textarea {
  min-height: 260px;
  resize: vertical;
  line-height: 1.7;
}

.result-textarea {
  min-height: 420px;
  margin-top: 16px;
  white-space: pre-wrap;
  font-size: 15px;
}

.tip-box {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(24, 92, 79, 0.08);
  color: var(--accent-strong);
}

.upload-entry {
  display: grid;
  gap: 10px;
}

.upload-entry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.upload-entry-head span {
  margin: 0;
}

.upload-entry-note {
  font-size: 13px;
  color: #7a8291;
  font-weight: 500;
}

.upload-entry-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 20px rgba(103, 126, 167, 0.08);
}

.upload-entry-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.upload-entry-status {
  margin: 0;
  font-size: 14px;
  color: var(--subtle);
  line-height: 1.6;
}

.upload-entry-status.is-error {
  color: var(--error);
}

.upload-entry-hint {
  margin: -4px 0 0;
  font-size: 13px;
  color: #7a8291;
  line-height: 1.6;
}

.alert {
  margin: 0 10px 18px;
  padding: 12px 14px;
  border-radius: 16px;
  line-height: 1.6;
  font-size: 14px;
  backdrop-filter: blur(10px);
}

.error-alert {
  background: rgba(194, 59, 49, 0.1);
  color: var(--error);
  border: 1px solid rgba(194, 59, 49, 0.12);
}

.success-alert {
  background: rgba(28, 138, 130, 0.1);
  color: #1c726b;
  border: 1px solid rgba(28, 138, 130, 0.12);
}

.warn-panel,
.warn-alert {
  background: rgba(255, 159, 10, 0.12);
  color: #9a5c00;
  border: 1px solid rgba(255, 159, 10, 0.12);
}

.tip-box p {
  margin: 8px 0 0;
  line-height: 1.6;
}

.primary-btn,
.secondary-btn,
.text-link {
  text-decoration: none;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 14px 18px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(180deg, #0a84ff 0%, #0071e3 100%);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 18px 34px rgba(10, 132, 255, 0.24);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.primary-btn:hover {
  background: linear-gradient(180deg, #1690ff 0%, #0077ed 100%);
  box-shadow: 0 22px 38px rgba(10, 132, 255, 0.28);
  transform: translateY(-1px);
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    0 10px 22px rgba(103, 126, 167, 0.1);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.secondary-btn:hover {
  border-color: rgba(10, 132, 255, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 14px 28px rgba(103, 126, 167, 0.14);
  transform: translateY(-1px);
}

.inline-btn {
  min-width: 120px;
}

.auth-btn {
  width: 100%;
  margin-top: 4px;
}

.auth-helper-text {
  margin: 16px 10px 4px;
  color: var(--subtle);
  font-size: 13px;
  line-height: 1.6;
}

.danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: none;
  border-radius: 999px;
  background: rgba(194, 59, 49, 0.12);
  color: var(--error);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.danger-btn:hover {
  background: rgba(194, 59, 49, 0.18);
}

.danger-btn:disabled,
.secondary-btn:disabled,
.primary-btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.inline-form {
  margin: 0;
}

.stacked-form {
  display: grid;
  gap: 8px;
  min-width: 190px;
}

.action-stack {
  display: grid;
  gap: 8px;
}

.compact-btn {
  min-width: 108px;
  padding: 9px 14px;
  font-size: 13px;
}

.cleanup-summary {
  margin-top: 16px;
}

.cleanup-form {
  margin-top: 18px;
}

.text-link {
  color: var(--accent);
}

.muted-text {
  color: var(--subtle);
  font-size: 14px;
}

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

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.feature-card {
  display: block;
  padding: 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 255, 0.92)),
    rgba(255, 255, 255, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 18px 36px rgba(103, 126, 167, 0.12);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  border-color: rgba(10, 132, 255, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 24px 42px rgba(10, 132, 255, 0.14);
}

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

.feature-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(10, 132, 255, 0.12);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.feature-arrow {
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}

.feature-card h3 {
  margin: 0 0 10px;
  font-size: 26px;
  line-height: 1.15;
}

.feature-card p {
  margin: 0;
  color: var(--subtle);
  line-height: 1.7;
}

.feature-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.feature-meta span {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(31, 35, 41, 0.06);
  color: var(--subtle);
  font-size: 12px;
  font-weight: 600;
}

.error-hero {
  background: linear-gradient(135deg, rgba(255, 246, 241, 0.96), rgba(255, 238, 232, 0.92));
}

.error-hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: #fffdf8;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

thead th {
  color: var(--subtle);
  font-weight: 600;
}

.status {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(108, 100, 88, 0.12);
}

.status-success {
  background: rgba(24, 92, 79, 0.12);
  color: var(--accent-strong);
}

.status-failed {
  background: rgba(162, 61, 47, 0.12);
  color: var(--error);
}

.status-processing {
  background: rgba(205, 147, 56, 0.15);
  color: #8b5e12;
}

.status-pending {
  background: rgba(72, 84, 102, 0.12);
  color: #475569;
}

.meta-list {
  display: grid;
  gap: 10px;
  line-height: 1.7;
}

.retry-form {
  margin-top: 18px;
}

.detail-stack {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.detail-card {
  padding: 16px 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
}

.detail-card h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.detail-card p {
  margin: 8px 0 0;
  line-height: 1.7;
  color: var(--subtle);
}

.audit-pre {
  margin: 10px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(31, 35, 41, 0.06);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
 }

.file-name,
.empty {
  color: var(--subtle);
}

@media (max-width: 720px) {
  .page {
    width: min(100% - 20px, 1080px);
    padding-top: 20px;
  }

  .panel,
  .hero,
  .auth-card {
    padding: 18px;
    border-radius: 18px;
  }

  .auth-header {
    gap: 14px;
    align-items: flex-start;
  }

  .auth-brand {
    flex-basis: 78px;
    gap: 8px;
  }

  .auth-logo {
    width: 60px;
    height: 60px;
  }

  .auth-group-name {
    font-size: 11px;
  }

  .auth-kicker {
    font-size: 13px;
    margin-bottom: 6px;
  }

  .auth-title-group {
    padding-top: 8px;
  }

  .feature-card {
    padding: 18px;
  }

  .feature-card h3 {
    font-size: 22px;
  }

  .grid.two-cols {
    grid-template-columns: 1fr;
  }

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

  h1 {
    font-size: 30px;
  }
}
