:root {
  --bg: #f4f7fb;
  --ink: #102a43;
  --muted: #486581;
  --brand: #0f766e;
  --brand-dark: #115e59;
  --accent: #f59e0b;
  --card: #ffffff;
  --line: #d9e2ec;
  --soft-blue: #e0f2fe;
  --soft-mint: #d1fae5;
}

body {
  font-family: "Poppins", "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top right, #d1fae5 0%, #f4f7fb 40%, #eef2ff 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

img {
  -webkit-user-drag: none;
  user-drag: none;
}

.bg-pattern {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle at 10% 20%, rgba(20, 184, 166, 0.15), transparent 30%),
    radial-gradient(circle at 90% 10%, rgba(14, 165, 233, 0.12), transparent 28%),
    radial-gradient(circle at 80% 80%, rgba(245, 158, 11, 0.1), transparent 26%);
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: 0.3px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.brand-logo-fallback {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #0f766e;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f766e;
}

.brand-subtitle {
  font-size: 0.73rem;
  font-weight: 500;
  color: #64748b;
}

.wfa-shell {
  padding: 1.5rem 0 2rem;
}

.glass-card {
  border: 1px solid rgba(15, 118, 110, 0.2);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 24px rgba(16, 42, 67, 0.08);
  border-radius: 16px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.glass-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(16, 42, 67, 0.12);
}

.badge-soft {
  background: #d1fae5;
  color: #065f46;
}

.section-title {
  font-weight: 600;
  color: var(--brand-dark);
}

.table thead th {
  background: #f0fdfa;
  color: #0f766e;
  font-size: 0.9rem;
}

.th-rich {
  vertical-align: top;
}

.th-title {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  font-size: 0.82rem;
  color: #0f766e;
}

.th-sub {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.68rem;
  color: #64748b;
  font-weight: 500;
}

.btn-brand {
  background-color: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.btn-brand:hover {
  background-color: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #fff;
}

.btn-action-primary {
  background: linear-gradient(120deg, #0f766e, #0ea5a2);
  border: 1px solid #0f766e;
  color: #fff;
  border-radius: 10px;
}

.btn-action-primary:hover {
  color: #fff;
  background: linear-gradient(120deg, #115e59, #0f766e);
  border-color: #115e59;
}

.btn-action-light {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #334155;
  border-radius: 10px;
}

.btn-action-light:hover {
  background: #eef2ff;
  color: #1e293b;
}

.btn-action-danger {
  background: #fff5f5;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 10px;
}

.btn-action-danger:hover {
  background: #fee2e2;
  color: #7f1d1d;
}

.hero {
  border-radius: 18px;
  padding: 1.5rem;
  background: linear-gradient(120deg, #0f766e, #0891b2);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  right: -70px;
  top: -120px;
  background: rgba(255, 255, 255, 0.14);
}

.login-layout {
  min-height: calc(100vh - 260px);
}

.login-intro {
  border-radius: 18px;
  padding: 1.6rem;
  color: #fff;
  background: linear-gradient(145deg, #0f766e, #0e7490);
  position: relative;
  overflow: hidden;
}

.login-intro::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  right: -70px;
  bottom: -95px;
  background: rgba(255, 255, 255, 0.14);
}

.login-kicker {
  display: inline-block;
  padding: 0.24rem 0.58rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 0.7rem;
  margin-bottom: 0.8rem;
}

.login-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
}

.login-lead {
  font-size: 0.92rem;
  opacity: 0.95;
}

.login-points {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
}

.login-point {
  font-size: 0.82rem;
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
}

.login-card {
  border-top: 5px solid #14b8a6;
}

.status-chip {
  font-size: 0.7rem;
  border-radius: 999px;
  background: #ecfeff;
  color: #155e75;
  border: 1px solid #a5f3fc;
  padding: 0.35rem 0.58rem;
}

.login-form .input-group-text {
  background: #f0fdfa;
  color: #0f766e;
  border-color: #cbd5e1;
}

.captcha-box {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 0.6rem;
}

.captcha-question {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed #99f6e4;
  border-radius: 10px;
  background: #f0fdfa;
  color: #0f766e;
  font-weight: 700;
}

.login-note {
  margin-top: 0.9rem;
  font-size: 0.78rem;
  color: #64748b;
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
}

.audit-text {
  font-size: 0.8rem;
  color: var(--muted);
}

.upload-box {
  border: 1px dashed #94a3b8;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fafc, #ffffff);
  padding: 0.8rem;
}

.upload-box.compact {
  padding: 0.55rem;
}

.upload-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  margin-bottom: 0.45rem;
  color: #0f766e;
  font-weight: 500;
}

.upload-control {
  border-radius: 10px;
}

.upload-meta {
  margin-top: 0.4rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem;
  font-size: 0.74rem;
  color: #64748b;
}

.selected-file {
  color: #0369a1;
  font-weight: 500;
}

.upload-lock-note {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  color: #b45309;
}

.steps-wrap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.step-card {
  padding: 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, #fff, #f8fafc);
}

.step-number {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
}

.row-enter {
  animation: rowPulse 0.6s ease;
}

.wfa-scroll {
  border: 1px solid #dbeafe;
  border-radius: 14px;
  max-height: 560px;
  overflow: auto;
}

.wfa-table {
  margin-bottom: 0;
}

.wfa-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  box-shadow: inset 0 -1px 0 #dbeafe;
  background: linear-gradient(180deg, #f0fdfa, #ecfeff);
}

.wfa-table tbody tr:hover {
  background: #f0fdfa;
}

.wfa-table td {
  vertical-align: top;
}

.wfa-table textarea.form-control {
  min-height: 132px;
}

.target-meta {
  margin-top: 0.35rem;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.73rem;
  color: #64748b;
}

.target-counter {
  color: #0f766e;
  font-weight: 600;
}

.target-counter.warn {
  color: #b45309;
}

.wfa-table .remove-row {
  border-radius: 999px;
}

.monitor-table thead th {
  background: linear-gradient(180deg, #f0fdfa, #ecfeff);
}

.monitor-table tbody tr:hover {
  background: #f8fafc;
}

.chart-wrap {
  position: relative;
  min-height: 280px;
}

@keyframes rowPulse {
  0% { background-color: #d1fae5; }
  100% { background-color: transparent; }
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid rgba(15, 118, 110, 0.25);
  background: linear-gradient(180deg, rgba(240, 253, 250, 0.7), rgba(255, 255, 255, 0.95));
}

.footer-title {
  font-weight: 700;
  color: #0f766e;
}

.footer-meta {
  font-size: 0.85rem;
  color: var(--muted);
}

.signature-mini {
  margin-top: 0.35rem;
  font-size: 0.56rem;
  color: #94a3b8;
  letter-spacing: 0.08rem;
}

.social-chip {
  text-decoration: none;
  font-size: 0.8rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
}

.social-chip:hover {
  background: var(--soft-blue);
  color: #075985;
}

.notice-stack {
  z-index: 1080;
}

.notify-toast {
  min-width: 300px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.25);
  border-radius: 12px;
}

.top-timer-bar {
  border-bottom: 1px solid #f59e0b;
  background: linear-gradient(90deg, #f59e0b, #f97316);
  box-shadow: 0 6px 18px rgba(249, 115, 22, 0.35);
}

.top-timer-inner {
  min-height: 42px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.9rem;
}

.top-timer-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff7ed;
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  white-space: nowrap;
  letter-spacing: 0.01rem;
}

.top-timer-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-width: 0;
}

.top-timer-status {
  font-size: 0.72rem;
  color: #fff7ed;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-timer-countdown {
  font-size: 0.92rem;
  color: #7c2d12;
  font-weight: 700;
  letter-spacing: 0.015rem;
  white-space: nowrap;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
}

.top-timer-meta {
  font-size: 0.66rem;
  color: #ffedd5;
  text-align: right;
  white-space: nowrap;
}

.timer-monitor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.timer-stat-card {
  border: 1px solid #dbeafe;
  border-radius: 16px;
  padding: 1rem;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.timer-stat-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.timer-stat-value {
  font-size: 1.08rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.35rem;
  word-break: break-word;
}

.timer-stat-note {
  font-size: 0.76rem;
  color: #64748b;
}

@media (max-width: 768px) {
  .table-wrap {
    overflow-x: auto;
  }

  .steps-wrap {
    grid-template-columns: 1fr;
  }

  .notify-toast {
    min-width: 240px;
  }

  .top-timer-inner {
    grid-template-columns: 1fr;
    gap: 0.2rem;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
  }

  .top-timer-main {
    justify-content: flex-start;
  }

  .top-timer-meta {
    text-align: left;
  }

  .timer-monitor-grid {
    grid-template-columns: 1fr;
  }

  .login-layout {
    min-height: auto;
  }

  .captcha-box {
    grid-template-columns: 1fr;
  }
}
