:root {
  --bg: #F4F6F9;
  --surface: #FFFFFF;
  --text: #1E293B;
  --text-muted: #64748B;
  --text-subtle: #94A3B8;
  --border: #E2E8F0;
  --border-focus: #3B82F6;
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #EFF6FF;
  --green: #10B981;
  --green-dark: #059669;
  --red: #EF4444;
  --red-dark: #DC2626;
  --shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.15), 0 8px 10px -6px rgba(15, 23, 42, 0.1);
  --font-stack: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard Variable", Pretendard, "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-stack);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}

.hidden { display: none !important; }

.screen {
  width: 98%;
  max-width: 600px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 24px 0;
  display: flex;
  flex-direction: column;
}

/* ---- Login Screen ---- */
#lock {
  justify-content: center;
  align-items: stretch;
}

.lock-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 32px 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  text-align: center;
}

.logo-icon {
  font-size: 40px;
  margin-bottom: 8px;
}

.app-title {
  font-size: 22px;
  font-weight: 750;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.app-sub {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 24px;
}

.unit-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.input-wrap {
  position: relative;
  flex: 1;
}

.input-wrap.full {
  width: 100%;
  margin-bottom: 14px;
}

.input-wrap input {
  width: 100%;
  font-size: 16px;
  padding: 14px 38px 14px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #F8FAFC;
  transition: border-color 160ms ease, background 160ms ease;
  outline: none;
}

.input-wrap.full input {
  padding-right: 14px;
}

.input-wrap input:focus {
  border-color: var(--primary);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.unit-label {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  pointer-events: none;
}

.check-wrap {
  margin: 12px 0 20px;
  text-align: left;
}

.check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.check-label input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.check-text {
  font-size: 13px;
  color: var(--text);
}

.check-text strong {
  color: var(--primary);
}

.guide-text {
  margin: 18px 0 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  text-align: left;
  background: #F8FAFC;
  padding: 10px 12px;
  border-radius: 8px;
}

.error-text {
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
  min-height: 20px;
  margin: 12px 0 0;
}

/* ──── 최상단 통합 프리미엄 헤더 바 ──── */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 12px 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

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

.brand-icon-box {
  width: 38px;
  height: 38px;
  background: #EFF6FF;
  border: 1px solid #DBEAFE;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.brand-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.app-title-sm {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  padding: 6px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 750;
  color: #1E293B;
  white-space: nowrap;
}

.user-icon {
  font-size: 12px;
}

.logout-btn {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  color: #64748B;
  font-size: 11px;
  font-weight: 650;
  padding: 6px 9px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 140ms ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.logout-btn:hover, .logout-btn:active {
  background: #FEF2F2;
  border-color: #FECACA;
  color: var(--red);
}

/* ──── 상단 탭 네비게이션 ──── */
.tab-nav {
  display: flex;
  background: #E2E8F0;
  padding: 4px;
  border-radius: 14px;
  margin-bottom: 18px;
  gap: 4px;
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 11px 4px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 750;
  border-radius: 10px;
  cursor: pointer;
  transition: all 160ms ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

.tab-btn.active {
  background: #FFFFFF;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.tab-badge {
  background: var(--primary);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  line-height: 1.2;
}

.tab-btn:not(.active) .tab-badge {
  background: #94A3B8;
}

/* ──── 카드 컨테이너 ──── */
.card {
  background: var(--surface);
  border-radius: 20px;
  padding: 24px 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

/* 폼 그룹 및 구분선 */
.form-group {
  position: relative;
}

.form-divider {
  height: 1px;
  background: #EDF2F7;
  margin: 24px 0 20px;
}

.section-label {
  display: block;
  font-size: 13px;
  font-weight: 750;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* 차량번호 헤더 */
.field-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.field-header .section-label {
  margin-bottom: 0;
}

.field-guide-tip {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

/* 차량번호 입력 필드 그룹 */
.car-input-group {
  position: relative;
  width: 100%;
}

.card input[type="text"],
.card input[type="date"] {
  width: 100%;
  font-size: 18px;
  font-weight: 600;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: #F8FAFC;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
  -webkit-appearance: none;
}

.car-input-group input[type="text"] {
  padding-right: 84px;
}

.card input[type="text"]:focus,
.card input[type="date"]:focus {
  border-color: var(--primary);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.input-clear-btn {
  position: absolute;
  right: 44px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: none;
  background: #E2E8F0;
  color: var(--text-muted);
  border-radius: 50%;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 140ms ease;
}

.input-clear-btn:hover, .input-clear-btn:active {
  background: #CBD5E1;
  color: var(--text);
}

.input-dropdown-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background 140ms ease, color 140ms ease;
}

.input-dropdown-btn:hover, .input-dropdown-btn:active {
  background: #E2E8F0;
  color: var(--text);
}

/* 자동완성 드롭다운 */
/* 자동완성 드롭다운 (통합 이력 관리 & 인라인 삭제) */
.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #FFFFFF;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  max-height: 290px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 100;
  padding: 0;
}

.auto-dropdown-header {
  padding: 10px 16px;
  background: #F8FAFC;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 750;
  color: var(--text-muted);
}

.auto-dropdown-count {
  font-size: 11px;
  color: var(--primary);
  background: #EFF6FF;
  padding: 2px 7px;
  border-radius: 10px;
}

.auto-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #F1F5F9;
  transition: background 120ms ease;
  user-select: none;
  -webkit-user-select: none;
}

.auto-item:last-child {
  border-bottom: none;
}

.auto-item:hover, .auto-item:active, .auto-item.focused {
  background: #EFF6FF;
}

.auto-item-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.auto-car-no {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}

.auto-car-no mark {
  background: #FEF08A;
  color: #854D0E;
  border-radius: 2px;
  padding: 0 2px;
}

.auto-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.auto-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: #DBEAFE;
  padding: 2px 6px;
  border-radius: 8px;
}

.auto-date {
  font-size: 12px;
  color: var(--text-muted);
}

.auto-del-btn {
  background: transparent;
  border: none;
  padding: 8px 10px;
  color: #94A3B8;
  font-size: 16px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 140ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
}

.auto-del-btn:hover, .auto-del-btn:active {
  background: #FEE2E2;
  color: var(--red);
}

/* ──── 차량번호 입력폼 아래: 현재 등록된 차량 영역 ──── */
.recent-chips-box {
  margin-top: 14px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 13px 14px;
}

.chip-header {
  margin-bottom: 10px;
}

.chip-title {
  font-size: 13px;
  font-weight: 750;
  color: #334155;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.chip-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.active-chip {
  min-height: 44px;
  padding: 8px 14px;
  background: #FFFFFF;
  border: 1.5px solid #93C5FD;
  border-radius: 22px;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(37, 99, 235, 0.08);
  transition: all 140ms ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.active-chip:hover {
  background: #EFF6FF;
  border-color: var(--primary);
}

.active-chip:active {
  background: #DBEAFE;
  border-color: var(--primary-dark);
  transform: scale(0.97);
}

.active-chip-car {
  font-size: 15px;
  font-weight: 750;
  color: #1E293B;
  letter-spacing: -0.01em;
}

.active-chip-date {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: #EFF6FF;
  padding: 2px 6px;
  border-radius: 8px;
}

.empty-chip-text {
  margin: 4px 0 2px;
  font-size: 13px;
  color: var(--text-muted);
}

.date-row {
  display: flex;
  gap: 8px;
}

.date-row input {
  flex: 1;
}

.ghost-btn {
  background: #F1F5F9;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  padding: 0 16px;
  cursor: pointer;
  transition: background 140ms ease;
  white-space: nowrap;
}

.ghost-btn:hover, .ghost-btn:active {
  background: #E2E8F0;
}

.duration-row {
  display: flex;
  gap: 8px;
}

.radio-pill {
  flex: 1;
  cursor: pointer;
  margin: 0 !important;
}

.radio-pill input {
  display: none;
}

.radio-pill span {
  display: block;
  text-align: center;
  padding: 12px 4px;
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 160ms ease;
}

.radio-pill input:checked + span {
  background: #EFF6FF;
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 700;
}

.action-row {
  display: flex;
  gap: 10px;
  margin-top: 26px;
}

.primary-btn {
  width: 100%;
  font-size: 16px;
  font-weight: 700;
  padding: 15px 16px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 160ms ease, transform 100ms ease, opacity 160ms ease;
}

.primary-btn:active {
  transform: scale(0.985);
}

.primary-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.primary-btn.submit {
  background: var(--primary);
  color: #FFFFFF;
}

.primary-btn.submit:hover {
  background: var(--primary-dark);
}

.primary-btn.register {
  flex: 2;
  background: var(--green);
  color: #FFFFFF;
}

.primary-btn.register:hover {
  background: var(--green-dark);
}

.primary-btn.delete {
  flex: 1;
  background: #F1F5F9;
  border: 1px solid var(--border);
  color: var(--red);
}

.primary-btn.delete:hover {
  background: #FEE2E2;
  border-color: #FCA5A5;
}

.result {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  animation: fadeIn 200ms ease-out;
}

.result.ok {
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
}

.result.err {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
}

/* ──── [탭 2] 현재 등록 현황 리스트 ──── */
.status-card {
  padding: 22px 18px;
}

.status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.status-title {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 750;
  color: var(--text);
}

.status-sub {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.refresh-btn {
  padding: 8px 14px;
  font-size: 13px;
}

.active-cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.active-card {
  background: #F8FAFC;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: border-color 140ms ease;
}

.active-card:hover {
  border-color: #CBD5E1;
}

.active-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.active-card-car {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.active-card-tag {
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
  font-size: 12px;
  font-weight: 750;
  padding: 3px 9px;
  border-radius: 12px;
}

.active-card-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.active-info-row {
  display: flex;
  font-size: 13px;
  line-height: 1.4;
}

.info-label {
  width: 75px;
  color: var(--text-muted);
  font-weight: 600;
  flex-shrink: 0;
}

.info-val {
  color: var(--text);
  font-weight: 600;
}

.info-val.highlight {
  color: var(--primary);
  font-weight: 750;
}

.active-card-bottom {
  display: flex;
  gap: 8px;
  border-top: 1px dashed var(--border);
  padding-top: 12px;
}

.cancel-card-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #FFFFFF;
  border: 1.5px solid #FECACA;
  color: var(--red);
  font-size: 14px;
  font-weight: 750;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 140ms ease;
}

.cancel-card-btn:hover, .cancel-card-btn:active {
  background: #FEF2F2;
  border-color: var(--red);
}

.empty-state {
  text-align: center;
  padding: 48px 16px;
}

.empty-icon {
  font-size: 42px;
  margin-bottom: 12px;
}

.empty-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
}

.empty-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 18px;
}

.empty-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
}

/* ──── 바텀 시트 모달 (차량 전체 이력) ──── */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: backdropFadeIn 200ms ease;
}

.bottom-sheet {
  position: relative;
  z-index: 1000;
  background: #FFFFFF;
  border-radius: 24px 24px 0 0;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  animation: sheetSlideUp 260ms cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
  padding-bottom: max(20px, env(safe-area-inset-bottom));
}

.sheet-handle-bar {
  display: flex;
  justify-content: center;
  padding: 10px 0 4px;
}

.sheet-handle {
  width: 38px;
  height: 4px;
  background: #CBD5E1;
  border-radius: 2px;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px 14px;
  border-bottom: 1px solid var(--border);
}

.sheet-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.sheet-title {
  margin: 0;
  font-size: 18px;
  font-weight: 750;
  color: var(--text);
}

.sheet-sub {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.icon-close-btn {
  background: #F1F5F9;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 140ms ease;
}

.icon-close-btn:active {
  background: #E2E8F0;
}

.sheet-search-wrap {
  padding: 12px 20px;
  background: #F8FAFC;
  border-bottom: 1px solid var(--border);
}

.sheet-search-wrap input {
  width: 100%;
  font-size: 16px;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: #FFFFFF;
  outline: none;
  box-sizing: border-box;
}

.sheet-search-wrap input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.sheet-list-container {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 20px;
  max-height: 50vh;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 12px 16px;
  margin-bottom: 8px;
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: all 140ms ease;
  user-select: none;
  -webkit-user-select: none;
}

.history-item:hover, .history-item:active {
  background: #EFF6FF;
  border-color: var(--primary);
  transform: scale(0.99);
}

.history-item-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.history-item-car {
  font-size: 17px;
  font-weight: 750;
  color: var(--text);
  letter-spacing: -0.01em;
}

.history-item-car mark {
  background: #FEF08A;
  color: #854D0E;
  border-radius: 2px;
  padding: 0 2px;
}

.history-item-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-item-count {
  font-weight: 700;
  color: var(--primary);
  background: #DBEAFE;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 11px;
}

.history-item-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
}

.history-del-btn {
  background: transparent;
  border: none;
  padding: 8px 10px;
  color: #94A3B8;
  font-size: 16px;
  cursor: pointer;
  border-radius: 8px;
  transition: background 140ms ease, color 140ms ease;
}

.history-del-btn:hover, .history-del-btn:active {
  color: var(--red);
  background: #FEE2E2;
}

.sheet-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

.sheet-footer {
  padding: 10px 20px 4px;
  text-align: center;
}

.sheet-tip {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

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

@keyframes backdropFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes sheetSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* ──── [탭 3] 월별 사용 통계 대시보드 ──── */
.record-card {
  padding: 20px 18px 26px;
}

.record-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.record-title {
  font-size: 19px;
  font-weight: 850;
  color: var(--text);
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}

.record-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

/* 필터 바 (연도, 월 선택) */
.record-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 10px 12px;
}

.filter-select-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.filter-label {
  font-size: 12px;
  font-weight: 750;
  color: var(--text-muted);
  white-space: nowrap;
}

.custom-select {
  flex: 1;
  width: 100%;
  height: 40px;
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  border-radius: 10px;
  padding: 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  outline: none;
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.custom-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* 로딩 인디케이터 */
.record-loading-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

.loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #E2E8F0;
  border-top-color: var(--primary);
  border-radius: 50%;
  margin: 0 auto 12px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 1. 핵심 KPI 카드 그리드 */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.kpi-box {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 14px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.kpi-remain {
  background: linear-gradient(145deg, #EFF6FF, #DBEAFE);
  border-color: #BFDBFE;
}

.text-blue {
  color: #1D4ED8 !important;
}

.kpi-title {
  font-size: 12px;
  font-weight: 750;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.kpi-num {
  font-size: 22px;
  font-weight: 850;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.kpi-caption {
  font-size: 11px;
  color: #64748B;
  margin-top: 4px;
}

/* 2. 프로그레스 카드 */
.progress-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 20px;
}

.progress-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 750;
  color: var(--text);
  margin-bottom: 8px;
}

.progress-rate {
  color: var(--primary);
  font-weight: 850;
}

.progress-track {
  height: 10px;
  background: #E2E8F0;
  border-radius: 6px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3B82F6, #1D4ED8);
  border-radius: 6px;
  transition: width 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-fill.warning {
  background: linear-gradient(90deg, #F59E0B, #D97706);
}

.progress-fill.danger {
  background: linear-gradient(90deg, #EF4444, #B91C1C);
}

/* 3 & 4. 서브 섹션 박스 */
.sub-section-box {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed #CBD5E1;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.sub-section-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.01em;
}

.section-tip {
  font-size: 11px;
  color: var(--text-muted);
}

.mini-count-badge {
  font-size: 11px;
  font-weight: 800;
  color: var(--primary);
  background: #EFF6FF;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid #BFDBFE;
}

/* 월별 통계 그리드 (1월 ~ 12월) */
.monthly-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

@media (min-width: 480px) {
  .monthly-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.monthly-item {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 150ms ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.monthly-item:hover, .monthly-item:active {
  border-color: var(--primary);
  background: #F8FAFC;
}

.monthly-item.active {
  border-color: var(--primary);
  background: #EFF6FF;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.month-label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.month-used {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
}

.month-remain {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* 실제 입출차 이력 */
.record-search-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.record-search-row input {
  flex: 1;
  height: 40px;
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--text);
  outline: none;
}

.record-search-row input:focus {
  border-color: var(--primary);
}

.search-btn {
  padding: 0 14px;
  height: 40px;
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  white-space: nowrap;
}

.record-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.record-log-item {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.record-log-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.record-log-car {
  font-size: 16px;
  font-weight: 850;
  color: var(--text);
  letter-spacing: -0.01em;
}

.record-log-times {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.3;
}

.record-log-duration {
  font-size: 14px;
  font-weight: 850;
  color: var(--primary);
  background: #EFF6FF;
  padding: 4px 10px;
  border-radius: 8px;
  white-space: nowrap;
}

.record-empty {
  text-align: center;
  padding: 36px 16px;
  color: var(--text-muted);
  font-size: 14px;
  background: #F8FAFC;
  border-radius: 12px;
}

/* 페이징 */
.pagination-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}

.page-nav-btn {
  padding: 6px 14px;
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
}

.page-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.page-indicator {
  font-size: 13px;
  font-weight: 750;
  color: var(--text-muted);
}

/* ──── 아파트 선택 & 모달 스타일 (v3.0) ──── */
.apt-selector-box {
  margin-bottom: 6px;
}

.apt-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.apt-reg-link-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: background 140ms ease;
}

.apt-reg-link-btn:hover {
  background: #EFF6FF;
  text-decoration: underline;
}

.apt-dropdown {
  cursor: pointer;
  background-color: #FFFFFF;
}

.lock-footer-links {
  margin-top: 20px;
  text-align: center;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}

.admin-link-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 140ms ease;
}

.admin-link-btn:hover {
  color: var(--text);
  background: #F1F5F9;
}

/* 중앙 팝업 모달 */
.modal-backdrop-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  position: relative;
  z-index: 1110;
  background: #FFFFFF;
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalPopIn 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-card.modal-wide {
  max-width: 540px;
}

@keyframes modalPopIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 17px;
  color: #94A3B8;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 120ms ease;
  line-height: 1;
}

.modal-close-btn:hover {
  background: #F1F5F9;
  color: #0F172A;
}

.modal-body {
  padding: 18px 20px;
  overflow-y: auto;
  max-height: 70vh;
}

.modal-info-box {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  color: #166534;
  margin-bottom: 16px;
}

/* 우리 아파트 등록 모달 폼 전용 스타일 */
.apt-reg-info-box {
  background: #F0F9FF;
  border: 1px solid #BAE6FD;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 18px;
}

.apt-reg-info-box .info-icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}

.apt-reg-info-box .info-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.apt-reg-info-box .info-title {
  font-size: 13px;
  font-weight: 750;
  color: #0369A1;
}

.apt-reg-info-box .info-desc {
  font-size: 12px;
  line-height: 1.45;
  color: #0C4A6E;
}

.apt-reg-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-label {
  font-size: 13.5px;
  font-weight: 750;
  color: #1E293B;
  display: flex;
  align-items: center;
}

.modal-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  background: #F8FAFC;
  border: 1.5px solid #CBD5E1;
  border-radius: 10px;
  font-size: 14px;
  color: #0F172A;
  transition: all 140ms ease;
  box-sizing: border-box;
}

.modal-input:focus {
  outline: none;
  background: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.modal-input::placeholder {
  color: #94A3B8;
  font-size: 13px;
}

.modal-input.font-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.2px;
}

.field-hint {
  font-size: 11.5px;
  color: #64748B;
  line-height: 1.4;
  margin-top: 1px;
}

.modal-action-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.modal-secondary-btn {
  height: 44px;
  padding: 0 18px;
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 120ms ease;
}

.modal-secondary-btn:hover {
  background: #E2E8F0;
  color: #1E293B;
}

.modal-primary-btn {
  flex: 1;
  height: 44px;
  padding: 0 20px;
  background: var(--primary);
  border: none;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 750;
  color: #FFFFFF;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
  transition: all 140ms ease;
}

.modal-primary-btn:hover {
  filter: brightness(1.08);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.modal-primary-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.input-desc-tip {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}

.admin-apt-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.admin-apt-item {
  background: #F8FAFC;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-apt-item.status-pending {
  border-color: #FCD34D;
  background: #FFFBEB;
}

.admin-apt-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.admin-apt-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-apt-ip {
  font-size: 13px;
  font-family: monospace;
  color: #475569;
}

.admin-apt-date {
  font-size: 11px;
  color: #94A3B8;
}

.admin-apt-status-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 8px;
  margin-left: 6px;
}

.admin-apt-status-tag.approved {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}

.admin-apt-status-tag.pending {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FDE68A;
}

.admin-apt-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.btn-approve-sm {
  background: #10B981;
  color: #FFFFFF;
  border: none;
  font-size: 12px;
  font-weight: 750;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 140ms ease;
}

.btn-approve-sm:hover {
  background: #059669;
}

.btn-delete-sm {
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 140ms ease;
}

.btn-delete-sm:hover {
  background: #FEE2E2;
  border-color: #FCA5A5;
}

/* 관리자 모달 내 직접 등록/승인요청 바 */
.admin-quick-reg-box {
  background: #F8FAFC;
  border: 1.5px dashed #CBD5E1;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 16px;
}

.admin-sub-heading {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}

.admin-reg-inline-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-reg-inline-form input {
  flex: 1;
  min-width: 140px;
  height: 38px;
  border: 1.5px solid #CBD5E1;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 13px;
}

.admin-reg-inline-form input:focus {
  border-color: var(--primary);
  outline: none;
}

/* 아파트 실시간 검색창 (로그인 단지 선택) */
.apt-search-wrap {
  margin-bottom: 8px;
}

.apt-search-wrap input {
  width: 100%;
  height: 42px;
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  border-radius: 12px;
  padding: 0 14px;
  font-size: 14px;
  color: var(--text);
  box-sizing: border-box;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.apt-search-wrap input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}

/* 관리자 서브탭 */
.admin-subtabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1.5px solid var(--border);
  padding-bottom: 8px;
}

.admin-subtab {
  background: none;
  border: none;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 750;
  color: var(--text-muted);
  border-radius: 10px;
  cursor: pointer;
  transition: all 140ms ease;
}

.admin-subtab:hover {
  background: #F1F5F9;
  color: var(--text);
}

.admin-subtab.active {
  background: #EFF6FF;
  color: var(--primary);
  font-weight: 850;
}

/* 접속 통계 요약 카드 */
.admin-stats-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.admin-stat-card {
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}

.stat-card-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.stat-card-num {
  font-size: 24px;
  font-weight: 850;
  color: var(--text);
}

.admin-stats-table-wrap {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 16px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #F1F5F9;
  font-size: 13px;
}

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

.stat-row-title {
  font-weight: 700;
  color: var(--text);
}

.stat-row-count {
  font-weight: 850;
  color: var(--primary);
  background: #EFF6FF;
  padding: 2px 8px;
  border-radius: 8px;
}

/* ──── 1. 아파트 이름 빠른 검색폼 (맨 위쪽) ──── */
.apt-top-search-wrap {
  position: relative;
  width: 100%;
  margin-bottom: 16px;
  text-align: left;
}

.apt-search-bar {
  display: flex;
  align-items: center;
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  border-radius: 12px;
  padding: 2px 8px 2px 12px;
  transition: all 180ms ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.apt-search-bar:hover {
  border-color: #94A3B8;
}

.apt-search-bar:focus-within,
.apt-search-bar.focused {
  border-color: var(--primary);
  box-shadow: 0 0 0 3.5px rgba(37, 99, 235, 0.15);
}

.search-bar-icon {
  font-size: 16px;
  margin-right: 8px;
  color: #64748B;
  flex-shrink: 0;
  user-select: none;
}

.apt-search-input {
  flex: 1;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 14.5px !important;
  font-weight: 600 !important;
  color: #0F172A !important;
  padding: 8px 0 !important;
  height: 38px !important;
  min-width: 0;
}

.apt-search-input::placeholder {
  font-size: 13.5px;
  font-weight: 500;
  color: #94A3B8;
}

.apt-search-arrow-btn {
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #64748B;
  transition: all 140ms ease;
  flex-shrink: 0;
}

.apt-search-arrow-btn:hover {
  background: #F1F5F9;
  color: var(--primary);
}

.search-arrow {
  font-size: 11px;
  transition: transform 180ms ease;
  pointer-events: none;
}

.apt-top-search-wrap.open .search-arrow {
  transform: rotate(180deg);
}

/* 검색 드롭다운 */
.apt-search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 1000;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16), 0 4px 10px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  animation: comboboxFadeIn 150ms ease-out;
}

.dropdown-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
  font-size: 11.5px;
  font-weight: 700;
  color: #64748B;
}

.apt-search-list {
  max-height: 230px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 0;
}

.search-apt-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  cursor: pointer;
  transition: background 120ms ease;
  border-bottom: 1px solid #F8FAFC;
}

.search-apt-item:last-child {
  border-bottom: none;
}

.search-apt-item:hover {
  background: #F1F5F9;
}

.search-apt-item.selected {
  background: #EFF6FF;
}

.search-apt-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.search-apt-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.search-apt-region-badge {
  display: inline-flex;
  align-items: center;
  padding: 1.5px 6px;
  border-radius: 4px;
  background: #E0F2FE;
  color: #0369A1;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.2px;
  white-space: nowrap;
}

.search-apt-name {
  font-size: 14.5px;
  font-weight: 750;
  color: #0F172A;
}

.search-apt-item.selected .search-apt-name {
  color: var(--primary);
}

.search-apt-ip {
  font-size: 11.5px;
  color: #64748B;
  font-family: monospace;
}

.search-apt-check {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
}

/* ──── 2. 메인 타이틀 & 젤롭 공식 로고 ──── */
.lock-header-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

.xellop-logo-badge-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  background: #A30D20;
  padding: 6px 14px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(163, 13, 32, 0.25);
  transition: transform 150ms ease;
}

