/* ==========================================================================
   Vacation Hub - Ultra Responsive Modern Design System
   calender.hychung.cloud
   ========================================================================== */

:root {
  --font-main: 'Pretendard', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-xs: 0.375rem; /* 6px */
  --radius-sm: 0.625rem; /* 10px */
  --radius-md: 0.875rem; /* 14px */
  --radius-lg: 1.25rem;  /* 20px */
  --radius-full: 9999px;

  /* Accent Palette */
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-glow: rgba(79, 70, 229, 0.25);
  --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #d946ef 100%);
  --accent-cyan: #0284c7;

  /* Vacation Types */
  --vac-annual-bg: rgba(79, 70, 229, 0.1);
  --vac-annual-border: rgba(79, 70, 229, 0.3);
  --vac-annual-text: #4338ca;
  --vac-annual-dot: #4f46e5;

  --vac-am-bg: rgba(217, 119, 6, 0.1);
  --vac-am-border: rgba(217, 119, 6, 0.3);
  --vac-am-text: #b45309;
  --vac-am-dot: #d97706;

  --vac-pm-bg: rgba(13, 148, 136, 0.1);
  --vac-pm-border: rgba(13, 148, 136, 0.3);
  --vac-pm-text: #0f766e;
  --vac-pm-dot: #0d9488;

  --holiday-bg: rgba(225, 29, 72, 0.08);
  --holiday-border: rgba(225, 29, 72, 0.25);
  --holiday-text: #e11d48;

  --weekend-bg: rgba(241, 245, 249, 0.6);
  --weekend-text: #94a3b8;

  --transition-fast: 0.15s ease;
  --transition-smooth: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --------------------------------------------------------------------------
   Light Theme (Default Mode)
   -------------------------------------------------------------------------- */
body.theme-light {
  --bg-base: #f8fafc;
  --bg-surface: rgba(255, 255, 255, 0.9);
  --bg-surface-elevated: #ffffff;
  --bg-glass-card: rgba(255, 255, 255, 0.92);
  --bg-glass-border: rgba(226, 232, 240, 0.95);
  --bg-glass-hover: rgba(248, 250, 252, 0.98);

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  --input-bg: #f8fafc;
  --input-border: #cbd5e1;

  --glass-shadow: 0 10px 30px -4px rgba(15, 23, 42, 0.08), 0 0 1px 1px var(--bg-glass-border);
  --glass-shadow-sm: 0 4px 12px -2px rgba(15, 23, 42, 0.05);

  --glow-1: rgba(79, 70, 229, 0.08);
  --glow-2: rgba(217, 70, 239, 0.06);
}

/* --------------------------------------------------------------------------
   Dark Theme (Toggle Mode)
   -------------------------------------------------------------------------- */
body.theme-dark {
  --bg-base: #0b0f19;
  --bg-surface: rgba(18, 24, 38, 0.78);
  --bg-surface-elevated: rgba(30, 41, 59, 0.95);
  --bg-glass-card: rgba(18, 24, 39, 0.75);
  --bg-glass-border: rgba(255, 255, 255, 0.08);
  --bg-glass-hover: rgba(255, 255, 255, 0.06);

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  --input-bg: rgba(0, 0, 0, 0.35);
  --input-border: rgba(255, 255, 255, 0.12);

  --glass-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.5), 0 0 1px 1px var(--bg-glass-border);
  --glass-shadow-sm: 0 4px 15px -2px rgba(0, 0, 0, 0.3);

  --vac-annual-bg: rgba(99, 102, 241, 0.2);
  --vac-annual-border: rgba(129, 140, 248, 0.4);
  --vac-annual-text: #a5b4fc;

  --vac-am-bg: rgba(245, 158, 11, 0.2);
  --vac-am-border: rgba(251, 191, 36, 0.4);
  --vac-am-text: #fde68a;

  --vac-pm-bg: rgba(16, 185, 129, 0.2);
  --vac-pm-border: rgba(52, 211, 153, 0.4);
  --vac-pm-text: #a7f3d0;

  --holiday-bg: rgba(239, 68, 68, 0.15);
  --holiday-border: rgba(248, 113, 113, 0.35);
  --holiday-text: #fca5a5;

  --weekend-bg: rgba(0, 0, 0, 0.2);
  --weekend-text: #64748b;

  --glow-1: rgba(99, 102, 241, 0.25);
  --glow-2: rgba(236, 72, 153, 0.2);
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
  min-height: 100vh;
  font-family: var(--font-main);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

/* Ambient Glows */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
}
.glow-1 {
  width: min(50vw, 500px);
  height: min(50vw, 500px);
  top: -8vw;
  left: -8vw;
  background: radial-gradient(circle, var(--glow-1) 0%, transparent 70%);
}
.glow-2 {
  width: min(60vw, 600px);
  height: min(60vw, 600px);
  bottom: -10vw;
  right: -10vw;
  background: radial-gradient(circle, var(--glow-2) 0%, transparent 70%);
}

