/* ============================================
   병원 HR 종합 시스템 - 스타일
   Linear / Raycast — Restrained Dark Tech
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Bakbak+One&family=Black+Han+Sans&family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;700&family=Noto+Sans+KR:wght@300;400;500;600;700&display=swap');

:root {
  /* ── Typography Scale ── */
  --text-amount-huge: 32px;
  --text-amount-large: 24px;
  --text-title-large: 20px;
  --text-body-large: 16px;
  --text-body-normal: 14px;
  --text-label-small: 12px;

  /* ── Linear Palette: Deep solid darks, no transparency ── */
  --bg-primary: #09090b;
  --bg-secondary: #0f0f11;
  --bg-card: #141416;
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-glass-hover: rgba(255, 255, 255, 0.06);
  --border-glass: rgba(255, 255, 255, 0.06);
  --border-active: rgba(255, 255, 255, 0.15);

  --text-primary: #ececef;
  --text-secondary: #a0a0ab;
  --text-muted: #63636e;
  --text-accent: #a0a0ab;

  --accent-indigo: #6366f1;
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-violet: #8b5cf6;

  /* ── Linear: Flat solid colors for buttons, no gradients ── */
  --gradient-primary: #6366f1;
  --gradient-success: #10b981;
  --gradient-warning: #f59e0b;
  --gradient-info: #3b82f6;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.6);
  --shadow-glow: none;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 12px;
  --radius-full: 9999px;

  --transition: all 0.15s ease-out;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Noto Sans KR', -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Ambient Background: REMOVED for Linear aesthetic ── */
body::before {
  display: none;
}

/* ── Header ── */
.header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-glass);
  padding: 2px 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}

@media (min-width: 769px) {
  .nav-tabs {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-glass);
    padding: 12px 0;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.12);
  }

  .nav-tabs .nav-tab {
    flex: 0 0 auto;
    min-width: 140px;
    max-width: 180px;
    padding: 10px 12px;
  }

  .main {
    padding-bottom: 72px;
  }

  #tab-overtime,
  #tab-leave,
  #tab-feedback {
    max-width: 600px;
    margin: 0 auto;
  }
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.header-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-title-large);
  flex-shrink: 0;
}

.logo .logo-main-title {
  font-family: 'Black Han Sans', 'Space Grotesk', sans-serif;
  font-size: 1.1rem; /* 모바일 사이즈로 고정됨 */
  font-weight: 400;
  color: #333333 !important; /* 진회색 텍스트만 유지 (!important 추가) */
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.logo .logo-sub-title {
  font-size: var(--text-label-small);
  color: #494949;
  margin-top: 2px;
  line-height: 1.4;
  font-weight: 400;
}

html[data-theme="neo"] .logo .logo-main-title {
  text-shadow: none !important; /* 색상 그림자 완벽 제거 */
}

/* 토글 아이콘 형태 보존을 위한 클래스 */
.toggle-icon {
  display: inline-block;
  width: 1.25em;
  text-align: center;
  font-family: monospace;
}

/* ── Navigation Tabs ── */
.nav-tabs {
  display: flex;
  gap: 2px;
  background: transparent;
  border-radius: var(--radius-sm);
  padding: 0;
  border: none;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nav-tabs::-webkit-scrollbar {
  display: none;
}

.nav-tab {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: var(--text-body-large);
  font-weight: 500;
  transition: var(--transition);
  font-family: inherit;
  white-space: nowrap;
  flex: auto;
  text-align: center;
}

.nav-tab:hover {
  color: var(--text-primary);
}

.nav-tab.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}


/* ── Main ── */
.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

/* ── Tab Content ── */
.tab-content {
  display: none;
  animation: fadeIn 0.4s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Modal Overlay ── */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 16px;
  overflow-y: auto;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.modal-body {
  max-height: calc(100vh - 160px);
  overflow-y: auto;
}

/* ── Sub-tabs ── */
.sub-tabs {
  display: flex;
  gap: 2px;
  background: transparent;
  border-radius: var(--radius-sm);
  padding: 0;
  border: none;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-glass);
}

.sub-tab {
  flex: 1;
  padding: 10px 12px;
  border-radius: 0;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: var(--text-body-large);
  font-weight: 500;
  transition: var(--transition);
  font-family: inherit;
  text-align: center;
}

.sub-tab:hover {
  color: var(--text-primary);
}

.sub-tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent-indigo);
}

.sub-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.sub-content.active {
  display: block;
}

/* ── Q&A Cards ── */
.qa-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.qa-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: var(--transition);
}

.qa-card:hover {
  border-color: var(--border-active);
  background: var(--bg-glass-hover);
}

.qa-card.expanded {
  grid-column: 1 / -1;
  cursor: default;
  border-color: var(--accent-indigo);
  transform: none;
}

.qa-card.expanded:hover {
  transform: none;
}

.qa-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qa-card-icon {
  font-size: var(--text-amount-large);
  flex-shrink: 0;
}

.qa-card-title {
  font-size: var(--text-body-large);
  font-weight: 600;
  color: var(--text-primary);
}

.qa-card-desc {
  font-size: var(--text-body-normal);
  color: var(--text-muted);
  margin-top: 2px;
}

.qa-card-body {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-glass);
  animation: fadeIn 0.3s ease;
}

.qa-card-result {
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-top: 12px;
}

.qa-card-result .result-value {
  font-size: var(--text-amount-large);
  font-weight: 700;
  color: var(--accent-indigo);
}

.qa-card-result .result-label {
  font-size: var(--text-body-normal);
  color: var(--text-muted);
  margin-top: 2px;
}

.qa-profile-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: var(--text-body-large);
  color: var(--accent-amber);
}

.qa-profile-warning a {
  color: var(--accent-indigo);
  text-decoration: underline;
  cursor: pointer;
}

/* ── Cards (Linear: solid bg, thin border, no blur/glow) ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 16px;
  transition: var(--transition);
}

.card:hover {
  border-color: var(--border-active);
}

.card-title {
  font-size: var(--text-title-large);
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title .icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-title-large);
}

.card-title .icon.indigo {
  background: rgba(99, 102, 241, 0.15);
}

.card-title .icon.emerald {
  background: rgba(16, 185, 129, 0.15);
}

.card-title .icon.amber {
  background: rgba(245, 158, 11, 0.15);
}

.card-title .icon.cyan {
  background: rgba(6, 182, 212, 0.15);
}

.card-title .icon.rose {
  background: rgba(244, 63, 94, 0.15);
}

.card-title .icon.violet {
  background: rgba(139, 92, 246, 0.15);
}

.card-title .icon.blue {
  background: rgba(59, 130, 246, 0.15);
}

/* ── Grid ── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

/* ── Form Elements ── */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: var(--text-body-large);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-group select,
.form-group input {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: var(--text-body-large);
  font-family: inherit;
  transition: var(--transition);
  outline: none;
  box-sizing: border-box;
  -webkit-appearance: none; /* 사파리 기본 스타일 제거 */
  -moz-appearance: none;
  appearance: none;
  line-height: 1.4; /* Safari 하단 잘림 방지 */
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2363636e'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
}

