@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Premium Dark Theme Tokens */
  --bg-main: #0f111a;
  --bg-sidebar: rgba(18, 20, 28, 0.7);
  --bg-card: rgba(26, 29, 41, 0.6);
  --bg-hover: rgba(255, 255, 255, 0.05);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-primary: #3b82f6;
  --accent-secondary: #8b5cf6;
  --accent-success: #10b981;
  --accent-warning: #f59e0b;
  --accent-danger: #ef4444;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --glass-border: 1px solid rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  --glass-blur: blur(12px);
  
  --sidebar-width: 260px;
  --header-height: 70px;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-main);
  background-image: radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.08), transparent 25%),
                    radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.08), transparent 25%);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 { font-weight: 600; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ── Layout ── */
.dashboard-container {
  display: flex;
  width: 100%;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-right: var(--glass-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
  transition: var(--transition);
}

.sidebar-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 24px;
  border-bottom: var(--border-color);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-menu {
  padding: 24px 16px;
  flex: 1;
  overflow-y: auto;
}

.menu-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 1px;
  margin: 16px 0 8px 12px;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  margin-bottom: 4px;
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
}

.menu-item i {
  font-size: 18px;
  margin-right: 14px;
  width: 20px;
  text-align: center;
}

.menu-item:hover, .menu-item.active {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.menu-item.active {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-primary);
  border-left: 3px solid var(--accent-primary);
}

.sidebar-footer {
  padding: 20px;
  border-top: var(--border-color);
}

.logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.1);
  color: var(--accent-danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.logout-btn:hover {
  background: var(--accent-danger);
  color: #fff;
}

/* ── Main Content ── */
.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Top Header ── */
.top-header {
  height: var(--header-height);
  background: var(--bg-sidebar);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 90;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-bar {
  position: relative;
}

.search-bar i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-bar input {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px 16px 10px 40px;
  border-radius: 20px;
  font-size: 14px;
  width: 250px;
  outline: none;
  transition: var(--transition);
}

.search-bar input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

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

.icon-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
}

.icon-btn:hover {
  color: var(--text-primary);
}

.badge-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background: var(--accent-danger);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--bg-main);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
}

/* ── Content Area ── */
.content-area {
  padding: 32px;
  flex: 1;
}

.page-title {
  margin-bottom: 24px;
}

.page-title h2 {
  font-size: 24px;
  font-weight: 700;
}

.page-title p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
}

/* ── Stats Grid ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--glass-shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0));
  pointer-events: none;
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
}

.stat-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.stat-icon.primary { background: rgba(59, 130, 246, 0.1); color: var(--accent-primary); }
.stat-icon.success { background: rgba(16, 185, 129, 0.1); color: var(--accent-success); }
.stat-icon.warning { background: rgba(245, 158, 11, 0.1); color: var(--accent-warning); }
.stat-icon.secondary { background: rgba(139, 92, 246, 0.1); color: var(--accent-secondary); }

.stat-details {
  flex: 1;
}

.stat-title {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 4px;
}

.stat-trend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  margin-top: 6px;
  font-weight: 600;
}
.trend-up { color: var(--accent-success); }
.trend-down { color: var(--accent-danger); }

/* ── Dashboard Grid (Charts & Tables) ── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

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

.panel {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--glass-shadow);
}

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

.panel-title {
  font-size: 16px;
  font-weight: 600;
}

.panel-action {
  font-size: 13px;
  color: var(--accent-primary);
  cursor: pointer;
}

.panel-action:hover {
  text-decoration: underline;
}

/* ── Table Styles ── */
.table-wrapper {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: var(--border-color);
  font-weight: 600;
}

.th-sortable {
  cursor: pointer !important;
  user-select: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.th-sortable:hover {
  color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.08);
}
.th-sortable .sort-icon {
  display: inline-flex;
  align-items: center;
  margin-left: 5px;
  font-size: 11px;
  vertical-align: middle;
  color: #64748b;
  transition: color 0.15s ease;
}
.th-sortable.sorted-asc,
.th-sortable.sorted-desc {
  color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.05);
}
.th-sortable.sorted-asc .sort-icon,
.th-sortable.sorted-desc .sort-icon {
  color: #38bdf8 !important;
}

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

.data-table tr:hover td {
  background: rgba(255,255,255,0.02);
}

.data-table td strong {
  color: var(--text-primary);
  font-weight: 500;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  min-width: 52px;
  box-sizing: border-box;
}
.status-completed { background: rgba(16, 185, 129, 0.1); color: var(--accent-success); }
.status-pending { background: rgba(245, 158, 11, 0.1); color: var(--accent-warning); }
.status-cancelled { background: rgba(239, 68, 68, 0.1); color: var(--accent-danger); }

