:root {
  color-scheme: light;
  --bg: #eef2f6;
  --panel: #ffffff;
  --ink: #172033;
  --muted: #667085;
  --line: #d9e1ea;
  --blue: #0b5cad;
  --blue-dark: #083a73;
  --cyan: #20a7db;
  --red: #bd1f2d;
  --shadow: 0 14px 38px rgba(20, 32, 52, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 96px;
  padding: 22px 32px;
  background: linear-gradient(90deg, var(--blue-dark), #10233f 72%, #2b1720);
  color: #fff;
  border-bottom: 4px solid var(--red);
}

.eyebrow {
  color: #9bdcf4;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  margin-top: 4px;
  font-size: 28px;
  font-weight: 700;
}

h2 {
  font-size: 20px;
}

h3 {
  font-size: 17px;
}

.session {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 20px;
  padding: 24px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.auth-panel {
  grid-column: 1 / -1;
  max-width: 760px;
  margin: 40px auto;
  width: 100%;
}

.panel-head {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}

.panel-head p,
.section-title {
  color: var(--muted);
}

.row,
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.form-grid,
.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 14px;
  font-weight: 600;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #c9d4e2;
  border-radius: 6px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-weight: 400;
}

textarea {
  resize: vertical;
  line-height: 1.65;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(32, 167, 219, 0.22);
  border-color: var(--cyan);
}

.checkline {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding-top: 25px;
}

.checkline input {
  width: 18px;
  height: 18px;
}

.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

button {
  border: 0;
  border-radius: 6px;
  padding: 11px 16px;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: #094f94;
}

button.secondary {
  background: #e8f1fa;
  color: var(--blue-dark);
}

button.secondary:hover {
  background: #d9eaf8;
}

button.ghost {
  background: transparent;
  color: inherit;
  border: 1px solid currentColor;
}

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

.section-title {
  margin: 22px 0 12px;
}

.groups {
  display: grid;
  gap: 14px;
}

.group-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #f8fafc;
}

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

.group-index {
  color: var(--blue-dark);
}

.upload-box {
  margin-top: 12px;
  border: 1px dashed #93a9c3;
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.upload-state {
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
}

.file-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.file-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.6fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #dde5ee;
  border-radius: 6px;
  background: #fff;
}

.file-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #26364f;
}

.task-list {
  display: grid;
  gap: 10px;
}

.task-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfdff;
}

.task-card strong {
  display: block;
  margin-bottom: 7px;
}

.task-preview {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  margin-bottom: 10px;
  background: #e6edf4;
}

.task-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.task-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.task-actions a.secondary-link {
  background: #e8f1fa;
  color: var(--blue-dark);
}

.task-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.status-line {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.progress {
  height: 8px;
  background: #e6edf4;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 10px;
}

.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.sticky-actions {
  position: sticky;
  bottom: 0;
  padding: 14px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 32%);
}

.hidden {
  display: none !important;
}

#submitHint {
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 1020px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .form-grid,
  .auth-grid,
  .file-item {
    grid-template-columns: 1fr;
  }
}