.glass-card {
  background: var(--bg-glass-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--glass-shadow);
  position: relative;
  z-index: 1;
}

.glass-chip {
  background: rgba(125, 125, 125, 0.08);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
}

/* ==========================================================================
   1. INDEPENDENT LOGIN SCREEN (단독 풀스크린 로그인 페이지)
   ========================================================================== */
.login-screen-wrapper {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 2rem);
  position: relative;
  z-index: 10;
}

.login-card {
  width: min(92vw, 420px);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--glass-shadow);
}

.login-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.login-icon-box {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--primary-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px var(--primary-glow);
  margin-bottom: 0.5rem;
}

.login-title {
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.login-subtitle {
  font-size: clamp(0.78rem, 1.2vw, 0.85rem);
  color: var(--text-muted);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.form-group label {
  font-size: clamp(0.78rem, 1.1vw, 0.84rem);
  font-weight: 600;
  color: var(--text-secondary);
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-lock-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
}

.input-with-icon input {
  width: 100%;
  padding-left: 2.8rem !important;
  padding-right: 2.8rem !important;
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.btn-toggle-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  z-index: 2;
  transition: color var(--transition-fast);
}
.btn-toggle-eye:hover { color: var(--text-primary); }

.checkbox-row { margin-top: 0.2rem; }
.custom-checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: clamp(0.75rem, 1.1vw, 0.82rem);
  color: var(--text-secondary);
  user-select: none;
}
.custom-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.btn-primary-block {
  width: 100%;
  padding: 0.85rem;
  border-radius: var(--radius-xs);
  background: var(--primary-gradient);
  border: none;
  color: #fff;
  font-size: clamp(0.88rem, 1.2vw, 0.95rem);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 20px var(--primary-glow);
  margin-top: 0.5rem;
  transition: all var(--transition-smooth);
}
.btn-primary-block:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--primary-glow);
}

.field-error-msg {
  font-size: 0.75rem;
  color: #e11d48;
  min-height: 1.1rem;
  display: block;
}

/* ==========================================================================
   2. MAIN CALENDAR APP (App Container)
   ========================================================================== */
.app-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(0.75rem, 1.8vw, 1.5rem);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
  position: relative;
  z-index: 1;
}

/* Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(0.6rem, 1.2vw, 0.9rem) clamp(0.85rem, 1.8vw, 1.5rem);
  gap: 0.75rem;
  flex-wrap: wrap;
}

.brand-area {
  display: flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 0;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.logo-icon {
  width: clamp(2rem, 3.5vw, 2.4rem);
  height: clamp(2rem, 3.5vw, 2.4rem);
  border-radius: var(--radius-sm);
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 12px var(--primary-glow);
  flex-shrink: 0;
}

.brand-title {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  line-height: 1;
  white-space: nowrap !important;
  word-break: keep-all;
  display: inline-block;
  flex-shrink: 0;
}

.view-tabs {
  display: flex;
  background: rgba(125, 125, 125, 0.08);
  border: 1px solid var(--bg-glass-border);
  padding: 3px;
  border-radius: var(--radius-full);
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: clamp(4px, 0.6vw, 6px) clamp(8px, 1.2vw, 14px);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: clamp(0.75rem, 1.2vw, 0.85rem);
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tab-btn.active {
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.header-center {
  display: flex;
  align-items: center;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: clamp(0.25rem, 0.6vw, 0.5rem);
}

.icon-nav-btn {
  width: clamp(1.8rem, 2.8vw, 2.1rem);
  height: clamp(1.8rem, 2.8vw, 2.1rem);
  border-radius: 50%;
  border: 1px solid var(--bg-glass-border);
  background: var(--bg-surface);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.icon-nav-btn:hover {
  background: var(--bg-glass-hover);
  border-color: var(--primary);
}

.period-text {
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  min-width: clamp(6.5rem, 12vw, 8.5rem);
  text-align: center;
  color: var(--text-primary);
}

.pill-btn {
  border: 1px solid var(--bg-glass-border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  padding: clamp(3px, 0.5vw, 5px) clamp(8px, 1vw, 12px);
  border-radius: var(--radius-full);
  font-size: clamp(0.72rem, 1.1vw, 0.8rem);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.pill-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: clamp(0.4rem, 0.8vw, 0.75rem);
}

.header-action-wrap {
  display: flex;
  align-items: center;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: clamp(0.35rem, 0.7vw, 0.6rem);
}

.bottom-sheet-handle {
  display: none;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: clamp(6px, 0.9vw, 8px) clamp(10px, 1.4vw, 16px);
  border-radius: var(--radius-full);
  font-size: clamp(0.75rem, 1.2vw, 0.85rem);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition-smooth);
}

.primary-gradient-btn {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: 0 4px 12px var(--primary-glow);
}
.primary-gradient-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px var(--primary-glow);
}

.icon-btn {
  width: clamp(2rem, 3vw, 2.3rem);
  height: clamp(2rem, 3vw, 2.3rem);
  border-radius: var(--radius-sm);
  border: 1px solid var(--bg-glass-border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.icon-btn:hover {
  color: var(--text-primary);
  border-color: var(--primary);
}

.user-badge {
  padding: 4px clamp(8px, 1.2vw, 12px) 4px 8px;
  gap: 6px;
  cursor: pointer;
}
.user-avatar-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.user-info-text {
  display: flex;
  align-items: center;
  gap: 6px;
}
.role-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: var(--radius-xs);
  background: rgba(125, 125, 125, 0.15);
  color: var(--text-muted);
}
.role-badge.is-master {
  background: rgba(217, 119, 6, 0.15);
  color: #d97706;
  border: 1px solid rgba(217, 119, 6, 0.3);
}

/* Modal Subtabs (Master View) */
.member-modal-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 1rem;
  background: rgba(125, 125, 125, 0.08);
  padding: 4px;
  border-radius: var(--radius-xs);
}
.modal-subtab {
  flex: 1;
  padding: 6px 12px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.modal-subtab:hover { color: var(--text-primary); }
.modal-subtab.active {
  background: var(--bg-surface-elevated);
  color: var(--primary);
  box-shadow: var(--glass-shadow-sm);
}

.section-badge-bar {
  margin-bottom: 0.75rem;
}
.admin-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #d97706;
  background: rgba(217, 119, 6, 0.1);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
}