/* ── Activity List ── */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.activity-item {
  display: flex;
  gap: 16px;
}

.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  color: var(--text-secondary);
}

.activity-content p {
  font-size: 13px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.activity-content span {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Activity Pagination ── */
.activity-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.activity-pagination .btn-act-page {
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.activity-pagination .btn-act-page:hover:not(:disabled) {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
}

.activity-pagination .btn-act-page.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #38bdf8;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
}

.activity-pagination .btn-act-page:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ── Chart Placeholder ── */
.chart-placeholder {
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.active {
    transform: translateX(0);
  }
  .main-wrapper {
    margin-left: 0;
  }
  .menu-toggle {
    display: block !important;
  }
}
.menu-toggle {
  display: none;
}

/* ── Page Sections (SPA 라우팅) ── */
.page-section {
  display: none;
  animation: fadeIn 0.3s ease;
}
.page-section.active {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Primary Small Button ── */
.btn-primary-sm {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}
.btn-primary-sm:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

/* ── Icon Edit Button ── */
.btn-icon-edit {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  transition: var(--transition);
}
.btn-icon-edit:hover {
  background: rgba(59,130,246,0.15);
  color: var(--accent-primary);
}

/* ── Empty State ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  text-align: center;
  color: var(--text-muted);
}
.empty-state i {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.3;
}
.empty-state p {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.empty-state span {
  font-size: 13px;
}

/* ── Sidebar active menu animation ── */
.menu-item {
  position: relative;
  overflow: hidden;
}
.menu-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(59,130,246,0.06), transparent);
  opacity: 0;
  transition: var(--transition);
}
.menu-item:hover::after,
.menu-item.active::after {
  opacity: 1;
}

/* ──────────────────────────────────────────
   렌탈 견적서 에디터 레이아웃
────────────────────────────────────────── */
.quote-editor-wrap {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 24px;
  align-items: flex-start;
}
@media (max-width: 1200px) {
  .quote-editor-wrap { grid-template-columns: 1fr; }
}

/* 폼 패널 */
.quote-form-panel {
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.form-section-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--accent-primary);
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(59,130,246,0.2);
}
.form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}
.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.form-group label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}
.form-group input,
.form-group select {
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  transition: var(--transition);
  width: 100%;
  font-family: 'Inter', sans-serif;
}
.form-group input:focus,
.form-group select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
.form-group select option {
  background: #1a1d29;
}

