/* ============================================================
   YGM Schedule - 공통 스타일 (브랜드 토큰 + 컴포넌트)
   브랜드: 이경민 스피치교육연구소 (ygmspeech.com)
   ============================================================ */

:root {
  /* 브랜드 컬러 (로고 추출) */
  --ygm-blue:        #1e40af;   /* 로고 "이경" */
  --ygm-blue-600:    #2563eb;
  --ygm-blue-500:    #3b82f6;
  --ygm-blue-50:     #eff6ff;
  --ygm-yellow:      #f59e0b;   /* 로고 "민" */
  --ygm-yellow-50:   #fffbeb;

  /* 그레이 스케일 */
  --bg:              #ffffff;
  --bg-soft:         #f9fafb;
  --card:            #ffffff;
  --border:          #e5e7eb;
  --border-strong:   #d1d5db;
  --text:            #111827;
  --text-muted:      #6b7280;
  --text-subtle:     #9ca3af;

  /* 상태 색상 */
  --status-scheduled-bg:   #dbeafe;
  --status-scheduled-fg:   #1e40af;
  --status-scheduled-bar:  #2563eb;

  --status-attended-bg:    #f3f4f6;
  --status-attended-fg:    #4b5563;
  --status-attended-bar:   #9ca3af;

  --status-absent-bg:      #fee2e2;
  --status-absent-fg:      #b91c1c;
  --status-absent-bar:     #ef4444;

  --status-cancel-bg:      #fef3c7;
  --status-cancel-fg:      #b45309;
  --status-cancel-bar:     #f59e0b;

  --status-holiday-bg:     #e5e7eb;
  --status-holiday-fg:     #4b5563;
  --status-holiday-bar:    #d1d5db;

  /* 그림자 */
  --shadow-sm:  0 1px 2px rgba(0,0,0,0.04);
  --shadow:     0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg:  0 12px 32px rgba(0,0,0,0.12);

  /* 라운드 */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont,
               'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic',
               'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

button { font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ---- 브랜드 헤더 ---- */
.ygm-topbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}
.ygm-topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  min-height: 60px;
}
.ygm-brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ygm-blue);
  font-size: 18px;
  text-decoration: none;
}
.ygm-brand-accent { color: var(--ygm-yellow); }
.ygm-brand-sub {
  color: var(--text-subtle);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

/* ---- 버튼 ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.05s;
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
  color: var(--text);
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--ygm-blue);
  color: #fff;
  border-color: var(--ygm-blue);
}
.btn-primary:hover:not(:disabled) { background: #1e3a8a; border-color: #1e3a8a; }

.btn-accent {
  background: var(--ygm-yellow);
  color: #fff;
  border-color: var(--ygm-yellow);
}
.btn-accent:hover:not(:disabled) { background: #d97706; border-color: #d97706; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover:not(:disabled) { background: var(--bg-soft); }

.btn-danger {
  background: #fff;
  color: #b91c1c;
  border-color: #fecaca;
}
.btn-danger:hover:not(:disabled) { background: #fef2f2; }

.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 13px; }

/* ---- 폼 ---- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}
.input, .select, .textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--ygm-blue-500);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.textarea { min-height: 88px; resize: vertical; }

/* ---- 카드 ---- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

/* ---- 모달 ---- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.4);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
  backdrop-filter: blur(2px);
}
.modal-backdrop.is-open { display: flex; }
.modal {
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
}
.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.modal-footer .spacer { flex: 1; }

/* ---- 토스트 ---- */
.toast-stack {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: calc(100% - 32px);
}
.toast {
  background: var(--card);
  border: 1px solid var(--border);
  border-left-width: 4px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  box-shadow: var(--shadow);
  font-size: 14px;
  color: var(--text);
  min-width: 240px;
  animation: toast-in 0.15s ease-out;
}
.toast.toast-info    { border-left-color: var(--ygm-blue-500); }
.toast.toast-success { border-left-color: #16a34a; }
.toast.toast-error   { border-left-color: #dc2626; }
.toast.toast-warn    { border-left-color: var(--ygm-yellow); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Dashboard - Weekly Calendar
   ============================================================ */

.cal-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 20px 80px;
}

.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.cal-nav-center {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center;
}
.cal-week-label {
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  min-width: 220px;
  text-align: center;
}

/* 데스크탑 그리드 (월~일 7열) */
.cal-grid {
  display: grid;
  grid-template-columns: 60px repeat(7, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.cal-day-header,
.cal-time-cell-header {
  padding: 10px 6px;
  text-align: center;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 60px;
  z-index: 10;
}
.cal-day-header.is-today {
  color: var(--ygm-blue);
  background: var(--ygm-blue-50);
}
.cal-day-header .cal-day-name { display: block; font-size: 12px; }
.cal-day-header .cal-day-date { display: block; font-size: 16px; margin-top: 2px; }

.cal-time-col {
  position: relative;
  border-right: 1px solid var(--border);
  background: var(--bg-soft);
}
.cal-time-label {
  height: 60px;
  padding: 4px 8px;
  font-size: 11px;
  color: var(--text-subtle);
  text-align: right;
  border-bottom: 1px dashed var(--border);
  box-sizing: border-box;
}
.cal-day-col {
  position: relative;
  border-right: 1px solid var(--border);
  min-height: 0;
}
.cal-day-col:last-child { border-right: none; }
.cal-hour-slot {
  height: 60px;
  border-bottom: 1px dashed var(--border);
  cursor: pointer;
  transition: background 0.1s;
}
.cal-hour-slot:hover { background: var(--ygm-blue-50); }

.cal-event {
  position: absolute;
  left: 4px;
  right: 4px;
  border-radius: var(--r-sm);
  padding: 6px 8px;
  font-size: 12px;
  cursor: pointer;
  border-left: 3px solid var(--status-scheduled-bar);
  background: var(--status-scheduled-bg);
  color: var(--status-scheduled-fg);
  overflow: hidden;
  transition: transform 0.05s, box-shadow 0.15s;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cal-event:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.cal-event-title { font-weight: 700; line-height: 1.2; }
.cal-event-time  { font-size: 11px; opacity: 0.85; }

.cal-event[data-status="attended"] {
  background: var(--status-attended-bg);
  color: var(--status-attended-fg);
  border-left-color: var(--status-attended-bar);
  text-decoration: line-through;
  text-decoration-color: rgba(0,0,0,0.25);
}
.cal-event[data-status="absent_student"] {
  background: var(--status-absent-bg);
  color: var(--status-absent-fg);
  border-left-color: var(--status-absent-bar);
}
.cal-event[data-status="cancelled_teacher"] {
  background: var(--status-cancel-bg);
  color: var(--status-cancel-fg);
  border-left-color: var(--status-cancel-bar);
}
.cal-event[data-status="holiday"] {
  background: var(--status-holiday-bg);
  color: var(--status-holiday-fg);
  border-left-color: var(--status-holiday-bar);
}

/* 모바일 뷰 (탭 전환) */
.cal-mobile { display: none; }
.cal-mobile-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.cal-mobile-tab {
  flex: 1 0 auto;
  min-width: 56px;
  padding: 8px 6px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: var(--r-md);
  text-align: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  font-weight: 600;
  font-size: 12px;
  color: var(--text-muted);
}
.cal-mobile-tab.is-active {
  background: var(--ygm-blue);
  color: #fff;
  border-color: var(--ygm-blue);
}
.cal-mobile-tab.is-today:not(.is-active) {
  border-color: var(--ygm-blue);
  color: var(--ygm-blue);
}
.cal-mobile-tab .cal-mobile-tab-date {
  display: block;
  font-size: 16px;
  margin-top: 2px;
}
.cal-mobile-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cal-mobile-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-subtle);
  background: var(--bg-soft);
  border-radius: var(--r-md);
  border: 1px dashed var(--border);
}
.cal-mobile-event {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--status-scheduled-bg);
  color: var(--status-scheduled-fg);
  border-left: 4px solid var(--status-scheduled-bar);
  cursor: pointer;
  min-height: 60px;
}
.cal-mobile-event[data-status="attended"] {
  background: var(--status-attended-bg);
  color: var(--status-attended-fg);
  border-left-color: var(--status-attended-bar);
}
.cal-mobile-event[data-status="absent_student"] {
  background: var(--status-absent-bg);
  color: var(--status-absent-fg);
  border-left-color: var(--status-absent-bar);
}
.cal-mobile-event[data-status="cancelled_teacher"] {
  background: var(--status-cancel-bg);
  color: var(--status-cancel-fg);
  border-left-color: var(--status-cancel-bar);
}
.cal-mobile-event[data-status="holiday"] {
  background: var(--status-holiday-bg);
  color: var(--status-holiday-fg);
  border-left-color: var(--status-holiday-bar);
}
.cal-mobile-event-time { font-weight: 700; min-width: 64px; }
.cal-mobile-event-title { font-weight: 600; }
.cal-mobile-event-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px;
  border-radius: var(--r-md);
  border: 1px dashed var(--border-strong);
  color: var(--text-muted);
  background: var(--bg-soft);
  cursor: pointer;
  font-weight: 600;
}
.cal-mobile-event-add:hover { background: var(--ygm-blue-50); color: var(--ygm-blue); }

/* 다음 주 생성 플로팅 액션 */
.cal-fab-row {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

/* ============================================================
   Students 페이지
   ============================================================ */

.stu-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 20px 80px;
}

.stu-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.stu-toolbar .spacer { flex: 1; }
.stu-search {
  max-width: 240px;
}
.stu-toggle-row {
  display: flex;
  gap: 6px;
}
.stu-toggle {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}
.stu-toggle.is-active {
  background: var(--ygm-blue);
  color: #fff;
  border-color: var(--ygm-blue);
}

.stu-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.stu-table th, .stu-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.stu-table th {
  background: var(--bg-soft);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.stu-table tbody tr { cursor: pointer; transition: background 0.1s; }
.stu-table tbody tr:hover { background: var(--ygm-blue-50); }
.stu-table tbody tr.is-inactive { opacity: 0.55; }
.stu-table tbody tr:last-child td { border-bottom: none; }

.stu-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--status-scheduled-bg);
  color: var(--status-scheduled-fg);
}
.stu-pill.is-inactive {
  background: #f3f4f6;
  color: #6b7280;
}

.stu-cards { display: none; flex-direction: column; gap: 10px; }
.stu-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-sm);
}
.stu-card.is-inactive { opacity: 0.55; }
.stu-card-name { font-weight: 700; font-size: 16px; }
.stu-card-meta { color: var(--text-muted); font-size: 13px; }

.empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-subtle);
}

/* ============================================================
   Login 페이지
   ============================================================ */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 15% 20%, rgba(30,64,175,0.06), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(245,158,11,0.06), transparent 40%),
    var(--bg);
}
.login-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 380px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
}
.login-brand-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--ygm-blue);
  letter-spacing: -0.02em;
}
.login-brand-title em {
  font-style: normal;
  color: var(--ygm-yellow);
}
.login-brand-sub {
  color: var(--text-subtle);
  font-size: 12px;
  letter-spacing: 0.1em;
}
.login-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  border-radius: var(--r-md);
  padding: 10px 12px;
  font-size: 13px;
  display: none;
}
.login-error.is-visible { display: block; }

/* ============================================================
   반응형
   ============================================================ */

@media (max-width: 1024px) {
  .cal-grid { grid-template-columns: 50px repeat(7, 1fr); }
  .cal-day-header { font-size: 12px; }
}

@media (max-width: 640px) {
  body { font-size: 14px; }
  .cal-grid { display: none; }
  .cal-mobile { display: block; }
  .ygm-topbar-inner { padding: 10px 14px; gap: 8px; min-height: 56px; }
  .cal-page, .stu-page { padding: 12px 14px 80px; }
  .cal-nav-center { order: 2; width: 100%; }
  .cal-week-label { min-width: 0; flex: 1; }
  .stu-table { display: none; }
  .stu-cards { display: flex; }
  .modal { max-width: 100%; }
  .btn { padding: 10px 12px; font-size: 13px; }
}

