﻿:root {
  --bg-0: #070b12;
  --bg-1: #0d1520;
  --bg-2: #111e2d;
  --panel: rgba(18, 30, 46, 0.72);
  --panel-strong: rgba(19, 35, 56, 0.9);
  --card: #162638;
  --text: #e6eef8;
  --text-dim: #9eb2c8;
  --line: rgba(147, 185, 224, 0.25);
  --accent: #24c0ff;
  --accent-2: #4dd2ff;
  --warn: #ffbc5b;
  --danger: #ff6b6b;
  --success: #6ee7b7;
  --radius: 14px;
}

* { box-sizing: border-box; }

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

body {
  color: var(--text);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(36, 192, 255, 0.2), transparent 65%),
    radial-gradient(900px 480px at 0% 100%, rgba(77, 210, 255, 0.16), transparent 70%),
    linear-gradient(160deg, var(--bg-0) 0%, var(--bg-1) 42%, var(--bg-2) 100%);
}

a {
  color: var(--accent-2);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(9, 15, 23, 0.96), rgba(9, 15, 23, 0.86));
  backdrop-filter: blur(8px);
}

.topbar h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #eef6ff;
}

.topbar p {
  margin: 6px 0 0;
  color: var(--text-dim);
  font-size: 14px;
}

.container {
  width: min(1280px, 96%);
  margin: 20px auto 34px;
}

.messages {
  margin-bottom: 12px;
}

.msg {
  padding: 11px 13px;
  border-radius: 10px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  background: rgba(16, 31, 47, 0.7);
}

.msg.success {
  border-color: rgba(110, 231, 183, 0.55);
  color: #ccfbe7;
}

.msg.error {
  border-color: rgba(255, 107, 107, 0.55);
  color: #ffd6d6;
}

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

.search-form {
  display: flex;
  gap: 8px;
  min-width: 340px;
  flex: 1;
}

input, textarea, button {
  font: inherit;
}

input, textarea {
  width: 100%;
  border: 1px solid rgba(126, 162, 198, 0.35);
  border-radius: 10px;
  padding: 9px 10px;
  color: #eaf3fd;
  background: rgba(9, 19, 31, 0.72);
}

input::placeholder,
textarea::placeholder {
  color: #8ca5be;
}

button, .button {
  border: 1px solid transparent;
  background: linear-gradient(90deg, #1098d3, #24c0ff);
  color: #061018;
  font-weight: 600;
  border-radius: 10px;
  padding: 9px 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

button:hover,
.button:hover {
  filter: brightness(1.06);
  text-decoration: none;
}

.button.ghost {
  border-color: rgba(126, 162, 198, 0.35);
  background: rgba(20, 35, 53, 0.72);
  color: #d7e7f8;
}

.toolbar-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 14px 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.card h2 {
  margin: 0 0 8px;
}

.admin-overview h2 {
  color: #eef7ff;
}

.admin-overview p {
  margin: 0;
  color: var(--text-dim);
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
  box-shadow: 0 18px 35px rgba(3, 9, 16, 0.45);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1100px;
}

th, td {
  border-bottom: 1px solid rgba(126, 162, 198, 0.24);
  padding: 11px 10px;
  text-align: left;
  vertical-align: top;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #182d44;
  color: #eaf3fd;
  font-weight: 600;
}

.empty {
  text-align: center;
  color: var(--text-dim);
}

.inline-form {
  display: inline;
}

.link-btn {
  color: var(--accent-2);
  background: none;
  border: 0;
  padding: 0;
  margin-right: 8px;
  cursor: pointer;
  text-decoration: underline;
}

.link-btn.danger {
  color: var(--danger);
}

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

.grid-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: #d8e7f7;
}

.full {
  grid-column: 1 / -1;
}

.actions {
  display: flex;
  gap: 8px;
}

.defect-thumb {
  width: 124px;
  height: 74px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0f1b2b;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--line);
  background: rgba(19, 33, 49, 0.84);
}

.badge.muted {
  color: var(--text-dim);
}

.defect-text {
  white-space: pre-wrap;
  line-height: 1.5;
}

.muted-text {
  color: var(--text-dim);
  font-size: 13px;
  margin-top: 4px;
}

.defect-result-title {
  font-weight: 700;
  color: #f0f8ff;
}

.defect-summary {
  margin-top: 6px;
  line-height: 1.48;
}

details summary {
  cursor: pointer;
  color: #dcecff;
}

.detail-block {
  margin-top: 8px;
  color: #d8e7f8;
}

.detail-title {
  font-weight: 700;
  margin-bottom: 4px;
  color: #eff8ff;
}

.detail-block ul {
  margin: 0;
  padding-left: 18px;
}

.detail-links {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.portal-body {
  margin: 0;
}

.portal-main {
  width: min(1140px, 92%);
  margin: 30px auto 46px;
}

.portal-hero {
  position: relative;
  padding: 30px 28px;
  border-radius: 18px;
  border: 1px solid rgba(133, 170, 208, 0.3);
  background:
    linear-gradient(130deg, rgba(18, 38, 58, 0.9), rgba(13, 25, 40, 0.86)),
    repeating-linear-gradient(
      90deg,
      rgba(51, 90, 131, 0.16) 0,
      rgba(51, 90, 131, 0.16) 1px,
      transparent 1px,
      transparent 34px
    );
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3);
}

.hero-tag {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 1.4px;
  color: #9fd7ff;
  border: 1px solid rgba(148, 197, 243, 0.35);
  border-radius: 999px;
  padding: 4px 10px;
}

.portal-hero h1 {
  margin: 14px 0 10px;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: 0.8px;
  color: #f3f9ff;
}

.portal-hero p {
  margin: 0;
  color: #bbd0e6;
  line-height: 1.6;
}

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

.portal-card {
  border: 1px solid rgba(133, 170, 208, 0.3);
  border-radius: 16px;
  padding: 22px 20px;
  background: linear-gradient(160deg, rgba(16, 29, 45, 0.9), rgba(13, 23, 36, 0.86));
  color: #e8f3ff;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.portal-card:hover {
  transform: translateY(-3px);
  border-color: rgba(92, 187, 255, 0.62);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
  text-decoration: none;
}

.portal-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(119, 187, 242, 0.5);
  background: rgba(17, 38, 59, 0.9);
  font-size: 18px;
}

.portal-card h2 {
  margin: 12px 0 8px;
  color: #f5fbff;
}

.portal-card p {
  margin: 0;
  color: #b8cee4;
  line-height: 1.55;
}

.portal-link {
  display: inline-block;
  margin-top: 14px;
  color: #57cbff;
  font-weight: 600;
}

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

@media (max-width: 760px) {
  .topbar {
    position: static;
    padding: 16px 14px 12px;
  }

  .topbar h1 {
    font-size: 24px;
  }

  .container {
    width: min(100%, 96%);
    margin-top: 14px;
  }

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

  .search-form {
    min-width: 0;
  }

  .toolbar {
    align-items: stretch;
  }

  .toolbar-links {
    width: 100%;
  }

  .toolbar-links .button,
  .toolbar-links button {
    flex: 1;
    text-align: center;
  }
}