.color-picker-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.color-picker-row input[type="color"] {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-xs);
  cursor: pointer;
  background: transparent;
}
.color-hex-label {
  font-size: 0.82rem;
  font-family: monospace;
  color: var(--text-secondary);
  font-weight: 600;
}
.logout-link {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 2px;
}
.logout-link:hover { color: #e11d48; }

/* Calendar Meta Bar */
.calendar-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  padding: 0 0.25rem;
  font-size: clamp(0.72rem, 1.1vw, 0.82rem);
  gap: 0.5rem;
  flex-wrap: wrap;
}

.legend-group {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 1.5vw, 1.25rem);
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-secondary);
  font-size: clamp(0.72rem, 1.1vw, 0.8rem);
}

.legend-badge {
  width: 9px;
  height: 9px;
  border-radius: 2.5px;
}
.type-annual { background: var(--primary); }
.type-half-am { background: #d97706; }
.type-half-pm { background: #0d9488; }
.type-holiday { background: #e11d48; }

.glass-chip.subtle {
  padding: 3px 8px;
  font-size: clamp(0.7rem, 1vw, 0.78rem);
  color: var(--text-secondary);
}
.glass-chip.subtle strong { color: var(--primary); }

/* Monthly Calendar Grid */
.month-calendar-wrapper {
  overflow: hidden;
  padding: clamp(0.5rem, 1.2vw, 1rem);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.weekdays-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: clamp(2px, 0.5vw, 6px);
  text-align: center;
  font-size: clamp(0.72rem, 1.2vw, 0.85rem);
  font-weight: 700;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--bg-glass-border);
  color: var(--text-secondary);
}
.weekday.sun { color: #e11d48; }
.weekday.sat { color: #0284c7; }

.days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: clamp(2px, 0.6vw, 6px);
}

/* Day Cell */
.day-cell {
  min-height: clamp(75px, 12vw, 125px);
  background: var(--bg-surface);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-xs);
  padding: clamp(3px, 0.6vw, 6px);
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
  transition: all var(--transition-fast);
  overflow: hidden;
}

.day-cell:hover {
  background: var(--bg-glass-hover);
  border-color: rgba(79, 70, 229, 0.4);
  transform: translateY(-1px);
  box-shadow: var(--glass-shadow-sm);
}

.day-cell.other-month {
  opacity: 0.35;
  background: transparent;
}
.day-cell.is-past {
  opacity: 0.62;
}
.day-cell.is-past:hover {
  border-color: var(--bg-glass-border);
  transform: none;
  box-shadow: none;
}
.day-cell.is-weekend {
  background: var(--weekend-bg);
}

.day-cell.is-today {
  border: 2px solid var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
  background: rgba(79, 70, 229, 0.05);
}
.day-cell.is-today .day-number {
  background: var(--primary-gradient);
  color: #fff;
  border-radius: 50%;
  width: clamp(1.2rem, 1.8vw, 1.5rem);
  height: clamp(1.2rem, 1.8vw, 1.5rem);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.day-cell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: clamp(2px, 0.4vw, 4px);
  line-height: 1;
}

.day-number {
  font-size: clamp(0.72rem, 1.2vw, 0.88rem);
  font-weight: 700;
  color: var(--text-primary);
}
.day-cell.sun .day-number { color: #e11d48; }
.day-cell.sat .day-number { color: #0284c7; }

.holiday-tag {
  font-size: clamp(0.58rem, 0.95vw, 0.68rem);
  font-weight: 600;
  color: var(--holiday-text);
  background: var(--holiday-bg);
  border: 1px solid var(--holiday-border);
  padding: 1px clamp(2px, 0.5vw, 4px);
  border-radius: var(--radius-xs);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70%;
}

.day-vacations-list {
  display: flex;
  flex-direction: column;
  gap: clamp(2px, 0.4vw, 3px);
  overflow-y: auto;
  flex: 1;
}
.day-vacations-list::-webkit-scrollbar { width: 3px; }
.day-vacations-list::-webkit-scrollbar-thumb {
  background: rgba(125, 125, 125, 0.25);
  border-radius: 3px;
}

.vacation-badge-item {
  display: flex;
  align-items: center;
  gap: clamp(2px, 0.5vw, 4px);
  padding: clamp(2px, 0.4vw, 3px) clamp(3px, 0.6vw, 5px);
  border-radius: var(--radius-xs);
  font-size: clamp(0.64rem, 1.05vw, 0.74rem);
  font-weight: 600;
  line-height: 1.15;
  cursor: pointer;
  border: 1px solid transparent;
  user-select: none;
  overflow: hidden;
}
.vacation-badge-item:hover {
  filter: brightness(0.95);
  transform: scale(1.02);
}

.vacation-badge-item.type-ANNUAL {
  background: var(--vac-annual-bg);
  border-color: var(--vac-annual-border);
  color: var(--vac-annual-text);
}
.vacation-badge-item.type-HALF_AM {
  background: var(--vac-am-bg);
  border-color: var(--vac-am-border);
  color: var(--vac-am-text);
}
.vacation-badge-item.type-HALF_PM {
  background: var(--vac-pm-bg);
  border-color: var(--vac-pm-border);
  color: var(--vac-pm-text);
}

.badge-user-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}
.badge-user-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.badge-type-pill {
  font-size: clamp(0.55rem, 0.9vw, 0.62rem);
  padding: 0 2px;
  border-radius: 2px;
  background: rgba(125, 125, 125, 0.15);
  flex-shrink: 0;
}

/* Yearly View */
.year-calendar-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.year-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(0.6rem, 1.2vw, 1rem) clamp(0.85rem, 1.8vw, 1.25rem);
  gap: 0.5rem;
  flex-wrap: wrap;
}

.year-title {
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  font-weight: 700;
  display: block;
}
.year-desc {
  font-size: clamp(0.7rem, 1.1vw, 0.8rem);
  color: var(--text-muted);
}

.year-legend {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.dot-legend {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 3px;
}
.dot-holiday { background: #e11d48; }
.dot-vacation { background: var(--primary); }

.year-months-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(clamp(240px, 22vw, 320px), 1fr));
  gap: clamp(0.6rem, 1.2vw, 1rem);
}

.mini-month-card {
  padding: clamp(0.6rem, 1.2vw, 0.85rem);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mini-month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mini-month-name {
  font-size: clamp(0.85rem, 1.3vw, 0.95rem);
  font-weight: 700;
  color: var(--text-primary);
}
.mini-month-stats {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.mini-weekdays-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
}

.mini-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.mini-day-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.65rem, 1vw, 0.75rem);
  border-radius: 4px;
  color: var(--text-secondary);
  position: relative;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.mini-day-cell:hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
  transform: scale(1.1);
  z-index: 5;
}
.mini-day-cell.is-sun { color: #e11d48; }
.mini-day-cell.is-sat { color: #0284c7; }
.mini-day-cell.is-holiday { color: #e11d48; font-weight: 700; }
.mini-day-cell.is-holiday::after {
  content: '';
  position: absolute;
  bottom: 2px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #e11d48;
}
.mini-day-cell.has-vacation {
  background: rgba(79, 70, 229, 0.15);
  color: var(--primary);
  font-weight: 700;
}
.mini-day-cell.has-vacation::after {
  content: '';
  position: absolute;
  bottom: 2px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--primary);
}

/* ==========================================================================
   Modals (Vacation / Delete / Members)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-smooth);
  padding: clamp(0.5rem, 3vw, 1.25rem);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: min(94vw, 480px);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--bg-glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-md);
  padding: clamp(1rem, 3vw, 1.75rem);
  transform: translateY(12px) scale(0.98);
  transition: transform var(--transition-spring);
}
.modal-overlay.active .modal-card {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.title-with-icon {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.modal-icon-badge {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-xs);
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.modal-icon-badge.danger {
  background: rgba(225, 29, 72, 0.1);
  color: #e11d48;
}

.modal-title {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  font-weight: 700;
}
.modal-subtitle {
  font-size: clamp(0.72rem, 1.1vw, 0.8rem);
  color: var(--text-muted);
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
}
.modal-close-btn:hover { color: var(--text-primary); }

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

input[type="text"],
input[type="password"],
input[type="date"] {
  width: 100%;
  padding: clamp(0.55rem, 1vw, 0.7rem) clamp(0.7rem, 1.2vw, 0.95rem);
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-size: clamp(0.85rem, 1.2vw, 0.92rem);
  font-family: inherit;
  transition: all var(--transition-fast);
}
input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.field-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Segmented Control */
.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: rgba(125, 125, 125, 0.1);
  padding: 3px;
  border-radius: var(--radius-xs);
  gap: 3px;
}
.segment-option input[type="radio"] { display: none; }
.segment-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 8px;
  border-radius: var(--radius-xs);
  font-size: clamp(0.72rem, 1.1vw, 0.8rem);
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.segment-option input[type="radio"]:checked + .segment-btn {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  box-shadow: var(--glass-shadow-sm);
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; }

/* Date Range Inputs */
.range-labels-row {
  display: flex;
  justify-content: space-between;
}
.date-range-inputs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.input-date-wrap { flex: 1; }
.range-arrow {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 700;
}

/* Matched User Display Box */
.matched-user-box {
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(79, 70, 229, 0.06);
  border: 1px solid rgba(79, 70, 229, 0.2);
}
.user-color-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.applicant-details { flex: 1; }
.applicant-name {
  font-weight: 700;
  color: var(--text-primary);
  font-size: clamp(0.85rem, 1.2vw, 0.95rem);
}
.badge-matched {
  font-size: 0.68rem;
  font-weight: 600;
  color: #059669;
  background: rgba(5, 150, 105, 0.1);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.4rem;
}
.btn-secondary {
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-xs);
  background: var(--bg-surface);
  border: 1px solid var(--bg-glass-border);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: clamp(0.78rem, 1.1vw, 0.85rem);
  cursor: pointer;
}
.btn-secondary:hover { background: var(--bg-glass-hover); color: var(--text-primary); }

.btn-primary {
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-xs);
  background: var(--primary-gradient);
  border: none;
  color: #fff;
  font-weight: 600;
  font-size: clamp(0.78rem, 1.1vw, 0.85rem);
  cursor: pointer;
  box-shadow: 0 4px 12px var(--primary-glow);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px var(--primary-glow);
}