/* 기기 카드 (폼 안) */
.device-form-card {
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
  position: relative;
}
.device-form-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.device-form-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-primary);
}
.btn-remove-device {
  background: rgba(239,68,68,0.1);
  color: var(--accent-danger);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
}
.btn-remove-device:hover { background: var(--accent-danger); color:#fff; }

/* 과금형 토글 */
.billing-type-wrap {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.billing-type-btn {
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.billing-type-btn.active {
  background: rgba(59,130,246,0.15);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* 미리보기 패널 */
.quote-preview-panel {
  position: sticky;
  top: calc(var(--header-height) + 16px);
}

/* ──────────────────────────────────────────
   견적서 종이 스타일 (화면용 + 인쇄용)
────────────────────────────────────────── */
.quote-preview-paper {
  background: #fff;
  color: #222;
  width: 100%;
  min-height: 600px;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 4px 40px rgba(0,0,0,0.4);
  font-family: '맑은 고딕', 'Malgun Gothic', sans-serif;
  font-size: 11px;
  line-height: 1.4;
  overflow-x: auto;
}

/* 인쇄 시 전용 스타일 */
@media print {
  body > * { display: none !important; }
  #printTarget {
    display: block !important;
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    background: white;
    z-index: 99999;
    padding: 20mm;
    box-sizing: border-box;
  }
}

/* ──────────────────────────────────────────
   거래처 관리 (Client Manager) 전용 스타일
────────────────────────────────────────── */
.client-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}


.client-toolbar input[type="text"] {
  background: rgba(0, 0, 0, 0.35) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
}
.client-toolbar input[type="text"]:focus {
  border-color: var(--accent-primary) !important;
}

/* 거래처 데이터 테이블 스타일링 */
.client-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1390px; /* thead 커럼 합계(1390px)에 맞춰 조정 */
  /*
    [table-layout: fixed 핵심 해결재]
    - 이 설정이 없으면 하위 서브테이블(13개 커럼)이
      부모 td 너비를 무한 확장시켜 우측 잔리는 현상이 발생
    - fixed로 테이블 너비를 thead 정의 값으로 고정하면
      서브테이블 내용이 td를 먹어도 부모 테이블은 확장 안 하고,
      device-subtable-wrap에서 가로 스크롤이 동작함
  */
  table-layout: fixed;
}
.client-table th {
  background: rgba(255, 255, 255, 0.02);
  white-space: nowrap;
  padding: 10px 12px;
}
.client-table td {
  vertical-align: middle;
  white-space: nowrap;
  padding: 11px 12px;
  /* table-layout:fixed 환경에서 셀 내용이 컬럼 너비를 넘으면 숨김 처리 */
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 서브테이블 row의 td는 overflow 제한 없이 wrap이 스크롤을 담당 */
.client-table .device-subtable-row > td {
  overflow: visible !important;
  white-space: normal !important;
}
.client-table tr.accordion-parent {
  cursor: pointer;
  transition: background 0.2s;
}
.client-table tr.accordion-parent:hover td {
  background: rgba(59, 130, 246, 0.06);
}
.client-table tr.accordion-parent.expanded td {
  background: rgba(59, 130, 246, 0.08);
  border-bottom-color: transparent;
}
.toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s;
}
.expanded .toggle-icon {
  transform: rotate(90deg);
  background: rgba(59, 130, 246, 0.2);
  color: var(--accent-primary);
}

/* 아코디언 하위 장비 상세 테이블 */
.device-subtable-row {
  background: rgba(10, 13, 22, 0.85);
}
.device-subtable-row td {
  padding: 0 16px 16px 40px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}
.device-subtable-wrap {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: rgba(22, 26, 38, 0.9);
  padding: 12px 16px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
  /* 열이 잘리지 않도록 가로 스크롤 허용 */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.device-subtable-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.device-subtable {
  width: 100%;
  /* min-width는 설정하지 않음: table-layout:fixed 부모가 너비를 고정하므로
     여기서 min-width를 주면 다시 부모 테이블을 확장시키는 부작용이 생김 */
  border-collapse: collapse;
  font-size: 12px;
}
.device-subtable th {
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 10px;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-weight: 500;
  text-align: left;
  /* 헤더 텍스트 줄바꿈 방지 - 열 너비 보장 */
  white-space: nowrap;
}
.device-subtable td {
  padding: 8px 10px !important;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03) !important;
  /* 셀 내용 줄바꿈 방지 - 가로 스크롤로 확인 */
  white-space: nowrap;
}
.device-subtable tr:last-child td {
  border-bottom: none !important;
}

/* 서브테이블 가로 스크롤바 커스텀 스타일 (다크 테마) */
.device-subtable-wrap::-webkit-scrollbar {
  height: 6px;
}
.device-subtable-wrap::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 3px;
}
.device-subtable-wrap::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.4);
  border-radius: 3px;
  transition: background 0.2s;
}
.device-subtable-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.7);
}

/* 관리 액션 버튼 */
.btn-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font-size: 12px;
}
.btn-action-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}
.btn-action-icon.edit:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: rgba(59, 130, 246, 0.15);
}
.btn-action-icon.delete:hover {
  border-color: var(--accent-danger);
  color: var(--accent-danger);
  background: rgba(239, 68, 68, 0.15);
}

/* ──────────────────────────────────────────
   거래처 등록/수정 모달 (Modal)
────────────────────────────────────────── */
.modal-backdrop,
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  animation: modalFadeIn 0.2s ease-out;
}
@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-container,
.modal-card,
.modal-box {
  background: #141724;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalScaleUp {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-lg {
  max-width: 960px;
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
}
.modal-header h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: var(--transition);
}
.modal-close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.form-section-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px 20px;
}

.form-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
.form-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

@media (max-width: 768px) {
  .form-grid-2, .form-grid-3, .form-grid-4 {
    grid-template-columns: 1fr;
  }
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-group label .req {
  color: var(--accent-danger);
}
.form-group input, .form-group select {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
  transition: var(--transition);
}
.form-group input:focus, .form-group select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* 동적 장비 폼 카드 */
.device-form-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
  position: relative;
  transition: border-color 0.2s;
}
.device-form-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
}
.device-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.07);
}
.device-badge-index {
  font-size: 12px;
  font-weight: 700;
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-primary);
  padding: 3px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.btn-remove-device {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--accent-danger);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.btn-remove-device:hover {
  background: var(--accent-danger);
  color: #fff;
}

