/* 考勤工具：Finexa 系玻璃拟态 + 紫蓝渐变；Plus Jakarta / DM Sans；图标 Lucide */
:root {
  --bg-page: #e8eaef;
  --bg-shell: #fafbfe;
  --bg-surface: rgba(255, 255, 255, 0.88);
  --bg-surface-muted: rgba(248, 250, 255, 0.95);
  --text-primary: #0b1020;
  --text-secondary: #3d4a5c;
  --text-tertiary: #64748b;
  --text-muted: #94a3b8;
  --border-subtle: rgba(148, 163, 184, 0.35);
  --border-glass: rgba(255, 255, 255, 0.7);
  --accent: #5b4fcf;
  --accent-bright: #3b82f6;
  --accent-soft: rgba(91, 79, 207, 0.12);
  --accent-hover: #4f3ec9;
  --glow-mix: linear-gradient(135deg, #7c3aed 0%, #6366f1 40%, #3b82f6 100%);
  --success: #059669;
  --success-soft: rgba(5, 150, 105, 0.1);
  --err: #dc2626;
  --warn: #b45309;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow-shell: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 24px 48px -12px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 2px 8px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(99, 102, 241, 0.06);
  --shadow-hover: 0 12px 40px rgba(99, 102, 241, 0.12);
  --font-display: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --glass-blur: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-primary);
  line-height: 1.55;
  position: relative;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 1000px 520px at 50% -20%, rgba(124, 58, 237, 0.11), transparent 60%),
    radial-gradient(ellipse 800px 480px at 100% 50%, rgba(59, 130, 246, 0.08), transparent 50%),
    radial-gradient(ellipse 600px 400px at 0% 80%, rgba(5, 150, 105, 0.05), transparent 50%),
    linear-gradient(180deg, #eceef3 0%, #e2e5ec 100%);
}

/* ---- Shell（大卡片）---- */
.shell {
  max-width: 44rem;
  margin: 0 auto;
  min-height: 100vh;
  padding: 1.75rem 1rem 2.5rem;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  animation: pageIn 0.55s ease-out;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.shell-inner {
  width: 100%;
  background: var(--bg-shell);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-shell);
  padding: 1.5rem 1.35rem 1.75rem;
  position: relative;
  overflow: hidden;
}

.shell-inner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9) 20%, rgba(255, 255, 255, 0.9) 80%, transparent);
  pointer-events: none;
  opacity: 0.6;
}

/* ---- Top nav ---- */
.shell-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  flex-wrap: wrap;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.nav-logo {
  position: relative;
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.nav-logo__hex {
  position: absolute;
  inset: 0;
  clip-path: polygon(25% 6.7%, 75% 6.7%, 100% 50%, 75% 93.3%, 25% 93.3%, 0% 50%);
  background: var(--glow-mix);
  box-shadow: 0 4px 18px rgba(99, 102, 241, 0.45);
}

.brand-icon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  margin: 0;
  border: none;
  background: transparent;
  border-radius: 0;
}

.nav-logo .brand-icon .icon {
  color: #fff;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}

.nav-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.nav-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.2;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 1;
  justify-content: center;
  min-width: 0;
}

.nav-link {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-pill);
  background: rgba(241, 245, 249, 0.8);
  border: 1px solid transparent;
}

/* ---- Hero + orb ---- */
.hero {
  text-align: center;
  margin-bottom: 1.5rem;
  padding: 0 0.25rem;
}

.hero-orb-wrap {
  position: relative;
  width: 5rem;
  height: 5rem;
  margin: 0 auto 1rem;
}

.hero-orb {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: var(--glow-mix);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35) inset, 0 8px 32px rgba(99, 102, 241, 0.35);
}

.hero-orb::after {
  content: "";
  position: absolute;
  top: 35%;
  left: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 12px 4px rgba(255, 255, 255, 0.9);
}

.hero-orb-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.35) 0%, transparent 70%);
  filter: blur(12px);
  z-index: -1;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 4vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.3;
  margin: 0 0 0.5rem;
  color: var(--text-primary);
}

.hero-gradient {
  background: var(--glow-mix);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0 0 1rem;
  max-width: 28ch;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.55;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.pill {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

/* ---- Glass cards ---- */
.glass {
  background: var(--bg-surface);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border-glass);
}

.glass--accent {
  position: relative;
  border-top: none;
  overflow: hidden;
}

.card--upload.glass--accent {
  padding-top: 2.1rem;
}

.glass--accent::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f472b6, #a78bfa, #6366f1, #38bdf8);
  opacity: 0.95;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.85em;
  color: var(--text-secondary);
  background: var(--bg-surface-muted);
  padding: 0.12em 0.4em;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
}

.kbd {
  font-family: inherit;
  font-size: 0.88em;
  padding: 0.1em 0.45em;
  border-radius: 6px;
  background: var(--bg-surface-muted);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

/* ---- Icons（与 Lucide stroke 一致）---- */
.icon {
  display: block;
  flex-shrink: 0;
  color: var(--accent);
}

.icon--hero {
  margin: 0 auto 0.5rem;
  color: var(--accent);
  opacity: 0.92;
  filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.25));
}

.icon--sm {
  width: 16px;
  height: 16px;
}

.inline-icon {
  display: inline-flex;
  vertical-align: middle;
  margin-right: 0.35rem;
  color: var(--text-tertiary);
}

.inline-icon .icon {
  color: inherit;
}

