:root {
  --bg: #f4f7fb;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-strong: #ffffff;
  --line: rgba(15, 23, 42, 0.08);
  --text: #10233f;
  --muted: #607089;
  --brand: #0f6fff;
  --brand-dark: #0a56c7;
  --accent: #00a7b3;
  --success: #0f9f63;
  --danger: #d54b4b;
  --shadow: 0 24px 60px rgba(24, 58, 99, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(15, 111, 255, 0.12), transparent 28%),
    radial-gradient(circle at bottom right, rgba(0, 167, 179, 0.12), transparent 24%),
    linear-gradient(180deg, #f8fbff 0%, #eef3f9 100%);
}

button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: inherit;
}

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

.page-shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px;
}

.panel {
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.app-sidebar {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 24px;
}

.app-main,
.profile-grid,
.publish-layout,
.stack-form,
.filters,
.order-list,
.compact-order-list {
  display: grid;
  gap: 18px;
}

.app-main {
  min-width: 0;
}

.brand-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 22px;
  text-decoration: none;
  background: linear-gradient(135deg, rgba(15, 111, 255, 0.95), rgba(0, 167, 179, 0.9));
  color: #fff;
  box-shadow: 0 20px 50px rgba(15, 111, 255, 0.24);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-copy {
  display: grid;
  gap: 4px;
}

.brand-copy strong {
  font-size: 20px;
}

.brand-copy span {
  opacity: 0.82;
  font-size: 14px;
}

.app-nav {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.nav-link {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 16px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.nav-link:hover {
  background: rgba(15, 111, 255, 0.08);
  color: var(--brand-dark);
  transform: translateX(2px);
}

.nav-link.is-active {
  background: linear-gradient(135deg, rgba(15, 111, 255, 0.12), rgba(0, 167, 179, 0.1));
  color: var(--brand-dark);
  border: 1px solid rgba(15, 111, 255, 0.14);
}

.nav-link-button {
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
}

.sidebar-card {
  display: grid;
  gap: 16px;
}

.sidebar-eyebrow,
.eyebrow,
.stat-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.user-card-inline,
.profile-summary {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(15, 111, 255, 0.07), rgba(0, 167, 179, 0.05));
  border: 1px solid rgba(15, 111, 255, 0.1);
}

.user-name {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
}

.user-meta,
.user-contact,
.helper-text,
.message-text,
.page-subtitle,
.panel-subtitle {
  color: var(--muted);
  line-height: 1.65;
}

.user-meta,
.user-contact {
  margin-top: 10px;
}

.sidebar-actions,
.tool-card,
.card-top,
.contact-row,
.contact-side,
.compact-head,
.compact-meta,
.compact-contact-line,
.toolbar-row,
.hero-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.sidebar-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hero-panel {
  align-items: flex-start;
}

.hero-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.hero-tag,
.inline-tag,
.publisher-chip,
.compact-departure-strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(15, 111, 255, 0.12), rgba(0, 167, 179, 0.08));
  border: 1px solid rgba(15, 111, 255, 0.16);
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 800;
}

.page-title {
  margin-top: 8px;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.1;
}

.page-subtitle,
.panel-subtitle {
  margin-top: 10px;
}

.panel-header h2,
.section-head h2 {
  font-size: 28px;
}

label span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 16px;
  padding: 14px 16px;
  background: var(--panel-strong);
  color: var(--text);
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(15, 111, 255, 0.14);
  border-color: rgba(15, 111, 255, 0.4);
}

.auth-layout {
  display: grid;
  grid-template-columns: 1.05fr minmax(360px, 520px);
  gap: 24px;
  align-items: stretch;
}

.auth-panel,
.auth-intro-panel {
  min-height: 100%;
}

.auth-intro-panel {
  display: grid;
  align-content: center;
  gap: 16px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.22), transparent 28%),
    linear-gradient(135deg, rgba(15, 111, 255, 0.94), rgba(0, 167, 179, 0.92));
  color: #fff;
}

.auth-intro-panel .eyebrow,
.auth-intro-panel .page-subtitle,
.auth-intro-panel .hero-tag {
  color: rgba(255, 255, 255, 0.92);
}

.auth-intro-panel .hero-tag {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
}

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

.auth-tab,
.primary-btn,
.secondary-btn,
.reveal-btn {
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.auth-tab {
  min-height: 48px;
  padding: 12px 16px;
  background: rgba(15, 111, 255, 0.08);
  color: var(--muted);
  font-weight: 700;
}

.auth-tab.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
}

.primary-btn,
.secondary-btn,
.reveal-btn {
  min-height: 48px;
  padding: 12px 18px;
  font-weight: 800;
}