/* 실시간 정산 미리보기 박스 */
.summary-calc-box {
  background: rgba(15, 23, 42, 0.6) !important;
  border: 1.5px solid rgba(59, 130, 246, 0.3) !important;
}
.summary-calc-box .form-section-title {
  color: #60a5fa !important;
}
.calc-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}
.calc-item {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.calc-item .calc-label {
  font-size: 11px;
  color: var(--text-muted);
}
.calc-item .calc-val {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.calc-item .calc-val.bold {
  color: #93c5fd;
  font-weight: 700;
}
.calc-item.total {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
}
.calc-item .calc-val.highlight {
  color: #60a5fa;
  font-size: 16px;
  font-weight: 800;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

/* =============================================
   검침내역 수정 및 수익성 분석 스타일
   ============================================= */
.meter-dev-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.meter-dev-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 10px;
  margin-bottom: 12px;
}
.meter-grid-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  align-items: center;
}
.meter-input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.meter-input-group label {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}
.meter-input-group input {
  padding: 7px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  color: #0f172a;
  background: #fff;
  font-weight: 600;
}
.meter-input-group input:read-only {
  background: #f8fafc;
  color: #475569;
  border-color: #e2e8f0;
}

/* BEP 회수 진행률 바 */
.bep-bar-wrap {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  margin-top: 5px;
  position: relative;
}
.bep-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6 0%, #10b981 100%);
  border-radius: 6px;
  transition: width 0.4s ease;
}

/* =============================================
   검침 청구서 PDF / A4 인쇄 전용 스타일 (@media print)
   ============================================= */
@media print {
  body * {
    visibility: hidden !important;
  }
  #meterPrintArea, #meterPrintArea * {
    visibility: visible !important;
  }
  #meterPrintArea {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    display: block !important;
    background: #ffffff !important;
    color: #000000 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Noto Sans KR", sans-serif !important;
    padding: 20px !important;
  }
  .print-page {
    page-break-after: always;
    padding: 10px 0;
  }
  .print-page:last-child {
    page-break-after: avoid;
  }
  .print-header {
    text-align: center;
    border-bottom: 2px solid #000;
    padding-bottom: 12px;
    margin-bottom: 20px;
  }
  .print-header h1 {
    font-size: 22px;
    margin: 0 0 6px 0;
    color: #000;
    letter-spacing: 1px;
  }
  .print-header p {
    font-size: 13px;
    margin: 0;
    color: #333;
  }
  .print-info-grid {
    display: flex;
    justify-content: space-between;
    margin-bottom: 18px;
    font-size: 12px;
    line-height: 1.6;
  }
  .print-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 11px;
  }
  .print-table th, .print-table td {
    border: 1px solid #999;
    padding: 7px 6px;
    text-align: center;
  }
  .print-table th {
    background: #f0f0f0 !important;
    font-weight: 700;
    color: #000;
  }
  .print-total-box {
    border: 2px solid #333;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    background: #fafafa !important;
  }
  .print-footer {
    text-align: center;
    margin-top: 30px;
    font-size: 11px;
    color: #666;
    border-top: 1px dashed #ccc;
    padding-top: 10px;
  }
}

/* 세금계산서 및 수금 상태 배지 */
.badge-tax {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  min-width: 78px;
  box-sizing: border-box;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.badge-tax.issued {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}
.badge-tax.unissued {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}
.badge-tax:hover {
  transform: translateY(-1px);
  filter: brightness(0.95);
}

.badge-pay {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  min-width: 95px;
  box-sizing: border-box;
}
.badge-pay.paid {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}
.badge-pay.partial {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #7dd3fc;
}
.badge-pay.unpaid {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

/* 청구 완료/미완료 배지 */
.badge-billing {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  min-width: 95px;
  box-sizing: border-box;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.badge-billing.done {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #86efac;
}
.badge-billing.pending {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}
.badge-billing:hover {
  transform: translateY(-1px);
  filter: brightness(0.95);
}

/* 기기별 원가 분리 입력 카드 */
.profit-dev-cost-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
}
.profit-dev-cost-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

/* 소모품/부품 건별 지출 장부 */
.maint-log-wrap {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
  background: #fff;
  margin-bottom: 14px;
}
.maint-log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 10px;
}
.maint-log-table th {
  background: #f1f5f9;
  color: #475569;
  font-weight: 700;
  padding: 8px;
  border: 1px solid #e2e8f0;
  text-align: center;
}
.maint-log-table td {
  padding: 7px 8px;
  border: 1px solid #e2e8f0;
  text-align: center;
  color: #334155;
}
.maint-summary-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 12px;
  text-align: center;
}