@media (min-width: 641px) and (max-width: 1024px) {
  /* Tablet: 그리드 유지하되 시간 라벨 축소 */
}

/* ============================================================
   Phase 2: 결제 알림 배지
   ============================================================ */
.payment-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  vertical-align: middle;
  margin-left: 4px;
  white-space: nowrap;
}
.payment-badge.imminent {
  background: var(--ygm-yellow);
  color: #1f1300;
}
.payment-badge.due {
  background: var(--status-absent-bar);
  color: #fff;
}
.payment-badge.reschedule-badge {
  background: #f97316;
  color: #fff;
}
.payment-badge.reschedule-badge.voting    { background: #f97316; }
.payment-badge.reschedule-badge.solvable  { background: #16a34a; }
.payment-badge.reschedule-badge.unsolvable{ background: #dc2626; }
.payment-badge.reschedule-badge.confirmed { background: #2563eb; }
.payment-badge.reschedule-badge.cancelled { background: #6b7280; }

/* ============================================================
   Phase 3: 다자간 시간 조율 시스템
   ============================================================ */
.modified-indicator {
  font-size: 10px;
  color: var(--text-subtle, #6b7280);
  font-style: italic;
  margin-left: 6px;
}

.reschedule-banner {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: var(--r-md, 8px);
  padding: 12px 16px;
  margin: 0 0 16px;
  font-size: 13px;
  color: #7c2d12;
}
.reschedule-banner-head {
  font-weight: 700;
  margin-bottom: 6px;
}
.reschedule-banner-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.reschedule-banner-item {
  background: transparent;
  border: 0;
  text-align: left;
  width: 100%;
  padding: 4px 0;
  cursor: pointer;
  color: #7c2d12;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.reschedule-banner-item:hover { text-decoration: underline; }
.reschedule-banner-status {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 3px;
  background: #fed7aa;
  color: #7c2d12;
}
.reschedule-banner-status.solvable   { background: #bbf7d0; color: #14532d; }
.reschedule-banner-status.unsolvable { background: #fecaca; color: #7f1d1d; }
.reschedule-banner-status.voting     { background: #fed7aa; color: #7c2d12; }

/* 세션 모달 - 투표자 / 솔루션 */
.voter-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.voter-status {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) auto 1fr;
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
}
.voter-status.is-voted {
  border-color: #86efac;
  background: #f0fdf4;
}
.voter-status.is-pending {
  border-color: #fde68a;
  background: #fffbeb;
}
.voter-name { font-weight: 600; }
.voter-time { color: var(--text-muted, #4b5563); font-variant-numeric: tabular-nums; }
.voter-state { font-size: 12px; color: var(--text-muted, #4b5563); }

.solution-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  background: #fff;
}
.solution-card:hover { background: #f9fafb; }
.solution-card input[type="radio"] { margin-top: 4px; }
.solution-card-body { flex: 1; }
.solution-card-title {
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--ygm-blue, #1e40af);
}
.solution-row {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) 2fr;
  gap: 8px;
  font-size: 13px;
  padding: 2px 0;
}

.vote-section-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--text, #111827);
  margin-top: 4px;
}

/* ============================================================
   Phase 3: 공개 투표 페이지 (vote.html)
   ============================================================ */
body.vote-page {
  background: #f8fafc;
  min-height: 100vh;
  margin: 0;
  padding: 16px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.vote-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  padding: 24px 20px;
  width: 100%;
  max-width: 520px;
}
.vote-brand {
  text-align: center;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border, #e5e7eb);
  padding-bottom: 12px;
}
.vote-brand-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--ygm-blue, #1e40af);
}
.vote-brand-title em {
  font-style: normal;
  margin: 0 4px;
  color: var(--text-subtle, #94a3b8);
}
.vote-brand-sub {
  font-size: 12px;
  color: var(--text-subtle, #6b7280);
  margin-top: 2px;
  letter-spacing: 0.05em;
}
.vote-state {
  text-align: center;
  padding: 30px 12px;
  color: var(--text-subtle, #6b7280);
}
.vote-state.vote-error {
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
}
.vote-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 14px;
  color: #1e3a8a;
}
.vote-info-line { margin-top: 4px; }
.vote-info-sub { font-size: 12px; color: #475569; }

.vote-section-title {
  font-weight: 700;
  font-size: 14px;
  margin: 14px 0 4px;
}
.vote-helper {
  font-size: 12px;
  color: var(--text-muted, #6b7280);
  margin-bottom: 8px;
}
.vote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}
.vote-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 6px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  user-select: none;
  transition: background 0.12s, border-color 0.12s;
}
.vote-slot input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--ygm-blue, #1e40af);
}
.vote-slot:has(input:checked) {
  background: #dbeafe;
  border-color: var(--ygm-blue, #1e40af);
  font-weight: 700;
  color: #1e3a8a;
}
.vote-submit {
  width: 100%;
  padding: 12px;
  font-size: 15px;
}
.vote-result {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
}
.vote-result.is-success {
  background: #f0fdf4;
  color: #14532d;
  border: 1px solid #86efac;
}
.vote-result.is-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.vote-peers-title { margin-top: 18px; }
.vote-peers {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.vote-peer {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  padding: 6px 10px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
}
.vote-peer.is-voted {
  background: #f0fdf4;
  border-color: #86efac;
}
.vote-peer-name { font-weight: 600; }
.vote-peer-time { color: var(--text-muted, #4b5563); font-variant-numeric: tabular-nums; }
.vote-peer-status { font-size: 12px; color: var(--text-muted, #4b5563); }

@media (max-width: 480px) {
  .vote-card { padding: 16px 14px; }
  .vote-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================
   Phase: 일요일 빨강 / 온라인·대면 배지 / 매너 온도 / 로고
   ============================================================ */

/* 일요일 빨강 */
.cal-day-header.sunday .cal-day-name,
.cal-day-header.sunday .cal-day-date,
.cal-mobile-tab.sunday {
  color: #dc2626;
}
.cal-mobile-tab.sunday.is-active {
  background: #fee2e2;
  color: #b91c1c;
}
.sun-option { color: #dc2626; }

/* 수업 형태 배지 */
.class-type-online,
.class-type-offline {
  display: inline-block;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 999px;
  margin-left: 4px;
  vertical-align: middle;
  white-space: nowrap;
}
.class-type-online {
  background: #ecfeff;
  color: #0e7490;
  border: 1px solid #a5f3fc;
}
.class-type-offline {
  background: #f3f4f6;
  color: #4b5563;
  border: 1px solid #e5e7eb;
}

/* 매너 온도 — 당근마켓 스타일 (blue→sky→green→orange→red) */
.manner-temp {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  white-space: nowrap;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}
.manner-temp.manner-cold  { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }
.manner-temp.manner-sky   { background: #e0f2fe; color: #0369a1; border: 1px solid #7dd3fc; }
.manner-temp.manner-green { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
.manner-temp.manner-warm  { background: #ffedd5; color: #c2410c; border: 1px solid #fdba74; }
.manner-temp.manner-hot   { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }

/* 상단 브랜드 로고 */
.ygm-brand-logo {
  height: 55px;
  width: auto;
  vertical-align: middle;
  margin-right: 10px;
  border-radius: 8px;
}
.login-brand-logo {
  display: block;
  margin: 0 auto 14px;
  height: 135px;
  width: auto;
  border-radius: 12px;
}
.vote-brand-logo {
  display: block;
  margin: 0 auto 12px;
  height: 90px;
  width: auto;
  border-radius: 10px;
}

/* 시간 선택 — 세부(10분) 체크박스 */
.ygm-time-detail {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-muted, #6b7280);
  cursor: pointer;
  user-select: none;
}
.ygm-time-detail input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--brand, #2563eb);
}

/* 투표 페이지 — 슬롯 카드 */
.vote-slot-group { margin-bottom: 14px; }
.vote-slot-date {
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #111827);
  padding: 6px 2px;
  border-bottom: 1px dashed var(--border, #e5e7eb);
  margin-bottom: 6px;
}
.vote-slot-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}
.vote-slot-card {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border: 1.5px solid var(--border, #e5e7eb);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s ease;
  flex-wrap: wrap;
}
.vote-slot-card:hover { border-color: #94a3b8; }
.vote-slot-card input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
  margin: 0;
}
.vote-slot-card:has(input:checked) {
  background: #dbeafe;
  border-color: #2563eb;
  color: #1e3a8a;
  font-weight: 600;
}
.vote-slot-label { flex: 1; }
.vote-slot-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  white-space: nowrap;
}
.vote-slot-freed {
  background: #f0fdf4;
  border-color: #86efac;
}
.vote-slot-freed .vote-slot-tag {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}
.vote-slot-existing { background: #fff; }
.vote-slot-current {
  background: #fef9c3;
  border-color: #eab308;
}
.vote-slot-current .vote-slot-tag {
  background: #fef08a;
  color: #854d0e;
  border-color: #eab308;
}
.vote-slot-current:has(input:checked) {
  background: #fde68a;
  border-color: #ca8a04;
}
