:root {
  --bg: #f5f5f2;
  --surface: #ffffff;
  --surface-1: #f1efe8;
  --border: #e3e1d8;
  --border-strong: #cac7bb;
  --text-primary: #242422;
  --text-secondary: #625f58;
  --text-muted: #918e84;
  --accent: #2f6fed;
  --accent-bg: #e6f1fb;
  --accent-text: #0c447c;
  --radius: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Tahoma, "Malgun Gothic", "Apple SD Gothic Neo", "Segoe UI", sans-serif;
  font-size: 12px;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 27px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.brand { font-size: 22px; font-weight: 600; white-space: nowrap; }

.nav { display: flex; gap: 22px; flex-wrap: wrap; font-size: 18px; }
.nav a { color: var(--text-secondary); padding-bottom: 4px; border-bottom: 3px solid transparent; }
.nav a.active { color: var(--accent-text); border-bottom-color: var(--accent); font-weight: 600; }
.nav a.archive-link { color: var(--text-muted); }

.user-box { display: flex; align-items: center; gap: 14px; font-size: 18px; color: var(--text-secondary); white-space: nowrap; }

.page { max-width: 900px; margin: 0 auto; padding: 24px 18px 68px; }

.flash {
  background: #faeeda;
  color: #633806;
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 26px;
  margin-bottom: 22px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  gap: 12px;
  flex-wrap: wrap;
}

.card-title { font-size: 22px; font-weight: 600; margin: 0; }
.icon { font-style: normal; margin-right: 8px; }

.ghost-btn {
  font-size: 18px;
  padding: 8px 15px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
}
.ghost-btn:hover { background: var(--surface-1); text-decoration: none; }
.danger-btn { color: #a32d2d; border-color: #e5b3b3; }
.danger-btn:hover { background: #faeceb; }
.row-actions { display: flex; align-items: center; gap: 9px; }
.small-btn { padding: 6px 12px; font-size: 15px; }

.primary {
  font-size: 18px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
.primary.small { padding: 9px 16px; }
.primary:hover { opacity: 0.9; }

.inline-form {
  display: none;
  flex-direction: column;
  gap: 10px;
  background: var(--surface-1);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}
.inline-form.open { display: flex; }
.inline-form input[type=text],
.inline-form input[type=password],
.inline-form input[type=date],
.inline-form input[type=file],
.inline-form select,
.inline-form textarea {
  font-size: 18px;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: #fff;
  font-family: inherit;
}
.inline-form textarea { min-height: 90px; resize: vertical; }
.inline-form label { font-size: 16px; color: var(--text-secondary); display: flex; flex-direction: column; gap: 4px; }
.hint { font-size: 15px; color: var(--text-muted); margin: 0; }

.issue-form-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.due-label { font-size: 16px; color: var(--text-secondary); display: flex; flex-direction: column; gap: 4px; }

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  gap: 12px;
}
.link-row { color: inherit; display: flex; }
.link-row:hover { text-decoration: none; background: var(--surface-1); border-radius: var(--radius); }

.row-title { font-size: 20px; font-weight: 500; margin: 0; }
.muted { color: var(--text-muted); }
.small-text { font-size: 15px; margin: 4px 0 0; }
.empty { color: var(--text-muted); font-size: 18px; padding: 12px 0; }

.badge {
  font-size: 15px;
  padding: 4px 12px;
  border-radius: var(--radius);
  white-space: nowrap;
}
.badge.success { background: #eaf3de; color: #27500a; }

.issue-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}
.issue-content { font-size: 18px; margin: 0; }
.archive-hint { font-size: 16px; color: var(--text-muted); margin-top: 15px; }

.status-select {
  font-size: 16px;
  padding: 7px 9px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
}
.status-select.status-pending { background: #faeeda; color: #633806; }
.status-select.status-in_progress { background: #e6f1fb; color: #0c447c; }
.status-select.status-resolved { background: #eaf3de; color: #27500a; }

.auth-wrap { display: flex; justify-content: center; padding: 60px 0; }
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 33px 28px;
  width: 330px;
  text-align: center;
}
.auth-title { font-size: 24px; font-weight: 600; margin: 0 0 8px; }
.auth-sub { font-size: 18px; color: var(--text-secondary); margin: 0 0 18px; }
.auth-error { font-size: 16px; color: #a32d2d; margin-bottom: 12px; }
.auth-card form { display: flex; flex-direction: column; gap: 10px; }
.auth-card input {
  font-size: 20px;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}

.name-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.name-btn {
  font-size: 20px;
  padding: 15px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-1);
  cursor: pointer;
}
.name-btn:hover { background: var(--accent-bg); color: var(--accent-text); }

.cal-wrap { display: flex; gap: 21px; flex-wrap: wrap; margin-top: 8px; }
.cal-block { flex: 1; min-width: 345px; }
.cal-title { font-size: 18px; font-weight: 600; color: var(--text-secondary); margin: 0 0 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 4px; margin-bottom: 4px; }
.cal-grid.cal-header { font-size: 12px; text-align: center; color: var(--text-muted); margin-bottom: 4px; }
.cal-cell {
  min-height: 63px;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 4px;
  font-size: 12px;
}
.empty-cell { border: none; }
.today-cell { border: 2px solid var(--accent); font-weight: 600; }
.cal-date { display: block; }
.cal-badge { border-radius: 3px; font-size: 10px; margin-top: 2px; padding: 2px 3px; }

.c-blue { background: #e6f1fb; color: #0c447c; }
.c-coral { background: #faece7; color: #712b13; }
.c-green { background: #eaf3de; color: #27500a; }
.c-amber { background: #faeeda; color: #633806; }
.c-pink { background: #fbeaf0; color: #72243e; }
.c-gray { background: #f1efe8; color: #444441; }

.legend { display: flex; gap: 15px; flex-wrap: wrap; margin-top: 15px; font-size: 15px; color: var(--text-secondary); }
.legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; }

.acc-row { align-items: flex-start; }
.acc-left { display: flex; align-items: center; gap: 12px; }
.acc-right { text-align: right; }
.acc-total { font-size: 22px; font-weight: 600; margin: 0; }
.acc-detail { font-size: 15px; color: var(--text-muted); margin: 3px 0 0; max-width: 420px; }
.acc-entries { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; max-width: 420px; justify-content: flex-end; }
.acc-entry-chip {
  font-size: 13px;
  padding: 4px 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-primary);
  background: var(--surface-1);
}
.acc-entry-chip:hover { background: var(--accent-bg); color: var(--accent-text); text-decoration: none; }
.acc-entry-chip.static { color: var(--text-muted); }
.edit-mark { color: var(--accent-text); font-size: 11px; }
.acc-entry-chip:hover .edit-mark { color: var(--accent-text); }

.avatar {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600;
}

.vac-form { flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
.half-check { flex-direction: row !important; align-items: center; gap: 6px !important; }

.post-body { font-size: 20px; white-space: pre-wrap; margin-top: 15px; }

@media (max-width: 750px) {
  .topbar { flex-direction: column; align-items: flex-start; }
  .cal-wrap { flex-direction: column; }
  .cal-block { min-width: 0; }
}

.big-date { cursor: pointer; background: #fff; }
.bigdate-panel {
  z-index: 1000;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  padding: 14px;
  width: 320px;
}
.bigdate-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.bigdate-label { font-size: 18px; font-weight: 600; }
.bigdate-nav {
  font-size: 20px;
  width: 34px; height: 34px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
}
.bigdate-nav:hover { background: var(--surface-1); }
.bigdate-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.bigdate-weekrow { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.bigdate-day {
  font-size: 17px;
  height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}
.bigdate-day:hover { background: var(--surface-1); }
.bigdate-day.today { border-color: var(--accent); }
.bigdate-day.selected { background: var(--accent); color: #fff; }

.project-files { padding: 0 0 12px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.file-del-btn {
  border: none; background: transparent; cursor: pointer;
  color: var(--text-muted); font-size: 15px; line-height: 1; padding: 0 0 0 4px;
}
.file-del-btn:hover { color: #a32d2d; }

.cat-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 9px;
  border-radius: var(--radius);
  margin-left: 8px;
}