/* Delete Card */
.delete-content-body {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}
.vacation-preview-box {
  padding: 0.75rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.preview-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
}
.preview-label { color: var(--text-muted); }
.preview-val { color: var(--text-primary); }
.preview-val.highlight { color: var(--primary); }
.preview-type-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  background: rgba(79, 70, 229, 0.15);
  color: var(--primary);
}

.continuous-notice-box {
  display: flex;
  gap: 0.65rem;
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius-xs);
  background: rgba(217, 119, 6, 0.1);
  border: 1px solid rgba(217, 119, 6, 0.3);
  color: #b45309;
}
.notice-icon { color: #d97706; flex-shrink: 0; }
.notice-text strong { font-size: 0.82rem; display: block; }
.notice-text p { font-size: 0.75rem; }

.delete-actions-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.btn-danger-outline, .btn-danger-solid {
  width: 100%;
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  text-align: left;
}
.btn-danger-outline {
  background: transparent;
  border: 1px solid rgba(225, 29, 72, 0.4);
  color: #e11d48;
}
.btn-danger-outline:hover { background: rgba(225, 29, 72, 0.08); }
.btn-danger-solid {
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  border: none;
  color: #fff;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.3);
}
.btn-text-block .main-txt { font-size: 0.85rem; font-weight: 700; display: block; }
.btn-text-block .sub-txt { font-size: 0.7rem; opacity: 0.85; display: block; }

/* Yearly Popover (스마트 상/하단 플립 지원) */
.day-popover {
  position: absolute;
  z-index: 2000;
  width: min(250px, 85vw);
  padding: 0.7rem;
  border-radius: var(--radius-xs);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.15);
}
.day-popover.popover-above {
  transform: translateY(-4px);
}
.day-popover.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.popover-header {
  display: flex;
  justify-content: space-between;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--bg-glass-border);
  margin-bottom: 4px;
  font-size: 0.72rem;
  font-weight: 700;
}
.popover-holiday { color: #e11d48; }
.popover-list { display: flex; flex-direction: column; gap: 3px; max-height: 150px; overflow-y: auto; }
.popover-vac-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  padding: 2px 4px;
  border-radius: 3px;
  background: rgba(125, 125, 125, 0.08);
}
.popover-vac-name { font-weight: 600; display: flex; align-items: center; gap: 4px; }
.popover-vac-type { font-size: 0.65rem; color: var(--text-muted); }

