/* ===== Innovance Attendance — v2 UI ===== */
:root {
  --brand: #185FA5;
  --brand-2: #2E9BD6;
  --brand-grad: linear-gradient(135deg, #185FA5 0%, #2E9BD6 100%);
  --bg: #EEF1F6;
  --card: #FFFFFF;
  --ink: #1A2333;
  --ink-2: #5A6472;
  --ink-3: #8B93A1;
  --line: rgba(26, 35, 51, 0.09);
  --ok: #0F8A66;
  --ok-bg: #E3F6EF;
  --warn: #B4700F;
  --warn-bg: #FCF1DC;
  --danger: #C13A3A;
  --danger-bg: #FCEBEB;
  --in-bg: #C3DCF7;
  --in-ink: #0A3D6E;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 6px 20px -6px rgba(16, 24, 40, 0.14);
  --shadow-lg: 0 20px 50px -16px rgba(16, 24, 40, 0.24);
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

html, body {
  margin: 0; padding: 0;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; }

/* ===================== 로그인 ===================== */
.login-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background:
    radial-gradient(1100px 600px at 85% -10%, rgba(46, 155, 214, 0.35), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(24, 95, 165, 0.30), transparent 55%),
    linear-gradient(160deg, #0E3B68 0%, #185FA5 55%, #2E9BD6 100%);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.login-shell { display: flex; align-items: stretch; gap: 0; width: 100%; max-width: 860px; }
.brand-side {
  display: none;
  flex: 1; color: #fff; padding: 48px 44px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14); border-right: none;
  border-radius: var(--r-lg) 0 0 var(--r-lg);
  backdrop-filter: blur(8px);
}
.brand-mark {
  width: 52px; height: 52px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; margin-bottom: 22px;
}
.brand-side h2 { font-size: 30px; line-height: 1.25; margin: 0 0 10px; font-weight: 700; letter-spacing: -0.5px; }
.brand-side p { margin: 0 0 30px; opacity: 0.85; font-size: 14px; line-height: 1.6; }
.brand-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.brand-points li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; opacity: 0.92; }
.brand-points i { font-size: 17px; opacity: 0.9; }

.login-card {
  background: var(--card); padding: 36px 30px 30px; width: 100%; max-width: 400px;
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  animation: rise 0.35s ease; margin: 0 auto;
}
.login-logo {
  width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 16px;
  background: var(--brand-grad); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 28px;
  box-shadow: 0 8px 20px -6px rgba(24, 95, 165, 0.5);
}
.login-title { font-size: 21px; font-weight: 700; margin: 0 0 4px; text-align: center; letter-spacing: -0.3px; }
.login-subtitle { font-size: 13px; color: var(--ink-3); text-align: center; margin: 0 0 24px; }
.login-field { margin-bottom: 13px; }
.login-field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.login-field input {
  width: 100%; height: 46px; padding: 0 14px;
  border: 1.5px solid var(--line); border-radius: var(--r-sm);
  font-size: 15px; font-family: inherit; background: #FAFBFC; color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.login-field input:focus {
  outline: none; border-color: var(--brand); background: #fff;
  box-shadow: 0 0 0 3px rgba(24, 95, 165, 0.12);
}
.login-btn {
  width: 100%; height: 48px; background: var(--brand-grad); color: #fff;
  border: none; border-radius: var(--r-sm); font-size: 15px; font-weight: 600;
  cursor: pointer; margin-top: 8px; letter-spacing: -0.2px;
  box-shadow: 0 6px 16px -5px rgba(24, 95, 165, 0.55);
  transition: transform 0.1s, filter 0.15s;
}
.login-btn:hover { filter: brightness(1.06); }
.login-btn:active { transform: scale(0.985); }
.login-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.login-error { font-size: 12.5px; color: var(--danger); margin: 10px 0 0; min-height: 17px; text-align: center; line-height: 1.5; }
.login-links { display: flex; justify-content: space-between; margin-top: 14px; }
.login-link { font-size: 12.5px; color: var(--brand); background: none; border: none; cursor: pointer; padding: 4px; font-weight: 500; }
.login-link:hover { text-decoration: underline; }
.login-link.center { display: block; margin: 12px auto 0; }

@media (min-width: 820px) {
  .brand-side { display: block; }
  .login-shell .login-card { border-radius: 0 var(--r-lg) var(--r-lg) 0; max-width: 420px; margin: 0; }
  .login-shell #form-signup, .login-shell #form-changepw { border-radius: 0 var(--r-lg) var(--r-lg) 0; }
}

/* ===================== 앱 셸 ===================== */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

.app-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.86); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.header-logo {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: var(--brand-grad); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.header-title { font-weight: 700; font-size: 15.5px; letter-spacing: -0.3px; white-space: nowrap; }
.header-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
#sync-status { display: inline-flex; align-items: center; }
.user-pill { display: flex; align-items: center; gap: 8px; min-width: 0; }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: var(--brand-grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}
.user-meta { min-width: 0; }
.user-name { font-weight: 600; font-size: 13.5px; line-height: 1.2; white-space: nowrap; }
.user-sub { font-size: 11px; color: var(--ink-3); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.logout-btn {
  font-size: 12px; background: none; border: 1px solid var(--line); color: var(--ink-2);
  padding: 7px 11px; border-radius: 9px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
}
.logout-btn:hover { background: var(--bg); color: var(--ink); }

/* 설치 배너 */
.install-bar {
  display: flex; align-items: center; gap: 10px;
  margin: 10px 16px 0; padding: 10px 14px;
  background: linear-gradient(135deg, rgba(24,95,165,0.09), rgba(46,155,214,0.10));
  border: 1px solid rgba(24, 95, 165, 0.22); border-radius: var(--r-md);
  color: var(--brand); font-size: 13px;
}
.install-bar > i { font-size: 20px; flex: none; }
.install-text { flex: 1; min-width: 0; font-weight: 500; color: var(--ink-2); }
.install-btn {
  flex: none; background: var(--brand-grad); color: #fff; border: none;
  padding: 8px 14px; border-radius: 9px; font-size: 12.5px; font-weight: 600; cursor: pointer;
  box-shadow: 0 4px 10px -3px rgba(24, 95, 165, 0.5);
}
.install-close { flex: none; background: none; border: none; color: var(--ink-3); cursor: pointer; font-size: 15px; padding: 4px; }

/* 모드 탭 — 모바일: 하단 고정 앱바 / PC: 상단 세그먼트 */
.mode-tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  gap: 4px;
}
.mode-tab {
  height: 52px; border: none; border-radius: 12px; background: transparent;
  font-size: 11px; font-weight: 600; cursor: pointer; color: var(--ink-3);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  transition: color 0.15s, background 0.15s;
}
.mode-tab i { font-size: 20px; }
.mode-tab.active { color: var(--brand); background: rgba(24, 95, 165, 0.10); }

.app-body { flex: 1; padding: 14px 16px calc(84px + env(safe-area-inset-bottom)); }
.layout-grid { display: flex; flex-direction: column; gap: 14px; max-width: 480px; margin: 0 auto; }

.panel {
  background: var(--card); border-radius: var(--r-lg);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  padding: 18px 16px;
  animation: rise 0.3s ease;
}

@media (min-width: 900px) {
  .mode-tabs {
    position: static; grid-template-columns: repeat(4, minmax(110px, 1fr));
    max-width: 560px; margin: 14px auto 0; border: 1px solid var(--line);
    border-radius: 14px; padding: 5px; background: var(--card); box-shadow: var(--shadow-sm);
  }
  .mode-tab { height: 42px; flex-direction: row; gap: 7px; font-size: 13.5px; border-radius: 10px; }
  .mode-tab i { font-size: 17px; }
  .app-body { padding: 20px 24px 40px; }
  .layout-grid {
    display: grid; grid-template-columns: minmax(380px, 460px) minmax(360px, 430px);
    justify-content: center; align-items: start; gap: 20px; max-width: 960px;
  }
  .panel { padding: 22px 22px; }
}

/* ===================== 달력 ===================== */
.cal-section { margin-bottom: 4px; }
.cal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.cal-month { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 10px; letter-spacing: -0.3px; }
.cal-nav-btn {
  width: 30px; height: 30px; border: 1px solid var(--line); background: var(--card);
  border-radius: 9px; cursor: pointer; color: var(--ink-2);
  display: flex; align-items: center; justify-content: center; padding: 0; font-size: 15px;
}
.cal-nav-btn:hover { background: var(--bg); }
.cal-clear { font-size: 12px; color: var(--ink-2); background: none; border: none; cursor: pointer; padding: 5px 8px; border-radius: 7px; }
.cal-clear:hover { background: var(--bg); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; user-select: none; -webkit-user-select: none; }
.cal-head-row { margin-bottom: 3px; }
.cal-head { font-size: 11px; font-weight: 600; color: var(--ink-3); text-align: center; padding: 3px 0; }
.cal-head.sun { color: var(--danger); }
.cal-head.sat { color: var(--brand); }
.cal-day {
  aspect-ratio: 1; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13.5px; font-weight: 500; cursor: pointer;
  transition: background 0.08s, transform 0.08s; position: relative; touch-action: none;
}
.cal-day:active { transform: scale(0.94); }
.cal-rest { background: #F1F3F7; color: var(--ink-3); }
.cal-in { background: var(--in-bg); color: var(--in-ink); font-weight: 600; }
.cal-out { background: var(--ok-bg); color: var(--ok); font-weight: 600; }
.cal-day.selected { box-shadow: inset 0 0 0 2.5px var(--brand); font-weight: 700; }
.cal-day.disabled { opacity: 0.32; cursor: not-allowed; }
.cal-day.sun:not(.cal-in):not(.cal-out) { color: #C97070; }
.cal-day.sat:not(.cal-in):not(.cal-out) { color: #6E9BD0; }
.cal-today::after {
  content: ''; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: var(--brand);
}
.legend { display: flex; gap: 12px; margin-top: 12px; font-size: 10.5px; color: var(--ink-3); flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 4px; }
.legend-sq { width: 11px; height: 11px; border-radius: 3.5px; display: inline-block; }
.sq-rest { background: #F1F3F7; border: 1px solid var(--line); }
.sq-in { background: var(--in-bg); }
.sq-out { background: var(--ok-bg); border: 1px solid rgba(15,138,102,0.3); }
.legend-sel { box-shadow: inset 0 0 0 2px var(--brand); background: #fff; }
.legend-today { background: #fff; border: 1px solid var(--line); position: relative; }
.legend-today::after { content: ''; position: absolute; bottom: 1.5px; left: 50%; transform: translateX(-50%); width: 3px; height: 3px; border-radius: 50%; background: var(--brand); }
.hint { font-size: 11px; color: var(--ink-3); margin-top: 8px; display: flex; align-items: center; gap: 4px; }

.selected-row {
  background: rgba(24, 95, 165, 0.08); color: var(--brand);
  padding: 12px 14px; border-radius: var(--r-md); font-size: 13.5px;
  margin-top: 14px; display: flex; align-items: center; gap: 9px; min-height: 44px;
  border: 1px solid rgba(24, 95, 165, 0.14);
}
.selected-row.empty { background: #F1F3F7; color: var(--ink-3); border-color: var(--line); }

/* ===================== 폼 ===================== */
.sub-toggle {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 14px;
  padding: 5px; background: #F1F3F7; border-radius: 12px;
}
.sub-btn {
  height: 38px; border: none; border-radius: 9px; background: transparent;
  font-size: 13px; font-weight: 500; cursor: pointer; color: var(--ink-2);
  display: flex; align-items: center; justify-content: center; gap: 5px;
}
.sub-btn.active { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm); }

.field-group { margin-bottom: 15px; }
.field-label {
  font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px;
  display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap;
}
.add-link { font-size: 12px; color: var(--brand); background: none; border: none; cursor: pointer; padding: 3px 5px; font-weight: 500; display: inline-flex; align-items: center; gap: 2px; }
.add-link:hover { text-decoration: underline; }

.geo-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10.5px; font-weight: 600; padding: 3px 8px; border-radius: 999px;
  background: #F1F3F7; color: var(--ink-2); margin-left: 6px; vertical-align: 1px;
}
.geo-badge.geo-ok { background: var(--ok-bg); color: var(--ok); }
.geo-badge.geo-warn { background: var(--warn-bg); color: var(--warn); }

select, input[type="text"] {
  width: 100%; height: 44px; padding: 0 12px;
  border: 1.5px solid var(--line); border-radius: var(--r-sm);
  background: #FAFBFC; font-size: 14.5px; color: var(--ink); font-family: inherit;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235A6472' stroke-width='2.4'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
select:focus, input[type="text"]:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(24,95,165,0.12); background-color: #fff; }
input[type="text"] { background-image: none; padding-right: 12px; }

.add-pjt-form { margin-top: 9px; padding: 12px; background: #F5F7FA; border-radius: var(--r-md); border: 1px dashed var(--line); }
.add-pjt-form input { margin-bottom: 8px; height: 40px; font-size: 13.5px; }
.add-pjt-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.add-pjt-actions button { height: 38px; border: none; border-radius: 9px; font-size: 13px; font-weight: 600; cursor: pointer; }
.btn-save { background: var(--ink); color: #fff; }
.btn-cancel { background: var(--card); color: var(--ink-2); border: 1px solid var(--line) !important; }

.roll-picker {
  display: flex; align-items: center; gap: 6px; height: 50px;
  border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 0 8px; background: #FAFBFC;
}
.roll-btn { width: 38px; height: 38px; border-radius: 9px; border: none; background: transparent; cursor: pointer; color: var(--ink-2); display: flex; align-items: center; justify-content: center; font-size: 17px; }
.roll-btn:hover { background: #EDF0F5; }
.roll-btn:active { background: #E2E7EE; }
.roll-val { flex: 1; text-align: center; font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 0.5px; }

.edit-hint {
  background: var(--warn-bg); color: var(--warn);
  padding: 10px 13px; border-radius: var(--r-md); font-size: 12px; line-height: 1.5;
  margin-bottom: 12px; display: flex; gap: 8px; align-items: flex-start;
}
.edit-hint i { font-size: 15px; margin-top: 1px; flex: none; }
.edit-hint.warn { background: var(--danger-bg); color: var(--danger); }

.btn-row { display: grid; grid-template-columns: 1fr auto; gap: 9px; margin-top: 4px; }
.submit-btn {
  height: 52px; border: none; border-radius: var(--r-md);
  font-size: 15px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 7px; color: #fff;
  letter-spacing: -0.2px; transition: transform 0.1s, filter 0.15s;
}
.submit-btn:hover:not(:disabled) { filter: brightness(1.07); }
.submit-btn:active:not(:disabled) { transform: scale(0.985); }
.submit-btn.mode-in { background: var(--brand-grad); box-shadow: 0 8px 18px -6px rgba(24,95,165,0.5); }
.submit-btn.mode-out { background: linear-gradient(135deg, #0F8A66, #16A97F); box-shadow: 0 8px 18px -6px rgba(15,138,102,0.5); }
.submit-btn.mode-edit { background: linear-gradient(135deg, #B4700F, #D28A1E); box-shadow: 0 8px 18px -6px rgba(180,112,15,0.5); }
.submit-btn:disabled { opacity: 1; cursor: not-allowed; background: #C7CDD6; box-shadow: none; color: #fff; }
.undo-btn {
  height: 52px; padding: 0 15px; background: var(--card); color: var(--ink-2);
  border: 1.5px solid var(--line); border-radius: var(--r-md); font-size: 13px; font-weight: 500; cursor: pointer;
}
.undo-btn:hover:not(:disabled) { background: var(--bg); }
.undo-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.footer-tools { margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 7px; }
.footer-btn {
  font-size: 12px; font-weight: 500; color: var(--ink-2); background: none;
  border: 1px solid var(--line); padding: 8px 12px; border-radius: 9px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
}
.footer-btn:hover { background: var(--bg); color: var(--ink); }
.footer-btn.accent-blue { color: var(--brand); border-color: rgba(24,95,165,0.4); }
.footer-btn.accent-blue:hover { background: rgba(24,95,165,0.07); }
.footer-btn.accent-green { color: var(--ok); border-color: rgba(15,138,102,0.4); }
.footer-btn.accent-green:hover { background: var(--ok-bg); }
.footer-btn.danger:hover { background: var(--danger-bg); color: var(--danger); border-color: rgba(193,58,58,0.4); }

/* ===================== 월간 뷰 ===================== */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 15px; }
.stat-card { background: #F5F7FA; padding: 13px 8px; border-radius: var(--r-md); text-align: center; }
.stat-card.stat-work { background: var(--ok-bg); }
.stat-card.stat-partial { background: var(--warn-bg); }
.stat-card.stat-hours { background: rgba(24,95,165,0.10); }
.stat-label { font-size: 10.5px; font-weight: 600; color: var(--ink-3); margin-bottom: 4px; }
.stat-card.stat-work .stat-label { color: var(--ok); }
.stat-card.stat-partial .stat-label { color: var(--warn); }
.stat-card.stat-hours .stat-label { color: var(--brand); }
.stat-value { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-card.stat-work .stat-value { color: var(--ok); }
.stat-card.stat-partial .stat-value { color: var(--warn); }
.stat-card.stat-hours .stat-value { color: var(--brand); }

.day-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 15px; max-height: 420px; overflow-y: auto; }
.day-list-empty { font-size: 13px; color: var(--ink-3); text-align: center; padding: 30px 0; }
.day-item { padding: 10px 13px; border-radius: var(--r-sm); font-size: 12.5px; }
.day-item-work { background: var(--ok-bg); }
.day-item-partial { background: var(--warn-bg); }
.day-line-1 { display: flex; justify-content: space-between; align-items: center; }
.day-date { font-weight: 600; }
.day-time { font-variant-numeric: tabular-nums; font-size: 12.5px; }
.day-item-partial .day-time { color: var(--warn); }
.day-meta { color: var(--ink-3); font-size: 10.5px; margin-top: 3px; }
.day-warn { color: var(--danger); font-size: 10.5px; font-weight: 600; margin-left: 4px; }

.export-month-btn {
  width: 100%; height: 42px; background: var(--card); color: var(--brand);
  border: 1.5px solid rgba(24,95,165,0.45); border-radius: var(--r-sm); font-size: 13.5px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.export-month-btn:hover { background: rgba(24,95,165,0.06); }

/* ===================== 모달 ===================== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(15, 23, 42, 0.55); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal-card {
  background: var(--card); border-radius: var(--r-lg); padding: 26px 24px;
  max-width: 360px; width: 100%; box-shadow: var(--shadow-lg); animation: rise 0.25s ease;
}
.modal-card h3 { margin: 0 0 14px; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.modal-card ol { margin: 0 0 18px; padding-left: 20px; font-size: 14px; line-height: 2; color: var(--ink-2); }
.modal-card b { color: var(--ink); }

/* ===================== 다크모드 ===================== */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101722;
    --card: #1A2332;
    --ink: #EDF1F7;
    --ink-2: #A8B2C1;
    --ink-3: #6E7887;
    --line: rgba(237, 241, 247, 0.10);
    --ok-bg: rgba(22, 169, 127, 0.16);
    --warn-bg: rgba(210, 138, 30, 0.16);
    --danger-bg: rgba(226, 88, 88, 0.14);
    --in-bg: rgba(46, 155, 214, 0.28);
    --in-ink: #A8D4F5;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 6px 20px -6px rgba(0,0,0,0.5);
    --shadow-lg: 0 20px 50px -16px rgba(0,0,0,0.6);
  }
  .app-header { background: rgba(16, 23, 34, 0.85); }
  .mode-tabs { background: rgba(16, 23, 34, 0.92); }
  @media (min-width: 900px) { .mode-tabs { background: var(--card); } }
  .cal-rest { background: #212B3C; color: var(--ink-3); }
  .sq-rest { background: #212B3C; }
  .cal-out { color: #4BC79E; }
  .stat-card { background: #212B3C; }
  .sub-toggle { background: #131B28; }
  .add-pjt-form { background: #151E2C; }
  .login-field input, select, input[type="text"] { background: #131B28; color: var(--ink); }
  select:focus, input[type="text"]:focus, .login-field input:focus { background-color: #131B28; }
  .roll-picker { background: #131B28; }
  .roll-btn:hover { background: #1F2938; }
  .selected-row.empty { background: #212B3C; }
  .legend-sel, .legend-today { background: var(--card); }
  .day-item-work { background: rgba(22,169,127,0.14); }
  .day-item-partial { background: rgba(210,138,30,0.14); }
  .geo-badge { background: #212B3C; }
  .install-bar { background: rgba(46,155,214,0.10); }
}