.form-group select:focus,
.form-group input:focus {
  border-color: var(--accent-indigo);
  background-color: var(--bg-glass-hover);
}

.form-group select option {
  background: #1c1c1e; /* 다크모드 옵션 배경 */
  color: var(--text-primary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ── Buttons ── */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: var(--text-body-large);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--accent-indigo);
  color: white;
}

.btn-primary:hover {
  background: #5558e6;
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-active);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* ── Result Display ── */
.result-box {
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 16px;
}

.result-box.success {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.2);
}

.result-total {
  font-size: var(--text-amount-huge);
  font-weight: 700;
  color: var(--accent-indigo);
  margin-bottom: 12px;
}

.result-total.green {
  color: var(--accent-emerald);
}

.result-label {
  font-size: var(--text-body-normal);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: var(--text-body-large);
}

.result-row:last-child {
  border-bottom: none;
}

.result-row .key {
  color: var(--text-secondary);
}

.result-row .val {
  font-weight: 600;
  color: var(--text-primary);
}

.result-row .val.accent {
  color: var(--accent-indigo);
}

/* ── Chatbot ── */
.chat-container {
  height: 500px;
  display: flex;
  flex-direction: column;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-messages::-webkit-scrollbar {
  width: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: var(--border-glass);
  border-radius: var(--radius-full);
}

.chat-msg {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: var(--text-body-large);
  line-height: 1.5;
  animation: msgSlide 0.3s ease;
}

@keyframes msgSlide {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-msg.bot {
  align-self: flex-start;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
}

.chat-msg.user {
  align-self: flex-end;
  background: var(--accent-indigo);
  color: white;
}

.chat-msg .ref {
  display: inline-block;
  margin-top: 8px;
  font-size: var(--text-body-normal);
  color: var(--text-accent);
  background: rgba(99, 102, 241, 0.1);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 16px;
  border-top: 1px solid var(--border-glass);
}

.chat-input {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: var(--text-body-large);
  outline: none;
  font-family: inherit;
  transition: var(--transition);
}

.chat-input:focus {
  border-color: var(--accent-indigo);
}

.chat-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-indigo);
  border: none;
  color: white;
  font-size: var(--text-title-large);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-send:hover {
  background: #5558e6;
}

/* ── Quick Tags (Chatbot) ── */
.quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 16px;
}

.quick-tag {
  padding: 6px 12px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: var(--text-body-normal);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.quick-tag:hover {
  color: var(--text-primary);
  border-color: var(--accent-indigo);
  background: rgba(99, 102, 241, 0.1);
}

/* ── Tables ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-body-large);
}

.data-table th {
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: var(--text-accent);
  border-bottom: 1px solid var(--border-glass);
  font-size: var(--text-body-normal);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
}

.data-table tr:hover td {
  background: var(--bg-glass);
  color: var(--text-primary);
}

.data-table .amount {
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
}

/* ── Stat Cards ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--border-active);
}

.stat-value {
  font-size: var(--text-amount-large);
  font-weight: 700;
  margin-bottom: 4px;
}

.stat-label {
  font-size: var(--text-body-normal);
  color: var(--text-muted);
}

/* ── Checkbox / Toggle ── */
.toggle-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.toggle-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-indigo);
  cursor: pointer;
}

.toggle-group label {
  font-size: var(--text-body-large);
  color: var(--text-secondary);
  cursor: pointer;
}

/* ── Info badge ── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-body-normal);
  font-weight: 600;
}

.badge.indigo {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-indigo);
}

.badge.emerald {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

.badge.amber {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
}

.badge.rose {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
}

/* ── Divider ── */
.divider {
  border: none;
  border-top: 1px solid var(--border-glass);
  margin: 20px 0;
}

/* ── Warning box ── */
.warning-box {
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: var(--text-body-large);
  color: var(--accent-amber);
  margin-top: 12px;
}

/* ── Collapsible Sections ── */
.collapsible-header {
  padding: 10px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: var(--text-body-large);
  font-weight: 500;
  color: var(--text-accent);
  transition: var(--transition);
  margin: 12px 0 4px;
}

.collapsible-header:hover {
  background: var(--bg-glass-hover);
  border-color: var(--accent-indigo);
}

.collapsible-body {
  padding: 16px;
  border: 1px solid var(--border-glass);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: rgba(99, 102, 241, 0.02);
  margin-bottom: 12px;
}

/* ── Outline Button ── */
.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-glass);
}

.btn-outline:hover {
  color: var(--text-primary);
  border-color: var(--border-active);
}

/* ── Mini Calendar ── */
.mini-cal {
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  overflow: hidden;
}

.mini-cal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-secondary);
  font-size: var(--text-body-large);
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-glass);
}

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

.mini-cal-dow {
  text-align: center;
  font-size: var(--text-body-normal);
  font-weight: 600;
  color: var(--text-muted);
  padding: 4px 0;
}

.mini-cal-dow.sun {
  color: var(--accent-rose);
}

.mini-cal-dow.sat {
  color: var(--accent-blue);
}

.mini-cal-day {
  text-align: center;
  font-size: var(--text-body-normal);
  padding: 6px 2px;
  border-radius: 6px;
  color: var(--text-secondary);
  transition: var(--transition);
  cursor: default;
  position: relative;
}

.mini-cal-day:hover {
  background: var(--bg-glass-hover);
}

.mini-cal-day.empty {
  visibility: hidden;
}

.mini-cal-day.weekend {
  color: rgba(59, 130, 246, 0.7);
}

.mini-cal-day.holiday {
  color: var(--accent-rose);
  font-weight: 700;
  background: rgba(244, 63, 94, 0.1);
}

.mini-cal-day.anniversary {
  color: var(--accent-amber);
  font-weight: 500;
}

.mini-cal-day.anniversary::after {
  content: '';
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-amber);
  margin: 1px auto 0;
}

