:root {
  --bg: #0b0c0e;
  --surface: #141518;
  --surface-2: #0e0f11;
  --surface-hover: #17181b;
  --text: #f4f2ee;
  --text-body: #e7ebee;
  --text-secondary: #c7cdd3;
  --text-secondary-2: #aab1b9;
  --text-muted: #7c848d;
  --text-muted-2: #8992a0;
  --text-muted-3: #6f7680;
  --text-placeholder: #5c626a;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.09);
  --border-btn: rgba(255, 255, 255, 0.12);
  --border-btn-2: rgba(255, 255, 255, 0.14);
  --accent: #c9a24a;
  --accent-2: #8a7a3f;
  --accent-soft-border: rgba(201, 162, 74, 0.35);
  --danger: #c0392b;
  --danger-hover: #e07b6f;
  --danger-soft: rgba(192, 57, 43, 0.16);
  --success: #7c8a63;
  --radius: 2px;
  --font-serif: "Noto Serif KR", serif;
  --font-body: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-body);
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

/* --- 공통 헤더 --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 12, 14, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  font-family: var(--font-serif);
  font-size: 17px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  gap: 32px;
}

.site-nav a {
  font-size: 13.5px;
  font-weight: 300;
  color: var(--text-muted-2);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-nav a:hover {
  color: var(--text-secondary);
}

.site-nav a.active {
  color: var(--accent);
  font-weight: 600;
  border-bottom-color: var(--accent);
}

@media (max-width: 720px) {
  .site-nav {
    gap: 16px;
  }
  .site-header-inner {
    padding: 0 20px;
  }
}

/* --- 페이지 셸 --- */
.page-shell {
  max-width: 820px;
  margin: 0 auto;
  padding: 88px 32px 140px;
}

.page-shell--wide {
  max-width: 1180px;
}

.page-shell--narrow {
  max-width: 640px;
}

.page-shell--auth {
  max-width: 340px;
  padding: 120px 32px 140px;
}

.breadcrumb {
  display: inline-block;
  margin-bottom: 28px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb:hover {
  color: var(--accent);
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 16px;
}

.page-header {
  margin-bottom: 36px;
}

.page-header h1 {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 38px);
  color: var(--text);
}

.page-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14.5px;
  font-weight: 300;
}

/* --- 입력 요소 --- */
input[type="text"],
input[type="password"],
input[type="date"],
select {
  font-size: 14.5px;
  padding: 13px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-body);
  outline: none;
  transition: border-color 0.2s ease;
}

input::placeholder {
  color: var(--text-placeholder);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
select:focus {
  border-color: var(--accent);
}

.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.search-bar input[type="text"] {
  flex: 1;
  min-width: 0;
}

.filters {
  margin-bottom: 22px;
}

.result-count {
  color: var(--text-muted-3);
  font-size: 13px;
  font-weight: 300;
  margin-bottom: 22px;
}

/* --- 버튼 --- */
button {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 13px 26px;
  border: none;
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: var(--bg);
  cursor: pointer;
  transition: opacity 0.15s ease;
}

button:hover {
  opacity: 0.88;
}

button.secondary {
  background: transparent;
  color: var(--text-body);
  border: 1px solid var(--border-btn-2);
}

button.secondary:hover {
  opacity: 1;
  border-color: var(--accent);
  color: var(--accent);
}

button.danger {
  background: var(--danger-soft);
  color: var(--danger-hover);
}

button.danger:hover {
  opacity: 1;
  background: var(--danger);
  color: #fff;
}

button.danger.confirming {
  background: var(--danger);
  color: #fff;
}

/* --- 도서 리스트(도서관) --- */
.book-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.book-row {
  padding: 24px 4px;
  border-bottom: 1px solid var(--border);
}

.book-row .title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.book-row .meta {
  font-size: 13.5px;
  color: var(--text-muted);
  font-weight: 300;
}

.book-row .category-tag {
  display: inline-block;
  margin-top: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 3px 11px;
  border: 1px solid var(--accent-soft-border);
  color: var(--accent);
}

.empty-state {
  text-align: center;
  padding: 64px 0;
  color: var(--text-muted-3);
  font-size: 14px;
  font-weight: 300;
}

.admin-link {
  display: inline-block;
  margin-top: 28px;
  font-size: 12.5px;
  color: var(--text-muted-3);
  text-decoration: none;
  transition: color 0.2s ease;
}

.admin-link:hover {
  color: var(--accent);
}

/* --- 홈 --- */
.home-hero {
  padding: 32px 0 48px;
}

.home-hero h1 {
  margin: 0 0 22px;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text);
}

