:root {
  color-scheme: light;
  --ink: #18233b;
  --muted: #768198;
  --line: #e6eaf1;
  --paper: #ffffff;
  --wash: #f4f6fa;
  --blue: #4c65f5;
  --blue-dark: #344bd7;
  --mint: #6dcbb5;
  --rose: #b6485b;
  font-family: "DM Sans", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background: var(--wash);
  color: var(--ink);
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 18% 18%, rgba(222, 230, 255, .72), transparent 34rem),
    var(--wash);
}

button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.topbar {
  height: 76px;
  padding: 0 clamp(20px, 6vw, 88px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(215, 221, 233, .7);
  background: rgba(255, 255, 255, .64);
  backdrop-filter: blur(16px);
}

.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--blue); color: white; font-size: 25px; line-height: 1; box-shadow: 0 6px 16px rgba(76, 101, 245, .25); }
.topbar-meta { display: flex; align-items: center; gap: 16px; }
.secure-pill, .index-badge { display: inline-flex; align-items: center; gap: 8px; color: #65718a; font-size: 12px; font-weight: 600; }
.secure-pill { padding: 8px 12px; border: 1px solid #e4e9f1; border-radius: 999px; background: rgba(255,255,255,.75); }
.secure-dot, .index-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px rgba(109,203,181,.15); }
.quiet-button { border: 0; padding: 8px 10px; color: var(--muted); background: transparent; font-size: 13px; }
.quiet-button:hover { color: var(--ink); }

.page-shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.login-layout { min-height: calc(100vh - 76px); display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: clamp(48px, 10vw, 132px); padding: 54px 0 74px; }
.intro-card { padding: 12px 0; }
.eyebrow { margin: 0 0 16px; color: var(--blue); font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
.intro-card h1 { margin-bottom: 22px; font-size: clamp(48px, 6vw, 76px); line-height: 1.1; letter-spacing: -.06em; font-weight: 700; }
.intro-card h1 span { color: var(--blue); }
.intro-copy { max-width: 390px; margin-bottom: 31px; color: var(--muted); font-size: 16px; line-height: 1.9; }
.intro-note { display: inline-flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 10px; background: rgba(255,255,255,.65); color: #68748c; font-size: 12px; }
.intro-note span { color: #47a78f; font-size: 15px; }
.auth-card { padding: clamp(28px, 4vw, 48px); border: 1px solid rgba(222,227,237,.85); border-radius: 22px; background: rgba(255,255,255,.9); box-shadow: 0 22px 70px rgba(37,50,88,.08); }
.card-icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 26px; border-radius: 14px; background: #eff1ff; color: var(--blue); font-size: 25px; }
.auth-card h2 { margin-bottom: 8px; font-size: 27px; letter-spacing: -.04em; }
.muted { color: var(--muted); font-size: 14px; line-height: 1.7; }
.stack-form { display: grid; gap: 11px; margin-top: 28px; }
.stack-form label { color: #45516a; font-size: 12px; font-weight: 700; }
.stack-form input, .search-box input { min-width: 0; border: 1px solid #dfe4ed; outline: 0; color: var(--ink); background: white; transition: border-color .18s, box-shadow .18s; }
.stack-form input { height: 48px; padding: 0 14px; border-radius: 10px; }
.stack-form input:focus, .search-box input:focus { border-color: #8997ff; box-shadow: 0 0 0 4px rgba(76,101,245,.1); }
.primary-button { display: inline-flex; align-items: center; justify-content: space-between; gap: 15px; border: 0; border-radius: 10px; padding: 13px 16px; color: white; background: var(--blue); font-size: 13px; font-weight: 700; box-shadow: 0 8px 18px rgba(76,101,245,.2); transition: transform .16s, background .16s, box-shadow .16s; }
.primary-button:hover { background: var(--blue-dark); box-shadow: 0 11px 20px rgba(76,101,245,.26); transform: translateY(-1px); }
.primary-button:disabled { cursor: wait; opacity: .7; transform: none; }
.form-error { min-height: 18px; margin: 0; color: var(--rose); font-size: 12px; }
.auth-footnote { margin: 22px 0 0; color: #9aa3b4; font-size: 11px; }

.search-layout { padding: 62px 0 26px; }
.search-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.search-heading .eyebrow { margin-bottom: 9px; }
.search-heading h1 { margin-bottom: 8px; font-size: clamp(34px, 4vw, 47px); letter-spacing: -.055em; }
.search-heading .muted { margin-bottom: 0; }
.index-badge { padding: 9px 12px; border: 1px solid #e0e6ef; border-radius: 999px; background: rgba(255,255,255,.7); }
.search-box { display: flex; align-items: center; gap: 12px; min-height: 70px; padding: 10px 12px 10px 21px; border: 1px solid #e2e6ef; border-radius: 15px; background: var(--paper); box-shadow: 0 10px 32px rgba(38,53,88,.06); }
.search-icon { color: #909bb1; font-size: 27px; line-height: 1; }
.search-box input { flex: 1; height: 46px; border: 0; box-shadow: none; font-size: 15px; }
.search-box input:focus { box-shadow: none; }
.search-submit { min-width: 112px; justify-content: center; }
.search-status { min-height: 34px; padding: 12px 4px 6px; color: var(--muted); font-size: 12px; }
.notice { margin-top: 12px; padding: 12px 14px; border-radius: 10px; font-size: 13px; }
.error-notice { border: 1px solid #f1d6dc; background: #fff7f8; color: var(--rose); }
.results-section { margin-top: 14px; }
.results-head { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 12px; }
.results-head h2 { margin: 0; font-size: 15px; font-weight: 700; }
.result-count { color: #8a94a8; font-size: 12px; }
.folder-nav { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; margin: 0 0 13px; }
.breadcrumbs { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; min-width: 0; }
.breadcrumb-button { border: 0; padding: 5px 2px; color: #56627b; background: transparent; font-size: 12px; }
.breadcrumb-button:hover { color: var(--blue); text-decoration: underline; }
.breadcrumb-separator { color: #a1a9b8; font-size: 12px; }
.results-list { display: grid; gap: 9px; }
.result-row { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 15px 17px; border: 1px solid #e6eaf1; border-radius: 13px; background: rgba(255,255,255,.92); transition: border-color .15s, transform .15s, box-shadow .15s; }
.result-row:hover { border-color: #ced5ff; box-shadow: 0 7px 20px rgba(38,53,88,.05); transform: translateY(-1px); }
.file-icon { flex: 0 0 40px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: #f0f2ff; color: #6174ec; font-size: 17px; }
.file-icon.folder { background: #fff5df; color: #d49b3e; }
.file-info { flex: 1; min-width: 0; }
.folder-open { flex: 1; display: flex; align-items: center; gap: 14px; min-width: 0; border: 0; padding: 0; color: inherit; background: transparent; text-align: left; }
.folder-open:hover .file-name { color: var(--blue); }
.file-name { overflow: hidden; margin-bottom: 5px; color: #26324a; font-size: 14px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.file-path { overflow: hidden; color: #8993a7; font-family: "DM Sans", "Microsoft YaHei", sans-serif; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { flex: 0 0 auto; display: flex; align-items: center; gap: 15px; color: #929bad; font-size: 11px; }
.type-tag { padding: 5px 8px; border-radius: 6px; background: #f4f6fa; color: #778298; }
.download-button { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; border: 1px solid #dfe4ff; border-radius: 8px; padding: 8px 11px; color: var(--blue); background: #f8f9ff; font-size: 11px; font-weight: 700; text-decoration: none; }
.download-button:hover { border-color: var(--blue); background: #eff1ff; }
.empty-state { display: grid; justify-items: center; gap: 8px; padding: 48px 20px; border: 1px dashed #dce2ec; border-radius: 14px; color: #98a2b3; background: rgba(255,255,255,.45); font-size: 12px; }
.empty-state strong { color: #66728a; font-size: 14px; }
.empty-icon { color: #aab3c3; font-size: 30px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 22px 0 10px; }
.page-button { border: 1px solid #e0e5ee; border-radius: 8px; padding: 8px 12px; color: #56627b; background: white; font-size: 12px; }
.page-button:disabled { cursor: not-allowed; opacity: .45; }
.page-label { color: #8a94a8; font-size: 12px; }
.page-footer { padding: 35px 0 10px; color: #9ca5b5; text-align: center; font-size: 11px; }

@media (max-width: 760px) {
  .topbar { height: 64px; padding: 0 18px; }
  .secure-pill { display: none; }
  .page-shell { width: min(100% - 32px, 560px); }
  .login-layout { min-height: calc(100vh - 64px); grid-template-columns: 1fr; gap: 28px; align-content: center; padding: 36px 0 46px; }
  .intro-card { padding: 0 3px; }
  .intro-card .eyebrow { margin-bottom: 11px; }
  .intro-card h1 { margin-bottom: 12px; font-size: 43px; }
  .intro-copy { margin-bottom: 15px; font-size: 14px; }
  .intro-note { font-size: 11px; }
  .auth-card { padding: 25px; }
  .card-icon { margin-bottom: 18px; }
  .auth-card h2 { font-size: 23px; }
  .stack-form { margin-top: 21px; }
  .search-layout { padding-top: 38px; }
  .search-heading { align-items: start; margin-bottom: 20px; }
  .index-badge { margin-top: 4px; white-space: nowrap; font-size: 10px; }
  .search-heading h1 { font-size: 34px; }
  .search-heading .muted { max-width: 280px; font-size: 12px; }
  .search-box { min-height: 60px; gap: 8px; padding: 7px 8px 7px 14px; }
  .search-box input { font-size: 13px; }
  .search-submit { min-width: 84px; padding: 11px 12px; font-size: 12px; }
  .result-row { gap: 10px; padding: 12px 11px; }
  .file-icon { flex-basis: 34px; width: 34px; height: 34px; }
  .file-name { font-size: 12px; }
  .file-path { font-size: 10px; }
  .file-meta { display: none; }
  .folder-nav { align-items: flex-start; gap: 8px; }
  .folder-open { gap: 10px; }
  .download-button { gap: 4px; padding: 8px 9px; font-size: 10px; }
  .page-footer { padding-top: 25px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