/* Members Table Modal (완벽 반응형 레이아웃 & 권한 드롭다운 지원) */
.modal-card.members-card {
  width: min(95vw, 600px);
}

.admin-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: block;
  margin-top: 4px;
}

.new-member-card {
  background: rgba(125, 125, 125, 0.05);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-xs);
  padding: clamp(0.6rem, 1.5vw, 0.85rem);
  margin-bottom: 0.95rem;
}

.subcard-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 0.55rem;
}

.new-member-form-grid {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.form-row-duo {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 0.5rem;
}

.form-row-trio {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 1.1fr;
  gap: 0.5rem;
  align-items: flex-end;
}

.mini-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 3px;
  display: block;
}

.form-input-sm {
  width: 100%;
  height: 36px;
  padding: 0.4rem 0.65rem;
  font-size: 0.82rem;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  box-sizing: border-box;
  transition: all var(--transition-fast);
}

.form-select-sm {
  width: 100%;
  height: 36px;
  padding: 0.4rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  box-sizing: border-box;
  cursor: pointer;
}

.color-preview-box {
  display: flex;
  align-items: center;
  height: 36px;
}
.color-preview-box input[type="color"] {
  width: 100%;
  height: 36px;
  padding: 2px;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-xs);
  cursor: pointer;
  background: var(--input-bg);
}