.home-hero p {
  margin: 0;
  font-size: 16px;
  line-height: 1.85;
  color: var(--text-secondary-2);
  font-weight: 300;
  max-width: 520px;
}

.facility-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-bottom: 8px;
}

@media (max-width: 640px) {
  .facility-grid {
    grid-template-columns: 1fr;
  }
}

.facility-card {
  position: relative;
  display: block;
  padding: 34px;
  background: var(--surface-2);
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease;
}

a.facility-card:hover {
  background: var(--surface-hover);
}

.facility-card.disabled {
  cursor: default;
  opacity: 0.45;
  pointer-events: none;
}

.facility-card .index-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 14px;
}

.facility-card .index {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--accent);
  font-weight: 400;
}

.facility-card .badge {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  font-weight: 600;
  padding: 3px 10px;
  border: 1px solid var(--border-btn);
  color: var(--text-muted);
}

.facility-card .name {
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.facility-card .desc {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.7;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 1180px;
  margin: 0 auto;
}

.site-footer .wordmark {
  font-size: 15px;
}

/* --- 카드형 폼(소독신청, 관리자) --- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
}

.card h2 {
  margin: 0 0 20px;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 18px;
  color: var(--text);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.form-grid input {
  width: 100%;
}

.date-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.date-pill {
  font-size: 13.5px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-btn);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 400;
  transition: all 0.12s ease;
}

.date-pill:hover:not(.selected) {
  border-color: var(--accent);
  color: var(--accent);
}

.date-pill.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  font-weight: 600;
}

.error-msg {
  font-size: 13px;
  min-height: 1.4em;
  margin-bottom: 14px;
  color: var(--danger);
}

.error-msg.success {
  color: var(--success);
}

.reservation-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: flex;
  flex-direction: column;
}

.reservation-row {
  padding: 18px 2px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.reservation-row .label {
  font-size: 14.5px;
  color: var(--text-body);
}

.reservation-row button {
  padding: 7px 14px;
  font-size: 12.5px;
}

/* --- 정기 회의 결과 --- */
.meeting-list {
  display: flex;
  flex-direction: column;
}

.meeting-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 32px 4px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.15s ease;
}

.meeting-row:hover {
  opacity: 0.8;
}

.meeting-row .meeting-info {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}

.meeting-row .round {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--accent);
  font-weight: 400;
}

.meeting-row .title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
}

.meeting-row .link-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 300;
}

/* --- 상가 배치도 --- */
.floor-list {
  display: flex;
  flex-direction: column;
}

.floor-row {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 26px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.floor-row .floor {
  font-family: var(--font-serif);
  font-size: 30px;
  color: var(--accent);
  font-weight: 400;
}

.floor-row .use {
  font-size: 17px;
  color: var(--text);
  font-weight: 500;
}

.floor-row .area {
  font-size: 13.5px;
  color: var(--text-muted);
  font-weight: 300;
}

@media (max-width: 480px) {
  .floor-row {
    grid-template-columns: 60px 1fr;
  }
  .floor-row .area {
    grid-column: 2;
  }
}

/* --- 관리자 --- */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-form input {
  width: 100%;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}

.topbar h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 26px;
  color: var(--text);
}

.topbar-actions {
  display: flex;
  gap: 20px;
  align-items: center;
}

.tab-bar {
  display: flex;
  gap: 2px;
  margin-bottom: 32px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: fit-content;
}

.tab-bar button {
  background: transparent;
  color: var(--text-muted);
  padding: 9px 20px;
  font-size: 13.5px;
  font-weight: 400;
}

.tab-bar button:hover {
  opacity: 1;
  color: var(--text-secondary);
}

.tab-bar button.active {
  background: var(--surface-2);
  color: var(--accent);
  font-weight: 600;
}

.book-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
}

.book-table th,
.book-table td {
  text-align: left;
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}

.book-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.book-table tr:last-child td {
  border-bottom: none;
}

.row-actions {
  display: flex;
  gap: 6px;
}

.row-actions button {
  padding: 7px 12px;
  font-size: 12px;
}
