:root {
  --ink: #18211d;
  --muted: #6e7973;
  --line: #e5e9e6;
  --surface: #ffffff;
  --canvas: #f4f6f4;
  --brand: #174b3a;
  --brand-2: #237456;
  --accent: #d8a94d;
  --danger: #b94141;
  --shadow: 0 14px 40px rgba(28, 48, 38, .09);
  font-family: Inter, Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted, .hint { color: var(--muted); }
.hint { font-weight: 400; font-size: 12px; }
.eyebrow { margin: 0 0 5px; font-size: 11px; font-weight: 800; letter-spacing: .18em; color: var(--brand-2); }
.brand-mark { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; color: #fff; background: var(--brand); font-weight: 800; letter-spacing: -.06em; }
.brand-mark.small { width: 40px; height: 40px; border-radius: 11px; font-size: 14px; }

.login-view { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 10%, #e2eee8 0, transparent 32%), linear-gradient(135deg, #f9faf9, #eef2ef); }
.login-card { width: min(100%, 400px); padding: 42px; border: 1px solid rgba(23,75,58,.08); border-radius: 24px; background: #fff; box-shadow: var(--shadow); }
.login-card h1 { margin: 8px 0; font-size: 30px; }
.login-card .brand-mark { margin-bottom: 28px; }
label { display: flex; flex-direction: column; gap: 7px; color: #45504a; font-size: 13px; font-weight: 700; }
.login-card label { margin-top: 18px; }
input, select, textarea { width: 100%; border: 1px solid #dce2de; border-radius: 9px; padding: 11px 12px; color: var(--ink); background: #fff; outline: none; transition: .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(35,116,86,.12); }
textarea { resize: vertical; }
.error-text { min-height: 18px; margin: 10px 0; color: var(--danger); font-size: 13px; }

.topbar { height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 34px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.92); backdrop-filter: blur(10px); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand span, .brand strong { display: block; }
.brand span { color: var(--muted); font-size: 10px; letter-spacing: .15em; }
.brand strong { margin-top: 2px; font-size: 16px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.user-chip { padding: 7px 12px; border-radius: 30px; color: var(--brand); background: #e9f2ed; font-size: 12px; font-weight: 700; }
main { width: min(1520px, calc(100% - 48px)); margin: 26px auto 40px; }
.summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.summary article { display: flex; align-items: center; justify-content: space-between; padding: 17px 20px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.summary span { color: var(--muted); font-size: 13px; }
.summary strong { font-size: 24px; color: var(--brand); }
.workspace { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 8px 28px rgba(36,52,43,.05); overflow: hidden; }
.calendar-toolbar, .filters { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.date-controls, .toolbar-right { display: flex; align-items: center; gap: 9px; }
.date-controls h2 { min-width: 210px; margin: 0 0 0 8px; font-size: 21px; letter-spacing: -.03em; }
.filters { justify-content: flex-start; padding-top: 12px; padding-bottom: 12px; background: #fbfcfb; }
.filters input { width: min(320px, 32vw); }
.filters select { width: 130px; }
.primary, .ghost, .danger, .icon-button, .view-switch button { border: 0; border-radius: 8px; padding: 9px 13px; font-weight: 700; font-size: 13px; }
.primary { color: #fff; background: var(--brand); }
.primary:hover { background: var(--brand-2); }
.ghost, .icon-button { color: #47524c; background: #eef1ef; }
.danger { color: #fff; background: var(--danger); }
.full { width: 100%; padding: 12px; }
.icon-button { min-width: 36px; font-size: 20px; line-height: 1; }
.view-switch { display: flex; padding: 3px; border-radius: 10px; background: #eef1ef; }
.view-switch button { min-width: 42px; padding: 7px 11px; color: var(--muted); background: transparent; }
.view-switch button.active { color: var(--brand); background: #fff; box-shadow: 0 1px 5px rgba(20,40,30,.1); }

.calendar { min-height: 620px; overflow-x: auto; }
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); min-width: 840px; }
.weekday { padding: 11px; border-bottom: 1px solid var(--line); color: var(--muted); background: #fafbfa; text-align: center; font-size: 12px; font-weight: 800; }
.weekday:first-child { color: #b54c4c; }.weekday:last-child { color: #4165a4; }
.month-day { min-height: 118px; padding: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.month-day:nth-child(7n) { border-right: 0; }
.month-day.outside { background: #fafbfa; color: #abb3ae; }
.month-day.today { background: #f5faf7; box-shadow: inset 0 0 0 2px rgba(35,116,86,.22); }
.day-number { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; margin-bottom: 5px; border: 0; border-radius: 50%; color: inherit; background: transparent; font-size: 12px; }
.today .day-number { color: #fff; background: var(--brand); font-weight: 800; }
.event-chip { display: block; width: 100%; margin: 3px 0; padding: 5px 7px; border: 0; border-left: 3px solid; border-radius: 5px; overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 700; }
.event-chip time { margin-right: 4px; opacity: .7; font-weight: 500; }
.cat-work { color: #235b48; border-color: #2c8b68; background: #e7f4ee; }
.cat-proposal { color: #795b16; border-color: #c69a33; background: #fbf2dc; }
.cat-reminder { color: #934440; border-color: #d35d55; background: #fbe9e7; }
.cat-executive { color: #684995; border-color: #8b6bb9; background: #f1ebf8; }
.cat-meeting { color: #345f99; border-color: #4b82c8; background: #eaf1fa; }
.cat-other { color: #58625d; border-color: #839088; background: #eef1ef; }
.completed { text-decoration: line-through; opacity: .58; }
.more-count { margin: 3px 4px; color: var(--muted); font-size: 11px; }

.agenda { min-width: 760px; }
.agenda-head, .agenda-row { display: grid; grid-template-columns: 120px 110px 1fr 120px 110px; gap: 12px; align-items: center; padding: 13px 20px; border-bottom: 1px solid var(--line); }
.agenda-head { color: var(--muted); background: #fafbfa; font-size: 11px; font-weight: 800; }
.agenda-row { border-left: 4px solid transparent; font-size: 13px; }
.agenda-row:hover { background: #fafcfb; }
.agenda-row button { color: var(--ink); border: 0; background: transparent; text-align: left; font-weight: 700; }
.agenda-date { color: var(--muted); font-size: 12px; }
.badge { display: inline-block; width: fit-content; padding: 4px 7px; border-radius: 20px; font-size: 10px; font-weight: 800; }
.empty { display: grid; place-items: center; min-height: 430px; color: var(--muted); }
.week-columns { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); min-width: 1050px; }
.week-column { min-height: 570px; border-right: 1px solid var(--line); }
.week-column:last-child { border-right: 0; }
.week-date { padding: 14px; border-bottom: 1px solid var(--line); text-align: center; font-size: 12px; font-weight: 800; background: #fafbfa; }
.week-date.today { color: #fff; background: var(--brand); }
.week-events { padding: 8px; }
.week-events .event-chip { padding: 8px; white-space: normal; }
.year-grid { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 1px; min-width: 960px; background: var(--line); }
.mini-month { padding: 17px; background: #fff; }
.mini-month h3 { margin: 0 0 12px; font-size: 15px; }
.mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.mini-grid span { display: grid; place-items: center; height: 26px; border-radius: 5px; color: var(--muted); font-size: 10px; }
.mini-grid .mini-week { height: 17px; font-weight: 800; }
.mini-grid .has-event { color: var(--brand); background: #e6f1eb; font-weight: 800; cursor: pointer; }
.mini-grid .today { color: #fff; background: var(--brand); }

.event-dialog { width: min(720px, calc(100% - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 18px; box-shadow: 0 24px 80px rgba(20,35,28,.25); }
.event-dialog::backdrop { background: rgba(15,28,22,.48); backdrop-filter: blur(3px); }
.event-dialog form { padding: 25px; }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.dialog-head h2 { margin: 0; }
.close-button { border: 0; color: var(--muted); background: transparent; font-size: 28px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .wide { grid-column: 1 / -1; }
.form-grid .check { flex-direction: row; align-items: center; }
.check input { width: auto; }
.dialog-actions { display: flex; gap: 9px; align-items: center; margin-top: 8px; }
.spacer { flex: 1; }
.toast { position: fixed; right: 24px; bottom: 24px; transform: translateY(30px); padding: 12px 17px; border-radius: 9px; color: #fff; background: var(--brand); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .2s; }
.toast.show { transform: translateY(0); opacity: 1; }

@media (max-width: 900px) {
  .summary { grid-template-columns: 1fr 1fr; }
  .calendar-toolbar { align-items: flex-start; }
  .calendar-toolbar, .toolbar-right { flex-wrap: wrap; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: auto; }
}
@media (max-width: 600px) {
  .topbar { padding: 0 15px; }.user-chip { display: none; }
  main { width: calc(100% - 20px); margin-top: 10px; }
  .summary { gap: 7px; }.summary article { padding: 13px; }.summary strong { font-size: 20px; }
  .calendar-toolbar { padding: 14px; }.date-controls { flex-wrap: wrap; }.date-controls h2 { order: 2; width: 100%; margin: 5px 0 0; }
  .toolbar-right { width: 100%; justify-content: space-between; }
  .filters { flex-wrap: wrap; padding: 10px; }.filters input { width: 100%; }.filters select { flex: 1; }
  .login-card { padding: 28px; }
}
