:root {
  color-scheme: light;
  --fh-bg: #f5f7fb;
  --fh-surface: rgba(255, 255, 255, 0.92);
  --fh-border: rgba(24, 40, 72, 0.12);
  --fh-text: #172033;
  --fh-muted: #5d6b85;
  --fh-primary: #1f5cff;
  --fh-primary-strong: #0f3fbf;
  --fh-primary-soft: rgba(31, 92, 255, 0.1);
  --fh-success-soft: rgba(18, 120, 90, 0.12);
  --fh-danger-soft: rgba(180, 35, 24, 0.12);
  --fh-warning-soft: rgba(181, 71, 8, 0.12);
  --fh-shadow: 0 16px 40px rgba(23, 32, 51, 0.08);
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    sans-serif;
  color: var(--fh-text);
  background:
    radial-gradient(circle at top right, rgba(31, 92, 255, 0.15), transparent 28rem),
    radial-gradient(circle at bottom left, rgba(18, 120, 90, 0.14), transparent 24rem),
    var(--fh-bg);
}

a {
  color: inherit;
}

.fh-shell {
  width: min(1120px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
}

.fh-shell--narrow {
  width: min(560px, calc(100vw - 2rem));
  padding-top: 5rem;
}

.fh-hero {
  margin-bottom: 1.25rem;
}

.fh-hero-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.fh-eyebrow {
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--fh-primary-strong);
}

.fh-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
}

.fh-lead {
  margin: 0.75rem 0 0;
  max-width: 56rem;
  color: var(--fh-muted);
  font-size: 1rem;
  line-height: 1.7;
}

.fh-card {
  background: var(--fh-surface);
  border: 1px solid var(--fh-border);
  border-radius: 24px;
  box-shadow: var(--fh-shadow);
  padding: 1.25rem;
  backdrop-filter: blur(14px);
}

.fh-card + .fh-card,
.fh-card + .fh-grid,
.fh-grid + .fh-card,
.fh-hero + .fh-card,
.fh-hero + .fh-grid {
  margin-top: 1rem;
}

.fh-card-header h2,
.fh-toolbar h2 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
}

.fh-card-header p,
.fh-toolbar p,
.fh-meta,
.fh-muted {
  margin: 0;
  color: var(--fh-muted);
}

.fh-grid {
  display: grid;
  gap: 1rem;
}

.fh-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.fh-form {
  display: grid;
  gap: 1rem;
}

.fh-field,
.fh-inline-field {
  display: grid;
  gap: 0.4rem;
}

.fh-field span,
.fh-inline-field span,
.fh-stat-label {
  font-size: 0.92rem;
  color: var(--fh-muted);
}

.fh-inline-field {
  align-items: center;
  min-width: min(100%, 320px);
}

.fh-input {
  width: 100%;
  border: 1px solid rgba(24, 40, 72, 0.16);
  border-radius: 14px;
  padding: 0.85rem 0.95rem;
  font-size: 0.98rem;
  color: var(--fh-text);
  background: rgba(255, 255, 255, 0.96);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fh-input:focus {
  outline: none;
  border-color: rgba(31, 92, 255, 0.65);
  box-shadow: 0 0 0 4px rgba(31, 92, 255, 0.12);
}

.fh-checkbox {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  color: var(--fh-muted);
}

.fh-checkbox input {
  width: 1rem;
  height: 1rem;
}

.fh-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.fh-actions--spaced {
  justify-content: space-between;
  margin-top: 1rem;
}

.fh-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.8rem;
  padding: 0.78rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.fh-button:hover {
  transform: translateY(-1px);
}

.fh-button:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}

.fh-button--primary {
  background: var(--fh-primary);
  color: #fff;
}

.fh-button--primary:hover {
  background: var(--fh-primary-strong);
}

.fh-button--ghost {
  background: transparent;
  color: var(--fh-text);
  border-color: var(--fh-border);
}

.fh-button--ghost:hover {
  background: rgba(255, 255, 255, 0.8);
}

.fh-status {
  border-radius: 16px;
  padding: 0.9rem 1rem;
  font-size: 0.95rem;
  line-height: 1.6;
  border: 1px solid var(--fh-border);
  background: rgba(255, 255, 255, 0.75);
}

.fh-status[data-state="info"] {
  border-color: rgba(31, 92, 255, 0.2);
  background: var(--fh-primary-soft);
}

.fh-status[data-state="success"] {
  border-color: rgba(18, 120, 90, 0.22);
  background: var(--fh-success-soft);
}

.fh-status[data-state="error"] {
  border-color: rgba(180, 35, 24, 0.22);
  background: var(--fh-danger-soft);
}

.fh-status[data-state="warning"] {
  border-color: rgba(181, 71, 8, 0.24);
  background: var(--fh-warning-soft);
}

.fh-stats {
  display: grid;
  gap: 0.8rem;
}

.fh-stat {
  border-radius: 18px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--fh-border);
}

.fh-stat strong {
  display: block;
  margin-top: 0.3rem;
  font-size: 1.15rem;
}

.fh-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: end;
  margin-bottom: 1rem;
}

.fh-toolbar-controls {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: end;
}

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

.fh-table {
  width: 100%;
  border-collapse: collapse;
}