.mini-cal-day.today {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  font-weight: 700;
}

.mini-cal-day[title]:hover::before {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: var(--text-body-normal);
  white-space: nowrap;
  z-index: 10;
  border: 1px solid var(--border-glass);
  pointer-events: none;
}

.mini-cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 8px 12px;
  border-top: 1px solid var(--border-glass);
  font-size: var(--text-body-normal);
  color: var(--text-muted);
}

.mini-cal-legend span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mini-cal-legend .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.mini-cal-legend .dot.holiday {
  background: var(--accent-rose);
}

.mini-cal-legend .dot.weekend {
  background: var(--accent-blue);
}

.mini-cal-legend .dot.anniversary {
  background: var(--accent-amber);
}

.mini-cal-legend .dot.workday {
  background: var(--accent-emerald);
}

/* ── Overtime CRUD: Interactive Calendar ── */
.ot-cal {
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  overflow: hidden;
}

.ot-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-secondary);
  font-size: var(--text-body-large);
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-glass);
}

.cal-nav-btn {
  background: none;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: inherit;
  cursor: pointer;
  padding: 4px 10px;
  font-size: var(--text-body-normal);
  transition: var(--transition);
  font-family: inherit;
}

.cal-nav-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.cal-nav-title {
  cursor: pointer;
  user-select: none;
  font-size: var(--text-amount-large);
}

.cal-nav-title:hover {
  text-decoration: underline;
}

.ot-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding: 8px;
}

.ot-cal-dow {
  text-align: center;
  font-size: var(--text-body-normal);
  font-weight: 600;
  color: var(--text-muted);
  padding: 4px 0;
}

.ot-cal-dow.sun {
  color: var(--accent-rose);
}

.ot-cal-dow.sat {
  color: var(--accent-blue);
}

.ot-cal-day {
  text-align: center;
  font-size: var(--text-body-normal);
  padding: 8px 2px 4px;
  border-radius: 8px;
  color: var(--text-secondary);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  min-height: 38px;
}

.ot-cal-day:hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
}

.ot-cal-day.empty {
  visibility: hidden;
  cursor: default;
}

.ot-cal-day.weekend {
  color: rgba(59, 130, 246, 0.7);
}

.ot-cal-day.holiday {
  color: var(--accent-rose);
  font-weight: 700;
  background: rgba(244, 63, 94, 0.08);
}

.ot-cal-day.today {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  font-weight: 700;
}

.ot-cal-day.selected {
  background: rgba(99, 102, 241, 0.15) !important;
  color: var(--accent-indigo) !important;
  font-weight: 700;
}

/* Record dots on calendar day */
.ot-cal-dots {
  display: flex;
  justify-content: center;
  gap: 3px;
  margin-top: 3px;
  min-height: 6px;
}

.ot-cal-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.ot-cal-dot.overtime {
  background: var(--accent-amber);
}

.ot-cal-dot.oncall_standby {
  background: var(--accent-cyan);
}

.ot-cal-dot.oncall_callout {
  background: var(--accent-indigo);
}

.ot-cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 8px 12px;
  border-top: 1px solid var(--border-glass);
  font-size: var(--text-body-normal);
  color: var(--text-muted);
}

.ot-cal-legend span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ot-cal-legend .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* ── Overtime: Dashboard (수당 금액 중심) ── */
.ot-dashboard {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
}

.ot-dash-main {
  flex-shrink: 0;
}

.ot-dash-main .ot-dash-pay {
  font-size: var(--text-amount-huge);
  font-weight: 700;
  color: var(--accent-emerald);
  line-height: 1.2;
}

.ot-dash-main .ot-dash-label {
  font-size: var(--text-body-normal);
  color: var(--text-muted);
  font-weight: 500;
}

.ot-dash-details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.ot-dash-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  font-size: var(--text-body-normal);
  font-weight: 500;
  color: var(--text-secondary);
}

.ot-dash-value {
  font-weight: 700;
}

.ot-dash-value.amber { color: var(--accent-amber); }
.ot-dash-value.cyan { color: var(--accent-cyan); }
.ot-dash-value.indigo { color: var(--accent-indigo); }
.ot-dash-value.emerald { color: var(--accent-emerald); }

/* ── Overtime: Quick Actions ── */
.ot-quick-actions {
  margin-bottom: 16px;
}

.ot-quick-title {
  font-size: var(--text-body-large);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ot-quick-date {
  font-size: var(--text-body-normal);
  font-weight: 500;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 10px;
  border-radius: var(--radius-full);
}

.ot-quick-btns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.ot-quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  position: relative;
  overflow: hidden;
}

.ot-quick-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.ot-quick-btn.overtime::before {
  background: var(--accent-amber);
}

.ot-quick-btn.oncall::before {
  background: var(--accent-cyan);
}

.ot-quick-btn.callout::before {
  background: var(--accent-indigo);
}

.ot-quick-btn:hover {
  border-color: var(--border-active);
}

.ot-quick-btn:active {
  transform: translateY(0);
}

.ot-quick-icon {
  font-size: var(--text-title-large);
}

.ot-quick-label {
  font-size: var(--text-body-normal);
  font-weight: 600;
  color: var(--text-primary);
}

.ot-quick-sub {
  font-size: var(--text-body-normal);
  font-weight: 500;
  color: var(--accent-emerald);
}

/* ── Overtime: Time Presets ── */
.ot-time-presets {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.ot-preset-btn {
  flex: 1;
  padding: 8px 4px;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  color: var(--text-secondary);
  font-size: var(--text-body-large);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  text-align: center;
}

.ot-preset-btn:hover {
  color: var(--text-primary);
  background: var(--bg-glass-hover);
  border-color: var(--accent-amber);
}

.ot-preset-btn.active {
  color: var(--accent-amber);
  background: rgba(245, 158, 11, 0.1);
  border-color: var(--accent-amber);
}

.ot-preset-btn.custom {
  font-size: var(--text-body-normal);
}

.ot-preset-btn.custom.active {
  color: var(--accent-indigo);
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--accent-indigo);
}

/* ── Overtime: Toast Notification ── */
.ot-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 14px 28px;
  background: var(--accent-emerald);
  color: white;
  font-size: var(--text-body-large);
  font-weight: 600;
  border-radius: var(--radius-full);
  z-index: 999;
  opacity: 0;
  transition: all 0.3s ease-out;
  pointer-events: none;
  font-family: inherit;
  white-space: nowrap;
}