.xellop-logo-badge-wrap:hover {
  transform: scale(1.03);
}

.xellop-login-logo {
  height: 36px;
  width: auto;
  display: block;
  object-fit: contain;
}

#lock-main-title {
  font-size: 20px;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.4px;
  margin-bottom: 4px;
}

.xellop-system-desc {
  font-size: 12px;
  font-weight: 600;
  color: #64748B;
  letter-spacing: -0.2px;
}

.xellop-modal-thumb {
  height: 30px;
  width: auto;
  border-radius: 6px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(163, 13, 32, 0.2);
}

/* ──── 3. 동호수폼 바로 위: 아파트 이름과 (아이피주소) 서브타이틀 ──── */
.selected-apt-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #F0F7FF;
  border: 1px solid #BFDBFE;
  border-radius: 10px;
  padding: 9px 12px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.06);
}

.banner-icon {
  font-size: 15px;
  flex-shrink: 0;
}

.banner-name {
  font-size: 15px;
  font-weight: 800;
  color: #1E40AF;
  letter-spacing: -0.3px;
}

.banner-ip {
  font-size: 13px;
  font-weight: 600;
  color: #3B82F6;
  font-family: monospace;
}

/* ──── 4. 아파트 가입하기 (로그인 버튼 하위) ──── */
.apt-join-action-wrap {
  margin-top: 14px;
  width: 100%;
}

