* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Noto Sans KR", "Malgun Gothic", sans-serif;
  background: #f5f6f8;
  color: #1f2430;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  background: #fff;
  border-bottom: 1px solid #e3e6eb;
}

.topbar .brand {
  font-weight: 700;
  text-decoration: none;
  color: #1f2430;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.topbar nav a {
  color: #3b4252;
  text-decoration: none;
}

.topbar nav a:hover { text-decoration: underline; }

.topbar .who { color: #6b7280; font-size: 14px; }

main {
  max-width: 1140px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

h1 { font-size: 22px; }
h2 { font-size: 17px; margin-top: 32px; }

.card {
  background: #fff;
  border: 1px solid #e3e6eb;
  border-radius: 10px;
  padding: 24px;
}

.card.narrow {
  max-width: 400px;
  margin: 48px auto 0;
}

label { display: block; margin-bottom: 12px; font-size: 14px; color: #3b4252; }

input, select, textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid #cfd4dc;
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
}

.filter { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.filter label { margin-bottom: 0; }
.filter input, .filter select { width: auto; }

.btn {
  padding: 9px 20px;
  border: 1px solid #cfd4dc;
  border-radius: 6px;
  background: #fff;
  font-size: 15px;
  cursor: pointer;
}

.btn.primary { background: #2563eb; border-color: #2563eb; color: #fff; }
.btn.wide { width: 100%; margin-top: 8px; }
.btn.small { padding: 5px 12px; font-size: 13px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:not(:disabled):hover { filter: brightness(0.95); }

a.btn-link {
  display: inline-block;
  text-decoration: none;
  color: #1f2430;
  line-height: normal;
}

.linklike {
  border: none;
  background: none;
  color: #3b4252;
  font-size: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

form.inline { display: inline-flex; align-items: center; gap: 8px; }
form.inline select { width: auto; margin-top: 0; }

td select { width: auto; margin-top: 0; display: inline-block; }
.cell-input { width: 110px; margin-top: 0; display: inline-block; }
.time-input { width: 190px; margin-top: 0; display: inline-block; }
.actions-cell { white-space: nowrap; }
.actions-cell form { margin-right: 4px; }

.status { display: flex; gap: 48px; margin-bottom: 20px; }
.status .label { color: #6b7280; margin-right: 8px; }
.status strong { font-size: 20px; }

.actions { display: flex; gap: 12px; }

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  vertical-align: middle;
}

.badge.ok { background: #dcfce7; color: #15803d; }
.badge.late { background: #fee2e2; color: #b91c1c; }
.badge.early { background: #ffedd5; color: #c2410c; }
.badge.leave { background: #e5e7eb; color: #374151; }
.badge.missing { background: #fef3c7; color: #92400e; }
.badge.flag { background: #fee2e2; color: #b91c1c; }

.notice-card { background: #fffbeb; border-color: #fcd34d; margin-bottom: 20px; padding: 14px 18px; }
.notice-item { white-space: pre-line; margin: 4px 0; }
.notice-content { white-space: pre-line; }

.tabs { display: flex; gap: 8px; margin: 16px 0 12px; }
.tabs a {
  padding: 6px 14px;
  border: 1px solid #cfd4dc;
  border-radius: 6px;
  text-decoration: none;
  color: #3b4252;
  background: #fff;
  font-size: 14px;
}
.tabs a.tab-on { background: #2563eb; color: #fff; border-color: #2563eb; }

.btn.danger { border-color: #fca5a5; color: #b91c1c; }

.plan-link { color: inherit; text-decoration: underline dotted #9ca3af; }
.plan-link:hover { color: #2563eb; }
.leave-input { width: 90px; }
.badge.admin { background: #dbeafe; color: #1d4ed8; }

.text-late { color: #b91c1c; font-weight: 700; }
.text-early { color: #c2410c; font-weight: 700; }
.text-missing { color: #92400e; font-weight: 700; }

.card-title { margin-top: 0; }
.plan { margin-top: 0; color: #3b4252; }
.hint-inline { color: #6b7280; font-size: 13px; }

.sched-list { display: flex; flex-direction: column; gap: 4px; }

.sched-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #e3e6eb;
  border-radius: 8px;
  padding: 6px 12px;
}

.sched-row.weekend { background: #f3f4f6; }
.sched-date { width: 90px; font-size: 14px; flex-shrink: 0; }
.sched-row form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sched-row input { margin-top: 0; width: auto; }
.sched-row input[type="text"] { width: 150px; }

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #e3e6eb;
  border-radius: 10px;
  overflow: hidden;
}

th, td {
  padding: 10px 14px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid #eef0f3;
  white-space: nowrap;
}

th { background: #f9fafb; color: #6b7280; font-weight: 600; }
tbody tr:last-child td { border-bottom: none; }

.flash {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}

.flash.ok { background: #dcfce7; color: #15803d; }
.flash.bad { background: #fee2e2; color: #b91c1c; }

.hint { color: #6b7280; font-size: 13px; }
.hint a { color: #2563eb; }