.icon--spin {
  animation: spin 0.75s linear infinite;
  color: var(--accent);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.drop-icon-wrap {
  margin-bottom: 0.4rem;
}

/* 云上传主图标：紫蓝微光，与上方光球同系 */
#icon-drop-hero .icon--hero {
  color: #6366f1;
  opacity: 0.96;
  filter: drop-shadow(0 2px 14px rgba(124, 58, 237, 0.3)) drop-shadow(0 6px 22px rgba(59, 130, 246, 0.2));
}

/* ---- Main ---- */
.main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card {
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s, box-shadow 0.25s, transform 0.2s;
  animation: rise 0.55s ease-out 0.1s both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card--upload {
  text-align: center;
}

.card--opt {
  padding: 0.9rem 1.25rem;
  text-align: center;
}

.card--opt .opt-zip-row {
  margin: 0;
}

.card:hover,
.card.is-drag {
  border-color: rgba(99, 102, 241, 0.28);
  box-shadow: var(--shadow-hover);
}

.card.is-drag {
  background: rgba(250, 251, 255, 0.95);
  transform: scale(1.01);
  outline: 2px solid rgba(99, 102, 241, 0.2);
  outline-offset: 0;
}

.drop-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin: 0 0 0.75rem;
}

.drop-inner {
  text-align: center;
}

.drop-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.65rem;
}

.drop-xlsx {
  background: var(--glow-mix);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}

.drop-hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.75rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0 0 1rem;
}

.drop-hint-suffix {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.drop-meta {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin: 0;
  line-height: 1.6;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.opt-zip-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  justify-content: center;
  text-align: left;
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin: 0 0 0.75rem;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
  cursor: pointer;
  line-height: 1.45;
}

.opt-zip-row input {
  margin-top: 0.2rem;
  flex-shrink: 0;
  accent-color: var(--accent);
}

.link-like {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-surface-muted);
  border: 1px solid var(--border-subtle);
  color: #5b4fcf;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  transition: background 0.15s, border-color 0.15s, transform 0.12s, box-shadow 0.2s;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.link-like:hover {
  background: #fff;
  border-color: rgba(99, 102, 241, 0.4);
  color: var(--accent-hover);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.12);
}

.link-like:active {
  transform: scale(0.98);
}

.link-like .inline-icon {
  margin-right: 0;
  color: #5b4fcf;
}

/* ---- Status panel ---- */
.panel {
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.5rem;
  box-shadow: var(--shadow-card);
  animation: rise 0.5s ease-out 0.16s both;
}

.panel--status {
  border-left: 3px solid #6366f1;
}

.status-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.25rem;
}

.status-icon-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  min-height: 1.5rem;
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.status-icon-slot:not(.has-icon) {
  display: none;
}

.status-icon-slot .icon--spin {
  margin: 0;
}

.status-line {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0;
  flex: 1;
}

.status-line.is-error {
  color: var(--err);
  font-weight: 500;
}

.stats-total {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0.75rem 0;
  padding: 0.6rem 0.75rem;
  background: var(--success-soft);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(5, 150, 105, 0.2);
}

.stats-total-icon {
  display: flex;
  color: var(--success);
}

.stats-total-icon .icon {
  color: inherit;
}

.stats-total strong {
  font-weight: 700;
  color: var(--success);
  font-size: 1.15em;
  font-family: var(--font-display);
}

.stats-scope {
  font-weight: 500;
  color: var(--text-tertiary);
  font-size: 0.88em;
}

.stats-caption {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  margin: 0 0 0.35rem;
}

.stats-sheets {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.88rem;
  line-height: 1.5;
}

.stats-sheets li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.stats-sheets li:last-child {
  border-bottom: none;
}

.sheet-row-name {
  display: flex;
  align-items: center;
  min-width: 0;
  color: var(--text-primary);
  font-weight: 500;
}

.sheet-row-name .inline-icon {
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.sheet-row-num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: var(--font-display);
}

.warn {
  font-size: 0.81rem;
  color: var(--warn);
  margin: 0.6rem 0 0;
  padding: 0.5rem 0.6rem;
  background: rgba(180, 83, 9, 0.08);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(180, 83, 9, 0.2);
}

.error-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0.5rem 0.65rem;
  background: rgba(220, 38, 38, 0.06);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--err);
  line-height: 1.5;
}

.error-list li {
  padding: 0.2rem 0;
  border-bottom: 1px solid rgba(220, 38, 38, 0.12);
}

.error-list li:last-child {
  border-bottom: none;
}

.download-list-wrap {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border-subtle);
}

.download-list-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
}

.download-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.btn-download-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-surface-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s;
}

.btn-download-row:hover {
  background: #fff;
  border-color: rgba(99, 102, 241, 0.35);
  color: var(--accent);
}

.btn-download-row--zip {
  border-color: rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.08);
}

.btn-download-row__icon {
  display: flex;
  flex-shrink: 0;
  color: var(--accent);
}

.btn-download-row__icon .icon {
  color: inherit;
}

.btn-download-row__text {
  min-width: 0;
  word-break: break-all;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.6rem 1.15rem;
  background: var(--glow-mix);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
  transition: filter 0.15s, transform 0.1s, box-shadow 0.2s;
}

.btn-icon {
  display: flex;
  align-items: center;
}

.btn-icon .icon {
  color: #fff;
}

.btn-primary:hover {
  filter: brightness(1.05);
  box-shadow: 0 6px 22px rgba(99, 102, 241, 0.45);
}

.btn-primary:active {
  transform: scale(0.99);
}

@media (max-width: 520px) {
  .nav-links {
    display: none;
  }

  .shell {
    padding: 1rem 0.65rem 2rem;
  }

  .shell-inner {
    border-radius: 22px;
    padding: 1.15rem 1rem 1.35rem;
  }
}

@media (min-width: 480px) {
  .hero-title {
    max-width: none;
  }
}