.primary-btn {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  box-shadow: 0 18px 40px rgba(15, 111, 255, 0.2);
}

.secondary-btn,
.reveal-btn {
  background: rgba(15, 111, 255, 0.08);
  color: var(--brand-dark);
}

.auth-tab:hover,
.primary-btn:hover,
.secondary-btn:hover,
.reveal-btn:hover {
  transform: translateY(-1px);
}

.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.message-text {
  min-height: 24px;
}

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

.message-text.success {
  color: var(--success);
}

.filters {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.single-filter-row {
  grid-template-columns: minmax(220px, 320px);
}

.toolbar-row {
  margin-top: 4px;
}

.toolbar-result {
  font-weight: 700;
}

.order-card,
.compact-order-row {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 249, 255, 0.95));
}

.order-card {
  padding: 20px;
  overflow: hidden;
}

.route-text {
  margin: 14px 0 12px;
  font-size: 26px;
  line-height: 1.22;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.meta-grid p,
.contact-row span,
.viewer-count,
.compact-meta {
  color: var(--muted);
  font-size: 14px;
}

.meta-grid strong,
.contact-text {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 18px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.order-contact-main,
.compact-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.contact-row,
.contact-side {
  min-width: 0;
}

.order-contact-main {
  flex: 1 1 0;
}

.contact-side {
  flex: 0 1 auto;
  align-items: flex-end;
}

.viewer-count {
  overflow-wrap: anywhere;
  word-break: break-word;
  text-align: right;
}

.remark-text {
  margin-bottom: 16px;
  color: #42526a;
  line-height: 1.7;
}

.empty-state {
  padding: 36px 18px;
  text-align: center;
  border-radius: 22px;
  border: 1px dashed rgba(15, 23, 42, 0.18);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.75);
}

.compact-order-list-page {
  gap: 12px;
}

.compact-order-row {
  padding: 14px 16px;
}

.compact-route {
  font-size: 16px;
}

.compact-price,
.compact-contact {
  color: var(--text);
  font-weight: 800;
}

.compact-reveal-btn,
.admin-delete-btn {
  min-height: auto;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 13px;
}

.publish-layout {
  grid-template-columns: 1.2fr 0.8fr;
}

.note-list {
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.profile-grid {
  grid-template-columns: 0.88fr 1fr 1fr;
  align-items: start;
}

.tool-card {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(15, 111, 255, 0.05), rgba(0, 167, 179, 0.04));
  border: 1px solid rgba(15, 111, 255, 0.1);
}

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

.stats-grid-wide {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.stat-panel {
  display: grid;
  gap: 10px;
}

.stat-value {
  font-size: clamp(28px, 4vw, 40px);
}

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

.admin-toolbar,
.table-pagination,
.pagination-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.admin-toolbar,
.table-pagination {
  justify-content: space-between;
}

.admin-toolbar {
  margin-bottom: 16px;
}

.admin-toolbar input {
  max-width: 460px;
}

.table-pagination {
  margin-top: 16px;
  flex-wrap: wrap;
}

.pagination-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.admin-page-btn {
  min-width: 92px;
}

.admin-page-btn:disabled {
  opacity: 0.46;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none;
}

.admin-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.table-empty-cell,
.audit-detail-cell {
  color: var(--muted);
}

.table-empty-cell {
  text-align: center !important;
}

.audit-detail-cell {
  min-width: 280px;
  white-space: normal;
  word-break: break-word;
}

@media (max-width: 1180px) {
  .app-shell,
  .profile-grid,
  .publish-layout,
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: static;
  }

  .stats-grid-wide {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .filters,
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool-card {
    align-items: stretch;
  }

  .admin-toolbar,
  .table-pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-toolbar input {
    max-width: none;
  }

  .pagination-actions {
    justify-content: flex-start;
  }

}

@media (max-width: 640px) {
  .page-shell {
    padding: 16px 14px 28px;
  }

  .panel {
    padding: 18px;
    border-radius: 20px;
  }

  .filters,
  .meta-grid,
  .auth-tabs,
  .stats-grid,
  .stats-grid-wide,
  .sidebar-actions {
    grid-template-columns: 1fr;
  }

  .hero-panel,
  .card-top,
  .contact-row,
  .contact-side,
  .compact-head,
  .compact-meta,
  .compact-contact-line,
  .toolbar-row,
  .tool-card {
    flex-direction: column;
    align-items: stretch;
  }

  .order-contact-main,
  .contact-side {
    width: 100%;
  }

  .viewer-count {
    text-align: left;
  }

  .route-text {
    font-size: 22px;
  }
}