.ot-toast.show {
  display: block;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Overtime: Callout Modal ── */
.ot-callout-modal {
  margin-bottom: 16px;
  animation: fadeIn 0.3s ease;
}

.ot-callout-inner {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--accent-indigo);
  border-radius: var(--radius-md);
}

.ot-callout-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-body-large);
  font-weight: 600;
  color: var(--accent-indigo);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-glass);
}

.ot-callout-duration {
  font-size: var(--text-body-large);
  color: var(--accent-emerald);
  font-weight: 600;
  margin-top: 4px;
}

/* ── Overtime: Calendar + Input Grid ── */
.ot-main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.ot-main-grid > #otCalendar .ot-cal {
  max-width: 100%;
}

.ot-hourly-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: rgba(16, 185, 129, 0.06);
  border-radius: 8px;
  border: 1px solid rgba(16, 185, 129, 0.15);
  font-size: var(--text-body-normal);
  color: var(--text-muted);
}

.ot-hourly-bar strong {
  color: var(--accent-emerald);
  font-size: var(--text-body-large);
}

/* ── Overtime: Input Panel (Legacy for Desktop, re-used partially) ── */
.ot-input-panel {
  padding: 16px;
  background: rgba(99, 102, 241, 0.04);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--radius-md);
}

/* ── 바텀 시트 오버레이 ── */
.ot-bottom-sheet-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.ot-bottom-sheet-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* ── 바텀 시트 패널 ── */
.ot-bottom-sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--bg-secondary);
  z-index: 10000;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  padding: 16px 20px 24px 20px;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.4);
  transform: translateY(100%);
  transition: transform 0.3s ease-out;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--border-glass);
  border-bottom: none;
}

.ot-bottom-sheet.show {
  transform: translateY(0);
}

.ot-sheet-handle {
  width: 40px;
  height: 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 auto 20px auto;
}

/* ── 프리미엄 시간 입력 폼 ── */
.time-picker-premium {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-size: var(--text-title-large);
  font-weight: 600;
  transition: all 0.2s ease;
}
.time-picker-premium:focus {
  border-color: var(--accent-indigo);
  outline: none;
  background: rgba(99, 102, 241, 0.06);
}

.premium-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-size: var(--text-body-large);
}
.premium-input:focus {
  border-color: var(--accent-emerald);
  outline: none;
  background: rgba(16, 185, 129, 0.1);
}

.ot-panel-header-v2 {
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
    max-height: 0;
  }

  to {
    opacity: 1;
    transform: translateY(0);
    max-height: 500px;
  }
}

.ot-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-body-large);
  color: var(--text-primary);
}

.btn-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-glass);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-body-large);
  transition: var(--transition);
}

.btn-icon:hover {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border-color: rgba(244, 63, 94, 0.3);
}

/* ── Overtime: Type Selector ── */
.ot-type-selector {
  display: flex;
  gap: 6px;
}

.ot-type-option {
  flex: 1;
  cursor: pointer;
}

.ot-type-option input[type="radio"] {
  display: none;
}

.ot-type-label {
  display: block;
  text-align: center;
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  font-size: var(--text-body-normal);
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  transition: var(--transition);
}

.ot-type-option input[type="radio"]:checked+.ot-type-label {
  color: var(--type-color, var(--accent-indigo));
  background: rgba(99, 102, 241, 0.08);
  border-color: var(--type-color, var(--accent-indigo));
}

.ot-type-label:hover {
  color: var(--text-primary);
  background: var(--bg-glass-hover);
}

/* ── Overtime: Preview (수당 금액 강조) ── */
.ot-preview {
  margin: 10px 0;
  padding: 16px;
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.15);
  border-radius: var(--radius-md);
  font-size: var(--text-body-large);
  min-height: 40px;
}

.ot-preview .preview-row {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  color: var(--text-secondary);
}

.ot-preview .preview-row .val {
  font-weight: 600;
  color: var(--text-primary);
}

.ot-preview .preview-total {
  display: flex;
  justify-content: space-between;
  padding: 6px 0 0;
  margin-top: 6px;
  border-top: 1px solid rgba(16, 18, 129, 0.15);
  font-weight: 700;
  color: var(--accent-emerald);
}

/* ── Overtime: Record List ── */
.ot-record-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  margin-bottom: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.ot-record-item:hover {
  border-color: var(--accent-indigo);
  background: rgba(99, 102, 241, 0.06);
  transform: translateX(2px);
}

.ot-record-date {
  font-size: var(--text-body-normal);
  font-weight: 700;
  color: var(--text-accent);
  min-width: 40px;
  text-align: center;
}

.ot-record-type {
  font-size: var(--text-body-normal);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.ot-record-type.overtime {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
}

.ot-record-type.oncall_standby {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
}

.ot-record-type.oncall_callout {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-indigo);
}

.ot-record-info {
  flex: 1;
  font-size: var(--text-body-normal);
  color: var(--text-secondary);
}

.ot-record-pay {
  font-size: var(--text-body-large);
  font-weight: 700;
  color: var(--accent-emerald);
  white-space: nowrap;
}

.ot-record-summary {
  display: flex;
  justify-content: space-between;
  padding: 12px;
  margin-top: 8px;
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.15);
  border-radius: var(--radius-sm);
  font-weight: 700;
  color: var(--accent-emerald);
  font-size: var(--text-body-large);
}

/* ── Leave: Dashboard ── */
.lv-dashboard {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.lv-dash-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  font-size: var(--text-body-large);
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

.lv-dash-item:hover {
  border-color: var(--border-active);
}

.lv-dash-value {
  font-weight: 700;
  color: var(--accent-emerald);
}

.lv-dash-value.warning {
  color: var(--accent-amber);
}

.lv-dash-value.over {
  color: var(--accent-rose);
}

/* ── Leave: Calendar + Input Grid ── */
.lv-main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.lv-main-grid > #lvCalendar .ot-cal {
  max-width: 100%;
}

.lv-input-panel {
  padding: 16px;
  background: rgba(99, 102, 241, 0.04);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--radius-md);
}

.lv-panel-header {
  padding-bottom: 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border-glass);
}

/* ── Leave: Progress Bar ── */
.lv-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-glass);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--border-glass);
}