.apt-join-btn {
  width: 100%;
  height: 44px;
  background: #F8FAFC;
  border: 1.5px dashed #CBD5E1;
  border-radius: 10px;
  color: #475569;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 160ms ease;
}

.apt-join-btn:hover {
  background: #EFF6FF;
  border-color: #93C5FD;
  color: var(--primary);
  transform: translateY(-1px);
}

.apt-join-icon {
  font-size: 15px;
}

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

/* ──── 5. 고객센터 버튼 & 1:1 비공개 비밀게시판 ──── */
.cs-center-action-wrap {
  margin-top: 8px;
  width: 100%;
}

.cs-center-btn {
  width: 100%;
  height: 42px;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  color: #334155;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 160ms ease;
}

.cs-center-btn:hover {
  background: #E2E8F0;
  color: #1E293B;
  border-color: #CBD5E1;
  transform: translateY(-1px);
}

.cs-center-icon {
  font-size: 15px;
}

/* 고객센터 모달 카드 - 로그인 카드 크기 유지 (모바일 완벽 대응) */
.cs-modal-card {
  max-width: 440px !important;
  width: 95% !important;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  overflow: hidden;
}

.cs-view-section {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 90vh;
}

.cs-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cs-subtitle-badge {
  font-size: 11px;
  font-weight: 700;
  background: rgba(37, 99, 235, 0.1);
  color: #2563EB;
  padding: 2px 7px;
  border-radius: 6px;
}

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

