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

body {
  font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  background: #f4f5f9;
  color: #333;
  font-size: 14px;
  line-height: 1.5;
}

/* ── Header ── */
header {
  background: #e8002d;
  color: #fff;
  height: 54px;
  display: flex;
  align-items: center;
  padding: 0 28px;
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner { display: flex; align-items: center; gap: 14px; }
.logo  { font-size: 20px; font-weight: 700; letter-spacing: -0.5px; }
h1     { font-size: 15px; font-weight: 400; opacity: .88; }

/* ── Layout ── */
main {
  max-width: 920px;
  margin: 28px auto;
  padding: 0 18px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* ── Card ── */
.card {
  background: #fff;
  border-radius: 10px;
  padding: 24px 28px;
  box-shadow: 0 1px 5px rgba(0,0,0,.07);
}
.card h2 {
  font-size: 14px;
  font-weight: 700;
  color: #111;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e8002d;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.count { font-size: 12px; font-weight: 400; color: #888; }

/* ── Form ── */
.form-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
input[type="number"] {
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 7px 12px;
  font-size: 14px;
  width: 170px;
  font-family: inherit;
  transition: border-color .15s;
}
input[type="number"]:focus { outline: none; border-color: #e8002d; }
.btn-primary {
  background: #e8002d;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 8px 22px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  transition: background .15s;
}
.btn-primary:hover   { background: #c5002a; }
.btn-primary:active  { background: #a50025; }
.hint { color: #999; font-size: 12px; margin-top: 4px; }

/* ── Status bar ── */
.status {
  margin-top: 14px;
  padding: 10px 15px;
  border-radius: 6px;
  font-size: 13px;
}
.status.success { background: #e8f5e9; color: #2e7d32; border-left: 4px solid #43a047; }
.status.error   { background: #ffebee; color: #b71c1c; border-left: 4px solid #e53935; }
.status.running { background: #fff8e1; color: #e65100; border-left: 4px solid #ffa000; }
.next-run { margin-top: 10px; font-size: 12px; color: #777; }

/* ── Table ── */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th {
  background: #fafafa;
  text-align: left;
  padding: 9px 14px;
  font-weight: 600;
  border-bottom: 2px solid #eee;
  color: #555;
  white-space: nowrap;
}
td {
  padding: 9px 14px;
  border-bottom: 1px solid #f2f2f2;
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #fafafa; }

/* ── Badges / labels ── */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.badge.d { background: #e3f2fd; color: #1565c0; }
.badge.g { background: #e8f5e9; color: #2e7d32; }
.required {
  background: #ffebee;
  color: #e8002d;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 4px;
}
.sub  { color: #aaa; font-size: 12px; }
.mono { font-family: 'Consolas', 'Courier New', monospace; font-size: 12px; }

/* ── Code ── */
code, .val {
  font-family: 'Consolas', 'Courier New', monospace;
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  word-break: break-all;
}

/* ── Alerts ── */
.empty { color: #999; padding: 6px 0; font-size: 13px; }
.alert-error { color: #b71c1c; background: #ffebee; padding: 10px 14px; border-radius: 6px; font-size: 13px; }