.lv-progress-fill {
  height: 100%;
  background: var(--accent-indigo);
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

/* ── Leave: Calendar Dots (category-based) ── */
.lv-cal-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.lv-cal-dot.legal {
  background: var(--accent-emerald);
}

.lv-cal-dot.health {
  background: var(--accent-rose);
}

.lv-cal-dot.education {
  background: var(--accent-violet);
}

.lv-cal-dot.family {
  background: var(--accent-cyan);
}

.lv-cal-dot.ceremony {
  background: var(--accent-amber);
}

.lv-cal-dot.maternity {
  background: var(--accent-rose);
}

.lv-cal-dot.special {
  background: var(--accent-indigo);
}

.lv-cal-dot.other {
  background: var(--text-muted);
}

/* ── Leave: Record Item ── */
.lv-record-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  margin-bottom: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.lv-record-item:hover {
  border-color: var(--accent-indigo);
  background: rgba(99, 102, 241, 0.06);
}

.lv-record-type {
  font-size: var(--text-body-normal);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.lv-record-type.paid {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

.lv-record-type.unpaid {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
}

/* ── Leave: Stats Dashboard ── */
.lv-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.lv-stat-card {
  text-align: center;
  padding: 10px 4px;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
}

.lv-stat-num {
  font-size: var(--text-title-large);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.lv-stat-label {
  font-size: var(--text-label-small);
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Leave: Month Bars ── */
.lv-month-bars {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 3px;
  height: 60px;
  align-items: end;
}

.lv-month-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  position: relative;
}

.lv-month-bar.current .lv-month-bar-label {
  color: var(--accent-emerald);
  font-weight: 700;
}

.lv-month-bar-fill {
  width: 100%;
  border-radius: 3px 3px 0 0;
  background: var(--accent-indigo);
  min-width: 4px;
  transition: height 0.3s ease;
}

.lv-month-bar-label {
  font-size: var(--text-label-small);
  color: var(--text-muted);
  margin-top: 2px;
}

.lv-month-bar-val {
  position: absolute;
  top: -2px;
  font-size: var(--text-label-small);
  font-weight: 700;
  color: var(--accent-indigo);
}

/* ── Calendar badge (for day annotations) ── */
.cal-badge {
  font-size: var(--text-label-small);
  font-weight: 600;
  padding: 1px 3px;
  border-radius: 4px;
  text-align: center;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  /* ── Header: 1-line only (nav moves to bottom) ── */
  .header {
    padding: 1px 12px;
  }

  .header-inner {
    gap: 0;
  }

  .header-top-row {
    gap: 6px;
  }

  .logo-icon {
    width: 28px;
    height: 28px;
    font-size: var(--text-body-large);
  }

  .logo h1 {
    font-size: var(--text-title-large);
  }

  .logo .logo-main-title {
    font-size: 1.1rem;
    display: block;
  }

  /* ── Bottom Tab Bar (안 A) ── */
  .nav-tabs {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-glass);
    border-bottom: none;
    padding: 8px 12px;
    padding-bottom: max(10px, calc(env(safe-area-inset-bottom) + 6px));
    z-index: 90;
    gap: 4px;
    justify-content: space-around;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.12);
    border-radius: 0;
  }

  .nav-tab {
    padding: 8px 4px 6px;
    font-size: var(--text-body-normal);
    flex: auto;
    text-align: center;
    border-radius: 8px;
    min-width: 0;
  }

  .nav-tab.active {
    background: rgba(99, 102, 241, 0.1);
  }

  .theme-toggle-btn {
    width: 30px;
    height: 30px;
    font-size: var(--text-body-large);
  }

  /* ── Main content: bottom padding for tab bar ── */
  .main {
    padding: 12px 10px 88px 10px;
  }

  /* ── Font size increase (+3pt for mobile readability) ── */
  .card {
    padding: 16px 12px;
  }

  .card-title {
    font-size: var(--text-title-large);
  }

  .form-group label {
    font-size: var(--text-body-large);
  }

  .form-group select,
  .form-group input {
    font-size: var(--text-body-large);
    padding: 12px 14px;
  }

  .ot-cal-day {
    font-size: var(--text-body-large);
  }

  .ot-cal-dow {
    font-size: var(--text-body-large);
  }

  .cal-badge {
    font-size: var(--text-label-small);
  }

  .badge {
    font-size: var(--text-body-large);
  }

  .stat-label,
  .lv-stat-label {
    font-size: var(--text-body-large);
  }

  .stat-value,
  .lv-stat-num {
    font-size: var(--text-amount-large);
  }

  .ot-record-info {
    font-size: var(--text-body-large);
  }

  .ot-record-pay {
    font-size: var(--text-body-large);
  }

  .ot-record-type,
  .lv-record-type {
    font-size: var(--text-body-large);
  }

  .collapsible-header {
    font-size: var(--text-body-large);
  }

  .toggle-group label {
    font-size: var(--text-body-large);
  }

  .btn {
    font-size: var(--text-title-large);
  }

  .ot-dash-main .ot-dash-label {
    font-size: var(--text-body-large);
  }

  /* ── Toast above tab bar ── */
  .ot-toast {
    bottom: 80px;
  }

  /* ── Grid/Layout ── */
  .form-row {
    grid-template-columns: 1fr;
  }

  #pfInputFields .form-row {
    grid-template-columns: 1fr 1fr;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ot-quick-btns {
    grid-template-columns: repeat(2, 1fr);
  }

  .ot-dashboard {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 16px 14px;
  }

  .ot-dash-details {
    margin-left: 0;
  }

  .ot-dash-main .ot-dash-pay {
    font-size: var(--text-amount-large);
  }

  .result-total {
    font-size: var(--text-amount-large);
  }

  .sub-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
  }

  .sub-tab {
    white-space: nowrap;
    flex: 0 0 auto;
    font-size: var(--text-body-large);
  }

  .qa-cards-grid {
    grid-template-columns: 1fr;
  }

  .ot-main-grid {
    grid-template-columns: 1fr;
  }

  .lv-main-grid {
    grid-template-columns: 1fr;
  }

  .lv-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .lv-month-bars {
    height: 48px;
  }

  .modal-content {
    margin-top: 20px;
  }

  /* Bottom Sheet safety */
  .ot-bottom-sheet {
    padding: 14px 16px 20px 16px;
  }

  /* Type selector wrap for narrow screens */
  .ot-type-selector {
    flex-wrap: wrap;
  }

  .ot-type-option {
    flex: 1 1 auto;
    min-width: 0;
  }

  .ot-type-label {
    font-size: var(--text-body-large);
    padding: 8px 6px;
  }

  /* Hourly bar adjustments */
  .ot-hourly-bar {
    padding: 8px 12px;
    font-size: var(--text-body-large);
    gap: 6px;
    flex-wrap: wrap;
  }

  /* Preview text */
  .ot-preview {
    font-size: var(--text-body-large);
  }

  .ot-preview .preview-row {
    font-size: var(--text-body-large);
  }

  /* Legend text */
  .ot-cal-legend {
    font-size: var(--text-body-large);
  }
}

/* ── Very small screens (iPhone SE, Galaxy S lite etc) ── */
@media (max-width: 380px) {
  .logo h1 {
    font-size: var(--text-body-large);
  }

  .nav-tab {
    font-size: var(--text-label-small);
    padding: 5px 2px 3px;
  }

  .main {
    padding: 10px 6px 72px 6px;
  }

  .card {
    padding: 14px 10px;
  }

  .ot-type-label {
    font-size: var(--text-body-normal);
    padding: 6px 4px;
  }

  .ot-bottom-sheet {
    padding: 12px 12px 16px 12px;
  }
}

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

  .chat-container {
    height: 400px;
  }
}