.fh-table th,
.fh-table td {
  padding: 1rem 0.7rem;
  border-bottom: 1px solid rgba(24, 40, 72, 0.08);
  text-align: left;
  vertical-align: top;
}

.fh-table th {
  font-size: 0.85rem;
  color: var(--fh-muted);
  font-weight: 700;
}

.fh-table td strong {
  display: block;
  font-size: 0.98rem;
  word-break: break-word;
}

.fh-table td .fh-muted {
  display: block;
  margin-top: 0.2rem;
  word-break: break-word;
}

.fh-row-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.fh-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--fh-border);
  font-size: 0.84rem;
  color: var(--fh-muted);
}

.fh-empty {
  border: 1px dashed rgba(24, 40, 72, 0.18);
  border-radius: 18px;
  padding: 1.2rem;
  text-align: center;
  color: var(--fh-muted);
  background: rgba(255, 255, 255, 0.55);
}

.fh-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.9rem;
}

.fh-file-card {
  display: grid;
  gap: 0.9rem;
  border: 1px solid var(--fh-border);
  border-radius: 18px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.86);
}

.fh-file-card h3 {
  margin: 0;
  font-size: 1.02rem;
  word-break: break-word;
}

.fh-file-card p {
  margin: 0;
  color: var(--fh-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  word-break: break-word;
}

.fh-meta {
  margin-bottom: 1rem;
}

@media (max-width: 860px) {
  .fh-grid--two {
    grid-template-columns: 1fr;
  }

  .fh-grid--three {
    grid-template-columns: 1fr;
  }

  .fh-shell {
    width: min(100vw - 1rem, 1120px);
    padding-top: 1.2rem;
  }

  .fh-card {
    padding: 1rem;
    border-radius: 20px;
  }

  .fh-table {
    min-width: 720px;
  }
}

.fh-browser-bar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.fh-breadcrumbs {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}

.fh-breadcrumb {
  border: 1px solid var(--fh-border);
  background: rgba(255, 255, 255, 0.88);
  color: var(--fh-text);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  font-size: 0.9rem;
}

.fh-breadcrumb:hover {
  background: rgba(31, 92, 255, 0.08);
  border-color: rgba(31, 92, 255, 0.2);
}

.fh-breadcrumb-separator {
  color: var(--fh-muted);
}
.fh-admin-layout {
  display: grid;
  grid-template-columns: minmax(320px, 360px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.fh-admin-side {
  display: grid;
  gap: 1rem;
  position: sticky;
  top: 1rem;
}

.fh-admin-main {
  min-width: 0;
}

.fh-card--contrast {
  color: #eef4ff;
  border-color: rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top right, rgba(116, 198, 255, 0.18), transparent 16rem),
    linear-gradient(155deg, rgba(12, 23, 49, 0.98), rgba(16, 47, 89, 0.96));
  box-shadow: 0 24px 60px rgba(9, 18, 39, 0.24);
}

.fh-card--contrast .fh-eyebrow,
.fh-card--contrast .fh-card-header p,
.fh-card--contrast .fh-field span,
.fh-card--contrast .fh-checkbox,
.fh-card--contrast .fh-card-note,
.fh-card--contrast .fh-stat-label {
  color: rgba(232, 240, 255, 0.76);
}

.fh-card--contrast .fh-input {
  background: rgba(255, 255, 255, 0.97);
}

.fh-card--contrast .fh-button--ghost {
  color: #eef4ff;
  border-color: rgba(255, 255, 255, 0.18);
}

.fh-card--contrast .fh-button--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

.fh-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.fh-kpi {
  border-radius: 18px;
  padding: 0.95rem 1rem;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--fh-border);
}

.fh-kpi strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.18rem;
}

.fh-card-note {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.85rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(24, 40, 72, 0.08);
}

.fh-card-note--soft {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.12);
}

.fh-card-note strong {
  text-align: right;
}

.fh-browser-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.fh-toolbar--stack {
  align-items: stretch;
}

.fh-search-field {
  flex: 1;
  min-width: min(100%, 420px);
}

.fh-toolbar-controls--wide {
  width: 100%;
  justify-content: flex-start;
}

.fh-toolbar-controls--wide .fh-inline-field {
  min-width: min(100%, 220px);
}

.fh-chip-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.fh-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.7rem;
  padding: 0.18rem 0.58rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.fh-badge--folder {
  color: var(--fh-primary-strong);
  background: rgba(31, 92, 255, 0.12);
}

.fh-badge--file {
  color: #0a6b52;
  background: rgba(18, 120, 90, 0.12);
}

.fh-row-title {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  align-items: center;
}

.fh-row-subtitle {
  display: block;
  margin-top: 0.3rem;
  color: var(--fh-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  word-break: break-word;
}

.fh-button--danger {
  color: #8e2216;
  border-color: rgba(180, 35, 24, 0.2);
  background: rgba(180, 35, 24, 0.08);
}

.fh-button--danger:hover {
  background: rgba(180, 35, 24, 0.14);
}

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

  .fh-admin-side {
    position: static;
  }
}

@media (max-width: 720px) {
  .fh-kpis {
    grid-template-columns: 1fr 1fr;
  }

  .fh-toolbar-controls--wide .fh-inline-field {
    min-width: 100%;
  }

  .fh-browser-header .fh-actions {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .fh-kpis {
    grid-template-columns: 1fr;
  }
}
