/* 예약표(2일/1일)·slot-table·미니 달력
   (admin.css 973–1205 행에서 분리. CSS 는 순서가 우선순위라 로드 순서를 지켜야 한다) */

/* ===== MOON SYSTEM 인터페이스 ===== */
.day-nav {
	display: flex;
	align-items: center;
	gap: 10px;
}
.day-nav .small-button {
	width: 40px;
	min-width: 40px;
	padding: 0;
	font-size: 18px;
}
.admin-guide {
	margin: 22px 0 4px;
	padding: 14px 20px;
	border: 1px solid var(--line);
	border-left: 4px solid var(--wine);
	border-radius: 18px;
	background: var(--card);
	color: var(--muted);
	font-size: 14px;
	line-height: 1.7;
}
.admin-guide strong {
	color: var(--wine);
}

/* 원본 new_total.asp 처럼 기본은 좌우 2일치, 달력에서 고르면 하루만 크게. */
.day-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 18px;
	margin-top: 18px;
}
.day-grid[data-view="two"] {
	grid-template-columns: 1fr 1fr;
}
/* 두 칸으로 나뉘면 폭이 절반이라 생년월일·전화번호가 줄바꿈된다.
   이 모드에서만 글자와 여백을 줄이고 숫자 칸은 줄바꿈을 막는다. */
.day-grid[data-view="two"] .slot-table {
	font-size: 11px;
}
.day-grid[data-view="two"] .slot-table th,
.day-grid[data-view="two"] .slot-table td {
	padding: 5px 3px;
	white-space: nowrap;
}
.day-grid[data-view="two"] .slot-table th {
	font-size: 10px;
	letter-spacing: 0;
}
.day-grid[data-view="two"] .slot-table .cell-part {
	white-space: normal;
	word-break: break-all;
}
.day-grid[data-view="two"] .badge {
	padding: 1px 5px;
	font-size: 11px;
	white-space: nowrap;
}
.day-grid[data-view="two"] .table-wrap {
	overflow-x: auto;   /* 그래도 좁으면 잘리지 않고 가로 스크롤 */
}
/* 두 칸 모드에서는 카드 여백과 칸 사이 간격을 줄여 표에 폭을 더 준다. */
.day-grid[data-view="two"] {
	gap: 10px;
}
.day-grid[data-view="two"] .schedule-card {
	padding: 16px 12px;
}
.day-grid[data-view="one"] [data-day-card="1"] {
	display: none;
}

.view-switch {
	display: flex;
	gap: 8px;
	margin-top: 18px;
}
.view-switch .small-button.active {
	background: var(--admin-accent, #7f1f2e);
	border-color: var(--admin-accent, #7f1f2e);
	color: #fff;
}
.day-card .table-wrap {
	margin-top: 4px;
}
.slot-table {
	min-width: 0;
	table-layout: fixed;
	font-size: 13px;
}
.slot-table th,
.slot-table td {
	padding: 8px 5px;
	text-align: center;
	white-space: normal;
	word-break: break-word;
	vertical-align: middle;
}
.slot-table th {
	background: rgba(127, 31, 46, 0.05);
}
/* 시 8 · 분 6 · 구분 8 · 성명 14 · 생년월일 10 · 시술내용 20 · 진료 8 · 여부 8 · 전화 12 · 관리자명 6 */
.slot-table th:nth-child(1),
.slot-table td:nth-child(1) { width: 8%; }
.slot-table th:nth-child(2),
.slot-table td:nth-child(2) { width: 6%; }
.slot-table th:nth-child(3),
.slot-table td:nth-child(3) { width: 8%; }
.slot-table th:nth-child(4),
.slot-table td:nth-child(4) { width: 14%; }
.slot-table th:nth-child(5),
.slot-table td:nth-child(5) { width: 10%; }
.slot-table th:nth-child(6),
.slot-table td:nth-child(6) { width: 20%; }
.slot-table th:nth-child(7),
.slot-table td:nth-child(7),
.slot-table th:nth-child(8),
.slot-table td:nth-child(8) { width: 8%; }
.slot-table th:nth-child(9),
.slot-table td:nth-child(9) { width: 12%; }
.slot-table th:nth-child(10),
.slot-table td:nth-child(10) { width: 6%; }

/* '시' 그룹 셀 — 한 시간대를 rowspan으로 묶음 (원본 new_total.asp의 좌측 시 컬럼) */
.cell-hour {
	background: rgba(127, 31, 46, 0.06);
	color: var(--wine);
	font-family: "Gowun Batang", serif;
	font-weight: 700;
	vertical-align: middle;
	border-right: 1px solid var(--line);
}
.slot-add-row .cell-hour {
	color: var(--muted);
}
.cell-min {
	color: #2c4a7c;
	font-weight: 700;
}
.cell-name .link-name {
	font-weight: 700;
}
.slot-row {
	cursor: pointer;
	transition: background 150ms ease;
}
.slot-row:hover {
	background: rgba(127, 31, 46, 0.06);
}
.slot-add-row {
	cursor: pointer;
}
.slot-add-row td {
	border-bottom: 1px dashed var(--line);
}
.slot-empty {
	color: var(--muted);
	font-weight: 700;
	font-size: 12px;
	letter-spacing: 0.04em;
	opacity: 0.55;
}
.slot-add-row:hover .slot-empty {
	color: var(--wine);
	opacity: 1;
}

/* 사이드바 미니 캘린더 */
.mini-calendar {
	padding: 16px;
	border-radius: 20px;
}
.mini-calendar .card-heading {
	margin-bottom: 10px;
}
.mini-calendar-title {
	font-size: 16px;
}
.mini-calendar .small-button {
	width: 32px;
	min-width: 32px;
	min-height: 32px;
	padding: 0;
}
.mini-weekdays,
.mini-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 3px;
}
.mini-weekdays {
	margin-bottom: 4px;
	color: var(--muted);
	font-size: 11px;
	font-weight: 800;
	text-align: center;
}
.mini-day {
	position: relative;
	aspect-ratio: 1;
	border: 1px solid transparent;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.45);
	color: var(--ink);
	cursor: pointer;
	font-size: 12px;
	font-weight: 700;
	transition: background 150ms ease, border-color 150ms ease;
}
.mini-day:hover {
	border-color: rgba(127, 31, 46, 0.3);
}
.mini-day.outside {
	opacity: 0.35;
}
.mini-day.has i {
	position: absolute;
	left: 50%;
	bottom: 4px;
	transform: translateX(-50%);
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: var(--wine);
}
.mini-day.selected {
	border-color: var(--wine);
	background: rgba(127, 31, 46, 0.12);
	color: var(--wine);
}