/* ============================================
   THEME: Neobrutalism — Bold, Raw, Playful
   Activated via data-theme="neo" on <html>
   ============================================ */

/* ── Neo: Calendar badge readability ── */
html[data-theme="neo"] .cal-badge {
  color: #1a1a1a !important;
}

html[data-theme="neo"] .ot-cal-legend span {
  color: #1a1a1a;
}

html[data-theme="neo"] .ot-cal-legend .cal-badge {
  color: #1a1a1a !important;
}

/* ── Neo: Bottom Tab Bar (all sizes — nav is always at bottom) ── */
html[data-theme="neo"] .nav-tabs {
  background: var(--accent-amber);
  border-top: 3px solid #1a1a1a;
  box-shadow: 0 -4px 0px #1a1a1a;
  gap: 6px;
}

html[data-theme="neo"] .nav-tab.active {
  background: #FFFFFF;
  border: 2px solid #1a1a1a;
  box-shadow: 2px 2px 0px #1a1a1a;
}

@media (max-width: 768px) {
  html[data-theme="neo"] .nav-tabs {
    padding: 8px 14px;
    padding-bottom: max(12px, calc(env(safe-area-inset-bottom) + 8px));
  }

  html[data-theme="neo"] .nav-tab {
    padding: 8px 6px 6px;
  }
}

/* ── Neo: Design Tokens ── */
html[data-theme="neo"] {
  --bg-primary: #FFFDF5;
  --bg-secondary: #FFF8E7;
  --bg-card: #FFFFFF;
  --bg-glass: #F5F0E1;
  --bg-glass-hover: #EDE7D3;
  --border-glass: #1a1a1a;
  --border-active: #1a1a1a;

  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-muted: #7a7a7a;
  --text-accent: #1a1a1a;

  --accent-indigo: #6C5CE7;
  --accent-blue: #74B9FF;
  --accent-cyan: #00CEC9;
  --accent-emerald: #00B894;
  --accent-amber: #FDCB6E;
  --accent-rose: #FD79A8;
  --accent-violet: #A29BFE;

  --gradient-primary: #6C5CE7;
  --gradient-success: #00B894;
  --gradient-warning: #FDCB6E;
  --gradient-info: #74B9FF;

  --shadow-sm: 2px 2px 0px #1a1a1a;
  --shadow-md: 4px 4px 0px #1a1a1a;
  --shadow-lg: 6px 6px 0px #1a1a1a;
  --shadow-glow: none;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

/* ── Neo: Typography ── */
html[data-theme="neo"] body {
  font-family: 'Space Grotesk', 'Noto Sans KR', -apple-system, sans-serif;
}

/* ── Neo: Header ── */
html[data-theme="neo"] .header {
  background: var(--accent-amber);
  border-bottom: 3px solid #1a1a1a;
  padding: 2px 16px;
}

html[data-theme="neo"] .logo-icon {
  background: #FFFFFF;
  border: 3px solid #1a1a1a;
  box-shadow: 2px 2px 0px #1a1a1a;
}


/* ── Neo: Nav Tabs ── */
html[data-theme="neo"] .nav-tab {
  font-weight: 600;
  border: 2px solid transparent;
}

html[data-theme="neo"] .nav-tab:hover {
  border-color: #1a1a1a;
}

html[data-theme="neo"] .nav-tab.active {
  background: #FFFFFF;
  border: 3px solid #1a1a1a;
  box-shadow: 2px 2px 0px #1a1a1a;
}

/* ── Neo: Cards ── */
html[data-theme="neo"] .card {
  border: 3px solid #1a1a1a;
  box-shadow: 4px 4px 0px #1a1a1a;
}

html[data-theme="neo"] .card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px #1a1a1a;
}

html[data-theme="neo"] .card-title .icon {
  border: 2px solid #1a1a1a;
}

html[data-theme="neo"] .card-title .icon.indigo { background: var(--accent-violet); }
html[data-theme="neo"] .card-title .icon.emerald { background: var(--accent-emerald); }
html[data-theme="neo"] .card-title .icon.amber { background: var(--accent-amber); }
html[data-theme="neo"] .card-title .icon.cyan { background: var(--accent-cyan); }
html[data-theme="neo"] .card-title .icon.rose { background: var(--accent-rose); }
html[data-theme="neo"] .card-title .icon.violet { background: var(--accent-violet); }
html[data-theme="neo"] .card-title .icon.blue { background: var(--accent-blue); }

/* ── Neo: Sub-tabs ── */
html[data-theme="neo"] .sub-tabs {
  gap: 6px;
  border-bottom: none;
}

html[data-theme="neo"] .sub-tab {
  border: 2px solid #1a1a1a;
  background: var(--bg-card);
  font-weight: 600;
  border-bottom-color: #1a1a1a;
}

html[data-theme="neo"] .sub-tab:hover {
  transform: translate(-1px, -1px);
  box-shadow: 2px 2px 0px #1a1a1a;
}

html[data-theme="neo"] .sub-tab.active {
  background: var(--accent-violet);
  color: #FFFFFF;
  box-shadow: 2px 2px 0px #1a1a1a;
}

/* ── Neo: Buttons ── */
html[data-theme="neo"] .btn {
  border: 3px solid #1a1a1a;
  font-weight: 700;
  box-shadow: 2px 2px 0px #1a1a1a;
}

html[data-theme="neo"] .btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0px #1a1a1a;
}

html[data-theme="neo"] .btn:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

/* ── Neo: Form Elements ── */
html[data-theme="neo"] .form-group label {
  font-weight: 600;
  color: var(--text-primary);
}

