:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #172033;
  --muted: #657086;
  --line: #e2e8f0;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #e8f0ff;
  --success: #059669;
  --success-soft: #dff8ee;
  --warning: #d97706;
  --warning-soft: #fff4d8;
  --danger: #dc2626;
  --danger-soft: #fee7e7;
  --shadow: 0 16px 40px rgba(15, 23, 42, .08);
  --radius: 18px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-size: 16px;
  font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background:
    radial-gradient(circle at 15% 15%, rgba(37, 99, 235, .18), transparent 35%),
    linear-gradient(135deg, #eff6ff 0%, #f8fafc 55%, #eef2ff 100%);
}
.login-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(40px, 7vw, 100px);
  position: relative;
  overflow: hidden;
}
.login-hero::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  right: -160px;
  bottom: -180px;
  border: 70px solid rgba(37, 99, 235, .07);
}
.hero-brand { display: flex; align-items: center; gap: 16px; margin-bottom: 42px; }
.hero-brand img { width: 78px; height: 78px; border-radius: 22px; box-shadow: var(--shadow); }
.hero-brand strong { font-size: 24px; }
.hero-brand span { display: block; margin-top: 5px; color: var(--muted); }
.hero-title { font-size: clamp(38px, 5vw, 66px); line-height: 1.08; letter-spacing: -.045em; margin: 0 0 22px; max-width: 760px; }
.hero-copy { color: var(--muted); font-size: 18px; line-height: 1.75; max-width: 650px; }
.hero-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.hero-pill { background: rgba(255,255,255,.8); border: 1px solid rgba(148,163,184,.25); padding: 10px 14px; border-radius: 999px; font-weight: 700; color: #334155; }

.login-panel { display: flex; align-items: center; width: min(520px, 100%); }
.login-card {
  width: 100%;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 28px;
  padding: 34px;
  box-shadow: 0 28px 70px rgba(15,23,42,.14);
}
.login-brand { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; }
.login-logo { width: 76px; height: 76px; border-radius: 21px; display: block; flex: 0 0 auto; }
.login-brand-copy { min-width: 0; }
.login-brand-copy strong { display: block; color: #0f2b5b; font-size: 24px; line-height: 1.25; letter-spacing: -.03em; }
.login-brand-copy span { display: block; margin-top: 7px; color: var(--muted); font-size: 16px; line-height: 1.35; }
.login-card h2 { margin: 0 0 8px; font-size: 30px; letter-spacing: -.03em; }
.login-card > p { margin: 0 0 28px; color: var(--muted); }
.field { display: grid; gap: 8px; }
.field + .field { margin-top: 16px; }
.field label { font-weight: 750; font-size: 14px; color: #334155; }
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  padding: 12px 13px;
  outline: none;
  transition: .18s ease;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37,99,235,.1); }
.field textarea { min-height: 92px; resize: vertical; }
.reservation-form-grid > .field:has(textarea[name="requesterNote"]) { grid-template-rows: 22px auto; }
.reservation-form-grid textarea[name="requesterNote"] { height: 66px; min-height: 66px; padding: 12px; line-height: 20px; resize: none; overflow-y: auto; }
.field small { color: var(--muted); }
.input-icon { position: relative; }
.input-icon input { padding-left: 42px; }
.input-icon .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.password-input { position: relative; min-width: 0; }
.password-input input { padding-right: 48px; }
.password-visibility { position: absolute; right: 3px; top: 3px; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 9px; background: transparent; color: #52627a; cursor: pointer; }
.password-visibility svg { width: 20px; height: 20px; }
.password-visibility[aria-pressed="false"]::after { content: ''; position: absolute; width: 23px; height: 2px; background: currentColor; transform: rotate(-45deg); }
.password-visibility:hover, .password-visibility:focus-visible { background: #eff6ff; color: #1d4ed8; }
.field small.password-mismatch { color: #b91c1c; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 15px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-weight: 750;
  white-space: nowrap;
  transition: .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { color: #fff; background: var(--primary); box-shadow: 0 8px 18px rgba(37,99,235,.2); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: #fff; color: #334155; border-color: var(--line); }
.btn-soft { background: var(--primary-soft); color: var(--primary); }
.btn-success { background: var(--success); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-soft { background: var(--danger-soft); color: var(--danger); }
.btn-sm { min-height: 34px; padding: 7px 10px; font-size: 13px; }
.btn-block { width: 100%; }
.login-submit { margin-top: 22px; min-height: 50px; }
.demo-box { margin-top: 22px; padding: 15px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.demo-box strong { display: block; margin-bottom: 10px; }
.demo-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.demo-btn { text-align: left; padding: 10px 12px; border: 1px solid var(--line); background: #fff; border-radius: 10px; color: #334155; }
.demo-btn b { display: block; margin-bottom: 2px; }
.demo-btn span { color: var(--muted); font-size: 12px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 270px minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #0f172a;
  color: #e2e8f0;
  padding: 20px 16px;
  z-index: 30;
}
.side-brand { display: grid; gap: 7px; padding: 4px 8px 20px; }
.side-brand-main { display: flex; align-items: center; gap: 12px; }
.side-brand img { width: 46px; height: 46px; border-radius: 14px; }
.side-brand strong { color: #fff; display: block; font-size: 17px; }
.side-brand span { color: #94a3b8; font-size: 12px; }
.side-brand-date { display: block; width: 100%; line-height: 1.25; font-size: 14.4px; font-weight: 800; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: #64748b; padding: 16px 12px 8px; }
.nav-list { display: grid; gap: 5px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 0;
  background: transparent;
  color: #cbd5e1;
  border-radius: 11px;
  padding: 11px 12px;
  text-align: left;
  font-weight: 650;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: #2563eb; color: #fff; box-shadow: 0 10px 20px rgba(37,99,235,.25); }
.nav-item .nav-icon { width: 22px; text-align: center; font-size: 18px; }
.sidebar-footer { margin-top: auto; border-top: 1px solid rgba(148,163,184,.18); padding-top: 15px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px; }
.side-user img { width: 40px; height: 40px; border-radius: 12px; }
.side-user > div { flex: 1 1 auto; min-width: 0; }
.side-user strong { display: block; color: #fff; font-size: 14px; }
.side-user span { color: #94a3b8; font-size: 12px; }
.side-logout { width: 100%; margin-top: 8px; color: #fecaca; border-color: rgba(248,113,113,.25); background: rgba(127,29,29,.18); }
.side-account-edit { flex: 0 0 auto; margin-left: auto; padding: 7px 9px; font-size: 12px; white-space: nowrap; }

.main { min-width: 0; }
.topbar {
  height: 72px;
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(244,247,251,.88);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(226,232,240,.8);
}
.mobile-menu { display: none; border: 0; background: #fff; border-radius: 10px; padding: 9px 11px; box-shadow: 0 4px 12px rgba(15,23,42,.08); }
.topbar-title strong { display: block; font-size: 20px; letter-spacing: -.02em; }
.topbar-title span { color: var(--muted); font-size: 13px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.role-chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 12px; font-size: 13px; font-weight: 700; }
.content { padding: 28px; max-width: 1600px; margin: 0 auto; }
.calendar-fullscreen-app { display: block; min-height: 100vh; }
.calendar-fullscreen-app .sidebar,
.calendar-fullscreen-app .mobile-menu { display: none; }
.calendar-fullscreen-app .main { min-height: 100vh; }
.calendar-fullscreen-app .content { display: flex; flex-direction: column; width: 100%; max-width: none; height: 100vh; min-height: 100vh; overflow: hidden; padding: 4px; }
.calendar-fullscreen-page-header { flex: 0 0 auto; align-items: center; gap: 10px; margin-bottom: 4px; }
.calendar-fullscreen-page-header h1 { margin-bottom: 0; font-size: 20px; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-header h1 { margin: 0 0 7px; font-size: 30px; letter-spacing: -.04em; }
.page-header p { margin: 0; color: var(--muted); line-height: 1.6; }
.page-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.page-actions select { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 11px; min-height: 40px; outline: none; }
.reservation-target-filter { min-width: 210px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: 0 8px 24px rgba(15,23,42,.04); }
button.stat-card { width: 100%; font: inherit; color: inherit; text-align: left; cursor: pointer; }
button.stat-card:hover { border-color: #93b4f6; }
button.stat-card:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.stat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stat-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; background: var(--primary-soft); color: var(--primary); font-size: 20px; }
.stat-card .value { display: block; margin-top: 16px; font-size: 30px; font-weight: 850; letter-spacing: -.04em; }
.stat-card .label { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }
.admin-dashboard-stats .stat-card { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "icon value" "label label"; align-items: center; column-gap: 12px; row-gap: 7px; padding-top: 16px; padding-bottom: 16px; }
.admin-dashboard-stats .stat-head { grid-area: icon; }
.admin-dashboard-stats .stat-card .value { grid-area: value; margin-top: 0; justify-self: end; line-height: 1; }
.admin-dashboard-stats .stat-card .label { grid-area: label; margin-top: 0; }
.stats.admin-dashboard-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.admin-dashboard-stats .stat-card { min-width: 0; padding: 14px; }
.admin-recent-card .table-wrap { overflow: auto; overscroll-behavior: contain; }
.admin-recent-card { min-width: 0; }
.admin-recent-card thead th { position: sticky; top: 0; z-index: 1; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(15,23,42,.04); }
.card-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 19px 20px; border-bottom: 1px solid var(--line); }
.card-header h2, .card-header h3 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.card-header p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.card-body { padding: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(320px,.7fr); gap: 18px; }
.admin-dashboard-grid { grid-template-columns: minmax(0, 1fr); }
.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.quick-card { border: 1px solid var(--line); background: var(--surface-2); border-radius: 14px; padding: 16px; }
.quick-card .big-icon { font-size: 25px; }
.quick-card strong { display: block; margin-top: 10px; }
.quick-card p { color: var(--muted); font-size: 13px; line-height: 1.55; margin: 5px 0 12px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.form-grid.account-form-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
.account-form-grid > .field { margin-top: 0; min-width: 0; grid-template-rows: 22px 46px; }
.account-form-grid > .field label { display: flex; align-items: center; min-width: 0; }
.account-form-grid > .field input, .account-form-grid > .field select, .account-form-grid > .field button { width: 100%; min-width: 0; height: 46px; min-height: 46px; }
.form-grid .full { grid-column: 1 / -1; }
.registration-form-grid { align-items: start; }
.registration-form-grid .field { grid-template-rows: 22px 46px auto; }
.registration-form-grid > .field { margin-top: 0; }
.registration-form-grid .field label { min-height: 22px; display: flex; align-items: center; }
.registration-form-grid .field input,
.registration-form-grid .field select { height: 46px; min-height: 46px; }
.registration-form-grid .input-icon { height: 46px; }
.registration-form-grid .input-icon input { height: 46px; }
.registration-sms-controls { display: flex; gap: 8px; }
.registration-sms-controls > :first-child { flex: 1; min-width: 0; }
.registration-sms-controls > button { flex-shrink: 0; white-space: nowrap; }
#password-reset-form .field { margin-top: 0; }
#password-reset-form .field input { height: 46px; }
.resource-form-grid {
  column-gap: 16px;
  row-gap: 16px;
}
.resource-form-grid > .field {
  margin-top: 0;
}
.resource-form-grid .field input,
.resource-form-grid .field select {
  height: 46px;
  min-height: 46px;
}
.resource-form-grid .field select {
  padding-top: 0;
  padding-bottom: 0;
  line-height: 46px;
}
.reservation-form-grid {
  column-gap: 16px;
  row-gap: 18px;
  align-items: start;
}
.reservation-form-grid > .field {
  grid-template-rows: 22px 46px;
  grid-auto-rows: auto;
  gap: 8px;
  margin-top: 0;
}
.reservation-form-grid .field label {
  min-height: 22px;
  display: flex;
  align-items: center;
}
.reservation-form-grid .field input,
.reservation-form-grid .field select {
  height: 46px;
  min-height: 46px;
}
.reservation-form-grid .field select {
  padding-top: 0;
  padding-bottom: 0;
  line-height: 46px;
}
.reservation-top-fields { margin-bottom: 18px; }

.form-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.reservation-entry-form > .form-actions { border-top: 0; }
.reservation-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-right: auto; }
.recurrence-pattern:has(option[value="existing"]) select { font-size: 12px; padding-left: 6px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0; }
.toolbar-group { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.toolbar input, .toolbar select { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 11px; min-height: 40px; outline: none; }
.date-filter-wrap { position: relative; }
.toolbar-date-button { min-height: 40px; min-width: 150px; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 11px; color: #334155; text-align: left; font: inherit; outline: none; }
.toolbar-date-button:focus-visible { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37,99,235,.1); }
.date-picker-popover { position: absolute; top: calc(100% + 8px); left: 0; z-index: 30; width: 294px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.date-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.date-picker-head strong { font-size: 14px; font-weight: 750; }
.date-picker-grid { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 4px; }
.date-picker-weekday { display: grid; place-items: center; height: 28px; color: var(--muted); font-size: 12px; font-weight: 750; }
.date-picker-weekday.weekday-sun,
.date-picker-day.weekday-sun { color: #dc2626; }
.date-picker-weekday.weekday-sat,
.date-picker-day.weekday-sat { color: #2563eb; }
.date-picker-day { display: grid; place-items: center; height: 32px; border: 1px solid transparent; border-radius: 8px; background: #fff; color: #334155; font-size: 13px; cursor: pointer; }
.date-picker-day.other { color: #a1aab8; }
.date-picker-day:hover,
.date-picker-day.selected { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.date-picker-footer { display: flex; justify-content: flex-start; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.date-picker-clear { border: 0; background: transparent; color: var(--primary); padding: 4px 2px; font: inherit; font-weight: 750; cursor: pointer; }
.table-wrap { overflow-x: auto; }
.place-multi-select { max-height: 190px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.place-picker { min-width: 0; }
.place-picker summary { display: block; height: 46px; padding: 11px 40px 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff url('assets/select-chevron.svg') right 11px center / 14px 14px no-repeat; cursor: pointer; list-style: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.place-picker summary::-webkit-details-marker { display: none; }
.place-picker summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.place-picker[open] .place-multi-select { margin-top: 6px; }
.reservation-form-grid > .field:has(.place-multi-select) { grid-template-rows: 22px auto; }
.field .place-multi-select label { display: flex; align-items: center; gap: 8px; padding: 6px 0; margin: 0; font-weight: 400; }
.field .place-multi-select input[type="checkbox"] { width: 16px; height: 16px; min-height: 0; flex-shrink: 0; }
.reservation-place-line { display: block; white-space: nowrap; }
.reservation-list-card td:nth-last-child(2), .admin-recent-card td:nth-last-child(2) { min-width: 180px; }
#reservation-table-area .table-wrap { height: 100%; overflow: auto; overscroll-behavior: contain; }
#reservation-table-area thead th { position: sticky; top: 0; z-index: 1; background: #f8fafc; }
.reservation-search-group { margin-left: auto; }
#reservation-search { width: 190px; max-width: 100%; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.reservation-detail-table th, .reservation-detail-table td { padding-top: calc(14px - 1pt); padding-bottom: calc(14px - 1pt); }
th { color: #475569; font-size: 12px; letter-spacing: .02em; background: #fbfcfe; white-space: nowrap; }
td { font-size: 14px; }
tbody tr:hover { background: #fbfdff; }
.actions { display: flex; flex-wrap: wrap; gap: 7px; }
.reservation-list-card .actions, .admin-recent-card .actions { flex-wrap: nowrap; white-space: nowrap; }
.reservation-list-card .actions .btn, .admin-recent-card .actions .btn { flex-shrink: 0; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 999px; font-size: 12px; font-weight: 750; white-space: nowrap; }
.badge-pending { color: var(--warning); background: var(--warning-soft); }
.badge-approved { color: var(--success); background: var(--success-soft); }
.badge-rejected, .badge-canceled { color: var(--danger); background: var(--danger-soft); }
.badge-vehicle { color: #1d4ed8; background: #e7efff; }
.badge-place { color: #7c3aed; background: #efe8ff; }
.badge-active { color: var(--success); background: var(--success-soft); }
.badge-inactive { color: #64748b; background: #eef2f7; }
.empty { padding: 46px 20px; text-align: center; color: var(--muted); }
.empty .empty-icon { font-size: 42px; margin-bottom: 10px; }
.muted { color: var(--muted); }
.strong { font-weight: 800; }
.small { font-size: 12px; }
.stack { display: grid; gap: 4px; }
.admin-recent-card td:nth-child(3),
.admin-recent-card td:nth-child(5),
.admin-recent-card td:nth-child(6),
.reservation-list-card td:nth-child(3),
.admin-reservation-list-card td:nth-child(6) { white-space: nowrap; }
.admin-recent-card td:nth-child(3) .stack,
.admin-recent-card td:nth-child(5) .stack,
.admin-recent-card td:nth-child(6) .stack,
.reservation-list-card td:nth-child(3) .stack,
.admin-reservation-list-card td:nth-child(6) .stack { display: flex; align-items: center; gap: 6px; }
.admin-recent-card td:nth-child(3) b,
.admin-recent-card td:nth-child(3) .muted,
.admin-recent-card td:nth-child(4),
.admin-recent-card td:nth-child(5) b,
.admin-recent-card td:nth-child(5) .muted,
.admin-recent-card td:nth-child(6) b,
.admin-recent-card td:nth-child(6) .muted,
.reservation-list-card td:nth-child(3) b,
.reservation-list-card td:nth-child(3) .muted,
.reservation-list-card td:nth-child(4),
.admin-reservation-list-card td:nth-child(6) b,
.admin-reservation-list-card td:nth-child(6) .muted { color: inherit; font-size: inherit; font-weight: 400; }
.reservation-list-card td.reservation-target-cell,
.dashboard-recent-card td.reservation-target-cell {
  color: inherit;
  font-size: 14px !important;
  font-weight: 400 !important;
}
[data-detail-row] { cursor: pointer; }
[data-detail-row]:hover { background: #f8fbff; }
.notice { padding: 13px 15px; border-radius: 12px; background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; line-height: 1.55; font-size: 14px; }
.notice.warning { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }

.calendar-shell { overflow: hidden; }
.calendar-shell:not(.calendar-fullscreen-shell) { display: flex; flex-direction: column; min-height: 0; }
.calendar-shell:not(.calendar-fullscreen-shell) .calendar-head { flex: 0 0 auto; }
.calendar-grid-viewport { flex: 1 1 0; min-height: 0; min-width: 0; overflow: hidden; }
.calendar-grid-viewport .calendar-grid { height: 100%; }
.calendar-shell:not(.calendar-fullscreen-shell) .calendar-grid { flex: 1 1 0; min-height: 0; grid-template-rows: 28px repeat(6, minmax(0, 1fr)); }
.calendar-shell:not(.calendar-fullscreen-shell) .calendar-day { height: auto; min-height: 0; }
.calendar-head { position: relative; display: flex; align-items: center; justify-content: flex-end; gap: 12px; min-height: 56px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.calendar-head h3 { margin: 0; font-size: 18px; }
.calendar-month-nav { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 18px; }
.calendar-head-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.toolbar-check { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; color: #334155; font-size: 13px; font-weight: 700; white-space: nowrap; }
.toolbar-check input { width: 16px; height: 16px; }
.reservation-pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; padding: 14px 16px; }
.reservation-pagination select { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 10px; min-height: 38px; outline: none; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); }
.calendar-weekday { padding: 10px; text-align: center; font-size: 14.4px; font-weight: 850; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.calendar-weekday.weekday-sun { color: #dc2626; }
.calendar-weekday.weekday-sat { color: #2563eb; }
.calendar-day { display: flex; flex-direction: column; height: max(150px, calc((100dvh - 240px) / 6)); min-height: 115px; overflow: hidden; padding: 9px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.calendar-day-top, .calendar-day-footer { flex: 0 0 auto; }
.calendar-events { flex: 1 1 0; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.calendar-events .cal-event { flex: 0 0 auto; }
.calendar-events > [hidden], .calendar-day-footer > .calendar-more[hidden] { display: none; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day.other { background: #fafbfd; color: #a1aab8; }
.calendar-day.calendar-today { outline: 3px solid #dc2626; outline-offset: -3px; }
.calendar-day.holiday-rest { background: #fff1f2; }
.calendar-day.other.holiday-rest { background: #fff5f6; }
.calendar-day.weekday-sun .day-number { color: #dc2626; }
.calendar-day.weekday-sat .day-number { color: #2563eb; }
.day-number { font-size: 14.4px; font-weight: 800; margin-bottom: 7px; }
.calendar-day-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 5px; margin-bottom: 7px; }
.calendar-day-top .day-number { margin-bottom: 0; }
.calendar-day-labels { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 2px 4px; min-width: 0; color: #dc2626; font-size: 14.4px; font-weight: 400; line-height: 1.2; text-align: right; }
.calendar-day-labels span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-day-button { display: block; width: fit-content; border: 0; background: transparent; color: inherit; padding: 1px 3px; border-radius: 6px; cursor: pointer; font-family: inherit; }
.calendar-day-button:hover, .calendar-day-button:focus-visible { background: var(--primary-soft); color: var(--primary); outline: none; }
.cal-event { display: flex; align-items: center; gap: 4px; width: 100%; min-width: 0; overflow: hidden; white-space: nowrap; padding: 5px 7px; margin: 4px 0; border-radius: 7px; font-size: 11px; font-weight: 700; text-align: left; }
.cal-event.status-pending { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }
.cal-event.status-approved { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.cal-type-icon { flex: 0 0 auto; font-size: 1.5em; line-height: 1; }
.cal-status { flex: 0 0 auto; display: inline-block; font-weight: 850; }
.cal-event-time { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.cal-event-department,
.cal-event-target,
.cal-event-reserver { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-event-department { flex: 0 0 auto; max-width: 26%; }
.cal-event-target { flex: 1 1 auto; }
.cal-event-reserver { flex: 0 0 auto; max-width: 22%; margin-left: auto; text-align: right; }
.cal-event-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-more { display: block; width: 100%; padding: 3px 2px; border: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 750; text-align: left; cursor: pointer; }
.calendar-more:hover { color: var(--primary); text-decoration: underline; }
.calendar-more-list { display: grid; gap: 9px; }
.calendar-more-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 11px 12px; border-radius: 12px; text-align: left; }
.calendar-more-item.status-pending { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }
.calendar-more-item.status-approved { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.calendar-more-copy { min-width: 0; display: grid; gap: 3px; }
.calendar-more-copy strong, .calendar-more-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-more-copy small { opacity: .8; }
.calendar-time-list { display: grid; gap: 8px; }
.calendar-time-item { display: grid; grid-template-columns: 92px 30px minmax(0,1fr); align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border-radius: 12px; text-align: left; }
.calendar-time-item.status-pending { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }
.calendar-time-item.status-approved { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.calendar-time-range { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 4px; font-size: 13px; font-variant-numeric: tabular-nums; }
.calendar-time-range span { opacity: .6; text-align: center; }
.calendar-time-copy { min-width: 0; display: grid; gap: 3px; }
.calendar-time-title { min-width: 0; display: flex; align-items: center; gap: 8px; }
.calendar-time-title b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-time-title em { flex: 0 0 auto; font-style: normal; }
.calendar-time-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .8; }
.calendar-fullscreen-shell { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.calendar-fullscreen-shell .calendar-head { flex: 0 0 auto; min-height: 44px; padding: 5px 7px; }
.calendar-fullscreen-shell .calendar-head-actions { flex-wrap: nowrap; gap: 6px; }
.calendar-fullscreen-shell .calendar-head-actions .btn,
.calendar-fullscreen-shell .calendar-head-actions select { min-height: 36px; height: 36px; border-radius: 10px; line-height: 34px; padding: 0 10px; }
.calendar-fullscreen-shell .calendar-head-actions .btn { padding: 7px 10px; }
.calendar-fullscreen-shell .calendar-fullscreen-back { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.calendar-fullscreen-shell .reservation-target-filter { min-width: 180px; }
.calendar-fullscreen-shell .calendar-grid { flex: 1 1 auto; min-height: 0; grid-template-rows: 28px repeat(6, minmax(0, 1fr)); }
.calendar-fullscreen-shell .calendar-weekday { display: grid; place-items: center; padding: 0 8px; }
.calendar-fullscreen-shell .calendar-day { height: auto; min-height: 0; overflow: hidden; padding: 4px; }
.calendar-fullscreen-shell .calendar-day-top { margin-bottom: 2px; }
.calendar-fullscreen-shell .calendar-day-labels { font-size: 13px; font-weight: 400; gap: 1px 3px; }
.calendar-fullscreen-shell .cal-event { gap: 3px; font-size: 9.5px; font-weight: 600; line-height: 1.1; padding: 1px 3px; margin: 1px 0; border-radius: 4px; }
.calendar-fullscreen-shell .cal-event-time { width: 61px; }
.calendar-fullscreen-shell .cal-event-department { max-width: 25%; }
.calendar-fullscreen-shell .cal-event-reserver { max-width: 18%; }
.calendar-fullscreen-shell .calendar-more { padding: 1px 2px; font-size: 9px; line-height: 1.1; }
.calendar-fullscreen-shell .day-number { font-size: 13px; }

.reservation-mode-panel { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.admin-reservation-options { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.admin-reservation-options .reservation-mode-panel { margin: 0; margin-left: auto; }
.reservation-type-panel { display: flex; flex-wrap: wrap; gap: 10px; }
.partial-reservation-list { display: grid; gap: 8px; max-height: 50dvh; overflow: auto; margin-top: 16px; }
.partial-reservation-item { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.partial-reservation-item input { flex: 0 0 auto; width: 18px; height: 18px; }
.partial-reservation-item small { display: block; color: var(--muted); margin-top: 4px; }
.partial-edit-notice { margin-bottom: 16px; overflow-wrap: anywhere; }
.choice-pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 9px 13px; font-weight: 750; cursor: pointer; }
.recurrence-grid { grid-template-columns: 112px repeat(3, minmax(0, 1fr)); margin-bottom: 18px; }
.recurrence-grid .recurrence-date,
.recurrence-grid .recurrence-time { grid-column: span 2; }
.recurrence-grid .recurrence-pattern { grid-column: 1; }
.recurrence-grid .recurrence-weekly { grid-column: 2 / -1; }
.recurrence-grid .recurrence-monthly-week { grid-column: 2; }
.recurrence-grid .recurrence-monthly-weekday { grid-column: 3; }
.weekday-options { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; height: 46px; }
.weekday-options label { display: inline-flex; align-items: center; gap: 3px; min-height: 0; padding: 0 3px; border: 0; border-radius: 0; background: transparent; font-size: 13px; font-weight: 700; white-space: nowrap; }
.weekday-options input { width: 15px; height: 15px; min-height: 0; margin: 0; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 18px; background: rgba(15,23,42,.55); backdrop-filter: blur(4px); }
.modal { width: min(620px, 100%); max-height: calc(100vh - 36px); overflow: auto; background: #fff; border-radius: 20px; box-shadow: 0 30px 90px rgba(15,23,42,.28); }
.modal-lg { width: min(900px, 100%); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.modal-header h3 { margin: 0; }
.modal-close { border: 0; background: var(--surface-2); width: 36px; height: 36px; border-radius: 10px; }
.modal-body { padding: 22px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px 20px; }
.toast-root { position: fixed; inset: 0; z-index: 200; display: grid; align-content: center; justify-items: center; gap: 10px; padding: 20px; pointer-events: none; }
.toast { min-width: 280px; max-width: min(390px, calc(100vw - 40px)); background: #0f172a; color: #fff; border-radius: 12px; padding: 13px 15px; text-align: center; box-shadow: var(--shadow); animation: toastIn .2s ease; pointer-events: auto; }
.toast.success { background: #065f46; }
.toast.error { background: #991b1b; }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0; } }

.mobile-backdrop { display: none; }

@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .login-shell { padding: 20px; }
  .login-panel { width: min(520px, 100%); }
  .app-shell { display: block; }
  .sidebar { position: fixed; left: auto; right: -285px; transition: .2s ease; width: 270px; }
  .sidebar.open { right: 0; }
  .mobile-menu { position: fixed; top: 14px; right: 14px; z-index: 22; display: inline-flex; }
  .mobile-backdrop { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(15,23,42,.5); }
  .content { padding: 20px 16px; }
  .page-header { flex-direction: column; }
}
@media (max-width: 680px) {
  .login-card { padding: 25px 20px; border-radius: 22px; }
  .login-brand { gap: 13px; }
  .login-logo { width: 68px; height: 68px; border-radius: 19px; }
  .login-brand-copy strong { font-size: 21px; }
  .login-brand-copy span { font-size: 14px; }
  .demo-actions, .grid-2, .grid-3, .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .content { padding: 18px 12px; }
  .page-header h1 { font-size: 25px; }
  .card-body { padding: 16px; }
  .dashboard-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .dashboard-stats .stat-card { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "icon value" "label label"; align-items: center; column-gap: 10px; row-gap: 5px; min-width: 0; padding: 12px; }
  .dashboard-stats .stat-head { grid-area: icon; }
  .dashboard-stats .stat-icon { width: 38px; height: 38px; border-radius: 11px; font-size: 18px; }
  .dashboard-stats .value { grid-area: value; justify-self: end; margin-top: 0; font-size: 25px; line-height: 1; }
  .dashboard-stats .label { grid-area: label; min-height: 0; line-height: 1.35; }
  .dashboard-grid,
  .dashboard-grid > .dashboard-card { width: 100%; max-width: 100%; min-width: 0; }
  .dashboard-grid > .dashboard-card { overflow: hidden; }
  .user-dashboard-grid .user-new-reservation-card { order: 1; }
  .user-dashboard-grid .user-recent-card { order: 2; }
  .account-department { white-space: nowrap; }
  .place-select option { padding-block: revert; }
  .place-select option + option { margin-top: 5px; }
  .dashboard-recent-card .table-wrap { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .dashboard-recent-card table { min-width: 760px; }
  .user-new-reservation-card .quick-grid,
  .admin-shortcuts-card .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .user-new-reservation-card .quick-card,
  .admin-shortcuts-card .quick-card { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 8px; min-width: 0; padding: 11px; }
  .user-new-reservation-card .quick-card .big-icon,
  .admin-shortcuts-card .quick-card .big-icon { font-size: 22px; }
  .user-new-reservation-card .quick-card strong,
  .admin-shortcuts-card .quick-card strong { margin-top: 0; font-size: 14px; }
  .user-new-reservation-card .quick-card p,
  .admin-shortcuts-card .quick-card p { grid-column: 1 / -1; min-height: 0; margin: 3px 0 8px; font-size: 12px; line-height: 1.45; }
  .user-new-reservation-card .quick-card .btn,
  .admin-shortcuts-card .quick-card .btn { grid-column: 1 / -1; width: 100%; padding-left: 8px; padding-right: 8px; }
  .mobile-logout-card { width: 100%; }
  .mobile-logout-card .side-logout { width: 100%; min-height: 42px; margin-top: 8px; }
  .calendar-shell:not(.calendar-fullscreen-shell) .calendar-head { flex-direction: column; justify-content: center; min-height: 0; }
  .calendar-shell:not(.calendar-fullscreen-shell) .calendar-month-nav { position: static; transform: none; }
  .calendar-shell:not(.calendar-fullscreen-shell) .calendar-head-actions { width: 100%; justify-content: center; }
  .calendar-fullscreen-shell .calendar-head { flex-direction: column; gap: 8px; }
  .calendar-fullscreen-shell .calendar-month-nav { position: static; transform: none; order: 1; gap: 12px; }
  .calendar-fullscreen-shell .calendar-head-actions { width: 100%; min-width: 0; justify-content: center; }
  .calendar-fullscreen-shell .reservation-target-filter { flex: 1 1 0; width: 0; min-width: 0; }
  .calendar-fullscreen-shell .calendar-fullscreen-back { flex: 0 0 auto; }
  .calendar-day { min-height: 85px; padding: 5px; }
  .cal-event { font-size: 9px; padding: 4px; }
  .calendar-time-item { grid-template-columns: 76px 26px minmax(0,1fr); gap: 7px; padding: 10px; }
  .calendar-time-range { font-size: 12px; }
}

.login-links { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; }
.login-links > span { width: 1px; height: 14px; background: var(--line); }
.link-btn { border: 0; background: transparent; color: var(--primary); padding: 4px; font-weight: 750; }
.link-btn:hover { text-decoration: underline; }
.consent-box { display: flex; align-items: flex-start; gap: 11px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); cursor: pointer; }
.consent-box input { width: 18px; height: 18px; margin-top: 2px; flex: 0 0 auto; }
.consent-box span { display: grid; gap: 5px; line-height: 1.55; }
.consent-box small { color: var(--muted); }
.badge-disabled { color: #64748b; background: #eef2f7; }
.loading-screen { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 18px; padding: 24px; text-align: center; background: var(--bg); }
.loading-screen img { width: 82px; height: 82px; border-radius: 22px; box-shadow: var(--shadow); }
.loading-screen strong { color: var(--muted); }

.stat-value-link {
  display: block;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  text-decoration-color: transparent;
  transition: color .16s ease, text-decoration-color .16s ease;
}
.stat-value-link:hover,
.stat-value-link:focus-visible {
  color: var(--primary);
  text-decoration-color: currentColor;
  outline: none;
}


/* 사용 종료 시간이 지난 예약 */
tr.past-reservation,
tr.past-reservation:hover {
  background: #f8f9fb;
  color: #8a94a3;
}
tr.past-reservation td,
tr.past-reservation .strong,
tr.past-reservation .muted {
  color: #8a94a3;
}
tr.past-reservation .badge {
  color: #7b8492;
  background: #e5e7eb;
}
tr.past-reservation .btn {
  filter: grayscale(1);
  opacity: .72;
}
.cal-event.past-reservation,
.calendar-more-item.past-reservation,
.calendar-time-item.past-reservation,
.cal-event.past-reservation.status-pending,
.cal-event.past-reservation.status-approved,
.calendar-more-item.past-reservation.status-pending,
.calendar-more-item.past-reservation.status-approved,
.calendar-time-item.past-reservation.status-pending,
.calendar-time-item.past-reservation.status-approved {
  color: #7b8492;
  background: #eef0f3;
  border-color: #d5d9df;
}
.cal-event.past-reservation .cal-type-icon,
.calendar-more-item.past-reservation .cal-type-icon,
.calendar-time-item.past-reservation .cal-type-icon {
  filter: grayscale(1);
  opacity: .68;
}
.cal-event.past-reservation .cal-status,
.cal-event.past-reservation .cal-event-title,
.calendar-more-item.past-reservation .cal-status,
.calendar-more-item.past-reservation .calendar-more-copy,
.calendar-time-item.past-reservation .cal-status,
.calendar-time-item.past-reservation .calendar-time-copy,
.calendar-time-item.past-reservation .calendar-time-range {
  color: #7b8492;
}

/* 관리자 알림 설정 */
.notification-settings-page-header { align-items: center; }
.notification-settings-page-header .btn { flex: 0 0 auto; }
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
.setting-card { min-width: 0; overflow: hidden; }
.settings-sms-card { grid-column: 1 / -1; }
.setting-card-header { align-items: flex-start; }
.settings-tool-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.vehicle-menu-setting { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; cursor: pointer; }
.vehicle-menu-setting input { width: 17px; height: 17px; margin: 0; }
.reservation-delete-list { display: grid; gap: 8px; max-height: 360px; overflow: auto; margin-top: 16px; }
.reservation-delete-list[hidden] { display: none !important; }
.reservation-delete-item { display: grid; grid-template-columns: 1.35fr minmax(0,1fr) .7fr auto; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); font-size: 13px; }
.reservation-delete-item span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reservation-delete-item strong { display: block; font-size: 13px; font-weight: 400; }
.reservation-delete-item small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.reservation-delete-item input { width: 18px; height: 18px; margin: 0; }
.notification-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.notification-toggle input { width: 18px; height: 18px; margin: 0; }
.notification-toggle:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.settings-form-grid { margin-top: 16px; }
.settings-form-grid input:not([type="checkbox"]),
.settings-form-grid select,
.settings-form-grid textarea {
  height: 40px;
  min-height: 40px;
  padding: 9px 11px;
}
.settings-form-grid textarea { resize: none; overflow-y: auto; line-height: 20px; }
.settings-form-grid input[readonly] { background: var(--surface-2); color: var(--muted); }
#sms-config-status.ready { background: var(--success-soft); border-color: #a7f3d0; color: #047857; }

@media (max-width: 1180px) {
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .notification-settings-page-header .btn { width: 100%; }
  .setting-card-header { align-items: stretch; flex-direction: column; }
  .notification-toggle { width: 100%; justify-content: flex-start; }
  .reservation-delete-item { grid-template-columns: minmax(0,1fr) auto; }
  .reservation-delete-item input { grid-column: 2; grid-row: 1 / span 3; }
}
.calendar-shell .calendar-events { gap: 1pt; }
.calendar-shell .calendar-events .cal-event { padding-top: 1pt; padding-bottom: 1pt; margin: 0; }
.calendar-events .cal-type-icon { font-size: 1em; line-height: inherit; }
.calendar-day-footer { display: flex; align-items: center; justify-content: space-between; gap: 3px; min-width: 0; padding-top: 1pt; font-size: 10px; line-height: 1.3; color: var(--muted); }
.calendar-shell .calendar-day-footer .calendar-more { flex: 1 1 auto; width: auto; min-width: 0; padding: 0; font-size: inherit; line-height: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calendar-day-total { flex: 0 0 auto; margin-left: auto; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; white-space: nowrap; text-align: right; cursor: pointer; }
.calendar-day-total:hover { color: var(--primary); text-decoration: underline; }
.calendar-day-total:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.calendar-fullscreen-shell .calendar-day-footer { font-size: 9px; }
.admin-recent-card td:nth-child(3) .reservation-date-stack,
.reservation-list-card td:nth-child(3) .reservation-date-stack { display: grid; grid-template-columns: max-content max-content; column-gap: 6px; row-gap: 4px; }
.reservation-repeat-count { grid-column: 1 / -1; }
.admin-recent-card td:nth-child(5), .admin-recent-card td:nth-child(6),
.reservation-list-card td:nth-child(5), .admin-reservation-list-card td:nth-child(6) { white-space: nowrap; min-width: 90px; }
.cal-event.cal-event-vehicle { background: #fff8cc; border: 1px solid #eadb88; color: #66551a; }
.resource-merge-confirm { margin-top: 16px; }
.resource-merge-confirm .actions { margin-top: 12px; }

select:not([multiple]) {
  appearance: none;
  background-image: url('assets/select-chevron.svg') !important;
  background-repeat: no-repeat !important;
  background-position: right 11px center !important;
  background-size: 14px 14px !important;
  padding-right: 40px !important;
}
input[type="search"] { padding-right: 11px !important; }
input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin: 0;
  background: url('assets/search-clear.svg') center / 14px 14px no-repeat;
  cursor: pointer;
}
@media (max-width: 680px) {
  .stats.admin-dashboard-stats { grid-template-columns: repeat(5, minmax(125px, 1fr)); overflow-x: auto; padding-bottom: 4px; }
}

.manual-viewer { min-width: 0; overflow: clip; }
.manual-toolbar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px 16px; background: #fff; border-bottom: 1px solid var(--line); }
.manual-role-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.manual-toolbar select { min-width: 0; max-width: 100%; min-height: 36px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 9px; background-color: #fff; color: var(--text); font-size: 13px; }
.manual-pagination { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }
#manual-page-select { width: 230px; }
.manual-download { margin-left: auto; }
.manual-role-name { font-size: 13px; font-weight: 750; }
.manual-page-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; padding: 11px 18px; background: var(--surface-2); color: var(--muted); font-size: 12px; }
.manual-sheet { max-width: 900px; margin: 0 auto; padding: 32px 36px 40px; line-height: 1.75; overflow-wrap: anywhere; }
.manual-sheet:focus { outline: none; }
.manual-page-kicker { margin: 0 0 6px; color: var(--primary); font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.manual-sheet h2 { margin: 0 0 12px; font-size: 27px; line-height: 1.35; letter-spacing: -.03em; }
.manual-intro { margin: 0 0 28px; color: var(--muted); }
.manual-section { margin: 24px 0; }
.manual-section h3 { margin: 0 0 8px; font-size: 17px; color: #153d7a; }
.manual-section ul, .manual-section ol { margin: 0; padding-left: 23px; }
.manual-section li + li { margin-top: 7px; }
.manual-note { margin-top: 28px; padding: 14px 16px; background: #eff6ff; border-left: 3px solid var(--primary); border-radius: 8px; color: #1e40af; font-size: 14px; }
.manual-load-state { padding: 28px; color: var(--muted); }

/* Mobile density: keep all desktop rules above unchanged. */
@media (max-width: 680px) {
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body { font-size: 13px; }
  .content { padding: 12px 10px; }
  .mobile-menu { top: 8px; right: 8px; width: 34px; height: 34px; padding: 5px; align-items: center; justify-content: center; font-size: 18px; }
  .page-header { gap: 8px; margin-bottom: 12px; }
  .page-header > div:first-child { min-width: 0; width: 100%; }
  .page-header h1 { padding-right: 38px; margin-bottom: 4px; font-size: 20px; line-height: 1.3; }
  .page-header p { font-size: 12px; line-height: 1.45; }
  .page-actions { width: 100%; gap: 6px; }
  .btn { min-height: 34px; padding: 6px 10px; gap: 5px; border-radius: 8px; font-size: 12px; line-height: 1.4; }
  .btn-sm { min-height: 30px; padding: 5px 7px; font-size: 11px; }
  .page-actions select, .toolbar input, .toolbar select, .toolbar-date-button { min-height: 34px; padding: 6px 9px; font-size: 12px; }
  .page-actions .reservation-target-filter { flex: 1 1 140px; min-width: 0; }
  .toolbar { gap: 7px; padding: 9px; }
  .toolbar-group { gap: 6px; max-width: 100%; }
  .card { border-radius: 12px; }
  .card-header { gap: 8px; padding: 11px 12px; }
  .card-header h2, .card-header h3 { font-size: 15px; }
  .card-header p { margin-top: 3px; font-size: 11px; line-height: 1.4; }
  .card-body { padding: 12px; }
  .stats.dashboard-stats { gap: 7px; margin-bottom: 12px; }
  .stats.admin-dashboard-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; padding-bottom: 0; }
  .dashboard-stats .stat-card { padding: 8px; border-radius: 11px; column-gap: 6px; row-gap: 4px; }
  .dashboard-stats .stat-icon { width: 26px; height: 26px; border-radius: 8px; font-size: 15px; }
  .dashboard-stats .value { min-width: 28px; min-height: 28px; font-size: 21px; line-height: 28px; text-align: right; }
  .dashboard-stats .label { font-size: 11px; line-height: 1.35; overflow-wrap: anywhere; }
  .quick-grid { gap: 8px; }
  .quick-card { padding: 10px; }
  .dashboard-grid { gap: 12px; }
  th, td { padding: 8px; }
  .admin-recent-card tbody td, .reservation-list-card tbody td { padding-top: 5px; padding-bottom: 5px; }
  .admin-recent-card tbody td:nth-last-child(2) .stack,
  .reservation-list-card tbody td:nth-last-child(2) .stack { gap: 2px; white-space: nowrap; }
  th { font-size: 10px; }
  td { font-size: 12px; line-height: 1.4; }
  .badge { gap: 3px; padding: 3px 6px; font-size: 10px; }
  .dashboard-recent-card table, table { min-width: 620px; }
  .admin-recent-card td:nth-child(3) .reservation-date-stack,
  .reservation-list-card td:nth-child(3) .reservation-date-stack { grid-template-columns: max-content; row-gap: 2px; }
  .reservation-list-card td.reservation-target-cell,
  .dashboard-recent-card td.reservation-target-cell { font-size: 12px !important; }
  .reservation-list-card td:nth-last-child(2), .admin-recent-card td:nth-last-child(2) { min-width: 120px; }
  .calendar-head h3 { font-size: 14px; white-space: nowrap; }
  .calendar-shell:not(.calendar-fullscreen-shell) .calendar-head { flex-direction: row; flex-wrap: wrap; justify-content: space-between; gap: 6px; padding: 8px; }
  .calendar-shell .calendar-month-nav { position: static; transform: none; min-width: 0; gap: 6px; justify-content: center; }
  .calendar-shell:not(.calendar-fullscreen-shell) .calendar-month-nav { flex: 1 1 175px; }
  .calendar-shell:not(.calendar-fullscreen-shell) .calendar-head-actions { width: auto; }
  .calendar-head .btn { min-height: 30px; padding: 5px 6px; font-size: 11px; }
  .calendar-shell:not(.calendar-fullscreen-shell) .calendar-grid,
  .calendar-fullscreen-shell .calendar-grid { grid-template-rows: 22px repeat(6, minmax(0, 1fr)); }
  .calendar-weekday { display: grid; place-items: center; padding: 0; font-size: 11px; }
  .calendar-shell .calendar-day { padding: 3px; }
  .calendar-shell .calendar-day-top { gap: 2px; margin-bottom: 3px; }
  .calendar-shell .day-number { padding: 0 1px; font-size: 12px; line-height: 18px; }
  .calendar-shell .calendar-day-labels { gap: 1px; font-size: 9px; line-height: 18px; }
  .calendar-shell .cal-event { gap: 2px; border-radius: 4px; padding: 2px; font-size: 9px; line-height: 1.25; }
  .calendar-shell:not(.calendar-fullscreen-shell) .cal-event .cal-type-icon,
  .calendar-shell:not(.calendar-fullscreen-shell) .cal-event-department,
  .calendar-shell:not(.calendar-fullscreen-shell) .cal-event-reserver { display: none; }
  .calendar-shell .calendar-day-footer { justify-content: center; gap: 0; padding-top: 1px; font-size: 9px; line-height: 1.4; }
  .calendar-shell .calendar-day-footer .calendar-more { display: none; }
  .calendar-shell .calendar-day-total { width: 100%; margin-left: 0; min-height: 18px; text-align: center; }
  .calendar-fullscreen-app .content { height: 100dvh; min-height: 100dvh; padding: 3px; }
  .calendar-fullscreen-shell .calendar-head { gap: 6px; padding: 6px; }
  .calendar-fullscreen-shell .calendar-head-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
  .calendar-fullscreen-shell .calendar-head-actions select,
  .calendar-fullscreen-shell .calendar-head-actions .btn { width: 100%; height: 32px; min-height: 32px; line-height: 1.3; padding: 5px 7px; font-size: 11px; }
  .calendar-fullscreen-shell .calendar-month-nav { width: 100%; order: 1; }
  .calendar-fullscreen-shell .cal-event-department,
  .calendar-fullscreen-shell .cal-event-target,
  .calendar-fullscreen-shell .cal-event-reserver { display: none; }
  .calendar-fullscreen-shell .cal-event-time { width: auto; flex: 1 1 auto; font-size: 9px; line-height: 1.15; text-align: center; }
  .calendar-fullscreen-shell .cal-event-time-desktop { display: none; }
  .calendar-fullscreen-shell .cal-event-time-mobile[hidden] { display: block !important; }
  .calendar-fullscreen-shell .cal-event-time-end { display: block; }
  .calendar-grid-viewport { overflow: auto; overscroll-behavior: contain; touch-action: pan-x pan-y; }
  .calendar-shell:not(.calendar-fullscreen-shell) .mobile-calendar-zoomed .cal-event .cal-type-icon,
  .calendar-shell:not(.calendar-fullscreen-shell) .mobile-calendar-zoomed .cal-event-department,
  .calendar-shell:not(.calendar-fullscreen-shell) .mobile-calendar-zoomed .cal-event-reserver,
  .calendar-fullscreen-shell .mobile-calendar-zoomed .cal-event-department,
  .calendar-fullscreen-shell .mobile-calendar-zoomed .cal-event-target,
  .calendar-fullscreen-shell .mobile-calendar-zoomed .cal-event-reserver { display: block; }
  .calendar-fullscreen-shell .mobile-calendar-zoomed .cal-event { gap: 5px; }
  .calendar-fullscreen-shell .mobile-calendar-zoomed .cal-event-time { width: max-content; flex: 0 0 auto; text-align: left; }
  .calendar-fullscreen-shell .mobile-calendar-zoomed .cal-event-time-desktop { display: inline; }
  .calendar-fullscreen-shell .mobile-calendar-zoomed .cal-event-time-mobile[hidden] { display: none !important; }
  .modal-backdrop { padding: 10px; }
  .modal { max-height: calc(100dvh - 20px); border-radius: 14px; }
  .modal-header { gap: 8px; padding: 12px; }
  .modal-header h3 { min-width: 0; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
  .modal-close { flex: 0 0 32px; width: 32px; height: 32px; font-size: 17px; }
  .modal-body { padding: 12px; }
  .modal-footer { flex-wrap: wrap; gap: 6px; padding: 8px 12px 12px; }
  .calendar-time-list { gap: 6px; }
  .calendar-time-item { grid-template-columns: max-content 20px minmax(0, 1fr); gap: 8px; padding: 9px; border-radius: 9px; }
  .calendar-time-range { grid-template-columns: none; display: flex; flex-wrap: nowrap; gap: 3px; min-width: 0; font-size: 11px; white-space: nowrap; }
  .calendar-time-range strong { flex: 0 0 auto; }
  .calendar-time-item > .cal-type-icon { font-size: 18px; text-align: center; }
  .calendar-time-copy { gap: 2px; }
  .calendar-time-title { flex-wrap: wrap; gap: 2px 5px; font-size: 12px; line-height: 1.35; }
  .calendar-time-title b { white-space: normal; overflow-wrap: anywhere; }
  .calendar-time-title em { min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; font-size: 11px; }
  .calendar-time-copy small { font-size: 10px; line-height: 1.35; white-space: normal; overflow-wrap: anywhere; }
  .reservation-detail-table { width: 100%; min-width: 0; table-layout: fixed; }
  .reservation-detail-table th { width: 32%; white-space: normal; }
  .reservation-detail-table th, .reservation-detail-table td { padding: 7px 6px; overflow-wrap: anywhere; }
  .field label { font-size: 12px; }
  .field input, .field select, .field textarea { font-size: 16px; }
  .form-grid { gap: 12px; }
  .notice { padding: 10px; font-size: 12px; }
  .login-shell { padding: 16px; }
  .login-card { padding: 22px 18px; }
  .login-brand { gap: 10px; margin-bottom: 18px; }
  .login-logo { width: 54px; height: 54px; border-radius: 15px; }
  .login-brand-copy strong { font-size: 19px; }
  .login-brand-copy span { font-size: 12px; }
  .login-card h2 { font-size: 23px; }
  .login-card > p { margin-bottom: 18px; font-size: 12px; line-height: 1.45; }
  .login-submit { min-height: 42px; margin-top: 18px; font-size: 14px; }
  .manual-toolbar { position: static; padding: 10px; gap: 8px; }
  .manual-pagination { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; gap: 5px; }
  #manual-page-select { grid-column: 1 / -1; grid-row: 2; width: 100%; font-size: 12px; }
  .manual-pagination .btn { padding: 5px 3px; font-size: 11px; }
  .manual-download { width: 100%; margin-left: 0; }
  .manual-page-meta { padding: 9px 12px; font-size: 11px; }
  .manual-sheet { padding: 20px 16px 26px; font-size: 14px; line-height: 1.7; }
  .manual-sheet h2 { font-size: 21px; }
  .manual-intro { margin-bottom: 20px; font-size: 13px; }
  .manual-section { margin: 20px 0; }
  .manual-section h3 { font-size: 15px; }
  .manual-note { padding: 11px 12px; font-size: 12px; }
}