.cs-header-action-btn {
  background: #2563EB;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 140ms ease;
}

.cs-header-action-btn:hover {
  background: #1D4ED8;
}

.cs-back-btn {
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  color: #334155;
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.cs-modal-body {
  padding: 16px 18px 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}

/* 검색 바 */
.cs-search-box {
  position: relative;
  margin-bottom: 12px;
}

.cs-search-input {
  width: 100%;
  height: 40px;
  border-radius: 10px;
  border: 1.5px solid #E2E8F0;
  background: #F8FAFC;
  padding: 0 36px 0 12px;
  font-size: 13.5px;
  color: #1E293B;
  transition: all 140ms ease;
}

.cs-search-input:focus {
  outline: none;
  border-color: #3B82F6;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.cs-search-clear-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: #94A3B8;
  color: #FFFFFF;
  border: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 게시글 테이블 */
.cs-table-wrap {
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  overflow: hidden;
  background: #FFFFFF;
  margin-bottom: 12px;
}

.cs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.cs-table th {
  background: #F8FAFC;
  color: #475569;
  font-weight: 700;
  padding: 9px 8px;
  border-bottom: 1px solid #E2E8F0;
  font-size: 12px;
}

.cs-table td {
  padding: 11px 8px;
  border-bottom: 1px solid #F1F5F9;
  color: #1E293B;
}

.cs-table tbody tr {
  cursor: pointer;
  transition: background 120ms ease;
}

.cs-table tbody tr:hover {
  background: #F8FAFC;
}

.cs-post-title-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 260px;
}

.cs-lock-ico {
  font-size: 12px;
  color: #64748B;
  flex-shrink: 0;
}

.cs-title-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: #1E293B;
}