html[data-theme="neo"] .form-group select,
html[data-theme="neo"] .form-group input {
  border: 2px solid #1a1a1a;
  background: var(--bg-card);
}

html[data-theme="neo"] .form-group select:focus,
html[data-theme="neo"] .form-group input:focus {
  box-shadow: 3px 3px 0px var(--accent-indigo);
}

/* ── Neo: QA Cards ── */
html[data-theme="neo"] .qa-card {
  border: 3px solid #1a1a1a;
  box-shadow: 2px 2px 0px #1a1a1a;
}

html[data-theme="neo"] .qa-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px #1a1a1a;
}

html[data-theme="neo"] .qa-card-result {
  background: var(--accent-amber);
  border: 2px solid #1a1a1a;
}

/* ── Neo: Result Display ── */
html[data-theme="neo"] .result-box {
  background: var(--accent-blue);
  border: 3px solid #1a1a1a;
  box-shadow: 4px 4px 0px #1a1a1a;
}

html[data-theme="neo"] .result-box.success {
  background: var(--accent-emerald);
}

/* ── Neo: Tables ── */
html[data-theme="neo"] .data-table {
  border: 2px solid #1a1a1a;
}

html[data-theme="neo"] .data-table th {
  font-weight: 700;
  border-bottom: 2px solid #1a1a1a;
  background: var(--accent-amber);
  color: #1a1a1a;
}

/* ── Neo: Stat Cards ── */
html[data-theme="neo"] .stat-card {
  border: 3px solid #1a1a1a;
  box-shadow: 2px 2px 0px #1a1a1a;
}

html[data-theme="neo"] .stat-card:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0px #1a1a1a;
}

/* ── Neo: Badges ── */
html[data-theme="neo"] .badge {
  border: 2px solid #1a1a1a;
  border-radius: var(--radius-sm);
  font-weight: 700;
}