/* 월별 정산 히스토리 모달 & 탭 */
.settlement-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px;
  margin-bottom: 16px;
}
.settlement-tab-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
.settlement-tab-btn.active {
  color: #4f46e5;
  background: #eef2ff;
  font-weight: 700;
}
.chart-container-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
  position: relative;
}

/* ────────────────────────────────────────────────
   소모품관리 (Supplies Management) 전용 스타일
   ──────────────────────────────────────────────── */
.btn-tab {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.btn-tab:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}
.btn-tab.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #38bdf8;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.35);
}

.badge-in {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(14, 165, 233, 0.18);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.45);
}
.badge-out {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.45);
}
.badge-client {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.4);
}
.badge-other {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.badge-sync-ok {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 11.5px;
  background: rgba(139, 92, 246, 0.2);
  color: #c084fc;
  border: 1px solid rgba(192, 132, 252, 0.4);
  font-weight: 700;
}

.badge-stock-ok {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.4);
}
.badge-stock-low {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.4);
}
.badge-stock-zero {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.4);
}

/* ========================================================
   임대 관리 월별 정산 & 수금 캘린더 스타일
   ======================================================== */
.rental-calendar-wrap {
  width: 100%;
  min-width: 900px;
}

.rental-cal-dow-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.rental-cal-dow {
  padding: 10px 8px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  background: rgba(30, 41, 59, 0.6);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.rental-cal-dow.sun { color: #f87171; }
.rental-cal-dow.sat { color: #60a5fa; }
.rental-cal-dow.weekday { color: #cbd5e1; }

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

.rental-cal-cell {
  min-height: 125px;
  background: rgba(30, 41, 59, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, background-color 0.2s;
}

.rental-cal-cell:hover {
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(30, 41, 59, 0.5);
}

.rental-cal-cell.other-month {
  opacity: 0.25;
  background: rgba(15, 23, 42, 0.2);
}

.rental-cal-cell.today {
  border: 1.5px solid #3b82f6;
  background: rgba(59, 130, 246, 0.08);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.15);
}

.rental-cal-date-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.rental-cal-day-num {
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
}
.rental-cal-cell.sun .rental-cal-day-num { color: #f87171; }
.rental-cal-cell.sat .rental-cal-day-num { color: #60a5fa; }

.rental-cal-today-badge {
  font-size: 10px;
  background: #3b82f6;
  color: #ffffff;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 700;
}

.rental-cal-count-badge {
  font-size: 10.5px;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 600;
}

.rental-cal-items {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex-grow: 1;
}

.rental-cal-item {
  border-radius: 6px;
  padding: 6px 7px;
  font-size: 11px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  user-select: none;
}
.rental-cal-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* 색상 테마: 가독성을 고려한 세련된 반투명 배경 및 선명한 텍스트 */
.rental-cal-item.status-red {
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}
.rental-cal-item.status-purple {
  background: rgba(168, 85, 247, 0.18);
  border: 1px solid rgba(168, 85, 247, 0.38);
  color: #d8b4fe;
}
.rental-cal-item.status-green {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.38);
  color: #6ee7b7;
}
.rental-cal-item.status-amber {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.38);
  color: #fcd34d;
}

.cal-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  margin-bottom: 3px;
}

.cal-item-name {
  font-weight: 700;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 95px;
}

.cal-item-bill {
  font-weight: 600;
  font-size: 10.5px;
  white-space: nowrap;
}

.cal-item-badges {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}

.cal-mini-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 9.5px;
  font-weight: 700;
}
.cal-mini-badge.tax-issued { background: rgba(16, 185, 129, 0.25); color: #34d399; }
.cal-mini-badge.tax-unissued { background: rgba(239, 68, 68, 0.25); color: #f87171; }
.cal-mini-badge.pay-paid { background: rgba(16, 185, 129, 0.25); color: #34d399; }
.cal-mini-badge.pay-unpaid { background: rgba(239, 68, 68, 0.25); color: #f87171; }
.cal-mini-badge.pay-partial { background: rgba(245, 158, 11, 0.25); color: #fbbf24; }
.cal-mini-badge.billing-pending { background: rgba(249, 115, 22, 0.25); color: #fb923c; }

/* 달력 업체명 옆 청구미완료 인라인 라벨 */
.cal-billing-pending-label {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 8.5px;
  font-weight: 800;
  background: rgba(249, 115, 22, 0.3);
  color: #fb923c;
  vertical-align: middle;
  white-space: nowrap;
  letter-spacing: 0.02em;
}






