* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: #f8fbff;
  color: #0f172a;
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
nav { border-bottom: 1px solid #dbe7f6; background: #fff; box-shadow: 0 1px 0 rgba(15, 23, 42, .02); }
main, nav > div { max-width: 1280px; margin: 0 auto; }
main { padding: 28px 18px 36px; }
nav > div { padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
section { margin-bottom: 18px; border: 1px solid #dbe7f6; background: #fff; border-radius: 16px; box-shadow: 0 12px 30px rgba(30, 64, 175, .08); overflow: hidden; }
h1, h2, p { margin: 0; }
h1 { font-size: 32px; line-height: 1.2; font-weight: 760; color: #0f172a; letter-spacing: 0; }
h2 { font-size: 17px; font-weight: 740; color: #0f172a; }
label { display: block; margin-bottom: 6px; color: #475569; font-size: 12px; font-weight: 700; }
input, select {
  width: 100%; min-height: 44px; border: 1px solid #cbd5e1; border-radius: 12px;
  background: #fff; color: #0f172a; padding: 0 13px; outline: none;
}
input:focus, select:focus { border-color: #2563eb; box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }
input::placeholder { color: #94a3b8; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { text-align: left; border-bottom: 1px solid #e4edf8; padding: 12px 14px; vertical-align: top; }
th { background: #f3f7fd; color: #50637f; font-size: 12px; font-weight: 760; }
tr:hover td { background: #f7fbff; }
pre { margin: 8px 0 0; max-height: 260px; overflow: auto; white-space: pre-wrap; background: #0b1730; color: #eaf2ff; border-radius: 12px; padding: 12px; }
a { color: #1d4ed8; text-decoration: none; }
.min-h-screen { min-height: 100vh; }
.antialiased { -webkit-font-smoothing: antialiased; }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-7xl { max-width: 1280px; }
.flex { display: flex; }
.grid { display: grid; }
.hidden { display: none !important; }
.items-center { align-items: center; }
.items-end { align-items: end; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.flex-wrap { flex-wrap: wrap; }
.flex-col { flex-direction: column; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-6 { margin-bottom: 18px; }
.mb-8 { margin-bottom: 24px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 14px; }
.p-3 { padding: 12px; }
.p-6 { padding: 18px; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.px-4 { padding-left: 14px; padding-right: 14px; }
.px-5 { padding-left: 18px; padding-right: 18px; }
.px-6 { padding-left: 18px; padding-right: 18px; }
.py-1\.5 { padding-top: 6px; padding-bottom: 6px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-2\.5 { padding-top: 10px; padding-bottom: 10px; }
.py-4 { padding-top: 14px; padding-bottom: 14px; }
.py-8 { padding-top: 28px; padding-bottom: 28px; }
.w-full { width: 100%; }
.w-9 { width: 36px; }
.h-2 { height: 8px; }
.w-2 { width: 8px; }
.h-4 { height: 16px; }
.w-4 { width: 16px; }
.h-9 { height: 36px; }
.h-11 { min-height: 44px; }
.h-12 { min-height: 48px; }
.min-w-0 { min-width: 0; }
.min-w-\[760px\] { min-width: 760px; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.break-all { word-break: break-all; }
.rounded-full { border-radius: 999px; }
.rounded-xl { border-radius: 12px; }
.rounded-2xl { border-radius: 14px; }
.rounded-3xl { border-radius: 18px; }
.border { border: 1px solid #dbe7f6; }
.border-b { border-bottom: 1px solid #dbe7f6; }
.border-t { border-top: 1px solid #dbe7f6; }
.border-r { border-right: 1px solid #dbe7f6; }
.border-2 { border-width: 2px; border-style: solid; }
.border-t-emerald-400 { border-top-color: #2563eb !important; }
.bg-white, .bg-zinc-900 { background: #fff; }
.bg-zinc-950 { background: #f8fbff; }
.bg-zinc-800 { background: #eef5ff; }
.bg-emerald-500 { background: #2563eb; }
.hover\:bg-emerald-600:hover { background: #1d4ed8; }
.bg-red-600 { background: #dc2626; }
.hover\:bg-red-500:hover { background: #ef4444; }
.hover\:bg-zinc-800:hover { background: #eef5ff; }
.text-white { color: #fff; }
.text-zinc-100, .text-zinc-200, .text-zinc-300 { color: #0f1f3a; }
.text-zinc-400, .text-zinc-500 { color: #64748b; }
.text-emerald-300, .text-emerald-400 { color: #1d4ed8; }
.text-red-300 { color: #b91c1c; }
.text-amber-300 { color: #b45309; }
.text-xs { font-size: 12px; }
.text-sm { font-size: 14px; }
.text-lg { font-size: 18px; }
.text-xl { font-size: 18px; }
.text-3xl { font-size: 28px; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 700; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 800; }
.tracking-tight { letter-spacing: 0; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.transition { transition: .16s ease; }
.animate-spin { animation: spin .85s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.inline-flex { display: inline-flex; }
.block { display: block; }
.outline-none { outline: none; }
.border-zinc-700, .border-zinc-800, .border-emerald-800, .border-emerald-900, .border-red-900, .border-amber-900 { border-color: #dbe7f6; }
.bg-emerald-950\/70, .bg-emerald-950\/80 { background: #eef5ff; }
.bg-red-950\/70 { background: #fef2f2; }
.bg-amber-950\/70 { background: #fffbeb; }
.text-\[15px\] { font-size: 15px; }
.placeholder\:text-zinc-600::placeholder { color: #94a3b8; }
.disabled\:cursor-not-allowed:disabled { cursor: not-allowed; }
.disabled\:opacity-50:disabled { opacity: .5; }
.disabled\:bg-zinc-900:disabled { background: #f8fafc; }
.disabled\:text-zinc-500:disabled { color: #94a3b8; }
nav .bg-emerald-500 { background: linear-gradient(135deg, #2563eb, #38bdf8); }
nav .text-white { color: #0f172a; }
nav .bg-emerald-500.text-white { color: #fff; }
#health_text, nav .text-emerald-400 { color: #047857; }
#submit, #schedule_add { background: #2563eb; color: #fff; border: 1px solid #2563eb; box-shadow: 0 8px 18px rgba(37, 99, 235, .18); }
#submit:hover, #schedule_add:hover { background: #1d4ed8; }
#export_json, #export_csv, #refresh_history, #history_prev, #history_next { background: #fff; border-color: #c9d8ee; color: #1f3b64; }
#status_box { background: #f3f7fd; border-color: #dbe7f6; }
#summary article { background: #fff; border-color: #dbe7f6; }
#summary article p:nth-child(2) { color: #123c96; }
.text-white:not(button):not(.bg-emerald-500) { color: #0f172a; }
.bg-red-600 { background: #dc2626; }
@media (min-width: 640px) {
  .sm\:px-6 { padding-left: 18px; padding-right: 18px; }
  .sm\:flex-row { flex-direction: row; }
  .sm\:items-center { align-items: center; }
  .sm\:text-4xl { font-size: 34px; }
  .sm\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
  .md\:items-end { align-items: end; }
  .md\:grid-cols-\[1\.4fr_\.55fr_\.65fr_\.6fr_auto\] { grid-template-columns: 1.4fr .55fr .65fr .6fr auto; }
}
@media (max-width: 640px) {
  nav > div { align-items: flex-start; flex-direction: column; }
  main { padding: 18px 12px 28px; }
  h1 { font-size: 26px; }
  .lg\:grid-cols-6, .sm\:grid-cols-2 { grid-template-columns: 1fr; }
  button { flex: 1 1 auto; }
}

/* Final local visual system: light, dense, professional */
:root {
  --page: #f4f7fb;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --line: #dbe5f2;
  --line-strong: #c7d5e8;
  --ink: #0b1b33;
  --muted: #607089;
  --primary: #1f5eff;
  --primary-dark: #1646c7;
  --success: #129c6b;
  --danger: #d93a32;
  --warning: #b77900;
}
body {
  background: linear-gradient(180deg, #fbfdff 0%, var(--page) 100%);
  color: var(--ink);
}
nav {
  background: rgba(255,255,255,.96);
  border-bottom-color: var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
}
nav > div {
  min-height: 64px;
}
nav .rounded-xl {
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), #36a3ff);
  box-shadow: 0 8px 18px rgba(31, 94, 255, .22);
}
nav .text-lg {
  color: var(--ink);
  font-size: 17px;
  font-weight: 760;
}
nav .text-xs {
  color: var(--muted);
}
nav .inline-flex {
  background: #f7fbff;
  border-color: var(--line);
  color: var(--success);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
main {
  padding-top: 26px;
}
main > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  margin-bottom: 18px;
  padding-left: 2px;
}
h1 {
  color: var(--ink);
  font-size: 30px;
  font-weight: 780;
  letter-spacing: 0;
}
main > header p {
  color: var(--muted);
  font-size: 13px;
}
section {
  border-color: var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(26, 54, 93, .07);
}
section > .flex:first-child {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border-bottom-color: var(--line);
  min-height: 50px;
}
h2 {
  color: var(--ink);
  font-size: 16px;
  font-weight: 760;
}
label {
  color: #42536d;
  font-weight: 720;
}
input, select {
  border-color: var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  min-height: 42px;
}
input:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 94, 255, .12);
}
button, .rounded-2xl, .rounded-3xl {
  border-radius: 8px;
}
#submit, #schedule_add {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 8px 18px rgba(31, 94, 255, .18);
  font-weight: 740;
}
#submit:hover, #schedule_add:hover {
  background: var(--primary-dark);
}
#cancel, .bg-red-600 {
  background: var(--danger);
}
#export_json, #export_csv, #refresh_history, #history_prev, #history_next,
button[data-action] {
  background: #fff;
  border-color: var(--line-strong);
  color: #29405f;
  box-shadow: 0 1px 0 rgba(15, 23, 42, .02);
}
button[data-action="schedule-delete"],
button[data-action="job-cancel"] {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}
#status_box {
  background: #f7fbff;
  border-color: var(--line);
  padding: 13px 16px;
}
#summary {
  gap: 12px;
}
#summary article {
  border-radius: 8px;
  border-color: var(--line);
  background: #fff;
  padding: 16px;
  box-shadow: 0 8px 22px rgba(26, 54, 93, .06);
  position: relative;
  overflow: hidden;
}
#summary article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--primary);
}
#summary article p:nth-child(2) {
  color: #123c96;
  font-size: 28px;
  line-height: 1.05;
}
table {
  min-width: 840px;
  background: #fff;
}
.history-table {
  min-width: 1120px;
  table-layout: fixed;
}
.history-table th, .history-table td {
  padding-left: 4px;
  padding-right: 4px;
}
.history-table th:nth-child(1), .history-table td:nth-child(1) { width: 126px; }
.history-table th:nth-child(2), .history-table td:nth-child(2) { width: 146px; }
.history-table th:nth-child(3), .history-table td:nth-child(3) { width: 152px; }
.history-table th:nth-child(4), .history-table td:nth-child(4) {
  width: 210px;
  white-space: normal;
  word-break: break-word;
}
.history-table th:nth-child(n+5), .history-table td:nth-child(n+5) { width: 58px; }
.history-table th:nth-child(n+5), .history-table td:nth-child(n+5) { text-align: center; }
.history-table th:nth-child(10), .history-table td:nth-child(10) { width: 70px; }
.history-table th:nth-child(11), .history-table td:nth-child(11) { width: 76px; }
th {
  background: #f5f8fc;
  color: #536782;
  border-bottom-color: var(--line);
}
td {
  color: #172641;
  border-bottom-color: #e8eef7;
}
tr:hover td {
  background: #f8fbff;
}
.bg-emerald-950\/70,
.bg-emerald-950\/80 {
  background: #edf7ff;
}
.text-emerald-300,
.text-emerald-400 {
  color: var(--primary);
}
.border-emerald-800,
.border-emerald-900 {
  border-color: #bdd2ff;
}
.bg-amber-950\/70 {
  background: #fff8e6;
}
.text-amber-300 {
  color: var(--warning);
}
.border-amber-900 {
  border-color: #f1d58a;
}
.bg-red-950\/70 {
  background: #fff0ef;
}
.text-red-300 {
  color: var(--danger);
}
.border-red-900 {
  border-color: #efb5b0;
}
.bg-zinc-800 {
  background: #f3f7fd;
}
.text-zinc-500 {
  color: var(--muted);
}
.px-6 {
  padding-left: 16px;
  padding-right: 16px;
}
.py-4 {
  padding-top: 13px;
  padding-bottom: 13px;
}
.p-6 {
  padding: 16px;
}
@media (max-width: 640px) {
  nav > div { gap: 10px; }
  main { padding-top: 18px; }
  section { border-radius: 8px; }
  #summary article p:nth-child(2) { font-size: 25px; }
}
.login-shell {
  min-height: calc(100vh - 72px);
  display: grid;
  place-items: center;
  padding: 28px 16px;
}
.login-card {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(26, 54, 93, .10);
  padding: 24px;
}
.login-card h1 {
  font-size: 24px;
}
.login-card p {
  color: var(--muted);
  margin-top: 6px;
}
.auth-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.brand-mark {
  line-height: 1;
  transform: translate(8px, -1px);
}
#logout_btn {
  min-height: 34px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: #29405f;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 740;
}
.tab-btn {
  background: transparent;
  cursor: pointer;
  outline: none;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 700;
  color: #64748b;
  transition: all 0.15s ease;
}
.tab-btn:hover {
  background: rgba(226, 232, 240, 0.05);
  color: #cbd5e1;
}
.tab-btn.active {
  background: rgba(16, 185, 129, 0.09) !important;
  color: #10b981 !important;
  border-color: rgba(16, 185, 129, 0.25) !important;
}