.cs-reply-badge {
  background: #E0E7FF;
  color: #3730A3;
  font-size: 11px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
  flex-shrink: 0;
}

.cs-empty-cell {
  text-align: center;
  color: #94A3B8;
  padding: 30px 10px !important;
}

/* 페이징 */
.cs-pagination-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 14px;
}

.cs-page-nav-btn {
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
  color: #334155;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 120ms ease;
}

.cs-page-nav-btn:hover:not(:disabled) {
  background: #2563EB;
  color: #FFFFFF;
  border-color: #2563EB;
}

.cs-page-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.cs-page-indicator {
  font-size: 12.5px;
  font-weight: 700;
  color: #475569;
}

.cs-bottom-notice {
  font-size: 11.5px;
  color: #64748B;
  line-height: 1.5;
  text-align: center;
}

/* 글쓰기 뷰 안내 배너 */
.cs-info-banner {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cs-info-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.cs-info-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.cs-info-text {
  font-size: 12px;
  color: #1E40AF;
  line-height: 1.5;
}

.cs-info-text strong {
  color: #1E3A8A;
  font-weight: 750;
}

.cs-field-row {
  display: flex;
  gap: 10px;
}

.cs-half {
  flex: 1;
}

.cs-field-tip {
  display: block;
  font-size: 11px;
  color: #64748B;
  margin-top: 3px;
}

.cs-email-guide-text {
  display: block;
  font-size: 11.5px;
  color: #2563EB;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 6px;
  padding: 6px 9px;
  margin-top: 4px;
  line-height: 1.45;
}

.cs-simple-editor {
  width: 100%;
  border-radius: 10px;
  border: 1.5px solid #CBD5E1;
  padding: 10px 12px;
  font-size: 13.5px;
  line-height: 1.5;
  resize: vertical;
  background: #FFFFFF;
}

.cs-simple-editor:focus {
  outline: none;
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* 비밀번호 인증 카드 */
.cs-pwd-auth-card {
  padding: 24px 16px;
  text-align: center;
}

.cs-lock-big-icon {
  font-size: 38px;
  margin-bottom: 8px;
}

.cs-lock-title {
  font-size: 16px;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 6px;
}

.cs-lock-desc {
  font-size: 12.5px;
  color: #64748B;
  margin-bottom: 16px;
}

.cs-pwd-auth-form {
  max-width: 280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 본문 상세 뷰 */
.cs-post-detail {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cs-detail-header {
  border-bottom: 1px solid #E2E8F0;
  padding-bottom: 10px;
}

.cs-detail-title {
  font-size: 16px;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 6px;
  word-break: break-all;
}

.cs-detail-meta {
  font-size: 12px;
  color: #64748B;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.cs-meta-email {
  background: #FEF3C7;
  color: #92400E;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}

.cs-detail-body {
  font-size: 13.5px;
  line-height: 1.6;
  color: #334155;
  white-space: pre-wrap;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 14px;
  min-height: 100px;
  word-break: break-word;
}

/* 댓글 영역 */
.cs-replies-section {
  border-top: 1px dashed #CBD5E1;
  padding-top: 14px;
}

.cs-replies-title {
  font-size: 13.5px;
  font-weight: 750;
  color: #1E293B;
  margin-bottom: 10px;
}

.cs-replies-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.cs-reply-card {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 8px;
  padding: 10px 12px;
}

.cs-reply-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: #166534;
  font-weight: 700;
  margin-bottom: 4px;
}

.cs-reply-content {
  font-size: 13px;
  color: #14532D;
  white-space: pre-wrap;
  line-height: 1.5;
}

.cs-admin-reply-box {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 10px 12px;
}

.cs-admin-reply-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cs-admin-tag {
  font-size: 11px;
  font-weight: 750;
  color: #64748B;
  background: #E2E8F0;
  padding: 2px 6px;
  border-radius: 4px;
}

.cs-btn-link {
  background: none;
  border: none;
  color: #2563EB;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.cs-admin-reply-form {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ──── 로그인 화면 프로그램 안내 배너 ──── */
.app-intro-notice {
  margin-top: 16px;
  padding: 13px 15px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  text-align: left;
}

.intro-notice-header {
  margin-bottom: 6px;
}

.intro-notice-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  color: #1E40AF;
  background: #DBEAFE;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: -0.01em;
}

.intro-notice-desc {
  margin: 0;
  font-size: 12.5px;
  color: #475569;
  line-height: 1.6;
  word-break: keep-all;
}

/* ──── 로그인 화면 및 메인 화면 약관/방침 푸터 ──── */
.lock-footer-policy-box {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid #E2E8F0;
  text-align: center;
}

.main-footer-policy {
  margin-top: 28px;
  padding: 16px 12px 24px;
  text-align: center;
}

.lock-footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.policy-trigger-btn {
  background: none;
  border: none;
  padding: 4px 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: #64748B;
  cursor: pointer;
  border-radius: 4px;
  transition: all 140ms ease;
}

.policy-trigger-btn:hover, .policy-trigger-btn:active {
  color: #2563EB;
  text-decoration: underline;
}

.policy-divider {
  color: #CBD5E1;
  font-size: 12px;
}

.lock-disclaimer-text {
  margin: 8px 0 0;
  font-size: 11.5px;
  color: #94A3B8;
  line-height: 1.5;
  word-break: keep-all;
}

/* ──── 약관 / 개인정보 / 이용안내 모달 팝업 ──── */
.policy-modal-card {
  max-width: 460px;
  width: 92%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.policy-modal-header {
  padding: 12px 14px 10px;
  border-bottom: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.policy-tab-header {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.policy-tab-btn {
  background: #F1F5F9;
  border: 1px solid transparent;
  color: #64748B;
  font-size: 12.5px;
  font-weight: 750;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 140ms ease;
}

.policy-tab-btn:hover {
  background: #E2E8F0;
  color: #334155;
}

.policy-tab-btn.active {
  background: #EFF6FF;
  border-color: #BFDBFE;
  color: #1E40AF;
}

.policy-modal-body {
  padding: 16px 18px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}

.policy-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.policy-sub-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #0F172A;
}

.policy-h5 {
  margin: 12px 0 4px;
  font-size: 13.5px;
  font-weight: 800;
  color: #1E293B;
}

.policy-p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #475569;
  word-break: keep-all;
}

.policy-list {
  margin: 0;
  padding-left: 18px;
  font-size: 12.5px;
  color: #475569;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 6px;
  word-break: keep-all;
}

.policy-list li strong {
  color: #1E293B;
}

.policy-alert-box {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12px;
  color: #991B1B;
  line-height: 1.55;
  word-break: keep-all;
}

.policy-alert-box strong {
  color: #7F1D1D;
}

.policy-action-row {
  padding-top: 10px;
  border-top: 1px solid #E2E8F0;
}

.guide-text-blue {
  color: #2563EB !important;
  font-weight: 750;
  font-size: 13px;
  line-height: 1.45;
  margin: 12px 0 4px;
  word-break: keep-all;
}