.btn-add-member {
  height: 36px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: var(--radius-xs);
  background: var(--primary);
  color: #ffffff;
  border: none;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}
.btn-add-member:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.members-table-wrapper {
  max-height: 250px;
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-xs);
  background: var(--bg-surface-elevated);
}

.members-table {
  width: 100%;
  min-width: 440px;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.members-table th, .members-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--bg-glass-border);
  vertical-align: middle;
}
.members-table th {
  background: rgba(125, 125, 125, 0.08);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 1;
}

.member-user-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}
.member-color-chip {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.member-name-text {
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.member-code-tag {
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  background: rgba(125, 125, 125, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--bg-glass-border);
  display: inline-block;
  word-break: break-all;
  color: var(--text-secondary);
}

.role-select-wrap {
  display: inline-block;
  width: 100%;
}
.role-select {
  width: 100%;
  max-width: 135px;
  padding: 4px 6px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 4px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.role-select.role-master {
  color: #d97706;
  border-color: rgba(217, 119, 6, 0.4);
  background: rgba(217, 119, 6, 0.1);
}
.role-select.role-normal {
  color: var(--text-secondary);
  border-color: var(--input-border);
}

.badge-self {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(79, 70, 229, 0.1);
  padding: 3px 7px;
  border-radius: 4px;
  display: inline-block;
}

.btn-table-del {
  background: rgba(225, 29, 72, 0.08);
  border: 1px solid rgba(225, 29, 72, 0.3);
  color: #e11d48;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.72rem;
  transition: all var(--transition-fast);
}
.btn-table-del:hover {
  background: #e11d48;
  color: #ffffff;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: clamp(12px, 2vw, 24px);
  right: clamp(12px, 2vw, 24px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 3000;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  min-width: min(280px, 85vw);
  max-width: 380px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--bg-glass-border);
  box-shadow: var(--glass-shadow);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastIn 0.3s forwards cubic-bezier(0.34, 1.56, 0.64, 1);
}
.toast.success { border-left: 4px solid #059669; }
.toast.error { border-left: 4px solid #e11d48; }
.toast.info { border-left: 4px solid var(--primary); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.hidden { display: none !important; }

/* ==========================================================================
   Responsive Breakpoints & Premium Mobile UX (토스/애플 캘린더 스타일)
   ========================================================================== */

/* 태블릿 및 모바일 공통 헤더 3행 스마트 레이아웃 (820px 이하) */
@media (max-width: 820px) {
  .app-container {
    padding: 0.5rem 0.6rem 2rem;
    gap: 0.6rem;
  }

  /* 토스 / Apple iOS 스타일 모바일 헤더 3단 정렬 레이아웃:
     1행: [아이콘 + 휴가 캘린더] 좌측 --- [팀원관리/테마/프로필] 우측
     2행: [월간/연간 세그먼트] 좌측 --- [+ 휴가 등록] 우측
     3행: [< 2026년 9월 > 오늘] 중앙 전폭 정렬 */
  .app-header {
    display: grid;
    grid-template-areas:
      "brand tools"
      "tabs action"
      "nav nav";
    grid-template-columns: 1fr auto;
    align-items: center;
    row-gap: 0.7rem;
    column-gap: 0.5rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  }

  /* 1행: 브랜드(좌측) & 도구/프로필(우측) */
  .brand-area {
    grid-area: brand;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    white-space: nowrap;
    border-bottom: none !important;
    padding-bottom: 0;
  }
  .brand-logo {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: auto !important;
    height: auto !important;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .brand-title {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    white-space: nowrap !important;
    word-break: keep-all;
    color: var(--text-primary);
    display: inline-block;
  }
  .header-tools {
    grid-area: tools;
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
  }

  /* 2행: 좌측 월간/연간 탭, 우측 + 휴가 등록 버튼 */
  .view-tabs {
    grid-area: tabs;
    justify-self: start;
    display: inline-flex;
    margin-left: 0;
    padding: 3px;
    border-radius: var(--radius-full);
    background: rgba(125, 125, 125, 0.08);
    border: 1px solid var(--bg-glass-border);
  }
  .header-action-wrap {
    grid-area: action;
    justify-self: end;
    display: flex;
    align-items: center;
    border-top: none !important;
    padding-top: 0;
  }

  /* 3행: 중앙 정렬 날짜 네비게이션 */
  .header-center {
    grid-area: nav;
    justify-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0;
    border-top: none !important;
    padding-top: 0;
  }
  .nav-controls {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    background: var(--bg-surface);
    border: 1px solid var(--bg-glass-border);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  }
  .period-text {
    min-width: 6.2rem;
    font-size: 1.05rem;
    font-weight: 800;
    text-align: center;
    letter-spacing: -0.02em;
    white-space: nowrap;
  }
  .icon-nav-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  .pill-btn.today-btn {
    padding: 3px 9px;
    font-size: 0.74rem;
    font-weight: 700;
  }
  .primary-gradient-btn {
    padding: 6px 13px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    white-space: nowrap;
  }
}

/* 모바일 전용 (640px 이하): Bottom Sheet 모달 & 월간 캘린더 초정밀 튜닝 */
@media (max-width: 640px) {
  .app-container {
    padding: 0.35rem 0.35rem 2rem;
    gap: 0.5rem;
  }

  .logo-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }
  .logo-icon svg {
    width: 15px;
    height: 15px;
  }
  .brand-logo {
    width: auto !important;
    height: auto !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .brand-title {
    font-size: 0.95rem;
    font-weight: 800;
    white-space: nowrap !important;
    word-break: keep-all;
    flex-shrink: 0;
  }

  .view-tabs {
    padding: 2px;
    gap: 2px;
  }
  .tab-btn {
    padding: 3px 7px;
    font-size: 0.72rem;
  }
  .tab-btn svg {
    width: 12px;
    height: 12px;
  }

  .icon-btn {
    width: 32px;
    height: 32px;
  }
  .icon-btn svg {
    width: 15px;
    height: 15px;
  }
  .user-badge {
    padding: 2px 6px;
    gap: 4px;
    font-size: 0.74rem;
    height: 32px;
  }

  /* 2. 월간 캘린더 범례 및 상단 바 */
  .calendar-meta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 2px 2px 4px;
    gap: 0.5rem;
  }
  .calendar-meta-bar::-webkit-scrollbar {
    display: none;
  }
  .legend-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    white-space: nowrap;
  }
  .legend-item {
    font-size: 0.7rem;
    white-space: nowrap;
  }
  .stats-hint {
    white-space: nowrap;
  }
  .glass-chip.subtle {
    font-size: 0.68rem;
    padding: 2px 6px;
  }

  /* 3. 월간 캘린더 그리드 */
  .month-calendar-wrapper {
    padding: 0.45rem 0.35rem;
    border-radius: var(--radius-sm);
    gap: 0.3rem;
  }
  .weekdays-grid {
    padding-bottom: 0.3rem;
    font-size: 0.74rem;
    font-weight: 700;
  }
  .days-grid {
    gap: 3px;
  }

  /* 날짜 셀 */
  .day-cell {
    min-height: clamp(68px, 17vw, 92px);
    padding: 3px 2px;
    border-radius: 6px;
    transition: transform 0.1s ease;
  }
  .day-cell:active {
    transform: scale(0.97);
  }

  .day-cell-header {
    margin-bottom: 2px;
    padding: 0 1px;
  }
  .day-number {
    font-size: 0.76rem;
    font-weight: 700;
  }
  .day-cell.is-today .day-number {
    width: 1.25rem;
    height: 1.25rem;
    font-size: 0.72rem;
  }

  /* 공휴일 태그 (모바일에서도 세련된 미니 뱃지로 노출!) */
  .holiday-tag {
    display: inline-block !important;
    font-size: 0.58rem;
    font-weight: 700;
    line-height: 1;
    padding: 1.5px 3px;
    border-radius: 3px;
    max-width: 36px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: rgba(225, 29, 72, 0.12);
    border: 1px solid rgba(225, 29, 72, 0.3);
    color: #e11d48;
  }

  /* 휴가 뱃지 칩 */
  .day-vacations-list {
    gap: 2px;
  }
  .vacation-badge-item {
    padding: 2px 3px;
    border-radius: 4px;
    font-size: 0.65rem;
    gap: 3px;
    line-height: 1.1;
  }
  .badge-user-dot {
    width: 5px;
    height: 5px;
    flex-shrink: 0;
  }
  .badge-user-name {
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .badge-type-pill {
    display: inline-block !important;
    font-size: 0.52rem;
    padding: 0 2px;
    border-radius: 2px;
    background: rgba(125, 125, 125, 0.15);
    opacity: 0.9;
    flex-shrink: 0;
  }

  /* 4. 모달: 프리미엄 모바일 Bottom Sheet 스타일 */
  .modal-overlay {
    padding: 0 !important;
    align-items: flex-end !important;
    justify-content: center !important;
  }

  .bottom-sheet-handle {
    display: block !important;
    width: 40px;
    height: 4.5px;
    border-radius: 99px;
    background: rgba(125, 125, 125, 0.35);
    margin: 0 auto 0.85rem;
    flex-shrink: 0;
  }

  .modal-card,
  .modal-card.members-card,
  .modal-card.delete-card {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 88vh !important;
    border-radius: 22px 22px 0 0 !important;
    border-bottom: none !important;
    padding: 1.1rem 1.15rem calc(1.2rem + env(safe-area-inset-bottom, 0px)) !important;
    transform: translateY(100%) !important;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.25) !important;
  }

  .modal-overlay.active .modal-card,
  .modal-overlay.active .modal-card.members-card,
  .modal-overlay.active .modal-card.delete-card {
    transform: translateY(0) !important;
  }

  .modal-header {
    margin-bottom: 0.9rem;
  }
  .modal-title {
    font-size: 1.05rem;
  }
  .modal-subtitle {
    font-size: 0.74rem;
  }
  .modal-close-btn {
    font-size: 1.6rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* 휴가 등록 모달 폼 요소 터치 편의성 */
  .segmented-control {
    padding: 3px;
    gap: 3px;
  }
  .segment-btn {
    padding: 9px 4px;
    font-size: 0.78rem;
    font-weight: 700;
  }

  /* 날짜 범위 인풋 (2열 나란히 시원하게 배치) */
  .range-labels-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .date-range-inputs {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.4rem;
    align-items: center;
  }
  .range-arrow {
    display: inline-block !important;
    font-size: 0.85rem;
    color: var(--text-muted);
  }
  .date-range-inputs input[type="date"] {
    height: 42px;
    padding: 0.45rem 0.5rem;
    font-size: 0.82rem;
    border-radius: var(--radius-xs);
  }
  input[type="text"] {
    height: 42px;
    font-size: 0.85rem;
  }

  /* 모달 하단 액션 버튼 (큼직한 CTA) */
  .modal-footer {
    display: flex;
    gap: 8px;
    margin-top: 0.5rem;
  }
  .modal-footer .btn-secondary {
    flex: 1;
    height: 46px;
    border-radius: var(--radius-xs);
    font-size: 0.85rem;
  }
  .modal-footer .btn-primary {
    flex: 1.8;
    height: 46px;
    border-radius: var(--radius-xs);
    font-size: 0.88rem;
    font-weight: 700;
  }

  /* 팀원 관리 폼 및 테이블 모바일 최적화 */
  .form-row-duo {
    grid-template-columns: 1fr;
  }
  .form-row-trio {
    grid-template-columns: 1fr 1fr;
  }
  .form-row-trio .btn-wrap {
    grid-column: span 2;
  }
  .members-table-wrapper {
    max-height: 220px;
  }
}