html[data-theme="neo"] .badge.indigo { background: var(--accent-violet); color: white; }
html[data-theme="neo"] .badge.emerald { background: var(--accent-emerald); color: white; }
html[data-theme="neo"] .badge.amber { background: var(--accent-amber); color: #1a1a1a; }
html[data-theme="neo"] .badge.rose { background: var(--accent-rose); color: white; }

/* ── Neo: Warning Box ── */
html[data-theme="neo"] .warning-box,
html[data-theme="neo"] .qa-profile-warning {
  background: var(--accent-amber);
  border: 2px solid #1a1a1a;
  color: #1a1a1a;
  font-weight: 600;
}

/* ── Neo: Chatbot ── */
html[data-theme="neo"] .chat-msg.bot {
  border: 2px solid #1a1a1a;
  box-shadow: 2px 2px 0px #1a1a1a;
}

html[data-theme="neo"] .chat-msg.user {
  border: 2px solid #1a1a1a;
  box-shadow: 2px 2px 0px #1a1a1a;
}

html[data-theme="neo"] .chat-input {
  border: 2px solid #1a1a1a;
  border-radius: var(--radius-sm);
}

html[data-theme="neo"] .chat-input:focus {
  box-shadow: 3px 3px 0px var(--accent-indigo);
}

html[data-theme="neo"] .chat-send {
  border: 2px solid #1a1a1a;
  border-radius: var(--radius-sm);
  box-shadow: 2px 2px 0px #1a1a1a;
}

html[data-theme="neo"] .chat-input-row {
  border-top: 2px solid #1a1a1a;
}

html[data-theme="neo"] .quick-tag {
  border: 2px solid #1a1a1a;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

html[data-theme="neo"] .quick-tag:hover {
  background: var(--accent-violet);
  color: white;
}

/* ── Neo: Collapsibles ── */
html[data-theme="neo"] .collapsible-header {
  border: 2px solid #1a1a1a;
  font-weight: 600;
  box-shadow: 2px 2px 0px #1a1a1a;
}

html[data-theme="neo"] .collapsible-header:hover {
  background: var(--accent-violet);
  color: white;
}

html[data-theme="neo"] .collapsible-body {
  border: 2px solid #1a1a1a;
  border-top: none;
  background: var(--bg-card);
}

/* ── Neo: Mini Calendar ── */
html[data-theme="neo"] .mini-cal {
  border: 3px solid #1a1a1a;
  box-shadow: 4px 4px 0px #1a1a1a;
  background: var(--bg-card);
}

html[data-theme="neo"] .mini-cal-header {
  background: var(--accent-rose);
  color: white;
  font-weight: 700;
  border-bottom: 3px solid #1a1a1a;
}

html[data-theme="neo"] .mini-cal-day.today {
  background: var(--accent-emerald);
  color: white;
  border: 2px solid #1a1a1a;
}

/* ── Neo: OT Calendar ── */
html[data-theme="neo"] .ot-cal {
  border: 3px solid #1a1a1a;
  box-shadow: 4px 4px 0px #1a1a1a;
  background: var(--bg-card);
}

html[data-theme="neo"] .ot-cal-header {
  background: var(--accent-amber);
  color: #1a1a1a;
  font-weight: 700;
  border-bottom: 3px solid #1a1a1a;
}

html[data-theme="neo"] .cal-nav-btn {
  border: 2px solid #1a1a1a;
  font-weight: 600;
  background: var(--bg-card);
}

html[data-theme="neo"] .cal-nav-btn:hover {
  background: #1a1a1a;
  color: white;
}

html[data-theme="neo"] .ot-cal-day.today {
  background: var(--accent-emerald);
  color: white;
  border: 2px solid #1a1a1a;
}

html[data-theme="neo"] .ot-cal-day.selected {
  background: var(--accent-indigo) !important;
  color: white !important;
  border: 2px solid #1a1a1a;
}

/* ── Neo: OT Dashboard ── */
html[data-theme="neo"] .ot-dashboard {
  background: var(--accent-emerald);
  border: 3px solid #1a1a1a;
  box-shadow: 4px 4px 0px #1a1a1a;
}

html[data-theme="neo"] .ot-dash-main .ot-dash-pay {
  color: #1a1a1a;
}

html[data-theme="neo"] .ot-dash-main .ot-dash-label {
  color: #1a1a1a;
  font-weight: 600;
}

html[data-theme="neo"] .ot-dash-item {
  border: 2px solid #1a1a1a;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

/* ── Neo: OT Quick Buttons ── */
html[data-theme="neo"] .ot-quick-btn {
  border: 3px solid #1a1a1a;
  box-shadow: 2px 2px 0px #1a1a1a;
}

html[data-theme="neo"] .ot-quick-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0px #1a1a1a;
}

html[data-theme="neo"] .ot-quick-btn:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

/* ── Neo: Bottom Sheet ── */
html[data-theme="neo"] .ot-bottom-sheet-overlay {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html[data-theme="neo"] .ot-bottom-sheet {
  border: 3px solid #1a1a1a;
  border-bottom: none;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 0px #1a1a1a;
}

html[data-theme="neo"] .ot-sheet-handle {
  background: var(--text-muted);
}

/* ── Neo: Type Selector ── */
html[data-theme="neo"] .ot-type-label {
  border: 2px solid #1a1a1a;
  font-weight: 700;
}

html[data-theme="neo"] .ot-type-option input[type="radio"]:checked+.ot-type-label {
  color: white;
  background: var(--type-color, var(--accent-indigo));
  box-shadow: 2px 2px 0px #1a1a1a;
}

/* ── Neo: Time Inputs ── */
html[data-theme="neo"] .time-picker-premium,
html[data-theme="neo"] .premium-input {
  border: 2px solid #1a1a1a;
  background: var(--bg-card);
}

html[data-theme="neo"] .time-picker-premium:focus {
  box-shadow: 3px 3px 0px var(--accent-indigo);
}

html[data-theme="neo"] .premium-input:focus {
  box-shadow: 3px 3px 0px var(--accent-emerald);
}

/* ── Neo: Preset Buttons ── */
html[data-theme="neo"] .ot-preset-btn {
  border: 2px solid #1a1a1a;
  font-weight: 700;
}

html[data-theme="neo"] .ot-preset-btn.active {
  background: var(--accent-amber);
  color: #1a1a1a;
}

html[data-theme="neo"] .ot-preset-btn.custom.active {
  background: var(--accent-indigo);
  color: white;
}

/* ── Neo: Preview ── */
html[data-theme="neo"] .ot-preview {
  background: var(--accent-emerald);
  border: 2px solid #1a1a1a;
  color: #1a1a1a;
  --accent-rose: #8B0000; /* 초록 배경 위에서 파스텔 핑크 안 보임 → 진한 빨강으로 재정의 */
  --text-muted: #1a1a1a99;
}

/* ── Neo: Record Items ── */
html[data-theme="neo"] .ot-record-item {
  border: 2px solid #1a1a1a;
  box-shadow: 2px 2px 0px #1a1a1a;
}

html[data-theme="neo"] .ot-record-item:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0px #1a1a1a;
}

html[data-theme="neo"] .ot-record-type {
  border: 1px solid #1a1a1a;
  border-radius: var(--radius-sm);
  font-weight: 700;
}

html[data-theme="neo"] .ot-record-type.overtime { background: var(--accent-amber); color: #1a1a1a; }
html[data-theme="neo"] .ot-record-type.oncall_standby { background: var(--accent-cyan); color: #1a1a1a; }
html[data-theme="neo"] .ot-record-type.oncall_callout { background: var(--accent-indigo); color: white; }

html[data-theme="neo"] .ot-record-summary {
  background: var(--accent-emerald);
  border: 2px solid #1a1a1a;
  color: #1a1a1a;
}

/* ── Neo: Toast ── */
html[data-theme="neo"] .ot-toast {
  background: var(--accent-emerald);
  color: #1a1a1a;
  border: 3px solid #1a1a1a;
  border-radius: var(--radius-sm);
  box-shadow: 4px 4px 0px #1a1a1a;
  font-weight: 700;
}

/* ── Neo: Callout Modal ── */
html[data-theme="neo"] .ot-callout-inner {
  border: 3px solid #1a1a1a;
  box-shadow: 4px 4px 0px #1a1a1a;
}

/* ── Neo: Modal ── */
html[data-theme="neo"] .modal-content {
  border: 3px solid #1a1a1a;
  box-shadow: 6px 6px 0px #1a1a1a;
}

/* ── Neo: Hourly Bar ── */
html[data-theme="neo"] .ot-hourly-bar {
  background: var(--accent-emerald);
  border: 2px solid #1a1a1a;
  color: #1a1a1a;
  font-weight: 600;
}

/* ── Neo: Leave Dashboard ── */
html[data-theme="neo"] .lv-dash-item {
  border: 2px solid #1a1a1a;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

html[data-theme="neo"] .lv-dash-item:hover {
  transform: translate(-1px, -1px);
  box-shadow: 2px 2px 0px #1a1a1a;
}

/* ── Neo: Leave Progress ── */
html[data-theme="neo"] .lv-progress-bar {
  border: 2px solid #1a1a1a;
  height: 10px;
}

html[data-theme="neo"] .lv-progress-fill {
  border-radius: 0;
}

/* ── Neo: Leave Records ── */
html[data-theme="neo"] .lv-record-item {
  border: 2px solid #1a1a1a;
  box-shadow: 2px 2px 0px #1a1a1a;
}

html[data-theme="neo"] .lv-record-item:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0px #1a1a1a;
}

html[data-theme="neo"] .lv-record-type {
  border: 1px solid #1a1a1a;
  border-radius: var(--radius-sm);
  font-weight: 700;
}

html[data-theme="neo"] .lv-record-type.paid { background: var(--accent-emerald); color: white; }
html[data-theme="neo"] .lv-record-type.unpaid { background: var(--accent-rose); color: white; }

/* ── Neo: Leave Stats ── */
html[data-theme="neo"] .lv-stat-card {
  border: 2px solid #1a1a1a;
  box-shadow: 2px 2px 0px #1a1a1a;
}

html[data-theme="neo"] .lv-month-bar-fill {
  border-radius: 0;
  border: 1px solid #1a1a1a;
}

/* ── Neo: Input Panel ── */
html[data-theme="neo"] .ot-input-panel,
html[data-theme="neo"] .lv-input-panel {
  border: 2px solid #1a1a1a;
}

/* ── Neo: Quick Date Badge ── */
html[data-theme="neo"] .ot-quick-date {
  background: var(--accent-emerald);
  color: #1a1a1a;
  border: 1px solid #1a1a1a;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

/* ── Neo: Theme Toggle (styling) ── */
html[data-theme="neo"] .theme-toggle-btn {
  background: var(--bg-card);
  border: 2px solid #1a1a1a;
  box-shadow: 2px 2px 0px #1a1a1a;
}

html[data-theme="neo"] .theme-toggle-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px #1a1a1a;
}