/* ===== 변수 ===== */
:root {
  --bg-main: #f0f2f5;
  --bg-sidebar: #1a2332;
  --bg-card: #ffffff;
  --text-primary: #1d1d1f;
  --text-secondary: #6b7280;
  --text-sidebar: rgba(255,255,255,0.9);
  --text-sidebar-muted: rgba(255,255,255,0.6);
  --border: #e5e7eb;
  --azure: #0078d4;
  --azure-light: #e6f2ff;
  --gcp: #b45309;
  --gcp-light: #fef9c3;
  --accent: #0ea5e9;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --font: 'Noto Sans KR', -apple-system, sans-serif;
}

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

html {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-main);
  min-height: 100%;
  height: 100%;
  overflow: hidden;
}

/* ===== 로그인 페이지 ===== */
.login-page {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: #f0f4f8;
  z-index: 2000;
  overflow: hidden;
}

.login-page-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 75% 55% at 12% 18%, rgba(14, 165, 233, 0.22) 0%, transparent 58%),
    radial-gradient(ellipse 60% 50% at 88% 82%, rgba(20, 184, 166, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 45% 40% at 72% 12%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
    linear-gradient(165deg, #f0f9ff 0%, #f8fafc 38%, #eef2f7 100%);
}

.login-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  animation: login-orb-float 14s ease-in-out infinite;
}

.login-bg-orb--1 {
  width: 420px;
  height: 420px;
  top: -8%;
  left: -6%;
  background: rgba(14, 165, 233, 0.28);
}

.login-bg-orb--2 {
  width: 360px;
  height: 360px;
  bottom: -10%;
  right: -4%;
  background: rgba(20, 184, 166, 0.22);
  animation-delay: -5s;
}

.login-bg-orb--3 {
  width: 240px;
  height: 240px;
  top: 42%;
  right: 18%;
  background: rgba(56, 189, 248, 0.15);
  animation-delay: -9s;
}

.login-bg-grid {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.12) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 65% at 50% 45%, black 20%, transparent 75%);
}

@keyframes login-orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(12px, -18px) scale(1.04); }
  66% { transform: translate(-10px, 10px) scale(0.97); }
}

.login-card-shell {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 440px;
  animation: login-card-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes login-card-in {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-card {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 32px 64px rgba(15, 23, 42, 0.1),
    0 0 0 1px rgba(15, 23, 42, 0.04),
    0 0 120px rgba(14, 165, 233, 0.08);
  padding: 2.25rem 2rem 2rem;
}

.login-card-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0ea5e9 0%, #14b8a6 50%, #0284c7 100%);
}

.login-card-header {
  text-align: center;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.login-theme-switch {
  display: inline-flex;
  align-items: center;
  margin-top: 1.15rem;
  padding: 0.2rem;
  border-radius: 12px;
  background: rgba(241, 245, 249, 0.95);
  border: 1px solid rgba(226, 232, 240, 0.95);
  gap: 0.15rem;
}

.login-theme-segment {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 88px;
  padding: 0.45rem 0.75rem;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: #64748b;
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.login-theme-segment-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
}

.login-theme-segment.is-active {
  background: #fff;
  color: #0284c7;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.login-theme-segment:not(.is-active):hover {
  color: #334155;
}

.login-service-desc {
  margin: 1.1rem 0 1.35rem;
  padding: 0 0.15rem;
  font-size: 0.8125rem;
  line-height: 1.65;
  text-align: center;
  color: #64748b;
}

.brand-mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  gap: 0.35rem;
}

.brand-subtitle {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #64748b;
  text-align: center;
  line-height: 1.3;
}

.brand-subtitle--sidebar {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.45);
  opacity: 0;
  animation: sidebar-logo-in 0.5s ease-out 0.12s forwards;
}

.brand-logo {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.brand-logo--dark {
  display: none;
}

body.theme-dark .brand-logo--light {
  display: none;
}

body.theme-dark .brand-logo--dark {
  display: block;
}

/* 로그인 — 라이트: logo1_loght, 다크: logo1_dark */
.login-brand-mark .brand-logo--dark {
  display: none;
}
body.theme-dark .login-brand-mark .brand-logo--light {
  display: none !important;
}
body.theme-dark .login-brand-mark .brand-logo--dark {
  display: block !important;
}

/* 사이드바(어두운 배경) — 다크 로고 */
.sidebar-brand-mark .brand-logo--light {
  display: none !important;
}
.sidebar-brand-mark .brand-logo--dark {
  display: block !important;
}

.sidebar-brand-mark {
  flex: 1;
  min-width: 0;
  width: auto;
  gap: 0.3rem;
}

.sidebar-brand-logo {
  display: block;
  width: 100%;
  max-width: 140px;
  height: auto;
  object-fit: contain;
  opacity: 0;
  animation: sidebar-logo-in 0.5s ease-out forwards;
}

.login-brand-mark {
  margin-bottom: 0;
  gap: 0.4rem;
}

.login-brand-mark .brand-logo {
  max-height: 52px;
  width: auto;
  max-width: 240px;
  margin: 0 auto;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.login-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #475569;
  text-transform: uppercase;
}

.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-field-icon {
  position: absolute;
  left: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  pointer-events: none;
  transition: color 0.2s;
}

.login-input-wrap:focus-within .login-field-icon {
  color: #0ea5e9;
}

.login-input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-family: var(--font);
  font-size: 0.9375rem;
  color: var(--text-primary);
  background: rgba(248, 250, 252, 0.9);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.login-input::placeholder {
  color: #94a3b8;
}

.login-input:hover {
  border-color: #cbd5e1;
  background: #fff;
}

.login-input:focus {
  outline: none;
  border-color: #0ea5e9;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.login-options {
  display: flex;
  align-items: center;
  padding-top: 0.15rem;
}

.login-remember {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: #64748b;
  cursor: pointer;
  user-select: none;
}

.login-remember input {
  width: 1rem;
  height: 1rem;
  accent-color: #0ea5e9;
}

.login-error {
  font-size: 0.8125rem;
  color: #dc2626;
  margin: 0;
  padding: 0.65rem 0.85rem;
  background: rgba(254, 226, 226, 0.65);
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 10px;
}

.btn-login {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 0.9rem 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #0ea5e9 0%, #0891b2 45%, #0284c7 100%);
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.25s ease, filter 0.2s;
  margin-top: 0.35rem;
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.35);
}

.btn-login-text {
  position: relative;
  z-index: 1;
}

.btn-login-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.22) 50%,
    transparent 65%
  );
  transform: translateX(-120%);
  transition: transform 0.55s ease;
}

.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(14, 165, 233, 0.42);
  filter: brightness(1.03);
}

.btn-login:hover .btn-login-shine {
  transform: translateX(120%);
}

.btn-login:active {
  transform: translateY(0);
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.3);
}

.login-credit {
  text-align: center;
  margin-top: 0.25rem;
}

.login-credit .credit-row {
  display: block;
  font-size: 0.7rem;
  color: #94a3b8;
}

.login-credit .credit-value {
  font-weight: 500;
  color: #64748b;
}

.login-credit.credit-block {
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.login-page.is-hidden {
  display: none;
}

@media (max-width: 480px) {
  .login-page {
    padding: 1rem;
  }

  .login-card {
    padding: 1.85rem 1.35rem 1.65rem;
    border-radius: 18px;
  }

  .login-brand-mark .brand-logo {
    max-height: 52px;
  }
}

.credit-block {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.credit-row {
  margin: 0;
  padding: 0.15rem 0;
  font-size: 0.75rem;
  line-height: 1.5;
}

.credit-label {
  color: var(--text-secondary);
}

.credit-value {
  font-weight: 600;
  color: var(--text-primary);
}

/* ===== App Layout ===== */
.app {
  display: flex;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

/* ===== Sidebar ===== */
.sidebar {
  width: 240px;
  background: var(--bg-sidebar);
  color: var(--text-sidebar);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
  transition: width 0.22s ease;
}

.sidebar.is-collapsed {
  width: 72px;
}

.sidebar-header {
  padding: 1.25rem 1rem 0.85rem;
  border-bottom: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar.is-collapsed .sidebar-header {
  padding: 0.85rem 0.5rem 0.5rem;
}

.sidebar-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 0 0.85rem 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.sidebar.is-collapsed .sidebar-toolbar {
  justify-content: center;
  padding: 0 0.45rem 0.55rem;
}

.sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  padding: 0.25rem;
  border: none;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: color 0.2s;
}

.sidebar-toggle:hover {
  background: transparent;
  color: rgba(255, 255, 255, 0.95);
  border-color: transparent;
}

.sidebar-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-toggle-icon--expand {
  display: none;
}

.sidebar.is-collapsed .sidebar-toggle-icon--collapse {
  display: none;
}

.sidebar.is-collapsed .sidebar-toggle-icon--expand {
  display: inline-flex;
}

.sidebar-brand-symbol {
  display: none;
  max-width: 36px;
  width: 100%;
  height: auto;
  opacity: 0;
  animation: sidebar-logo-in 0.5s ease-out forwards;
}

.sidebar.is-collapsed .sidebar-brand-logo,
.sidebar.is-collapsed .brand-subtitle--sidebar {
  display: none !important;
}

.sidebar.is-collapsed .sidebar-brand-symbol {
  display: block;
}

.sidebar.is-collapsed .sidebar-brand-mark {
  width: 100%;
  gap: 0;
}

.sidebar-header-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.logo-text {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  opacity: 0;
  animation: sidebar-logo-in 0.5s ease-out 0.08s forwards;
}

.logo-tagline {
  font-size: 0.68rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.04em;
  opacity: 0;
  animation: sidebar-logo-in 0.5s ease-out 0.12s forwards;
}

@keyframes sidebar-logo-in {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  color: var(--text-sidebar-muted);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}

.nav-item:hover {
  color: var(--text-sidebar);
  background: rgba(255,255,255,0.06);
}

.nav-item.active {
  color: #fff;
  background: rgba(14, 165, 233, 0.2);
  border-left: 3px solid var(--accent);
  padding-left: calc(1.25rem - 3px);
}

.nav-label {
  white-space: nowrap;
}

.sidebar.is-collapsed .nav-label,
.sidebar.is-collapsed .sidebar-cmp-link,
.sidebar.is-collapsed .sidebar-resolution,
.sidebar.is-collapsed .sidebar-credit,
.sidebar.is-collapsed .sidebar-footer-divider {
  display: none;
}

.sidebar.is-collapsed .nav-item {
  justify-content: center;
  padding: 0.75rem;
  gap: 0;
}

.sidebar.is-collapsed .nav-item.active {
  border-left: none;
  padding-left: 0.75rem;
}

.sidebar.is-collapsed .sidebar-footer {
  padding: 0.75rem 0.5rem;
  justify-content: center;
}

.sidebar.is-collapsed .btn-logout {
  flex: 0 0 auto;
  width: 100%;
  justify-content: center;
  padding: 0.5rem;
}

.sidebar.is-collapsed .btn-logout-text {
  display: none;
}

.nav-icon {
  font-size: 1.1rem;
  opacity: 0.9;
}

.nav-icon--currency {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  font-family: var(--font);
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.sidebar-footer-divider {
  flex: 0 0 100%;
  width: 100%;
  height: 0;
  margin: 0.25rem 0;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: none;
  display: block;
}

.sidebar-cmp-link {
  flex: 0 0 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.sidebar-cmp-link:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.sidebar-cmp-link-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 4px;
}

.btn-logout {
  flex: 0 0 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-logout:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-logout-icon {
  font-size: 0.9rem;
  opacity: 0.9;
}

.sidebar-resolution {
  flex: 0 0 100%;
  margin: 0.75rem 0 0;
  padding: 0;
  font-size: 0.7rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.5);
}

.sidebar-credit {
  flex: 0 0 100%;
  margin: 0.5rem 0 0;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-credit .credit-row {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
}

.sidebar-credit .credit-label::after {
  content: ': ';
}

.sidebar-credit .credit-value {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}

.csp-badge {
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
}

.csp-badge.azure {
  background: rgba(0, 120, 212, 0.2);
  color: #0078d4;
}

.csp-badge.gcp {
  background: rgba(234, 179, 8, 0.25);
  color: #b45309;
}

/* ===== Main ===== */
.main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  padding: 1.5rem 2rem 2rem;
  overflow-x: auto;
  overflow-y: auto;
}

.page-panel {
  display: none;
}

.app-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
}

.app-loading-spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid rgba(14, 165, 233, 0.24);
  border-top-color: #0ea5e9;
  animation: appLoadingSpin 0.85s linear infinite;
  background: transparent;
}

.app-loading-text {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
}

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

.page-panel.is-active {
  display: block;
}

/* Billing Detail 페이지 (Contract Overview와 디자인 통일) */
.billing-detail-section {
  margin-top: 0;
  margin-bottom: 1rem;
}

.billing-detail-summary {
  margin-bottom: 1.25rem;
}

/* Billing Detail 상단 요약: 콤팩트 배치 (전체 상단 + CSP별 3열) */
.billing-detail-hero {
  margin-bottom: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  min-height: 0;
}

.billing-detail-hero-total {
  width: 100%;
}
.billing-detail-hero-total .billing-detail-hero-block {
  max-width: 100%;
  padding: 0.875rem 1.125rem;
  background: linear-gradient(135deg, #f0f9ff 0%, #f8fafc 100%);
  border-color: rgba(14, 165, 233, 0.22);
}
.billing-detail-hero-total .billing-detail-hero-title {
  font-size: 0.9375rem;
  padding-bottom: 0.4rem;
  margin-bottom: 0.2rem;
}
.billing-detail-hero-total .billing-detail-hero-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem 1rem;
}
.billing-detail-hero-total .billing-detail-hero-card {
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  gap: 0.2rem;
  border-bottom: none;
  padding: 0.35rem 0;
}
.billing-detail-hero-total .billing-detail-hero-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 1;
}
.billing-detail-hero-total .billing-detail-hero-value {
  font-size: 1.125rem;
}

.billing-detail-hero-breakdown {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.875rem;
  width: 100%;
}
@media (max-width: 900px) {
  .billing-detail-hero-breakdown {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .billing-detail-hero-grid--other {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .billing-detail-hero-total .billing-detail-hero-grid {
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    overflow-x: auto;
  }
}
@media (max-width: 480px) {
  .billing-detail-hero-grid--other {
    grid-template-columns: 1fr;
  }
}

.billing-detail-hero-block {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: #f8fafc;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
}

.billing-detail-hero-block[data-block="azure"] {
  background: linear-gradient(to right, var(--azure-light) 0%, #f8fafc 100%);
  border-color: rgba(0, 120, 212, 0.2);
}

.billing-detail-hero-block[data-block="gcp"] {
  background: linear-gradient(to right, #fffbeb 0%, #f8fafc 72%);
  border-color: rgba(180, 83, 9, 0.1);
}

.billing-detail-hero-block[data-block="other"] {
  background: linear-gradient(to right, #f1f5f9 0%, #f8fafc 100%);
  border-color: #cbd5e1;
}

.billing-detail-hero-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.2rem;
}

/* 기타 블록: 발주/청구/차액 3항만 가로 배치 */
.billing-detail-hero-grid--other {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem 0.75rem;
}
.billing-detail-hero-grid--other .billing-detail-hero-card {
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  gap: 0.2rem;
  padding: 0.3rem 0;
  border-bottom: none;
}
.billing-detail-hero-grid--other .billing-detail-hero-label {
  font-size: 0.75rem;
}
.billing-detail-hero-grid--other .billing-detail-hero-value {
  font-size: 1rem;
}

.billing-detail-hero-block[data-block="total"] .billing-detail-hero-title { color: var(--text-primary); }
.billing-detail-hero-block[data-block="azure"] .billing-detail-hero-title { color: var(--azure); }
.billing-detail-hero-block[data-block="gcp"] .billing-detail-hero-title { color: #92400e; }
.billing-detail-hero-block[data-block="other"] .billing-detail-hero-title { color: #475569; }

.billing-detail-hero-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.billing-detail-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(100px, auto);
  gap: 0.4rem 0.75rem;
  align-items: baseline;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  min-width: 0;
}

.billing-detail-hero-card:last-child {
  border-bottom: none;
}

.billing-detail-hero-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.billing-detail-hero-value {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  text-align: right;
  word-break: break-all;
  min-width: 0;
  line-height: 1.25;
}

.billing-detail-hero-value.billing-detail-hero-billing {
  color: var(--accent);
}

.billing-detail-hero-value.billing-detail-diff-plus {
  color: var(--success, #059669);
}

.billing-detail-hero-value.billing-detail-diff-minus {
  color: var(--danger, #dc2626);
}

.billing-detail-hero-card--billing {
  position: relative;
  z-index: 1;
}

.billing-detail-hero-card--billing:hover,
.billing-detail-hero-card--billing:focus-within {
  z-index: 5;
}

.billing-amount-tooltip-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
  cursor: help;
  outline: none;
}

.billing-amount-tooltip-wrap:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
  border-radius: 4px;
}

.billing-amount-tooltip-wrap--table {
  display: inline-flex;
  justify-content: flex-end;
  width: 100%;
}

.billing-amount-tooltip-wrap--hero {
  justify-self: end;
}

.billing-amount-tooltip {
  position: absolute;
  z-index: 60;
  right: 0;
  bottom: calc(100% + 8px);
  top: auto;
  min-width: 10.5rem;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  font-size: 0.75rem;
  font-weight: 500;
  color: #e2e8f0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  text-align: left;
}

.billing-amount-tooltip-wrap--table .billing-amount-tooltip {
  bottom: auto;
  top: calc(100% + 8px);
}

.billing-amount-tooltip-wrap:hover .billing-amount-tooltip,
.billing-amount-tooltip-wrap:focus .billing-amount-tooltip,
.billing-amount-tooltip-wrap:focus-within .billing-amount-tooltip {
  opacity: 1;
  visibility: visible;
}

.billing-amount-tooltip--empty {
  white-space: nowrap;
  color: #94a3b8;
  font-style: italic;
}

.billing-amount-tooltip-title {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 0.35rem;
}

.billing-amount-tooltip-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.12rem 0;
}

.billing-amount-tooltip-month {
  color: #cbd5e1;
  flex-shrink: 0;
}

.billing-amount-tooltip-amt {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #7dd3fc;
  text-align: right;
}

.billing-detail-billing-total {
  overflow: visible;
}

.billing-detail-contract-table td.billing-detail-billing-total {
  overflow: visible;
}

/* 계약별 리스트 영역: table-section과 동일한 카드 컨테이너 */
.billing-detail-list-wrap {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow-x: auto;
  overflow-y: visible;
  padding: 1rem 1.25rem;
  margin-top: 0.5rem;
}

.billing-detail-list-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  gap: 1rem;
}

.billing-detail-list-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  min-width: 0;
}

.billing-detail-monthly-bulk {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.billing-detail-monthly-bulk-btn {
  padding: 0.35rem 0.6rem !important;
  font-size: 0.75rem !important;
  font-weight: 600;
  border-width: 1px !important;
}

.billing-detail-search-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 220px;
  max-width: 360px;
}

.billing-detail-search-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.15);
}

.billing-detail-search-icon {
  flex-shrink: 0;
  font-size: 0.9375rem;
  opacity: 0.7;
}

.billing-detail-search-input {
  flex: 1;
  min-width: 0;
  padding: 0.25rem 0;
  font-size: 0.875rem;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font);
}

.billing-detail-search-input::placeholder {
  color: var(--text-secondary);
}

.billing-detail-search-input:focus {
  outline: none;
}

.billing-detail-search-clear {
  flex-shrink: 0;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font);
}

.billing-detail-search-clear:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.06);
}

.billing-detail-list-header .btn {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-width: 1.5px;
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--color-primary, #2563eb);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.billing-detail-list-header .btn:hover {
  background: var(--color-primary, #2563eb);
  color: #fff;
  border-color: var(--color-primary, #2563eb);
}

.billing-detail-list-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  margin: 0;
  padding-left: 0.25rem;
}

.billing-detail-csp-group {
  margin-bottom: 1rem;
}

.billing-detail-csp-group:last-child {
  margin-bottom: 0;
}

.billing-detail-csp-group-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  line-height: 1.3;
  margin: 0 0 0.5rem;
  padding: 0.4rem 0.75rem;
  padding-left: 0.85rem;
  border-radius: var(--radius);
  border-left: 4px solid #cbd5e1;
  background: linear-gradient(to right, #f8fafc 0%, transparent 100%);
}

.billing-detail-csp-group--azure .billing-detail-csp-group-title {
  color: #1d4ed8;
  border-left-color: var(--azure);
  background: linear-gradient(to right, var(--azure-light) 0%, transparent 100%);
}

.billing-detail-csp-group--gcp .billing-detail-csp-group-title {
  color: #92400e;
  border-left-color: var(--gcp);
  background: linear-gradient(to right, var(--gcp-light) 0%, transparent 100%);
}

.billing-detail-csp-group--other .billing-detail-csp-group-title {
  color: #475569;
  border-left-color: #94a3b8;
  background: linear-gradient(to right, #f1f5f9 0%, transparent 100%);
}

.billing-detail-contracts {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

/* 계약별 비용 현황: 계약 1건 = 1행 테이블 (Contract Overview 테이블과 행간·볼드·폰트 통일) */
.billing-detail-contract-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.875rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.billing-detail-contract-table .billing-detail-col-num { width: 7%; }
.billing-detail-contract-table .billing-detail-col-name { width: 21%; }
.billing-detail-contract-table .billing-detail-col-amount { width: 10%; }
.billing-detail-contract-table .billing-detail-col-monthly { width: 8%; }
.billing-detail-contract-table .billing-detail-col-report { width: 9%; min-width: 92px; }
.billing-detail-contract-table .billing-detail-col-admin { width: 6.5%; min-width: 72px; }

.billing-detail-contract-table-admin {
  text-align: center;
  vertical-align: middle;
  padding-left: 0.35rem !important;
  padding-right: 0.35rem !important;
  white-space: nowrap;
}

.billing-detail-contract-table thead th.billing-detail-contract-table-admin {
  font-size: 0.72rem;
  line-height: 1.25;
  padding-left: 0.35rem !important;
  padding-right: 0.35rem !important;
}

.billing-detail-row-register-btn {
  min-height: 0;
  line-height: 1;
}

.billing-detail-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  min-height: 0;
  border: 1px solid #94a3b8;
  border-radius: 6px;
  background: #f1f5f9;
  color: #1e293b;
  vertical-align: middle;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.billing-detail-icon-btn svg {
  display: block;
  flex-shrink: 0;
}

.billing-detail-icon-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #64748b;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

.billing-detail-row-report-btn {
  color: #166534;
  background: #ecfdf5;
  border-color: #6ee7b7;
}

.billing-detail-row-report-btn:hover {
  color: #14532d;
  background: #d1fae5;
  border-color: #34d399;
}

.billing-detail-row-usage-btn {
  color: #0369a1;
  background: #eff6ff;
  border-color: #93c5fd;
}

.billing-detail-row-usage-btn:hover {
  color: #075985;
  background: #dbeafe;
  border-color: #60a5fa;
}

.billing-detail-row-billing-btn--primary {
  background: #0284c7;
  border-color: #0284c7;
  color: #fff;
  box-shadow: 0 1px 2px rgba(2, 132, 199, 0.35);
}

.billing-detail-row-billing-btn--primary:hover {
  background: #0369a1;
  border-color: #0369a1;
  color: #fff;
}
.billing-detail-contract-table th,
.billing-detail-contract-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
  box-sizing: border-box;
  line-height: 1.5;
}
.billing-detail-contract-table thead th {
  background: #e2e8f0;
  font-weight: 700;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: #334155;
  letter-spacing: 0.01em;
  white-space: nowrap;
  border-bottom: 2px solid #cbd5e1;
}
.billing-detail-contract-table thead th.billing-detail-num,
.billing-detail-contract-table td.billing-detail-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.billing-detail-contract-table tbody tr {
  transition: background 0.15s;
}
.billing-detail-contract-table tbody tr:hover {
  background: #f8fafc;
}
.billing-detail-contract-table tbody tr:last-child td {
  border-bottom: none;
}
/* 계약번호 컬럼: Contract Overview .contract-number-cell 과 동일 */
.billing-detail-contract-table td.billing-detail-contract-table-num {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.billing-detail-contract-number-link {
  display: inline;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}
.billing-detail-contract-number-link:hover {
  color: inherit;
}
.overview-contract-number-link {
  display: inline;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.overview-contract-number-link:hover {
  color: var(--accent);
  text-decoration: underline;
}
.contract-table tbody tr.contract-row-focus {
  background: rgba(14, 165, 233, 0.12);
  box-shadow: inset 3px 0 0 var(--accent);
}
body.theme-dark .contract-table tbody tr.contract-row-focus {
  background: rgba(14, 165, 233, 0.18);
}
.billing-detail-contract-table tbody tr.contract-row-focus {
  background: rgba(14, 165, 233, 0.12);
  box-shadow: inset 3px 0 0 var(--accent);
}
body.theme-dark .billing-detail-contract-table tbody tr.contract-row-focus {
  background: rgba(14, 165, 233, 0.18);
}
/* 계약명 컬럼: Contract Overview .contract-name 과 동일 */
.billing-detail-contract-table td.billing-detail-contract-table-name {
  font-weight: 500;
  color: var(--text-primary);
}
/* 금액 컬럼: Contract Overview .amount-cell 과 동일 */
.billing-detail-contract-table td.billing-detail-num {
  font-weight: 500;
}
/* 청구 차액: 마이너스 시 빨간색, 플러스 시 녹색 */
.billing-detail-contract-table td.billing-detail-diff-minus {
  color: #dc2626;
}
.billing-detail-contract-table td.billing-detail-diff-plus {
  color: var(--success, #059669);
}
.billing-detail-contract-table-num {
  overflow: hidden;
  text-overflow: ellipsis;
}
.billing-detail-contract-table-name {
  overflow: hidden;
  text-overflow: ellipsis;
}
.billing-detail-contract-table-na {
  text-align: center;
  color: var(--muted, #94a3b8);
}

.billing-detail-contract-table-monthly {
  text-align: center;
  vertical-align: middle;
}

.billing-detail-contract-table-report {
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.billing-detail-report-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.billing-detail-row-pdf-report-btn {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fca5a5;
}

.billing-detail-row-pdf-report-btn:hover {
  color: #991b1b;
  background: #fee2e2;
  border-color: #f87171;
}

.billing-detail-row-excel-btn {
  min-width: 0;
}

.billing-detail-contract-table .billing-detail-monthly-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  min-height: 0;
  border: 1px solid #94a3b8;
  border-radius: 6px;
  background: #f1f5f9;
  color: #334155;
  vertical-align: middle;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.billing-detail-contract-table .billing-detail-monthly-toggle-btn:hover {
  background: #e2e8f0;
  color: #0ea5e9;
  border-color: #64748b;
}
.billing-detail-monthly-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease;
}
.billing-detail-monthly-toggle-btn.is-open .billing-detail-monthly-toggle-icon {
  transform: rotate(180deg);
}
.billing-detail-monthly-toggle-icon svg {
  display: block;
}
.billing-detail-monthly-na-text {
  font-size: 0.8125rem;
  color: var(--muted, #94a3b8);
}
.billing-detail-monthly-detail-row td {
  padding: 0;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.billing-detail-monthly-detail-cell {
  border-left: 3px solid var(--accent);
  padding: 0;
  background: #f8fafc;
  width: 100%;
}
.billing-detail-monthly-table-wrap {
  width: var(--billing-monthly-panel-width, 100%);
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 0.75rem 0.65rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #f8fafc;
}
.billing-detail-monthly-empty {
  width: var(--billing-monthly-panel-width, 100%);
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.75rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-secondary, #64748b);
  font-style: italic;
  background: #f8fafc;
}
.billing-detail-monthly-detail-cell .billing-detail-monthly-table {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
}

.billing-detail-contract-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--accent);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.billing-detail-contract-block--azure {
  border-left-color: var(--azure);
}

.billing-detail-contract-block--gcp {
  border-left-color: var(--gcp);
}

.billing-detail-contract-block--other {
  border-left-color: #94a3b8;
}

.billing-detail-contract-block:hover {
  box-shadow: var(--shadow-md);
}

.billing-detail-contract-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.75rem 1.25rem;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.billing-detail-contract-header-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
  flex: 1;
  min-width: 0;
}

.billing-detail-contract-header-right {
  flex-shrink: 0;
}

.billing-detail-contract-block--azure .billing-detail-contract-header {
  background: linear-gradient(to right, rgba(0, 120, 212, 0.06) 0%, #f1f5f9 100%);
}

.billing-detail-contract-block--gcp .billing-detail-contract-header {
  background: linear-gradient(to right, rgba(180, 83, 9, 0.06) 0%, #f1f5f9 100%);
}

.billing-detail-contract-block--other .billing-detail-contract-header {
  background: linear-gradient(to right, rgba(148, 163, 184, 0.08) 0%, #f1f5f9 100%);
}

.billing-detail-contract-number {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  font-size: 0.9rem;
}

.billing-detail-contract-name {
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
}

.billing-detail-contract-csp {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  background: #e2e8f0;
}

.billing-detail-contract-block--azure .billing-detail-contract-csp {
  background: var(--azure-light);
  color: var(--azure);
}

.billing-detail-contract-block--gcp .billing-detail-contract-csp {
  background: var(--gcp-light);
  color: var(--gcp);
}

.billing-detail-contract-block--other .billing-detail-contract-csp {
  background: #e2e8f0;
  color: #64748b;
}

.billing-detail-contract-summary {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 0.8125rem;
}

.billing-detail-contract-summary-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.6rem 0.75rem;
  background: #f8fafc;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.billing-detail-summary-item-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.billing-detail-summary-item-value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
  font-size: 0.9375rem;
}

.billing-detail-summary-item-value.billing-detail-billing-total {
  color: var(--accent);
  font-size: 1rem;
}

.billing-detail-summary-item-value.billing-detail-diff-plus {
  color: var(--success, #059669);
}

.billing-detail-summary-item-value.billing-detail-diff-minus {
  color: var(--danger, #dc2626);
}

.billing-detail-toggle-wrap {
  padding: 0.5rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: #fafbfc;
  min-height: 0;
}

.billing-detail-toggle-btn {
  padding: 0.35rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.billing-detail-toggle-btn:hover {
  background: var(--bg-main);
  color: var(--accent);
  border-color: var(--accent);
}

.billing-detail-monthly-wrap {
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  width: 100%;
  max-width: 100%;
}

.billing-detail-monthly-table {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.72rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-card);
  color: var(--text-primary);
}

.billing-detail-monthly-col-month {
  width: 4.5%;
}

.billing-detail-monthly-col-num {
  width: 11.5%;
}

.billing-detail-monthly-col-attach {
  width: 8.5%;
}

.billing-detail-monthly-month-th,
.billing-detail-monthly-table .billing-detail-monthly-month {
  width: auto;
  min-width: 0;
  padding: 0.35rem 0.3rem !important;
  font-weight: 600;
  font-size: 0.7rem;
  color: var(--text-secondary, #475569);
  white-space: nowrap;
  text-align: center;
  background: transparent;
}

.billing-detail-monthly-table th.billing-detail-num,
.billing-detail-monthly-table td.billing-detail-num {
  width: auto;
  min-width: 0;
  max-width: none;
  padding: 0.35rem 0.4rem !important;
  font-size: 0.72rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.billing-detail-monthly-table th:nth-child(9),
.billing-detail-monthly-table td:nth-child(9),
.billing-detail-monthly-table th:nth-child(10),
.billing-detail-monthly-table td:nth-child(10) {
  width: auto;
  min-width: 0;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  padding: 0.3rem 0.25rem !important;
}

.billing-detail-monthly-th-attach {
  text-align: center !important;
  font-size: 0.65rem;
  line-height: 1.2;
  white-space: nowrap !important;
  font-weight: 600;
  color: #334155;
}

.billing-detail-monthly-attach-cell {
  text-align: center;
  vertical-align: middle;
  padding: 0.25rem 0.2rem !important;
  white-space: nowrap !important;
}

.billing-detail-monthly-attach-list {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
}

.billing-detail-monthly-attach-empty {
  color: var(--muted, #94a3b8);
}

.billing-detail-monthly-attach-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.05rem;
  margin: 0;
  padding: 0.1rem 0.15rem;
  border: none;
  border-radius: 3px;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  line-height: 1;
  position: relative;
}

.billing-detail-monthly-attach-btn:hover {
  background: rgba(14, 165, 233, 0.1);
  color: #0284c7;
}

.billing-detail-monthly-attach-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.billing-detail-monthly-attach-icon svg {
  width: 12px;
  height: 12px;
}

.billing-detail-monthly-attach-badge {
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--text-secondary, #64748b);
  margin-left: 1px;
  line-height: 1;
}

.billing-detail-monthly-table th,
.billing-detail-monthly-table td {
  padding: 0.35rem 0.4rem;
  border-bottom: 1px solid var(--border);
  box-sizing: border-box;
}

.billing-detail-monthly-table th.billing-detail-monthly-th-attach,
.billing-detail-monthly-table td.billing-detail-monthly-attach-cell {
  white-space: nowrap !important;
}

.billing-detail-monthly-table thead th {
  background: #e2e8f0;
  font-weight: 600;
  color: #334155;
  font-size: 0.65rem;
  letter-spacing: 0;
  text-align: center;
  border-bottom: 1px solid #cbd5e1;
  white-space: nowrap;
}

.billing-detail-monthly-table thead th.billing-detail-num {
  text-align: right;
}

.billing-detail-monthly-table tbody tr:last-child td {
  border-bottom: none;
}

.billing-detail-monthly-table tbody tr:hover td {
  background: rgba(14, 165, 233, 0.05);
}

.billing-detail-monthly-table td.billing-detail-monthly-na {
  text-align: center;
  color: var(--muted, #94a3b8);
  font-style: italic;
  padding: 0.4rem;
  font-size: 0.7rem;
}

.billing-detail-monthly-table tfoot tr.billing-detail-monthly-foot {
  font-weight: 700;
  background: #e2e8f0;
  border-top: 1px solid #cbd5e1;
}

.billing-detail-monthly-table tfoot td {
  border-bottom: none;
  color: var(--text-primary);
}

.billing-detail-month-total {
  font-weight: 500;
}

.billing-detail-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.billing-detail-msp-plus {
  color: var(--success, #059669);
}

.billing-detail-msp-minus {
  color: var(--danger, #dc2626);
}

.billing-detail-total {
  font-weight: 600;
  color: var(--text-primary);
}

.billing-detail-empty {
  padding: 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
}

.billing-detail-message {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Subscription Detail 페이지 */
#pageSubscriptionDetail .subscription-detail-section {
  margin-top: 0;
  margin-bottom: 1rem;
}

#pageSubscriptionDetail .subscription-detail-summary {
  margin-bottom: 1.25rem;
}

/* Subscription Detail 요약: Overview와 동일한 summary-cards 스타일 */
#pageSubscriptionDetail .subscription-detail-summary-cards.summary-cards {
  margin-bottom: 1.25rem;
}

#pageSubscriptionDetail .subscription-detail-summary-grid.summary-cards-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

#pageSubscriptionDetail .subscription-detail-summary-cards .summary-card {
  padding-left: 0.85rem;
  border-left: 4px solid var(--border);
  cursor: default;
}

#pageSubscriptionDetail .subscription-detail-summary-cards .summary-card .card-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.35rem;
}

/* 계약 미적용 카드 (경고 스타일) */
#pageSubscriptionDetail .summary-card-unassigned {
  border-left-color: #f59e0b;
}

#pageSubscriptionDetail .summary-card-unassigned .summary-card-icon {
  background: rgba(245, 158, 11, 0.15);
}

#pageSubscriptionDetail .summary-card-unassigned .card-value {
  color: #d97706;
}

/* 기타 카드 */
#pageSubscriptionDetail .summary-card-other {
  border-left-color: #94a3b8;
}

#pageSubscriptionDetail .summary-card-other .summary-card-icon {
  background: rgba(148, 163, 184, 0.2);
}

#pageSubscriptionDetail .summary-card-other .card-value {
  color: #64748b;
}

#pageSubscriptionDetail .subscription-detail-search-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

#pageSubscriptionDetail .subscription-detail-search-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

#pageSubscriptionDetail .subscription-detail-search-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

#pageSubscriptionDetail .subscription-detail-search-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 0.75rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#pageSubscriptionDetail .subscription-detail-search-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.18);
}

#pageSubscriptionDetail .subscription-detail-search-icon {
  flex-shrink: 0;
  font-size: 1rem;
  opacity: 0.6;
  margin-right: 0.5rem;
}

#pageSubscriptionDetail .subscription-detail-search-input {
  flex: 1;
  min-width: 0;
  padding: 0.65rem 0;
  font-size: 0.875rem;
  border: none;
  background: transparent;
  color: var(--text-primary);
}

#pageSubscriptionDetail .subscription-detail-search-input::placeholder {
  color: var(--text-secondary);
}

#pageSubscriptionDetail .subscription-detail-search-input:focus {
  outline: none;
}

#pageSubscriptionDetail .subscription-detail-search-clear {
  flex-shrink: 0;
  margin-left: 0.5rem;
  padding-left: 0.65rem;
  padding-right: 0.65rem;
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-left: 1px solid var(--border);
  border-radius: 0;
  transition: color 0.2s, background 0.2s;
}

#pageSubscriptionDetail .subscription-detail-search-clear:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.04);
}

/* Settings > 구독 삭제 모달 - 검색 영역 */
#subscriptionDeleteModal .modal-body {
  padding: 1.4rem 1.75rem 1.6rem;
  background: linear-gradient(180deg, #f9fafb 0%, #eef2f7 100%);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#subscriptionDeleteModal .modal-desc {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

#subscriptionDeleteModal .form-row + .form-row {
  margin-top: 0.85rem;
}

#subscriptionDeleteModal .form-row:last-of-type {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#subscriptionDeleteModal .form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

#subscriptionDeleteModal .subscription-delete-search-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 0.75rem;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

#subscriptionDeleteModal .subscription-delete-search-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.18);
  background: rgba(255, 255, 255, 0.96);
}

#subscriptionDeleteModal .subscription-delete-search-icon {
  flex-shrink: 0;
  font-size: 0.95rem;
  opacity: 0.55;
  margin-right: 0.45rem;
}

#subscriptionDeleteModal .subscription-delete-search-input {
  flex: 1;
  min-width: 0;
  padding: 0.6rem 0;
  font-size: 0.875rem;
  border: none;
  background: transparent;
  color: var(--text-primary);
}

#subscriptionDeleteModal .subscription-delete-search-input::placeholder {
  color: var(--text-secondary);
}

#subscriptionDeleteModal .subscription-delete-search-input:focus {
  outline: none;
}

/* 구독 선택 리스트: 카드형 느낌 + 높이/스크롤 개선 */
#subscriptionDeleteSelect {
  flex: 1;
  min-height: 9rem;
  max-height: 100%;
  overflow-y: auto;
  border-radius: var(--radius);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.9);
}

#subscriptionDeleteSelect:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.16);
}

#subscriptionDeleteSelect option {
  padding: 0.4rem 0.35rem;
  font-size: 0.875rem;
}

#subscriptionDeleteSelect option:not(:first-child):hover {
  background-color: rgba(15, 118, 110, 0.06);
}

#pageSubscriptionDetail .subscription-detail-list-wrap {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: 1rem 1.25rem;
  margin-top: 0.5rem;
}

#pageSubscriptionDetail .subscription-detail-list-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
  padding-left: 0.25rem;
}

#pageSubscriptionDetail .subscription-detail-csp-group {
  margin-bottom: 1.75rem;
}

#pageSubscriptionDetail .subscription-detail-csp-group:last-child {
  margin-bottom: 0;
}

#pageSubscriptionDetail .subscription-detail-csp-group-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
}

#pageSubscriptionDetail .subscription-detail-csp-group-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius);
  border-left: 4px solid #cbd5e1;
  background: linear-gradient(to right, #f8fafc 0%, transparent 100%);
  flex: 1;
  min-width: 0;
}

#pageSubscriptionDetail .subscription-detail-list-toggle {
  flex-shrink: 0;
  padding: 0.45rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(14, 165, 233, 0.08);
  border: 1.5px solid var(--accent);
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

#pageSubscriptionDetail .subscription-detail-list-toggle:hover {
  background: rgba(14, 165, 233, 0.15);
  color: #0284c7;
  border-color: #0284c7;
  box-shadow: 0 2px 6px rgba(14, 165, 233, 0.25);
}

#pageSubscriptionDetail .subscription-detail-table-wrap.subscription-detail-table-wrap--closed {
  display: none;
}

#pageSubscriptionDetail .subscription-detail-table-wrap {
  overflow-x: auto;
}

#pageSubscriptionDetail .subscription-detail-csp-group--azure .subscription-detail-csp-group-title {
  color: #1d4ed8;
  border-left-color: var(--azure);
  background: linear-gradient(to right, var(--azure-light) 0%, transparent 100%);
}

#pageSubscriptionDetail .subscription-detail-csp-group--gcp .subscription-detail-csp-group-title {
  color: #92400e;
  border-left-color: var(--gcp);
  background: linear-gradient(to right, var(--gcp-light) 0%, transparent 100%);
}

#pageSubscriptionDetail .subscription-detail-csp-group--other .subscription-detail-csp-group-title {
  color: #475569;
  border-left-color: #94a3b8;
  background: linear-gradient(to right, #f1f5f9 0%, transparent 100%);
}

#pageSubscriptionDetail .subscription-detail-csp-group--unassigned .subscription-detail-csp-group-title {
  color: #b45309;
  border-left-color: #f59e0b;
  background: linear-gradient(to right, #fffbeb 0%, transparent 100%);
}

#pageSubscriptionDetail .subscription-detail-csp-group--unassigned-azure .subscription-detail-csp-group-title {
  color: #1d4ed8;
  border-left-color: var(--azure);
  background: linear-gradient(to right, var(--azure-light) 0%, transparent 100%);
}

#pageSubscriptionDetail .subscription-detail-csp-group--unassigned-gcp .subscription-detail-csp-group-title {
  color: #92400e;
  border-left-color: var(--gcp);
  background: linear-gradient(to right, var(--gcp-light) 0%, transparent 100%);
}

#pageSubscriptionDetail .subscription-detail-cell-empty {
  color: var(--text-secondary);
  font-style: normal;
}

#pageSubscriptionDetail .subscription-detail-table {
  width: 100%;
  min-width: 1320px;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.875rem;
}

/* 컬럼별 너비·간격 동일 적용 (Azure / GCP / 기타 / 계약 미적용) */
#pageSubscriptionDetail .subscription-detail-table .subscription-detail-col-name {
  width: 20%;
}
#pageSubscriptionDetail .subscription-detail-table .subscription-detail-col-id {
  width: 18%;
}
#pageSubscriptionDetail .subscription-detail-table .subscription-detail-col-date {
  width: 10%;
}
#pageSubscriptionDetail .subscription-detail-table .subscription-detail-col-account {
  width: 14%;
}
#pageSubscriptionDetail .subscription-detail-table .subscription-detail-col-cost {
  width: 10%;
}
#pageSubscriptionDetail .subscription-detail-table .subscription-detail-col-number {
  width: 10%;
}
#pageSubscriptionDetail .subscription-detail-table .subscription-detail-col-contract {
  width: 12%;
}
#pageSubscriptionDetail .subscription-detail-table .subscription-detail-col-registered {
  width: 10%;
}

#pageSubscriptionDetail .subscription-detail-table th,
#pageSubscriptionDetail .subscription-detail-table td {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#pageSubscriptionDetail .subscription-detail-table thead th {
  background: #e2e8f0;
  font-weight: 700;
  color: #334155;
  font-size: 0.8125rem;
  border-bottom: 2px solid #cbd5e1;
}

#pageSubscriptionDetail .subscription-detail-table tbody tr:hover {
  background: #f8fafc;
}

#pageSubscriptionDetail .subscription-detail-table td.subscription-detail-cost {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

#pageSubscriptionDetail .subscription-detail-name {
  font-weight: 500;
  color: var(--text-primary);
}

#pageSubscriptionDetail .subscription-detail-id {
  color: var(--text-secondary);
  word-break: break-all;
}

#pageSubscriptionDetail .subscription-detail-csp {
  color: var(--text-secondary);
  white-space: nowrap;
}

#pageSubscriptionDetail .subscription-detail-action {
  white-space: nowrap;
}

#pageSubscriptionDetail .subscription-detail-empty {
  padding: 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
}

#pageSubscriptionDetail .subscription-detail-loading {
  padding: 1.2rem 1rem;
  margin-bottom: 0.75rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: rgba(148, 163, 184, 0.08);
  text-align: center;
}

#pageSubscriptionDetail .subscription-detail-loading-message {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

#pageSubscriptionDetail .subscription-detail-message {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Settings 페이지 */
.settings-section {
  margin-top: 1rem;
}

.settings-placeholder {
  padding: 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
}

.settings-message {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.settings-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

/* 역할별 레이아웃: 1행(사용자) / 구분선 / 2행(관리자) */
.settings-cards--role-layout {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
}

.settings-cards--role-layout .settings-col--user {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  width: 100%;
}

.settings-divider {
  width: 100%;
  height: 1px;
  min-height: 1px;
  background: var(--border, #e5e7eb);
  margin: 1.5rem 0;
  display: none;
}

.settings-cards--role-layout .settings-col--admin {
  display: none;
  width: 100%;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

#settingsSection.is-admin .settings-divider {
  display: block;
}

#settingsSection.is-admin .settings-col--admin {
  display: grid;
}

.settings-change-password-form .form-row {
  margin-bottom: 1rem;
}

.settings-change-password-form .form-row:last-of-type {
  margin-bottom: 1.25rem;
}

.settings-change-password-form .form-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.settings-change-password-form .form-input {
  width: 100%;
  max-width: 280px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9375rem;
}

.settings-card {
  padding: 1.75rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.settings-card .btn-primary {
  padding: 0.6rem 1.25rem;
  font-size: 0.9375rem;
}

.settings-card-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.settings-contract-select {
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}

.settings-card-form--contract-edit .settings-contract-combobox {
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}

.settings-card-form--user-role .settings-user-role-select {
  flex: 0 1 160px;
  min-width: 140px;
  max-width: 180px;
}

/* 구독 삭제 모달 안에서는 전체 폭을 사용하도록 재정의 */
#subscriptionDeleteModal .settings-contract-select {
  max-width: none;
  width: 100%;
}

.settings-card-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.settings-card-desc {
  margin: 0 0 1.25rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Settings > 사용자 현황 카드 */
.settings-user-stats {
  margin: 0;
  padding: 0.25rem 0 0;
}

.settings-user-stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.35);
  font-size: 0.875rem;
}

.settings-user-stats-row:last-child {
  border-bottom: none;
}

.settings-user-stats-row dt {
  margin: 0;
  color: var(--text-secondary);
}

.settings-user-stats-row dd {
  margin: 0;
  font-weight: 600;
  color: var(--text-primary);
}

.settings-card .btn-register {
  padding: 0.6rem 1.25rem;
  font-size: 0.9375rem;
}

.settings-account-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1.5rem;
  margin: 0;
  font-size: 0.9rem;
}

.settings-account-dl dt {
  margin: 0;
  color: var(--text-secondary);
  font-weight: 500;
}

.settings-account-dl dd {
  margin: 0;
  color: var(--text-primary);
  font-weight: 600;
}

.settings-check-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.settings-check-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
}

.settings-check {
  width: 1.125rem;
  height: 1.125rem;
  accent-color: var(--accent);
}

.settings-inline-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.settings-inline-label span {
  white-space: nowrap;
}

.settings-select-sm {
  min-width: 120px;
  padding: 0.4rem 0.6rem;
  font-size: 0.875rem;
}

.main-header {
  position: relative;
  margin-bottom: 1.5rem;
  padding: 1.25rem 1.5rem 1.35rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  overflow: hidden;
}

.main-header-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  color: var(--accent);
}

.main-header-bg svg {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.main-header-bg .header-shape {
  opacity: 0;
  transform-origin: center;
  animation: header-shape-in 0.5s ease-out forwards;
}

.main-header-bg .header-shape:nth-child(2) { animation-delay: 0s; }
.main-header-bg .header-shape:nth-child(3) { animation-delay: 0.05s; }
.main-header-bg .header-shape:nth-child(4) { animation-delay: 0.1s; }
.main-header-bg .header-shape:nth-child(5) { animation-delay: 0.12s; }
.main-header-bg .header-shape:nth-child(6) { animation-delay: 0.15s; }
.main-header-bg .header-shape:nth-child(7) { animation-delay: 0.18s; }
.main-header-bg .header-shape:nth-child(8) { animation-delay: 0.2s; }
.main-header-bg .header-shape:nth-child(9) { animation-delay: 0.22s; }
.main-header-bg .header-shape:nth-child(10) { animation-delay: 0.25s; }
.main-header-bg .header-shape:nth-child(11) { animation-delay: 0.28s; }
.main-header-bg .header-shape:nth-child(12) { animation-delay: 0.3s; }

@keyframes header-shape-in {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.main-header-title,
.main-header-subtitle {
  position: relative;
  z-index: 1;
}

.main-header-title {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.3;
  margin: 0;
}

.main-header-subtitle {
  position: relative;
  z-index: 1;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0.4rem 0 0;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* ===== 정보 요약 (계약금액 & 사용율) ===== */
.info-summary-section {
  margin-bottom: 1.25rem;
}

.info-summary-heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-secondary, #475569);
  letter-spacing: 0.02em;
  margin: 0 0 0.6rem 0;
  padding: 0;
}

.amount-usage-hero {
  background: linear-gradient(152deg, #0f172a 0%, #1a2332 50%, #1e293b 100%);
  border-radius: 14px;
  padding: 1.35rem 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  color: #fff;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.amount-usage-block {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.amount-usage-block[data-block="azure"] {
  background: rgba(96, 165, 250, 0.06);
  border-color: rgba(96, 165, 250, 0.2);
}

.amount-usage-block[data-block="gcp"] {
  background: rgba(234, 179, 8, 0.06);
  border-color: rgba(234, 179, 8, 0.2);
}

.amount-usage-block-title {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding-bottom: 0.35rem;
  margin-bottom: 0.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.amount-usage-block[data-block="total"] .amount-usage-block-title {
  color: rgba(255, 255, 255, 0.95);
}

.amount-usage-block[data-block="azure"] .amount-usage-block-title {
  color: #7dd3fc;
}

.amount-usage-block[data-block="gcp"] .amount-usage-block-title {
  color: #fde047;
}

.amount-usage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem 0.65rem;
  align-items: stretch;
  min-width: 0;
}

.amount-usage-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.6rem 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-width: 0;
}

.amount-usage-card .amount-usage-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.amount-usage-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.amount-usage-value {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.amount-card .amount-usage-value { color: #93c5fd; }
.usage-card .amount-usage-value { color: #a5f3fc; }
.rate-card .amount-usage-value { color: #fff; margin-bottom: 0.2rem; font-size: 1.15rem; }

.usage-rate-bar-wrap {
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  overflow: hidden;
}

.usage-rate-bar {
  height: 100%;
  border-radius: 999px;
  width: 0;
}

.usage-rate-bar--animate {
  animation: usage-rate-fill 0.6s ease-out forwards;
}

@keyframes usage-rate-fill {
  from { width: 0; }
  to { width: var(--rate, 0); }
}

.usage-rate-bar.normal {
  background: linear-gradient(90deg, #34d399, #10b981);
}

.usage-rate-bar.warning {
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

.usage-rate-bar.critical {
  background: linear-gradient(90deg, #f87171, #ef4444);
}

/* ===== Summary Cards (계약 수 요약) ===== */
.summary-cards {
  margin-bottom: 1.25rem;
}

.summary-cards .card {
  padding: 0.85rem 1rem;
}

.summary-cards-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
  padding-left: 0.25rem;
}

.summary-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.summary-card {
  position: relative;
  padding-left: 0.85rem;
  border-left: 4px solid var(--border);
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s, border-left-width 0.2s;
}

.summary-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.summary-card:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--accent);
}

.summary-card.is-active {
  box-shadow: 0 0 0 2px var(--accent), 0 4px 16px rgba(0, 0, 0, 0.1);
  border-left-width: 6px;
  transform: translateY(-1px);
}

.summary-card-total {
  border-left-color: #64748b;
}

.summary-card-total.is-active {
  box-shadow: 0 0 0 2px #64748b, 0 4px 16px rgba(0, 0, 0, 0.1);
  background: #f8fafc;
}

.summary-card-azure {
  border-left-color: var(--azure);
}

.summary-card-azure.is-active {
  box-shadow: 0 0 0 2px var(--azure), 0 4px 16px rgba(0, 0, 0, 0.1);
  background: var(--azure-light);
}

.summary-card-gcp {
  border-left-color: var(--gcp);
}

.summary-card-gcp.is-active {
  box-shadow: 0 0 0 2px var(--gcp), 0 4px 16px rgba(0, 0, 0, 0.1);
  background: var(--gcp-light);
}

.summary-card-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.summary-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.04);
  font-size: 1.1rem;
}

.summary-card-icon img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.summary-card-total .summary-card-icon { background: #e2e8f0; }
.summary-card-azure .summary-card-icon { background: rgba(0, 120, 212, 0.12); }
.summary-card-gcp .summary-card-icon { background: rgba(234, 179, 8, 0.2); }

.summary-card .card-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.summary-card .card-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.summary-card .card-unit {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-left: 0.2em;
}

.summary-card-total .card-value { color: #334155; }
.summary-card-azure .card-value { color: var(--azure); }
.summary-card-gcp .card-value { color: var(--gcp); }

/* ===== 만료 예정 배너 ===== */
.expiry-banner-wrap {
  margin-bottom: 1rem;
}
.expiry-banner {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: #92400e;
}
.expiry-banner-icon { font-size: 1rem; }
.expiry-banner strong { margin: 0 0.25rem; }

/* ===== 최근 본 계약 ===== */
.recent-section {
  margin-bottom: 1rem;
}
.recent-header {
  margin-bottom: 0.5rem;
}
.recent-title {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0;
}
.recent-clear-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem;
  margin: 0;
  background: none;
  border: none;
  border-radius: 4px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  vertical-align: middle;
}
.recent-clear-btn:hover {
  color: var(--accent);
  background: rgba(14, 165, 233, 0.1);
}
.recent-clear-icon {
  display: block;
}
.recent-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0;
  align-items: stretch;
}
.recent-item {
  display: flex;
  align-items: center;
  padding: 0.4rem 0.75rem;
  background: rgba(14, 165, 233, 0.06);
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: 6px;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}
.recent-link {
  font-size: 0.8125rem;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}
.recent-link:hover { text-decoration: underline; }

/* ===== 빠른 필터 ===== */
/* ===== 빠른 필터 ===== */
.quick-filter-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 1rem;
  padding: 0.5rem 1rem;
  min-height: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.quick-filter-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0;
  flex-shrink: 0;
}
.quick-filter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.quick-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.75rem;
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.quick-filter-btn:hover {
  background: rgba(14, 165, 233, 0.08);
  border-color: rgba(14, 165, 233, 0.35);
  color: var(--accent);
}
.quick-filter-btn.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 1px 4px rgba(14, 165, 233, 0.3);
}
.quick-filter-btn.is-active:hover {
  background: #0284c7;
  border-color: #0284c7;
  color: #fff;
}
.quick-filter-btn-icon {
  font-size: 0.875rem;
  line-height: 1;
}
.quick-filter-btn-text {
  white-space: nowrap;
}
.quick-filter-btn--clear {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.35rem 0.6rem;
}
.quick-filter-btn--clear:hover {
  background: rgba(100, 116, 139, 0.12);
  border-color: var(--border);
  color: var(--text-primary);
}
.quick-filter-btn--clear.is-active {
  background: #374151;
  color: #e5e7eb;
  border-color: #4b5563;
  box-shadow: none;
}

/* ===== 즐겨찾기 ===== */
.btn-favorite {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-secondary);
  padding: 0.2rem;
  line-height: 1;
}
.btn-favorite:hover { color: #f59e0b; }
.btn-favorite.is-favorite { color: #f59e0b; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ===== Toolbar ===== */
.toolbar {
  margin-bottom: 1rem;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.overview-contract-register-btn {
  flex-shrink: 0;
  font-weight: 600;
}

.filter-select {
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.875rem;
  background: var(--bg-card);
  color: var(--text-primary);
  min-width: 120px;
}

.search-input {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.875rem;
  width: 280px;
  max-width: 100%;
}

.search-input::placeholder {
  color: var(--text-secondary);
}

.search-input:focus,
.filter-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.15);
}

.btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background 0.2s, color 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #0284c7;
}

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

.btn-secondary:hover {
  background: var(--border);
  color: var(--text-primary);
}

.btn-register {
  background: #059669;
  color: #fff;
}

.btn-register:hover {
  background: #047857;
}

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

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

.btn-outline.btn-danger {
  color: var(--danger, #dc2626);
  border-color: var(--danger, #dc2626);
}
.btn-outline.btn-danger:hover {
  background: rgba(220, 38, 38, 0.08);
  color: var(--danger, #dc2626);
}

.column-toggle-wrap {
  position: relative;
}

.column-toggle-panel {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.35rem;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 0.75rem;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s, visibility 0.15s;
}

.column-toggle-panel.is-open {
  opacity: 1;
  visibility: visible;
}

.column-toggle-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

.column-toggle-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 280px;
  overflow-y: auto;
}

.column-toggle-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  font-size: 0.875rem;
  cursor: pointer;
  user-select: none;
}

.column-toggle-item:hover {
  color: var(--accent);
}

.column-toggle-checkbox {
  width: 1rem;
  height: 1rem;
  cursor: pointer;
}

/* ===== Table ===== */
.table-section {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.table-wrapper {
  overflow-x: auto;
}

.contract-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.contract-table th,
.contract-table td {
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  line-height: 1.5;
}

.contract-table th {
  background: #e2e8f0;
  font-weight: 700;
  color: #334155;
  font-size: 0.8125rem;
  line-height: 1.4;
  text-transform: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
  border-bottom: 2px solid #cbd5e1;
}

.contract-table tbody tr {
  transition: background 0.15s;
}

.contract-table tbody tr:hover {
  background: #f8fafc;
}

.contract-table tbody tr:last-child td {
  border-bottom: none;
}

/* 계약 테이블 컬럼 너비 (data-column-id 기준, 컬럼 표시/숨김과 무관) */
.contract-table th[data-column-id="contractNumber"],
.contract-table td[data-column-id="contractNumber"] { width: 7%; min-width: 100px; }
.contract-table th[data-column-id="contractName"],
.contract-table td[data-column-id="contractName"] { min-width: 140px; }
.contract-table th[data-column-id="csp"],
.contract-table td[data-column-id="csp"] { width: 5%; min-width: 64px; max-width: 88px; }
.contract-table th[data-column-id="contractAmount"],
.contract-table td[data-column-id="contractAmount"] { min-width: 100px; }
.contract-table th[data-column-id="currentUsage"],
.contract-table td[data-column-id="currentUsage"] { min-width: 100px; }
.contract-table th[data-column-id="billingAmount"],
.contract-table td[data-column-id="billingAmount"] { min-width: 100px; }
.contract-table th[data-column-id="billingDiff"],
.contract-table td[data-column-id="billingDiff"] { min-width: 90px; }
.contract-table th[data-column-id="usageRate"],
.contract-table td[data-column-id="usageRate"] { min-width: 200px; width: 12%; }
.contract-table th[data-column-id="endCustomer"],
.contract-table td[data-column-id="endCustomer"] { min-width: 90px; }
.contract-table th[data-column-id="haeManager"],
.contract-table td[data-column-id="haeManager"] { min-width: 80px; }
.contract-table th[data-column-id="subscriptionOrProject"],
.contract-table td[data-column-id="subscriptionOrProject"] { min-width: 120px; }
.contract-table th[data-column-id="contractPeriod"],
.contract-table td[data-column-id="contractPeriod"] { min-width: 150px; }
.contract-table th[data-column-id="billingMethod"],
.contract-table td[data-column-id="billingMethod"] { min-width: 100px; }
/* billingCycle: 아래 블록에 width 1% + min-width 22rem */
.contract-table th[data-column-id="contractStatus"],
.contract-table td[data-column-id="contractStatus"] { min-width: 72px; }
.contract-table th[data-column-id="action"],
.contract-table td[data-column-id="action"] { width: 6%; min-width: 88px; max-width: 112px; }

.contract-number-cell {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
}

.contract-name {
  font-weight: 500;
  color: var(--text-primary);
}

.credit-applied-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  margin-left: 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #0b1220;
  background: #34d399; /* green-400 계열 */
  border: 1px solid rgba(16, 185, 129, 0.55);
  white-space: nowrap;
  vertical-align: middle;
}

.credit-applied-badge-btn {
  font-family: inherit;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}

.credit-applied-badge-btn:hover {
  background: #6ee7b7;
  border-color: rgba(5, 150, 105, 0.75);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.credit-applied-badge-btn:focus-visible {
  outline: 2px solid rgba(16, 185, 129, 0.65);
  outline-offset: 2px;
}

.credit-applied-badge::before {
  content: '★';
  font-size: 0.8rem;
  margin-right: 0.25rem;
  opacity: 0.9;
}

body.theme-dark .credit-applied-badge {
  color: #ecfeff;
  background: rgba(16, 185, 129, 0.20);
  border-color: rgba(16, 185, 129, 0.55);
}

body.theme-dark .credit-applied-badge-btn:hover {
  background: rgba(16, 185, 129, 0.34);
  border-color: rgba(52, 211, 153, 0.75);
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.2);
}

.msp-rate-missing-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  margin-left: 0.4rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #7c2d12;
  background: #fdba74;
  border: 1px solid rgba(249, 115, 22, 0.45);
  white-space: nowrap;
  vertical-align: middle;
}

body.theme-dark .msp-rate-missing-badge {
  color: #ffedd5;
  background: rgba(249, 115, 22, 0.24);
  border-color: rgba(251, 146, 60, 0.65);
}

.contract-name a {
  color: inherit;
  text-decoration: none;
}

.contract-name a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.csp-logo {
  display: inline-block;
  height: 20px;
  width: auto;
  max-width: 56px;
  object-fit: contain;
  vertical-align: middle;
}

.csp-logo-modal {
  height: 24px;
  max-width: 72px;
}

.csp-text {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  vertical-align: middle;
}

.csp-text.csp-other {
  color: #64748b;
  padding: 0.15rem 0.5rem;
  background: rgba(100, 116, 139, 0.12);
  border-radius: 6px;
}

.csp-tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
}

.csp-tag.azure {
  background: var(--azure-light);
  color: var(--azure);
}

.csp-tag.gcp {
  background: var(--gcp-light);
  color: var(--gcp);
}

.amount-cell {
  font-weight: 500;
  white-space: nowrap;
}


.amount-cell.amount-na,
.amount-na {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.8rem;
}

.usage-rate-cell .usage-rate-na {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.usage-rate-na {
  color: rgba(255, 255, 255, 0.7);
}

.usage-rate-desc {
  display: block;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.25rem;
}

.usage-rate-cell {
  min-width: 200px;
}

.usage-rate-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.usage-rate-inline-bar {
  flex: 1;
  min-width: 60px;
  height: 8px;
}

.usage-rate-inline--payg-special {
  gap: 0.4rem;
}

.usage-rate-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.12);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.usage-rate-note {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
}

.usage-rate-pct {
  flex-shrink: 0;
  font-weight: 600;
  font-size: 0.8rem;
  min-width: 2.2em;
}

.usage-rate-pct.normal { color: #059669; }
.usage-rate-pct.warning { color: #d97706; }
.usage-rate-pct.critical { color: #dc2626; }

.contract-table th[data-column-id="billingCycle"],
.contract-table td.billing-cycle-cell {
  width: 1%;
  min-width: 22rem; /* 월 1회 + 12개 뱃지 한 줄 유지 */
}

.contract-table th[data-column-id="billingCycle"] {
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

.billing-cycle-cell {
  font-size: 0.875rem;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

.contract-table th[data-column-id="action"],
.contract-table td[data-column-id="action"] {
  padding-left: 0.5rem;
  text-align: center;
}

.billing-cycle-wrap {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.35rem;
}

.billing-cycle-label {
  margin-right: 0.25rem;
  white-space: nowrap;
}

.billing-month-badges {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
}

.billing-month-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  color: var(--text-primary, #1e293b);
  background: var(--billing-badge-bg, #e2e8f0);
  border: 1px solid var(--billing-badge-border, #cbd5e1);
  border-radius: 4px;
  box-sizing: border-box;
}

.billing-cycle-empty {
  color: var(--text-tertiary, #94a3b8);
}

.contract-status-cell {
  font-size: 0.8125rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 6px;
  white-space: nowrap;
}

.status-badge--active {
  background: rgba(5, 150, 105, 0.12);
  color: #059669;
  border: 1px solid rgba(5, 150, 105, 0.3);
}

.status-badge--ended {
  background: rgba(100, 116, 139, 0.15);
  color: #64748b;
  border: 1px solid rgba(100, 116, 139, 0.3);
}

.status-badge--pending {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
  border: 1px solid rgba(217, 119, 6, 0.35);
}

.status-badge--default {
  background: #f1f5f9;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.status-badge--empty {
  background: transparent;
  color: var(--text-tertiary, #94a3b8);
  border: none;
  font-weight: 500;
}

.billing-diff-cell {
  white-space: nowrap;
  font-weight: 600;
}

.billing-diff-plus {
  color: #059669;
}

.billing-diff-minus {
  color: #dc2626;
}

.detail-value.billing-diff-plus { color: #059669; }
.detail-value.billing-diff-minus { color: #dc2626; }

.usage-rate-infinity {
  font-size: 1.25em;
  font-weight: 600;
  color: #64748b;
  line-height: 1;
}

.usage-rate-bar-payg {
  background: #e2e8f0;
}

.usage-rate-bar.payg {
  width: 100%;
  background: repeating-linear-gradient(
    90deg,
    #94a3b8 0,
    #94a3b8 4px,
    transparent 4px,
    transparent 8px
  );
  opacity: 0.9;
}

.btn-detail {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.2s, color 0.2s;
}

.btn-detail--icon {
  padding: 0.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-detail--icon .btn-detail-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.btn-detail--icon .btn-detail-icon svg {
  display: block;
}

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

.contract-table-action-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex-wrap: nowrap;
}

.btn-contract-edit-row {
  color: #64748b;
  border-color: #cbd5e1;
}

.btn-contract-edit-row:hover {
  background: #475569;
  border-color: #475569;
  color: #fff;
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  padding: 1.25rem;
}

.modal-overlay[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.modal-overlay[aria-hidden="false"] .modal {
  animation: modalIn 0.25s ease-out;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal {
  background: var(--bg-card);
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18), 0 0 1px rgba(0, 0, 0, 0.08);
  max-width: 820px;
  width: 100%;
  max-height: 72vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 1.35rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, #fafbfc 0%, var(--bg-card) 100%);
}

.modal-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-close {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--border);
  font-size: 1.35rem;
  line-height: 1;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: #d1d5db;
  color: var(--text-primary);
}

.modal-close:active {
  transform: scale(0.96);
}

.modal-body {
  padding: 1.5rem 1.5rem 1.75rem;
  overflow-y: auto;
  background: #fafbfc;
}

.modal-amount-block {
  background: linear-gradient(152deg, #0f172a 0%, #1a2332 40%, #1e293b 100%);
  color: #fff;
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-amount-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.35rem;
}

.modal-amount-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem 0;
}

.modal-amount-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.7);
}

.modal-amount-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.modal-amount-rate {
  grid-column: span 1;
}

.modal-amount-rate .usage-rate-bar-wrap {
  margin-top: 0.45rem;
  height: 10px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  overflow: hidden;
}

.usage-rate-value.normal { color: #34d399; }
.usage-rate-value.warning { color: #fbbf24; }
.usage-rate-value.critical { color: #f87171; }

.modal-amount-block .usage-rate-infinity {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.3rem;
}

.modal-amount-block .usage-rate-bar-payg {
  background: rgba(255, 255, 255, 0.12);
}

.modal-amount-block .usage-rate-bar.payg {
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.5) 0,
    rgba(255, 255, 255, 0.5) 4px,
    transparent 4px,
    transparent 8px
  );
}

.modal-amount-block .usage-rate-desc {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.25rem;
}

.modal-detail-section-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  margin: 0 0 0.75rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

.modal-detail-rows {
  margin-top: 0;
  background: var(--bg-card);
  border-radius: 12px;
  padding: 0 1.25rem;
  border: 1px solid var(--border);
  overflow: hidden;
}

.modal-detail-rows .detail-row:nth-child(odd) {
  background: rgba(0, 0, 0, 0.02);
}

body.theme-dark .modal-detail-rows .detail-row:nth-child(odd) {
  background: rgba(255, 255, 255, 0.03);
}

/* 상세 모달 편집 모드 */
.detail-edit-wrap {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.detail-edit-form {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.detail-edit-form .modal-body--form {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.5rem 1.5rem;
}

.detail-edit-form .modal-footer--form {
  flex-shrink: 0;
}

/* ===== 계약 등록 모달 ===== */
.modal--register {
  max-width: 720px;
  max-height: 78vh;
  border-radius: 16px;
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.12), 0 0 1px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.modal--credit-register {
  max-width: min(1080px, calc(100vw - 2rem));
  max-height: 86vh;
}

.modal--credit-register .modal-body--form {
  padding-left: 1.75rem;
  padding-right: 1.75rem;
  overflow-x: hidden;
}

.modal--register .modal-header {
  flex-shrink: 0;
  padding: 1.5rem 1.75rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid var(--border);
  border-left: 4px solid #059669;
}

.modal--register .modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

/* ===== 계약 등록 모달 (개편) ===== */
.modal--contract-register {
  max-width: min(720px, calc(100vw - 2rem));
  max-height: min(88vh, 920px);
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow:
    0 24px 48px rgba(15, 23, 42, 0.12),
    0 8px 16px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  background: var(--bg-card);
}

.contract-reg-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 1.5rem 1.15rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}

.contract-reg-header-main {
  min-width: 0;
}

.contract-reg-eyebrow {
  display: block;
  margin: 0 0 0.35rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #059669;
}

.contract-reg-title {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.25;
}

.contract-reg-lead {
  margin: 0.45rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.contract-reg-close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-main);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.contract-reg-close:hover {
  background: #f1f5f9;
  color: var(--text-primary);
  border-color: #cbd5e1;
}

.modal--contract-register .contract-reg-body {
  padding: 1.1rem 1.25rem 1.35rem;
  background: #f8fafc;
}

.contract-reg-panels {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contract-reg-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.contract-reg-panel-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem 0.7rem;
  border-bottom: 1px solid #f1f5f9;
  background: linear-gradient(180deg, #fafbfc 0%, var(--bg-card) 100%);
}

.contract-reg-panel-index {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 8px;
  font-size: 0.6875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #0f766e;
  background: rgba(5, 150, 105, 0.1);
  letter-spacing: 0.02em;
}

.contract-reg-panel-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.contract-reg-panel-desc {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.contract-reg-panel-body {
  padding: 0.85rem 1rem 1rem;
}

.contract-reg-fields {
  display: grid;
  gap: 0.85rem 1rem;
}

.contract-reg-fields--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contract-reg-field {
  min-width: 0;
}

.contract-reg-field--span2 {
  grid-column: 1 / -1;
}

.contract-reg-field[aria-hidden="true"],
.contract-reg-months-wrap[aria-hidden="true"] {
  display: none;
}

.contract-reg-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.modal--contract-register .contract-reg-input,
.modal--contract-register .contract-reg-textarea {
  border-radius: 10px;
  border-color: #e2e8f0;
  background: #fff;
  padding: 0.58rem 0.8rem;
  font-size: 0.875rem;
}

.modal--contract-register .contract-reg-input:hover,
.modal--contract-register .contract-reg-textarea:hover {
  border-color: #cbd5e1;
}

.modal--contract-register .contract-reg-input:focus,
.modal--contract-register .contract-reg-textarea:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.modal--contract-register .contract-reg-textarea {
  min-height: 72px;
  resize: vertical;
}

.contract-reg-month-chips {
  gap: 0.4rem;
}

.contract-reg-month-chip {
  min-width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.contract-reg-month-chip.is-selected {
  background: #059669;
  border-color: #059669;
  color: #fff;
}

.contract-reg-sub-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.contract-reg-sub-toolbar:focus-within {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
  background: #fff;
}

.contract-reg-sub-toolbar-icon {
  flex-shrink: 0;
  display: inline-flex;
  color: var(--text-secondary);
  opacity: 0.75;
}

.contract-reg-sub-search {
  flex: 1;
  min-width: 0;
  padding: 0.2rem 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 0.875rem;
}

.contract-reg-sub-search:focus {
  outline: none;
  box-shadow: none !important;
}

.contract-reg-sub-list {
  display: flex;
  flex-direction: column;
  max-height: min(22rem, 46vh);
  min-height: 14rem;
  margin: 0;
  padding: 0.25rem 0.35rem 0.35rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fafbfc;
  gap: 0.1rem;
  overflow-y: auto;
}

.contract-reg-sub-item {
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr);
  column-gap: 0.65rem;
  align-items: center;
  margin: 0;
  padding: 0.5rem 0.55rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.contract-reg-sub-item:hover {
  background: rgba(14, 165, 233, 0.06);
}

.contract-reg-sub-check {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: #059669;
}

.contract-reg-sub-main {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  column-gap: 0.85rem;
  align-items: center;
  line-height: 1.35;
}

.contract-reg-sub-main--name-only {
  grid-template-columns: minmax(0, 1fr);
}

.contract-reg-sub-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.contract-reg-sub-id {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  text-align: right;
}

.contract-reg-sub-search:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.modal--contract-register .contract-reg-check-row {
  margin-top: -0.15rem;
}

.modal--contract-register .contract-reg-check-label {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.45;
  cursor: pointer;
}

.modal--contract-register .contract-reg-check-label input {
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: #059669;
}

.modal--contract-register .contract-reg-file-input {
  padding: 0.45rem 0.65rem;
  font-size: 0.8125rem;
}

.modal--contract-register .contract-reg-attachment-list {
  margin-top: 0;
  min-height: 2.75rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fafbfc;
}

.modal--contract-register .contract-reg-attachment-list .monthly-usage-attachment-empty {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.modal--contract-register .contract-reg-attachment-list .monthly-usage-attachment-ul {
  margin: 0;
  padding-left: 1rem;
  font-size: 0.8125rem;
}

.modal--contract-register .contract-combobox-trigger.contract-reg-input {
  width: 100%;
  text-align: left;
}

.contract-reg-empty {
  padding: 1rem 0.75rem;
  text-align: center;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.modal--contract-register .contract-reg-footer {
  padding: 0.9rem 1.25rem;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  gap: 0.6rem;
}

.contract-reg-btn-cancel {
  min-width: 5rem;
  border-radius: 10px;
}

.contract-reg-btn-submit {
  min-width: 6.5rem;
  border-radius: 10px;
  font-weight: 700;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

body.theme-dark .modal--contract-register {
  border-color: var(--border);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

body.theme-dark .contract-reg-header {
  background: var(--bg-card);
  border-bottom-color: var(--border);
}

body.theme-dark .contract-reg-close {
  background: #1f2937;
  border-color: var(--border);
  color: #94a3b8;
}

body.theme-dark .contract-reg-close:hover {
  background: #374151;
  color: #e2e8f0;
}

body.theme-dark .modal--contract-register .contract-reg-body {
  background: #0f172a;
}

body.theme-dark .contract-reg-panel {
  background: #1f2937;
  border-color: var(--border);
}

body.theme-dark .contract-reg-panel-head {
  background: linear-gradient(180deg, #243044 0%, #1f2937 100%);
  border-bottom-color: var(--border);
}

body.theme-dark .contract-reg-panel-index {
  color: #6ee7b7;
  background: rgba(5, 150, 105, 0.18);
}

body.theme-dark .modal--contract-register .contract-reg-input,
body.theme-dark .modal--contract-register .contract-reg-textarea {
  background: #111827;
  border-color: var(--border);
  color: var(--text-primary);
}

body.theme-dark .contract-reg-sub-toolbar {
  background: #111827;
  border-color: var(--border);
}

body.theme-dark .contract-reg-sub-toolbar:focus-within {
  background: #1f2937;
}

body.theme-dark .contract-reg-sub-list {
  background: #111827;
  border-color: var(--border);
}

body.theme-dark .contract-reg-sub-item:hover {
  background: rgba(14, 165, 233, 0.12);
}

body.theme-dark .modal--contract-register .contract-reg-attachment-list {
  background: #111827;
  border-color: var(--border);
}

body.theme-dark .modal--contract-register .contract-reg-footer {
  background: rgba(17, 24, 39, 0.94);
}

@media (max-width: 640px) {
  .modal--contract-register {
    max-width: 100%;
    max-height: 94vh;
    margin: 0.5rem;
    border-radius: 16px;
  }

  .contract-reg-header {
    padding: 1rem 1rem 0.85rem;
  }

  .contract-reg-title {
    font-size: 1.2rem;
  }

  .modal--contract-register .contract-reg-body {
    padding: 0.85rem 0.85rem 1rem;
  }

  .contract-reg-fields--2 {
    grid-template-columns: 1fr;
  }

  .contract-reg-field--span2 {
    grid-column: auto;
  }

  .modal--contract-register .contract-reg-footer {
    padding: 0.85rem;
  }
}

.modal-form {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.modal-body--form {
  padding: 1.5rem 1.75rem 1.75rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  background: linear-gradient(180deg, #fafbfc 0%, #f4f6f8 100%);
}

.modal-footer--form {
  flex-shrink: 0;
  padding: 1.25rem 1.75rem;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.04);
}

.form-section {
  margin-bottom: 1.75rem;
  background: var(--bg-card);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.form-section:last-child {
  margin-bottom: 0;
}

.form-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-row {
  margin-bottom: 1.1rem;
}

.form-row:last-child {
  margin-bottom: 0;
}

.form-row[aria-hidden="true"] {
  display: none;
}

.form-row--half {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-row--third {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.form-required {
  color: #dc2626;
  font-weight: 600;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 0.875rem;
  color: var(--text-primary);
  background: var(--bg-card);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
  border-color: #cbd5e1;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-secondary);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  padding-right: 2.25rem;
}

.form-textarea {
  resize: vertical;
  min-height: 88px;
}

.form-group {
  min-width: 0;
}

.form-month-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.form-month-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}

.form-month-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(14, 165, 233, 0.06);
}

.form-month-chip.is-selected {
  background: rgba(5, 150, 105, 0.12);
  border-color: #059669;
  color: #059669;
  font-weight: 700;
}

.form-sub-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.form-sub-item {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.form-sub-search-wrap {
  margin-bottom: 0.5rem;
}

.form-sub-search-input {
  width: 100%;
  max-width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
}

.form-sub-check-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 12rem;
  overflow-y: auto;
  padding: 0.5rem 0;
}

.form-sub-check-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.form-sub-check-item .form-check-input {
  margin: 0;
  width: 1rem;
  height: 1rem;
}

.form-sub-check-item span {
  flex: 1;
}

.contract-combobox {
  position: relative;
  width: 100%;
}

.contract-combobox-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.contract-combobox-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contract-combobox-chevron {
  flex-shrink: 0;
  font-size: 0.65rem;
  opacity: 0.65;
}

.contract-combobox-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 80;
  display: flex;
  flex-direction: column;
  padding: 0.5rem;
  max-height: min(50vh, 320px);
  background: var(--bg-card, #fff);
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
}

.contract-combobox-panel[hidden] {
  display: none !important;
}

.contract-combobox-filter {
  flex-shrink: 0;
  margin-bottom: 0.45rem;
}

.contract-combobox-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  min-height: 2rem;
  flex: 1;
}

.contract-combobox-list li {
  padding: 0.45rem 0.5rem;
  border-radius: 6px;
  font-size: 0.875rem;
  cursor: pointer;
  color: var(--text-primary);
}

.contract-combobox-list li:hover,
.contract-combobox-list li:focus {
  background: var(--bg-muted, #f1f5f9);
  outline: none;
}

.contract-combobox-empty {
  cursor: default;
  color: var(--text-muted, #64748b);
  font-size: 0.8125rem;
}

.contract-combobox-empty:hover {
  background: transparent !important;
}

.modal-overlay--register.modal-overlay--combobox-open .modal-form,
.modal-overlay--register.modal-overlay--combobox-open .modal-body--form {
  overflow: visible;
}

body.theme-dark .contract-combobox-panel {
  background: var(--bg-card);
  border-color: var(--border);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}

body.theme-dark .contract-combobox-list li:hover,
body.theme-dark .contract-combobox-list li:focus {
  background: #374151;
}

.form-hint {
  color: var(--text-muted, #64748b);
  font-size: 0.875rem;
  margin: 0;
}

.form-row--checkbox {
  margin-top: 0.25rem;
}

.form-label-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-primary);
  cursor: pointer;
}

.form-label-checkbox input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.monthly-usage-attachment-list {
  margin-top: 0.35rem;
  min-height: 1.25rem;
}

.monthly-usage-attachment-empty {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted, #64748b);
}

.monthly-usage-attachment-ul {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.monthly-usage-attachment-ul .btn-link {
  padding: 0;
  font-size: inherit;
  vertical-align: baseline;
}

/* ----- CSV 일괄 등록 섹션 ----- */
.form-section--csv {
  margin-top: 1.75rem;
  padding: 1.25rem 1rem;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.form-section-title--csv {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.form-section-title-icon {
  font-size: 1.125rem;
}

.form-csv-intro {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0 0 1rem 0;
  line-height: 1.5;
}

.form-csv-format {
  margin-bottom: 1.25rem;
  padding: 1rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.form-csv-format-title {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.form-csv-format-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.form-csv-format-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  padding: 0.4rem 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}

.form-csv-format-list li:last-child {
  border-bottom: none;
}

.form-csv-col {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  padding: 0.15rem 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(14, 165, 233, 0.1);
  border-radius: 4px;
}

.form-csv-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  white-space: nowrap;
}

.form-csv-badge--required {
  color: #b45309;
  background: var(--gcp-light);
}

.form-csv-badge--optional {
  color: var(--text-secondary);
  background: var(--border);
}

.form-csv-desc {
  color: var(--text-secondary);
  font-size: 0.75rem;
  margin-left: 0.25rem;
}

.form-csv-note {
  margin: 0.75rem 0 0 0;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border);
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.form-csv-note-label {
  display: inline-block;
  font-weight: 600;
  color: var(--text-primary);
  margin-right: 0.35rem;
}

.form-csv-upload-wrap {
  margin-top: 0.75rem;
}

.form-csv-upload-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.form-csv-file-area {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* label for= 로 파일 대화상자 열기. input은 화면 밖에만 배치 */
.form-input--file-hidden {
  position: absolute !important;
  left: -10000px !important;
  top: 0 !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 none !important;
  opacity: 0.001 !important;
}

.btn-csv-file-trigger {
  flex-shrink: 0;
  padding: 0.4rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  margin: 0;
}

.btn-csv-file-trigger:hover {
  background: var(--bg-main);
  border-color: var(--accent);
  color: var(--accent);
}

.form-csv-file-name {
  flex: 1;
  min-width: 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-csv-file-area.has-file .form-csv-file-name {
  color: var(--text-primary);
  font-weight: 500;
}

.btn-csv-upload {
  flex-shrink: 0;
  padding: 0.5rem 1.25rem;
  font-weight: 600;
}

.form-csv-upload-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.form-section-desc {
  margin-bottom: 0.75rem;
}

.form-csv-result {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  line-height: 1.5;
}

.form-csv-result-summary p {
  margin: 0 0 0.5rem 0;
}

.form-csv-result-summary p:last-child {
  margin-bottom: 0;
}

.form-csv-result-list {
  margin: 0.25rem 0 0.75rem 1.25rem;
  padding: 0;
}

.form-csv-result-list li {
  margin-bottom: 0.25rem;
}

.form-csv-result-skip {
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

.form-csv-result-err {
  color: var(--danger, #dc2626);
}

.form-csv-result-errors {
  margin-bottom: 0;
}

.form-csv-result-error {
  color: var(--danger, #dc2626);
  margin: 0;
  font-size: 0.875rem;
}

.form-input--sub {
  flex: 1;
  min-width: 0;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  border-radius: 8px;
}

.form-add-sub {
  align-self: flex-start;
  border-style: dashed;
  color: var(--accent);
  font-weight: 600;
}

.form-add-sub:hover {
  background: rgba(14, 165, 233, 0.08);
  border-color: var(--accent);
  color: #0284c7;
}

.modal-footer--form .btn-primary {
  padding: 0.625rem 1.5rem;
  font-weight: 600;
  border-radius: 8px;
  background: #059669;
  min-width: 100px;
}

.modal-footer--form .btn-primary:hover {
  background: #047857;
}

.modal-footer--form .btn-secondary {
  padding: 0.625rem 1.25rem;
  border-radius: 8px;
}

@media (max-width: 640px) {
  .modal--register {
    max-width: 100%;
    margin: 0.5rem;
  }
  .modal--credit-register {
    max-width: 100%;
    max-height: 92vh;
  }
  .modal--register .modal-header,
  .modal-body--form {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  .modal-footer--form {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  .form-section {
    padding: 1rem 1.25rem;
  }
  .form-row--half,
  .form-row--third {
    grid-template-columns: 1fr;
  }
}

.sub-cell-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
}

.sub-first-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 180px;
}

.sub-more-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(14, 165, 233, 0.12);
  border-radius: 999px;
  flex-shrink: 0;
}

/* 상세 모달 - 구독/프로젝트 목록 */
.modal-sub-list {
  max-height: 200px;
  overflow-y: auto;
  padding: 0.35rem 0;
}

/* 상세 모달 내 구독 행: 다른 detail-row와 높이 맞춤 */
.modal-detail-rows .detail-row .modal-sub-list {
  padding: 0;
}
.modal-detail-rows .detail-row .modal-sub-list-item {
  padding: 0.2rem 0;
}

.modal-sub-list-item {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.45rem 0;
  font-size: 0.9375rem;
  border-bottom: 1px solid var(--border);
  line-height: 1.4;
}

.modal-sub-list-item:last-child {
  border-bottom: none;
}

.modal-sub-list-num {
  flex-shrink: 0;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.modal-sub-list-name {
  word-break: break-all;
}

/* 상세 모달 - 월별 사용금액 */
.modal-monthly-usage {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.modal-monthly-usage.is-empty {
  display: none;
}

.modal-monthly-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}
.modal-monthly-legend {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.modal-monthly-loading {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.modal-monthly-chart {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 0.35rem;
  min-height: 140px;
}

.modal-monthly-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.modal-monthly-bar-track {
  position: relative;
  width: 100%;
  max-width: 28px;
  height: 100px;
  background: #e2e8f0;
  border-radius: 6px 6px 0 0;
  overflow: visible;
  display: flex;
  align-items: flex-end;
  margin: 0 auto;
}
.modal-monthly-baseline {
  position: absolute;
  left: -4px;
  right: -4px;
  height: 2px;
  background: #64748b;
  z-index: 1;
  pointer-events: none;
}
.modal-monthly-bar-fill {
  width: 100%;
  min-height: 2px;
  background: linear-gradient(180deg, #38bdf8 0%, var(--accent) 100%);
  border-radius: 6px 6px 0 0;
  transition: height 0.35s ease-out;
  position: relative;
  z-index: 0;
}
.modal-monthly-bar-fill--under {
  background: linear-gradient(180deg, #7dd3fc 0%, var(--accent) 100%);
}
.modal-monthly-bar-fill--over {
  background: linear-gradient(180deg, #fca5a5 0%, #dc2626 100%);
}

.modal-monthly-bar-label {
  margin-top: 0.4rem;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.modal-monthly-table-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.modal-monthly-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.modal-monthly-table th,
.modal-monthly-table td {
  padding: 0.4rem 0.6rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.modal-monthly-table thead th {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.75rem;
}
.modal-monthly-table tbody th {
  font-weight: 500;
  color: var(--text-secondary);
  width: 3rem;
}
.modal-monthly-table .modal-monthly-table-amount {
  font-weight: 600;
  color: var(--text-primary);
  word-break: keep-all;
}

.detail-row {
  display: flex;
  padding: 0.85rem 0.5rem 0.85rem 0;
  border-bottom: 1px solid var(--border);
  gap: 1.5rem;
  align-items: flex-start;
  min-height: 2.5rem;
}

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

.detail-label {
  flex: 0 0 130px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 600;
  padding-top: 0.1rem;
  line-height: 1.4;
}

.detail-value {
  flex: 1;
  color: var(--text-primary);
  font-size: 0.9375rem;
  min-width: 0;
  line-height: 1.5;
  font-weight: 500;
  padding-left: 1.25rem;
}

.detail-value-memo {
  white-space: pre-wrap;
  word-break: break-word;
}

/* 리포트(PDF) 출력 시 메모 영역 최소 8줄 높이 */
.detail-value-memo--report {
  min-height: 12em;
  display: block;
}

.report-sub-one-line {
  display: flex;
  align-items: center;
  gap: 0.35em;
}
.report-sub-one-line .modal-sub-list-item {
  flex: 1;
  min-width: 0;
}
.detail-value-sub-extra {
  flex-shrink: 0;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* ===== Empty state ===== */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-secondary);
}

.empty-state p {
  margin-top: 0.5rem;
}

/* ===== Responsive ===== */

/* 1200px: 태블릿 가로 ~ 작은 데스크톱 */
@media (max-width: 1200px) {
  .amount-usage-hero {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .amount-usage-block {
    padding: 0.75rem 1rem;
  }

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

/* 900px: 태블릿 세로 */
@media (max-width: 900px) {
  .amount-usage-hero {
    padding: 1rem 1.15rem;
    gap: 0.85rem;
  }

  .amount-usage-value {
    font-size: 1.15rem;
  }

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

  .summary-card .card-value {
    font-size: 1.6rem;
  }

  .filter-group {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  .search-input {
    width: 100%;
  }

  .main {
    padding: 1.25rem 1.25rem 1.5rem;
  }

  .main-header {
    padding: 1rem 1.25rem 1.15rem;
  }

  .main-header-title {
    font-size: 1.2rem;
  }
}

/* 700px: 모바일 가로 ~ 작은 태블릿 */
@media (max-width: 700px) {
  .sidebar {
    width: 64px;
  }

  .logo-text,
  .logo-tagline,
  .nav-label,
  .sidebar-footer .csp-badge,
  .btn-logout-text {
    display: none;
  }

  .btn-logout {
    justify-content: center;
    padding: 0.5rem;
  }

  .sidebar-header {
    padding: 1rem 0.5rem;
    justify-content: center;
  }

  .sidebar-brand-logo {
    max-width: 52px;
  }

  .nav-item {
    justify-content: center;
    padding: 0.75rem;
  }

  .main {
    padding: 1rem;
  }

  .main-header {
    padding: 0.9rem 1rem 1rem;
  }

  .main-header-title {
    font-size: 1.1rem;
  }

  .main-header-subtitle {
    font-size: 0.75rem;
  }

  .amount-usage-hero {
    padding: 0.75rem 0.9rem;
  }

  .amount-usage-grid {
    grid-template-columns: 1fr;
  }

  .amount-usage-card {
    padding: 0.5rem 0.6rem;
  }

  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .contract-table {
    min-width: 520px;
  }

  .contract-table th:nth-child(n+6),
  .contract-table td:nth-child(n+6) {
    display: none;
  }

  /* 5컬럼: 계약번호 | 계약명 | CSP | 계약금액 | 현재사용금액 */
  .contract-table th:nth-child(1), .contract-table td:nth-child(1) { width: 12%; min-width: 90px; }
  .contract-table th:nth-child(2), .contract-table td:nth-child(2) { width: 28%; min-width: 120px; }
  .contract-table th:nth-child(3), .contract-table td:nth-child(3) { width: 10%; min-width: 64px; }
  .contract-table th:nth-child(4), .contract-table td:nth-child(4) { width: 25%; min-width: 90px; }
  .contract-table th:nth-child(5), .contract-table td:nth-child(5) { width: 25%; min-width: 90px; }

  .modal {
    max-width: 95vw;
    margin: 0.5rem;
  }

  .modal-body {
    padding: 1rem 1.15rem;
  }

  .modal-amount-grid {
    grid-template-columns: 1fr;
  }
}

/* 480px: 모바일 세로 */
@media (max-width: 480px) {
  .sidebar {
    width: 56px;
  }

  .sidebar-resolution,
  .sidebar-credit {
    display: none;
  }

  .nav-item {
    padding: 0.6rem;
  }

  .main {
    padding: 0.75rem;
  }

  .main-header {
    padding: 0.75rem 0.85rem 0.9rem;
  }

  .main-header-title {
    font-size: 1rem;
  }

  .main-header-subtitle {
    font-size: 0.7rem;
  }

  .amount-usage-hero {
    padding: 0.6rem 0.75rem;
    gap: 0.6rem;
  }

  .amount-usage-block-title {
    font-size: 0.8125rem;
  }

  .amount-usage-label {
    font-size: 0.6875rem;
  }

  .amount-usage-value {
    font-size: 1.1rem;
  }

  .summary-cards {
    margin-bottom: 1rem;
  }

  .summary-card {
    padding: 1rem;
  }

  .summary-card .card-value {
    font-size: 1.4rem;
  }

  .filter-group {
    gap: 0.5rem;
  }

  .btn {
    padding: 0.45rem 0.85rem;
    font-size: 0.8rem;
  }

  .filter-select,
  .search-input {
    font-size: 0.85rem;
  }

  .modal {
    max-width: 100%;
    margin: 0.25rem;
    border-radius: 10px;
  }

  .modal-header {
    padding: 1rem 1.1rem;
  }

  .modal-header h3 {
    font-size: 1rem;
  }

  .modal-monthly-chart {
    min-height: 110px;
  }

  .modal-monthly-bar-track {
    height: 80px;
  }

  .billing-detail-empty,
  #pageSubscriptionDetail .subscription-detail-empty,
  .settings-placeholder {
    padding: 1.5rem 1rem;
  }
  #pageSubscriptionDetail .subscription-detail-summary-grid.summary-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  #pageSubscriptionDetail .subscription-detail-summary-cards.summary-cards {
    margin-bottom: 1rem;
  }
  .billing-detail-summary-cards {
    grid-template-columns: 1fr;
  }
  .billing-detail-contract-header {
    padding: 0.7rem 1rem;
  }
  .billing-detail-hero {
    padding: 1.25rem 1rem;
    gap: 1rem;
  }
  .billing-detail-hero-block {
    padding: 0.85rem 1rem;
  }
  .billing-detail-hero-value {
    font-size: 1.125rem;
  }
  .billing-detail-contract-summary {
    grid-template-columns: repeat(2, 1fr);
    padding: 0.7rem 1rem;
  }
  .billing-detail-monthly-table {
    font-size: 0.68rem;
  }
  .billing-detail-monthly-table th,
  .billing-detail-monthly-table td {
    padding: 0.3rem 0.35rem;
  }

  .billing-detail-message,
  #pageSubscriptionDetail .subscription-detail-message,
  .settings-message {
    font-size: 0.875rem;
  }
}

/* ===== 단축키 모달 ===== */
.modal--shortcuts .modal-body { padding: 1rem 1.5rem; }
.shortcuts-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.shortcuts-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.shortcuts-list li:last-child { border-bottom: none; }
.shortcuts-list kbd {
  display: inline-block;
  min-width: 2rem;
  padding: 0.25rem 0.5rem;
  font-family: inherit;
  font-size: 0.8125rem;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 4px;
  text-align: center;
}

/* PDF 리포트 출력: 불필요 요소 숨김, 기존 요약 숨김, 리포트용 요약 표시 */
body.pdf-export-mode #pageOverview .quick-filter-card,
body.pdf-export-mode #pageOverview .toolbar,
body.pdf-export-mode #pageOverview .recent-section,
body.pdf-export-mode #pageOverview .expiry-banner-wrap,
body.pdf-export-mode #pageOverview .info-summary-section,
body.pdf-export-mode #pageOverview .summary-cards {
  display: none !important;
}
body.pdf-export-mode #pageOverview #pdfReportSummary {
  display: block !important;
  visibility: visible;
}
body.pdf-export-mode #pageOverview .table-section .table-wrapper {
  display: none !important;
}
body.pdf-export-mode #pageOverview #pdfReportContractTable {
  display: block !important;
  visibility: visible;
}

/* PDF 리포트용 요약 (테이블 형태) */
.pdf-report-summary {
  margin: 1rem 0 1.5rem;
  padding: 1rem 1.25rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.875rem;
}
.pdf-report-summary-inner {
  min-width: 0;
}
.pdf-report-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 0.5rem;
}
.pdf-report-summary-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}
.pdf-report-summary-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  font-size: 0.8125rem;
}
.pdf-report-summary-date {
  color: #64748b;
  margin: 0;
}
.pdf-report-summary-outputter {
  color: #475569;
  margin: 0.25rem 0 0;
}
.pdf-report-summary-total {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 1rem;
}
.pdf-report-summary-total strong {
  color: #0ea5e9;
  font-size: 1.125rem;
}
.pdf-report-summary-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
  padding: 0.6rem 0.85rem;
  background: #fff;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  font-size: 0.8125rem;
}
.pdf-report-metric {
  color: #475569;
}
.pdf-report-summary-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.pdf-report-summary-table th,
.pdf-report-summary-table td {
  padding: 0.6rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}
.pdf-report-summary-table th {
  background: #e2e8f0;
  font-weight: 700;
  color: #334155;
}
.pdf-report-summary-table td {
  color: #1e293b;
}
.pdf-report-summary-table tr:last-child td {
  border-bottom: none;
}
.pdf-report-summary-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.pdf-report-summary-table .rate { text-align: center; }

/* PDF 리포트용 계약 테이블 */
.pdf-report-contract-table {
  margin-top: 0;
  overflow: visible;
}
.pdf-report-contract-inner {
  min-width: 0;
}
.pdf-report-contract-table table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.8125rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.pdf-report-contract-table th,
.pdf-report-contract-table td {
  padding: 0.5rem 0.6rem;
  text-align: left;
  border: 1px solid #e2e8f0;
}
.pdf-report-contract-table th {
  background: #e2e8f0;
  font-weight: 700;
  color: #334155;
}
.pdf-report-contract-table td {
  color: #1e293b;
}
.pdf-report-contract-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.pdf-report-contract-table .text-center { text-align: center; }
.pdf-report-contract-table thead th {
  white-space: nowrap;
}
.pdf-report-contract-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

/* 계약 상세 모달 PDF 리포트 (임시 컨테이너·헤더) */
.detail-report-pdf-wrap {
  font-family: inherit;
  color: #1e293b;
  background: #fff;
}
.detail-report-pdf-header {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e2e8f0;
}
.detail-report-pdf-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.detail-report-pdf-meta {
  font-size: 0.8125rem;
  color: #64748b;
}

/* ===== Settings 공지사항 / 라디오 ===== */
.settings-notice-list {
  list-style: none;
  margin: 0 0 0.75rem 0;
  padding: 0;
}
.settings-notice-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}
.settings-notice-item:last-child { border-bottom: none; }
.settings-notice-item[data-notice-id] {
  cursor: pointer;
  border-radius: 4px;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}
.settings-notice-item[data-notice-id]:hover {
  background: rgba(0, 0, 0, 0.04);
}
body.theme-dark .settings-notice-item[data-notice-id]:hover {
  background: rgba(255, 255, 255, 0.06);
}
.settings-notice-empty {
  color: var(--text-secondary);
  font-style: normal;
}
.settings-notice-date { color: var(--text-secondary); font-size: 0.8125rem; }
.settings-notice-body { color: var(--text-secondary); }
.settings-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.settings-radio-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
}

/* 공지사항 모달 (보기) */
.notice-modal-meta {
  margin-bottom: 0.75rem;
}
.notice-modal-date {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}
.notice-modal-body {
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-primary);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  max-height: 60vh;
  overflow-y: auto;
}
.notice-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

/* 로그인 후 메인 공지 팝업 */
.main-notice-popup-modal .modal-body {
  padding: 1rem 1.25rem;
}
.notice-popup-date {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}
.notice-popup-body {
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-primary);
  font-size: 0.9375rem;
  line-height: 1.6;
  max-height: 50vh;
  overflow-y: auto;
  margin-bottom: 1.25rem;
}
.notice-popup-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

/* ===== 다크 모드 ===== */
body.theme-dark {
  --bg-main: #111827;
  --bg-card: #1f2937;
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --border: #374151;
  --billing-badge-bg: #374151;
  --billing-badge-border: #4b5563;
}
body.theme-dark .login-page {
  background: #060a12;
}

body.theme-dark .login-page-bg {
  background:
    radial-gradient(ellipse 70% 55% at 15% 20%, rgba(14, 165, 233, 0.2) 0%, transparent 58%),
    radial-gradient(ellipse 55% 48% at 85% 78%, rgba(20, 184, 166, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse 40% 35% at 50% 50%, rgba(59, 130, 246, 0.06) 0%, transparent 50%),
    linear-gradient(165deg, #0c1222 0%, #0f172a 42%, #060a12 100%);
}

body.theme-dark .login-bg-orb--1 {
  background: rgba(14, 165, 233, 0.2);
}

body.theme-dark .login-bg-orb--2 {
  background: rgba(20, 184, 166, 0.16);
}

body.theme-dark .login-bg-orb--3 {
  background: rgba(56, 189, 248, 0.1);
}

body.theme-dark .login-bg-grid {
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
}

body.theme-dark .login-card {
  background: rgba(15, 23, 42, 0.82);
  border-color: rgba(148, 163, 184, 0.12);
  box-shadow:
    0 32px 64px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 100px rgba(14, 165, 233, 0.1);
}

body.theme-dark .login-card-accent {
  background: linear-gradient(90deg, #38bdf8 0%, #2dd4bf 50%, #0ea5e9 100%);
  opacity: 0.95;
}

body.theme-dark .login-card-header {
  border-bottom-color: rgba(148, 163, 184, 0.12);
}

body.theme-dark .login-label {
  color: #94a3b8;
}

body.theme-dark .login-field-icon {
  color: #64748b;
}

body.theme-dark .login-input-wrap:focus-within .login-field-icon {
  color: #38bdf8;
}

body.theme-dark .login-input {
  background: rgba(2, 6, 23, 0.45);
  border-color: rgba(148, 163, 184, 0.18);
  color: #f1f5f9;
}

body.theme-dark .login-input::placeholder {
  color: #64748b;
}

body.theme-dark .login-input:hover {
  border-color: rgba(148, 163, 184, 0.32);
  background: rgba(15, 23, 42, 0.65);
}

body.theme-dark .login-input:focus {
  border-color: #38bdf8;
  background: rgba(15, 23, 42, 0.75);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.15);
}

body.theme-dark .login-remember {
  color: #94a3b8;
}

body.theme-dark .login-error {
  background: rgba(127, 29, 29, 0.35);
  border-color: rgba(248, 113, 113, 0.25);
  color: #fca5a5;
}

body.theme-dark .login-credit.credit-block {
  border-top-color: rgba(148, 163, 184, 0.12);
}

body.theme-dark .login-credit .credit-row {
  color: #64748b;
}

body.theme-dark .login-credit .credit-value {
  color: #94a3b8;
}

body.theme-dark .login-theme-switch {
  background: rgba(15, 23, 42, 0.65);
  border-color: rgba(148, 163, 184, 0.14);
}

body.theme-dark .login-theme-segment {
  color: #94a3b8;
}

body.theme-dark .login-theme-segment.is-active {
  background: rgba(30, 41, 59, 0.95);
  color: #38bdf8;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

body.theme-dark .login-theme-segment:not(.is-active):hover {
  color: #cbd5e1;
}

body.theme-dark .login-service-desc {
  color: #94a3b8;
}

body.theme-dark .brand-subtitle {
  color: #94a3b8;
}

body.theme-dark .expiry-banner { background: #422006; border-color: #b45309; color: #fcd34d; }
body.theme-dark .shortcuts-list kbd { background: #374151; border-color: #4b5563; }
body.theme-dark .recent-item {
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(14, 165, 233, 0.35);
}

/* 테이블: 헤더·행 호버 시 어두운 배경 유지 (흰색 배경 제거) */
body.theme-dark .contract-table th {
  background: #374151;
  color: #e5e7eb;
  border-bottom-color: #4b5563;
}
body.theme-dark .contract-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.06);
}
body.theme-dark .contract-table td {
  color: var(--text-primary);
}

/* Subscription Detail: 다크모드에서 구독/프로젝트 목록 항목 색상 개선 (밝은 톤 완화) */
body.theme-dark #pageSubscriptionDetail .subscription-detail-list-wrap {
  background: #1f2937;
  border: 1px solid #374151;
  box-shadow: none;
}
body.theme-dark #pageSubscriptionDetail .subscription-detail-list-title {
  color: #9ca3af;
}
/* CSP 그룹 타이틀: 라이트 그라데이션 제거, 어두운 배경 + 차분한 텍스트 */
body.theme-dark #pageSubscriptionDetail .subscription-detail-csp-group-title {
  background: rgba(0, 0, 0, 0.25);
  border-left-color: #4b5563;
  color: #d1d5db;
}
body.theme-dark #pageSubscriptionDetail .subscription-detail-csp-group--azure .subscription-detail-csp-group-title {
  color: #93c5fd;
  border-left-color: #3b82f6;
  background: linear-gradient(to right, rgba(59, 130, 246, 0.15) 0%, transparent 100%);
}
body.theme-dark #pageSubscriptionDetail .subscription-detail-csp-group--gcp .subscription-detail-csp-group-title {
  color: #fcd34d;
  border-left-color: #d97706;
  background: linear-gradient(to right, rgba(234, 179, 8, 0.12) 0%, transparent 100%);
}
body.theme-dark #pageSubscriptionDetail .subscription-detail-csp-group--other .subscription-detail-csp-group-title {
  color: #9ca3af;
  border-left-color: #6b7280;
  background: linear-gradient(to right, rgba(107, 114, 128, 0.15) 0%, transparent 100%);
}
body.theme-dark #pageSubscriptionDetail .subscription-detail-csp-group--unassigned .subscription-detail-csp-group-title {
  color: #fcd34d;
  border-left-color: #d97706;
  background: linear-gradient(to right, rgba(245, 158, 11, 0.12) 0%, transparent 100%);
}
body.theme-dark #pageSubscriptionDetail .subscription-detail-csp-group--unassigned-azure .subscription-detail-csp-group-title {
  color: #93c5fd;
  border-left-color: #3b82f6;
  background: linear-gradient(to right, rgba(59, 130, 246, 0.15) 0%, transparent 100%);
}
body.theme-dark #pageSubscriptionDetail .subscription-detail-csp-group--unassigned-gcp .subscription-detail-csp-group-title {
  color: #fcd34d;
  border-left-color: #d97706;
  background: linear-gradient(to right, rgba(234, 179, 8, 0.12) 0%, transparent 100%);
}
/* 테이블 헤더·행: 어두운 톤 유지 */
body.theme-dark #pageSubscriptionDetail .subscription-detail-table thead th {
  background: #111827;
  color: #9ca3af;
  border-bottom-color: #374151;
}
body.theme-dark #pageSubscriptionDetail .subscription-detail-table tbody tr {
  background: transparent;
}
body.theme-dark #pageSubscriptionDetail .subscription-detail-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}
body.theme-dark #pageSubscriptionDetail .subscription-detail-table td {
  color: #d1d5db;
  border-bottom-color: #374151;
}
body.theme-dark #pageSubscriptionDetail .subscription-detail-name {
  color: #e5e7eb;
}
body.theme-dark #pageSubscriptionDetail .subscription-detail-id,
body.theme-dark #pageSubscriptionDetail .subscription-detail-contract,
body.theme-dark #pageSubscriptionDetail .subscription-detail-cell-empty {
  color: #9ca3af;
}
body.theme-dark #pageSubscriptionDetail .subscription-detail-list-toggle {
  color: #67b3e6;
  background: rgba(59, 130, 246, 0.12);
  border-color: #4b5563;
}
body.theme-dark #pageSubscriptionDetail .subscription-detail-list-toggle:hover {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  border-color: #3b82f6;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.2);
}
body.theme-dark .contract-number-cell {
  color: var(--text-secondary);
}
body.theme-dark .billing-month-badge {
  color: #e5e7eb;
  background: var(--billing-badge-bg);
  border-color: var(--billing-badge-border);
}

/* 다크 모드에서 밝은 배경 뱃지 → 어두운 배경 + 밝은 텍스트 */
body.theme-dark .status-badge--default {
  background: #374151;
  color: #e5e7eb;
  border-color: #4b5563;
}
body.theme-dark .status-badge--empty {
  color: #9ca3af;
}

/* 카드·입력·버튼 호버 시 밝은 배경 제거 */
body.theme-dark .card,
body.theme-dark .table-section {
  background: var(--bg-card);
}
body.theme-dark .btn-outline:hover,
body.theme-dark .btn-secondary:hover {
  background: #4b5563;
  color: #f3f4f6;
  border-color: #4b5563;
}
body.theme-dark .billing-detail-search-wrap {
  background: rgba(15, 23, 42, 0.6);
  border-color: var(--border);
}
body.theme-dark .billing-detail-search-input {
  color: var(--text-primary);
}
body.theme-dark .billing-detail-search-input::placeholder {
  color: var(--text-secondary);
}
body.theme-dark .billing-detail-search-clear:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}
body.theme-dark .billing-detail-list-header .btn {
  border-color: #60a5fa;
  color: #93c5fd;
  background: rgba(96, 165, 250, 0.1);
}
body.theme-dark .billing-detail-list-header .btn:hover {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}
body.theme-dark .filter-select,
body.theme-dark .search-input,
body.theme-dark .form-input,
body.theme-dark .form-select,
body.theme-dark .form-textarea {
  background: #1f2937;
  color: var(--text-primary);
  border-color: var(--border);
}
body.theme-dark .filter-select:focus,
body.theme-dark .search-input:focus,
body.theme-dark .form-input:focus,
body.theme-dark .form-select:focus,
body.theme-dark .form-textarea:focus {
  border-color: var(--accent);
  background: #1f2937;
  color: var(--text-primary);
}
body.theme-dark .search-input::placeholder {
  color: #6b7280;
}
body.theme-dark .info-summary-heading {
  color: #9ca3af;
}

/* 컬럼 토글 패널·요약 카드 호버 */
body.theme-dark .column-toggle-panel {
  background: var(--bg-card);
  border-color: var(--border);
}
body.theme-dark .column-toggle-item:hover {
  background: rgba(255, 255, 255, 0.06);
}
body.theme-dark .summary-card:hover {
  background: #374151;
}

/* 빠른 필터 카드 - 다크 모드 */
body.theme-dark .quick-filter-card {
  background: var(--bg-card);
  border-color: var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
body.theme-dark .quick-filter-title {
  color: var(--text-primary);
}
body.theme-dark .quick-filter-btn {
  background: #1f2937;
  border-color: var(--border);
  color: var(--text-primary);
}
body.theme-dark .quick-filter-btn:hover {
  background: rgba(14, 165, 233, 0.15);
  border-color: rgba(14, 165, 233, 0.4);
  color: #7dd3fc;
}
body.theme-dark .quick-filter-btn.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
body.theme-dark .quick-filter-btn--clear {
  color: var(--text-secondary);
}
body.theme-dark .quick-filter-btn--clear.is-active {
  background: #374151;
  color: #e5e7eb;
  border-color: #4b5563;
}

body.theme-dark .summary-card .card-value,
body.theme-dark .summary-card .card-label {
  color: inherit;
}

/* 모달 닫기 버튼 호버 */
body.theme-dark .modal-close:hover {
  background: #4b5563;
  color: #f3f4f6;
}

/* ===== 다크 모드 - 모달 전체 ===== */
body.theme-dark .modal-overlay {
  background: rgba(0, 0, 0, 0.7);
}
body.theme-dark .modal {
  background: var(--bg-card);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 1px rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}
body.theme-dark .modal-header {
  background: linear-gradient(to bottom, #1f2937 0%, var(--bg-card) 100%);
  border-bottom-color: var(--border);
}
body.theme-dark .modal-header h3,
body.theme-dark .modal--register .modal-title {
  color: var(--text-primary);
}
body.theme-dark .modal-close {
  background: #374151;
  color: #9ca3af;
}
body.theme-dark .modal-body {
  background: #111827;
  color: var(--text-primary);
}
body.theme-dark .modal-amount-block {
  background: linear-gradient(145deg, #1e3a5f 0%, #1e293b 50%, #1a2332 100%);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
body.theme-dark .modal-amount-label {
  color: rgba(255, 255, 255, 0.7);
}
body.theme-dark .modal-amount-value {
  color: #f1f5f9;
}
body.theme-dark .modal-detail-section-title {
  color: var(--text-secondary);
  border-bottom-color: var(--border);
}
body.theme-dark .modal-detail-rows {
  background: #1f2937;
  border-color: var(--border);
}
body.theme-dark .detail-row {
  border-bottom-color: var(--border);
}
body.theme-dark .detail-label {
  color: var(--text-secondary);
}
body.theme-dark .detail-value {
  color: var(--text-primary);
}
body.theme-dark .modal-sub-list-item {
  border-bottom-color: var(--border);
}
body.theme-dark .modal-sub-list-num {
  color: var(--text-secondary);
}
body.theme-dark .modal-monthly-usage {
  background: #1f2937;
  border-color: var(--border);
}
body.theme-dark .modal-monthly-title,
body.theme-dark .modal-monthly-legend {
  color: var(--text-secondary);
}
body.theme-dark .modal-monthly-bar-track {
  background: #374151;
}
body.theme-dark .modal-monthly-baseline {
  background: #94a3b8;
}
body.theme-dark .modal-monthly-bar-fill--over {
  background: linear-gradient(180deg, #f87171 0%, #b91c1c 100%);
}
body.theme-dark .modal-monthly-bar-label {
  color: var(--text-secondary);
}
body.theme-dark .modal-monthly-table th,
body.theme-dark .modal-monthly-table td {
  border-bottom-color: var(--border);
}
body.theme-dark .modal-monthly-table .modal-monthly-table-amount {
  color: var(--text-primary);
}
body.theme-dark .modal--register .modal-header {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  border-bottom-color: var(--border);
  border-left-color: #059669;
}
body.theme-dark .modal-body--form {
  background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
  color: var(--text-primary);
}
body.theme-dark .modal-footer--form {
  border-top-color: var(--border);
  background: var(--bg-card);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.2);
}
body.theme-dark .form-section-title,
body.theme-dark .modal-body--form .form-label {
  color: var(--text-primary);
}
/* CSV 일괄 등록 - 다크 모드 */
body.theme-dark .form-section--csv {
  background: rgba(30, 41, 59, 0.5);
  border-color: var(--border);
}
body.theme-dark .form-csv-format {
  background: rgba(15, 23, 42, 0.6);
  border-color: var(--border);
}
body.theme-dark .form-csv-format-list li {
  border-bottom-color: var(--border);
}
body.theme-dark .form-csv-col {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
}
body.theme-dark .form-csv-badge--required {
  color: #fcd34d;
  background: rgba(251, 191, 36, 0.2);
}
body.theme-dark .form-csv-badge--optional {
  color: var(--text-secondary);
  background: rgba(148, 163, 184, 0.25);
}
body.theme-dark .form-csv-note {
  border-top-color: var(--border);
  color: var(--text-secondary);
}
body.theme-dark .form-csv-upload-label {
  color: var(--text-primary);
}
body.theme-dark .form-csv-file-area {
  background: rgba(15, 23, 42, 0.6);
  border-color: var(--border);
}
body.theme-dark .form-csv-file-name {
  color: var(--text-secondary);
}
body.theme-dark .form-csv-file-area.has-file .form-csv-file-name {
  color: var(--text-primary);
}
body.theme-dark .btn-csv-file-trigger:hover {
  border-color: #38bdf8;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
}
body.theme-dark .form-csv-result {
  background: rgba(15, 23, 42, 0.6);
  border-color: var(--border);
}
body.theme-dark .modal--shortcuts .modal-body {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* 빈 상태·사용률 퍼센트 텍스트 (호버 행에서도 보이도록) */
body.theme-dark .empty-state {
  color: var(--text-secondary);
}
body.theme-dark .empty-state strong {
  color: var(--text-primary);
}
body.theme-dark .usage-rate-pct.normal { color: #34d399; }
body.theme-dark .usage-rate-pct.warning { color: #fbbf24; }
body.theme-dark .usage-rate-pct.critical { color: #f87171; }
body.theme-dark .usage-rate-pill {
  background: rgba(56, 189, 248, 0.18);
  color: #7dd3fc;
}
body.theme-dark .usage-rate-note {
  color: #9ca3af;
}
body.theme-dark .billing-diff-plus { color: #34d399; }
body.theme-dark .billing-diff-minus { color: #f87171; }
body.theme-dark .billing-detail-msp-plus { color: #34d399; }
body.theme-dark .billing-detail-msp-minus { color: #f87171; }
body.theme-dark .billing-detail-diff-plus { color: #34d399; }
body.theme-dark .billing-detail-diff-minus { color: #f87171; }
body.theme-dark .billing-detail-summary-item-value.billing-detail-diff-plus { color: #34d399; }
body.theme-dark .billing-detail-summary-item-value.billing-detail-diff-minus { color: #f87171; }
body.theme-dark .billing-detail-hero {
  background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
  border-color: var(--border);
  color: #fff;
  box-shadow: var(--shadow-md);
}
body.theme-dark .billing-detail-hero-total .billing-detail-hero-block {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
}
body.theme-dark .billing-detail-hero-block {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}
body.theme-dark .billing-detail-hero-block[data-block="azure"] {
  background: linear-gradient(to right, rgba(59, 130, 246, 0.12) 0%, rgba(255, 255, 255, 0.04) 100%);
  border-color: rgba(59, 130, 246, 0.25);
}
body.theme-dark .billing-detail-hero-block[data-block="gcp"] {
  background: linear-gradient(to right, rgba(234, 179, 8, 0.05) 0%, rgba(255, 255, 255, 0.04) 72%);
  border-color: rgba(234, 179, 8, 0.14);
}
body.theme-dark .billing-detail-hero-block[data-block="other"] {
  background: linear-gradient(to right, rgba(148, 163, 184, 0.1) 0%, rgba(255, 255, 255, 0.04) 100%);
  border-color: rgba(148, 163, 184, 0.2);
}
body.theme-dark .billing-detail-hero-title {
  color: rgba(255, 255, 255, 0.98);
  border-bottom-color: rgba(255, 255, 255, 0.2);
}
body.theme-dark .billing-detail-hero-block[data-block="total"] .billing-detail-hero-title { color: #fff; }
body.theme-dark .billing-detail-hero-block[data-block="azure"] .billing-detail-hero-title { color: #60a5fa; }
body.theme-dark .billing-detail-hero-block[data-block="gcp"] .billing-detail-hero-title { color: #d97706; }
body.theme-dark .billing-detail-hero-block[data-block="other"] .billing-detail-hero-title { color: #94a3b8; }
body.theme-dark .billing-detail-hero-label {
  color: rgba(255, 255, 255, 0.75);
}
body.theme-dark .billing-detail-hero-total .billing-detail-hero-label {
  opacity: 0.85;
}
body.theme-dark .billing-detail-hero-value {
  color: #fff;
}
body.theme-dark .billing-detail-hero-value.billing-detail-hero-billing {
  color: #7dd3fc;
}
body.theme-dark .billing-detail-hero-value.billing-detail-diff-plus {
  color: #34d399;
}
body.theme-dark .billing-detail-hero-value.billing-detail-diff-minus {
  color: #f87171;
}
body.theme-dark .billing-detail-hero-card {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
body.theme-dark .billing-detail-contract-table thead th {
  background: #374151;
  color: #e5e7eb;
  border-bottom-color: #4b5563;
}
body.theme-dark .billing-detail-contract-table td {
  color: var(--text-primary);
  border-bottom-color: #4b5563;
}
body.theme-dark .billing-detail-contract-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.06);
}
body.theme-dark .billing-detail-icon-btn {
  background: #374151;
  border-color: #6b7280;
  color: #f1f5f9;
  box-shadow: none;
}
body.theme-dark .billing-detail-icon-btn:hover {
  background: #4b5563;
  border-color: #9ca3af;
  color: #fff;
}
body.theme-dark .billing-detail-row-report-btn {
  color: #86efac;
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(74, 222, 128, 0.45);
}
body.theme-dark .billing-detail-row-report-btn:hover {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.25);
  border-color: #86efac;
}
body.theme-dark .billing-detail-row-usage-btn {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(147, 197, 253, 0.45);
}
body.theme-dark .billing-detail-row-usage-btn:hover {
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.25);
  border-color: #93c5fd;
}
body.theme-dark .billing-detail-row-billing-btn--primary {
  background: #0284c7;
  border-color: #0284c7;
  color: #fff;
}
body.theme-dark .billing-detail-row-pdf-report-btn {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(252, 165, 165, 0.45);
}
body.theme-dark .billing-detail-row-pdf-report-btn:hover {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.25);
  border-color: #fca5a5;
}
body.theme-dark .billing-detail-contract-table .billing-detail-monthly-toggle-btn {
  background: #374151;
  border-color: #6b7280;
  color: #e2e8f0;
}
body.theme-dark .billing-detail-contract-table .billing-detail-monthly-toggle-btn:hover {
  background: #4b5563;
  border-color: #9ca3af;
  color: #38bdf8;
}
body.theme-dark .billing-detail-contract-table-na {
  color: #6b7280;
}
body.theme-dark .billing-detail-monthly-detail-row td {
  background: #1a2332;
  border-bottom-color: #374151;
}
body.theme-dark .billing-detail-monthly-detail-cell {
  border-left-color: var(--accent);
  background: #1a2332;
}
body.theme-dark .billing-detail-contract-header {
  background: #374151;
  border-bottom-color: #4b5563;
}
body.theme-dark .billing-detail-contract-block--azure .billing-detail-contract-header {
  background: linear-gradient(to right, rgba(59, 130, 246, 0.12) 0%, #374151 100%);
}
body.theme-dark .billing-detail-contract-block--gcp .billing-detail-contract-header {
  background: linear-gradient(to right, rgba(234, 179, 8, 0.1) 0%, #374151 100%);
}
body.theme-dark .billing-detail-contract-block--other .billing-detail-contract-header {
  background: linear-gradient(to right, rgba(148, 163, 184, 0.1) 0%, #374151 100%);
}
body.theme-dark .billing-detail-contract-csp {
  background: #4b5563;
  color: #e5e7eb;
}
body.theme-dark .billing-detail-contract-block--azure .billing-detail-contract-csp {
  background: rgba(59, 130, 246, 0.25);
  color: #93c5fd;
}
body.theme-dark .billing-detail-contract-block--gcp .billing-detail-contract-csp {
  background: rgba(234, 179, 8, 0.2);
  color: #fcd34d;
}
body.theme-dark .billing-detail-contract-block--other .billing-detail-contract-csp {
  background: #4b5563;
  color: #cbd5e1;
}
body.theme-dark .billing-detail-contract-summary-item {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}
body.theme-dark .billing-detail-toggle-wrap {
  background: rgba(0, 0, 0, 0.15);
}
body.theme-dark .billing-detail-toggle-btn {
  color: #9ca3af;
  border-color: #4b5563;
}
body.theme-dark .billing-detail-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #60a5fa;
  border-color: #3b82f6;
}
body.theme-dark .billing-detail-contract-name {
  color: var(--text-primary);
}
body.theme-dark .billing-detail-monthly-detail-row td,
body.theme-dark .billing-detail-monthly-detail-cell,
body.theme-dark .billing-detail-monthly-table-wrap {
  background: #1a2332;
}
body.theme-dark .billing-detail-monthly-empty {
  background: #1a2332;
  color: #94a3b8;
}
body.theme-dark .billing-detail-monthly-table {
  background: #1a2332;
  border-color: #374151;
  color: #f1f5f9;
}
body.theme-dark .billing-detail-monthly-month-th,
body.theme-dark .billing-detail-monthly-table .billing-detail-monthly-month {
  background: transparent;
  color: #e2e8f0;
}
body.theme-dark .billing-detail-monthly-table thead th {
  background: #243044;
  color: #cbd5e1;
  border-bottom-color: #374151;
}
body.theme-dark .billing-detail-monthly-table td.billing-detail-num {
  color: #f8fafc;
}
body.theme-dark .billing-detail-monthly-attach-btn {
  color: #60a5fa;
}
body.theme-dark .billing-detail-monthly-attach-btn:hover {
  background: rgba(96, 165, 250, 0.15);
  color: #93c5fd;
}
body.theme-dark .billing-detail-monthly-attach-badge {
  color: #94a3b8;
}
body.theme-dark .billing-detail-monthly-attach-empty {
  color: #64748b;
}
body.theme-dark .billing-detail-monthly-table th,
body.theme-dark .billing-detail-monthly-table td {
  border-bottom-color: #2d3a4d;
}
body.theme-dark .billing-detail-monthly-table tfoot tr.billing-detail-monthly-foot {
  background: #1f2937;
  border-top-color: #4b5563;
}
body.theme-dark .billing-detail-monthly-table tfoot td {
  color: #f8fafc;
}
body.theme-dark .billing-detail-csp-group-title {
  border-bottom-color: #4b5563;
  color: var(--text-primary);
}
body.theme-dark .billing-detail-csp-group--azure .billing-detail-csp-group-title {
  color: #93c5fd;
}
body.theme-dark .billing-detail-csp-group-title {
  background: linear-gradient(to right, #1f2937 0%, transparent 100%);
  border-left-color: #4b5563;
}
body.theme-dark .billing-detail-csp-group--azure .billing-detail-csp-group-title {
  color: #93c5fd;
  border-left-color: #3b82f6;
  background: linear-gradient(to right, rgba(59, 130, 246, 0.12) 0%, transparent 100%);
}
body.theme-dark .billing-detail-csp-group--gcp .billing-detail-csp-group-title {
  color: #fcd34d;
  border-left-color: #eab308;
  background: linear-gradient(to right, rgba(234, 179, 8, 0.12) 0%, transparent 100%);
}
body.theme-dark .billing-detail-csp-group--other .billing-detail-csp-group-title {
  color: #cbd5e1;
  border-left-color: #94a3b8;
  background: linear-gradient(to right, #374151 0%, transparent 100%);
}
body.theme-dark .billing-detail-contract-block--other {
  border-left-color: #64748b;
}

/* 즐겨찾기 버튼·설정 카드·폼 칩 */
body.theme-dark .btn-favorite { color: #9ca3af; }
body.theme-dark .btn-favorite:hover,
body.theme-dark .btn-favorite.is-favorite { color: #fbbf24; }
body.theme-dark .settings-card,
body.theme-dark .settings-card-title,
body.theme-dark .settings-card-desc { color: var(--text-primary); }
body.theme-dark .form-month-chip {
  background: #1f2937;
  border-color: var(--border);
  color: var(--text-primary);
}
body.theme-dark .form-month-chip:hover {
  border-color: var(--accent);
  background: #374151;
}
body.theme-dark .form-month-chip.is-selected {
  background: rgba(5, 150, 105, 0.2);
  border-color: #059669;
  color: #6ee7b7;
}

/* 다크모드: 구독 삭제 모달 */
body.theme-dark #subscriptionDeleteModal .modal-body {
  background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
}

body.theme-dark #subscriptionDeleteModal .modal-desc,
body.theme-dark #subscriptionDeleteModal .form-label {
  color: #cbd5e1;
}

body.theme-dark #subscriptionDeleteModal .subscription-delete-search-wrap {
  background: #0b1220;
  border-color: #334155;
}

body.theme-dark #subscriptionDeleteModal .subscription-delete-search-wrap:focus-within {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
  background: #111827;
}

body.theme-dark #subscriptionDeleteModal .subscription-delete-search-input {
  color: #e5e7eb;
}

body.theme-dark #subscriptionDeleteModal .subscription-delete-search-input::placeholder {
  color: #94a3b8;
}

body.theme-dark #subscriptionDeleteSelect {
  background: #111827;
  border-color: #334155;
  color: #e5e7eb;
}

body.theme-dark #subscriptionDeleteSelect:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

body.theme-dark #subscriptionDeleteSelect option {
  background: #111827;
  color: #e5e7eb;
}

/* 구독 자동완성 (크레딧 등록 모달) */
.credit-target-autocomplete {
  position: relative;
  width: 100%;
}

.credit-target-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 2000;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-height: 14rem;
  overflow-y: auto;
  display: none;
}

.credit-target-suggestions.is-open {
  display: block;
}

.credit-target-suggestion {
  padding: 0.6rem 0.75rem;
  font-size: 0.875rem;
  cursor: pointer;
  color: var(--text-primary);
}

.credit-target-suggestion:hover {
  background: rgba(14, 165, 233, 0.10);
}

.credit-target-suggestion--empty {
  cursor: default;
  color: var(--text-secondary);
}

body.theme-dark .credit-target-suggestions {
  background: #0b1220;
  border-color: #334155;
}

body.theme-dark .credit-target-suggestion {
  color: #e5e7eb;
}

body.theme-dark .credit-target-suggestion:hover {
  background: rgba(56, 189, 248, 0.14);
}

body.theme-dark .credit-target-suggestion--empty {
  color: #94a3b8;
}

/* 크레딧 등록/수정 모달 - 등록 목록 */
.credit-register-list-section {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  min-width: 0;
}

.credit-register-list-header {
  margin-bottom: 0.85rem;
}

.credit-register-list-desc {
  margin-top: 0.2rem;
  margin-bottom: 0;
  color: var(--muted, #64748b);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.credit-register-edit-hint {
  margin: 0 0 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #0369a1;
  font-size: 0.8125rem;
  font-weight: 600;
}

.credit-register-list-wrap {
  max-height: 20rem;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  min-width: 0;
}

.credit-register-list-table {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 0.8125rem;
}

.credit-register-list-table.contract-table th,
.credit-register-list-table.contract-table td {
  min-width: 0;
  box-sizing: border-box;
}

.credit-register-list-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 0.65rem 0.75rem;
  background: #f1f5f9;
  border-bottom: 1px solid #cbd5e1;
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.credit-register-list-table tbody td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
  line-height: 1.35;
}

.credit-register-list-table tbody tr {
  cursor: pointer;
  transition: background 0.12s ease;
}

.credit-register-list-table tbody tr:nth-child(even):not(.is-selected) {
  background: #f8fafc;
}

.credit-register-list-table tbody tr:hover:not(.is-selected) {
  background: #f1f5f9;
}

.credit-register-list-table tbody tr:last-child td {
  border-bottom: none;
}

.credit-register-col-month { width: 9%; }
.credit-register-col-subscription { width: 26%; }
.credit-register-col-amount { width: 16%; }
.credit-register-col-scope { width: 14%; }
.credit-register-col-note { width: 24%; }
.credit-register-col-actions { width: 11%; }

.credit-register-th-num,
.credit-register-cell-amount {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.credit-register-cell-amount {
  font-weight: 700;
  color: #0f172a;
}

.credit-register-cell-month {
  font-weight: 600;
  color: #334155;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.credit-register-cell-subscription {
  font-weight: 600;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.credit-register-cell-scope {
  white-space: nowrap;
}

.credit-register-cell-note {
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.credit-register-th-actions,
.credit-register-cell-actions {
  text-align: right;
}

.credit-register-list-empty {
  text-align: center;
  padding: 1.25rem 0.75rem !important;
  color: #64748b;
  font-style: italic;
}

.credit-scope-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.credit-scope-badge--usage {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.credit-scope-badge--msp {
  background: #ede9fe;
  color: #5b21b6;
  border: 1px solid #ddd6fe;
}

.credit-register-list-table tbody tr.is-selected {
  background: rgba(56, 189, 248, 0.12);
  box-shadow: none;
}

.credit-register-list-table tbody tr.is-selected td:first-child {
  box-shadow: inset 3px 0 0 #0ea5e9;
}

.credit-register-list-table tbody tr.is-selected td {
  background: transparent;
}

.credit-register-list-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0.25rem;
  justify-content: flex-end;
  align-items: center;
}

.credit-register-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #475569;
  cursor: pointer;
  line-height: 1;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.credit-register-icon-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.credit-register-icon-btn--danger {
  color: #dc2626;
  border-color: #fecaca;
  background: #fff;
}

.credit-register-icon-btn--danger:hover {
  background: #fef2f2;
  border-color: #f87171;
  color: #b91c1c;
}

.credit-register-icon-btn__icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.credit-register-icon-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

body.theme-dark .credit-register-icon-btn {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
}

body.theme-dark .credit-register-icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
  color: #f1f5f9;
}

body.theme-dark .credit-register-icon-btn--danger {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(127, 29, 29, 0.15);
}

body.theme-dark .credit-register-icon-btn--danger:hover {
  background: rgba(127, 29, 29, 0.28);
  border-color: rgba(248, 113, 113, 0.5);
  color: #fecaca;
}

body.theme-dark .credit-register-edit-hint {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: #7dd3fc;
}

body.theme-dark .credit-register-list-wrap {
  background: rgba(15, 23, 42, 0.5);
  border-color: rgba(255, 255, 255, 0.1);
}

body.theme-dark .credit-register-list-table thead th {
  background: #1e293b;
  color: #cbd5e1;
  border-bottom-color: #334155;
}

body.theme-dark .credit-register-list-table tbody td {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .credit-register-list-table tbody tr:nth-child(even):not(.is-selected) {
  background: rgba(255, 255, 255, 0.03);
}

body.theme-dark .credit-register-list-table tbody tr:hover:not(.is-selected) {
  background: rgba(255, 255, 255, 0.06);
}

body.theme-dark .credit-register-cell-amount {
  color: #f1f5f9;
}

body.theme-dark .credit-register-cell-subscription {
  color: #e2e8f0;
}

body.theme-dark .credit-register-list-table tbody tr.is-selected {
  background: rgba(56, 189, 248, 0.14);
}

body.theme-dark .credit-scope-badge--usage {
  background: rgba(14, 165, 233, 0.18);
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.35);
}

body.theme-dark .credit-scope-badge--msp {
  background: rgba(139, 92, 246, 0.18);
  color: #c4b5fd;
  border-color: rgba(167, 139, 250, 0.35);
}

/* 크레딧 등록 모달 - 삭제 목록 (legacy alias) */
.credit-delete-table-wrap {
  max-height: 16rem;
  overflow-y: auto;
}

.credit-delete-table-wrap .contract-table th,
.credit-delete-table-wrap .contract-table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Credit Management > 크레딧 목록 섹션 */
#pageCredits .credit-list-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.25rem;
}

#pageCredits .credit-list-title-wrap {
  min-width: 260px;
}

#pageCredits .credit-list-desc {
  margin: 0.25rem 0 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

#pageCredits .credit-list-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(14, 165, 233, 0.05);
}

#pageCredits .credit-year-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

#pageCredits .credit-year-input {
  max-width: 140px;
  width: 140px;
}

#pageCredits .credit-list-hint {
  margin: 0.75rem 0 0.75rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* 크레딧 목록 요약 카드 */
.credit-list-summary {
  margin: 0 0 1rem;
}

.credit-list-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (max-width: 960px) {
  .credit-list-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .credit-list-summary-grid {
    grid-template-columns: 1fr;
  }
}

.credit-list-summary-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg, #fff);
}

.credit-list-summary-card--accent {
  border-color: rgba(14, 165, 233, 0.35);
  background: rgba(14, 165, 233, 0.06);
}

.credit-list-summary-card--remaining {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.06);
}

.credit-list-summary-card--muted {
  background: rgba(107, 114, 128, 0.06);
}

.credit-list-summary-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.credit-list-summary-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.credit-list-summary-value--compact {
  font-size: 0.95rem;
  font-weight: 600;
}

.credit-list-summary-value--text {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.credit-list-summary-unit {
  margin-left: 0.15rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.credit-list-summary-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.credit-list-summary-scope {
  white-space: nowrap;
}

.credit-list-summary-scope-divider {
  margin: 0 0.35rem;
  color: var(--text-secondary);
}

#pageCredits .credit-table-wrapper {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 58vh;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.credit-mgmt-table {
  table-layout: fixed;
  width: 100%;
  min-width: 820px;
}

.credit-mgmt-col-month { width: 9%; }
.credit-mgmt-col-target { width: 28%; }
.credit-mgmt-col-amount { width: 13%; }
.credit-mgmt-col-scope { width: 12%; }
.credit-mgmt-col-remaining { width: 13%; }
.credit-mgmt-col-note { width: 18%; }
.credit-mgmt-col-report { width: 7%; }
.credit-mgmt-col-admin { width: 8%; min-width: 72px; }

.credit-mgmt-th-admin,
.credit-mgmt-cell-admin {
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.credit-mgmt-admin-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

#pageCredits .credit-list-register-btn {
  white-space: nowrap;
}

.credit-mgmt-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--table-head-bg, #f3f4f6);
  font-size: 0.82rem;
  white-space: nowrap;
}

.credit-mgmt-th-num,
.credit-mgmt-cell-amount,
.credit-mgmt-cell-remaining {
  text-align: right !important;
}

.credit-mgmt-th-report,
.credit-mgmt-cell-report {
  text-align: center !important;
}

.credit-mgmt-cell-amount {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.credit-mgmt-cell-note {
  max-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.credit-mgmt-empty {
  text-align: center;
  padding: 2rem 1rem !important;
  color: var(--text-secondary);
}

.credit-mgmt-month-cell {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  align-items: flex-start;
}

.credit-mgmt-month-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(14, 165, 233, 0.12);
  color: #0369a1;
  border: 1px solid rgba(14, 165, 233, 0.25);
}

.credit-mgmt-year-label {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.credit-mgmt-target-cell {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.credit-mgmt-target-sub {
  font-weight: 600;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.credit-mgmt-target-contract {
  font-size: 0.8rem;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.credit-mgmt-cell-scope {
  vertical-align: middle;
}

.credit-mgmt-remaining {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.credit-mgmt-remaining--full {
  color: #059669;
}

.credit-mgmt-remaining--partial {
  color: #d97706;
}

.credit-mgmt-remaining--exhausted {
  color: var(--text-secondary);
}

.credit-mgmt-remaining--na {
  color: var(--text-secondary);
  font-weight: 400;
}

.credit-mgmt-month-group td {
  padding: 0 !important;
  border-bottom: none !important;
  background: transparent !important;
}

.credit-mgmt-month-group-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.65rem 0 0.35rem;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius);
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.18);
}

.credit-mgmt-month-group-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #4338ca;
}

.credit-mgmt-month-group-meta {
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.credit-mgmt-row td {
  vertical-align: middle;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

.credit-mgmt-row:hover td {
  background: rgba(14, 165, 233, 0.04);
}

.credit-mgmt-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg, #fff);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.credit-mgmt-icon-btn:hover {
  background: rgba(14, 165, 233, 0.08);
  border-color: rgba(14, 165, 233, 0.35);
  color: #0284c7;
}

.credit-mgmt-icon-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.theme-dark #pageCredits .credit-list-controls {
  background: rgba(56, 189, 248, 0.10);
}

body.theme-dark #pageCredits .credit-list-hint {
  color: rgba(156, 163, 175, 0.95);
}

body.theme-dark .credit-list-summary-card {
  background: rgba(31, 41, 55, 0.85);
}

body.theme-dark .credit-list-summary-card--accent {
  background: rgba(14, 165, 233, 0.12);
}

body.theme-dark .credit-list-summary-card--remaining {
  background: rgba(16, 185, 129, 0.12);
}

body.theme-dark .credit-mgmt-table thead th {
  background: #374151;
}

body.theme-dark .credit-mgmt-month-badge {
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.3);
}

body.theme-dark .credit-mgmt-month-group-inner {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(129, 140, 248, 0.25);
}

body.theme-dark .credit-mgmt-month-group-title {
  color: #a5b4fc;
}

body.theme-dark .credit-mgmt-row:hover td {
  background: rgba(56, 189, 248, 0.06);
}

body.theme-dark .credit-mgmt-icon-btn {
  background: #1f2937;
  border-color: #4b5563;
  color: #9ca3af;
}

body.theme-dark .credit-mgmt-icon-btn:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
  color: #7dd3fc;
}

body.theme-dark .credit-mgmt-remaining--full {
  color: #6ee7b7;
}

body.theme-dark .credit-mgmt-remaining--partial {
  color: #fbbf24;
}

/* 크레딧 차감 리포트 (모달 미리보기 · PDF 캡처) */
.modal--credit-report {
  width: min(920px, 96vw);
  max-width: 920px;
}

.modal-body--credit-report {
  padding: 0 1.25rem 1.25rem;
  max-height: min(78vh, 820px);
  overflow-y: auto;
}

.credit-report-pdf-wrap {
  display: flex;
  flex-direction: column;
  min-height: min(72vh, 760px);
  font-family: 'Noto Sans KR', Arial, sans-serif;
  color: #0f172a;
  background: #fff;
  padding: 1.25rem 1.35rem 0;
  border-radius: 12px;
}

.credit-report-body {
  flex: 1 1 auto;
  padding-bottom: 1rem;
}

.credit-report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.credit-report-header-brand {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  line-height: 0;
}

.credit-report-logo {
  display: block;
  height: 32px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

.credit-report-header-main {
  flex: 1;
  min-width: 0;
  text-align: right;
}

.credit-report-title {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.credit-report-meta {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: #64748b;
}

/* KPI — 단일 스트립, 구분선만 */
.credit-report-kpi-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f1f5f9;
}

@media (max-width: 720px) {
  .credit-report-kpi-strip {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
}

.credit-report-kpi-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0 1.1rem;
  border-left: 1px solid #e2e8f0;
  min-width: 0;
}

.credit-report-kpi-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 1.35rem;
}

.credit-report-kpi-item-head .credit-report-kpi-label {
  flex: 1;
  min-width: 0;
  padding-top: 0.1rem;
}

.credit-report-kpi-item:first-child {
  padding-left: 0;
  border-left: none;
}

@media (max-width: 720px) {
  .credit-report-kpi-item {
    padding: 0;
    border-left: none;
    border-top: 1px solid #f1f5f9;
    padding-top: 0.85rem;
  }

  .credit-report-kpi-item:first-child {
    border-top: none;
    padding-top: 0;
  }
}

.credit-report-kpi-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: #94a3b8;
  letter-spacing: 0.01em;
}

.credit-report-kpi-value {
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  line-height: 1.25;
}

.credit-report-kpi-value--primary {
  color: #0369a1;
}

.credit-report-kpi-value--deducted {
  color: #b45309;
}

.credit-report-kpi-value--remaining {
  color: #047857;
}

.credit-report-kpi-sub {
  font-size: 0.76rem;
  color: #94a3b8;
}

.credit-report-kpi-badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

.credit-report-kpi-badge--apply {
  color: #0369a1;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.22);
}

.credit-report-kpi-badge--usage {
  color: #b45309;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.22);
}

.credit-report-progress {
  margin-bottom: 1.25rem;
}

/* 크레딧 사용 현황 — 잔여 강조 패널 */
.credit-report-usage-panel {
  margin-bottom: 1.35rem;
  padding: 0.9rem 1.15rem 1rem;
  border: 1px solid #d1fae5;
  border-radius: 10px;
  background: linear-gradient(135deg, #f0fdf4 0%, #f8fafc 55%, #fff 100%);
}

.credit-report-usage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.credit-report-usage-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  padding-top: 0.1rem;
}

.credit-report-progress-track {
  height: 12px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.credit-report-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0ea5e9, #10b981);
  min-width: 0;
  box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.15);
}

.credit-report-section {
  margin-bottom: 1.35rem;
}

.credit-report-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid #f1f5f9;
}

.credit-report-section-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: #334155;
  letter-spacing: -0.01em;
}

.credit-report-section-meta {
  font-size: 0.74rem;
  color: #94a3b8;
}

/* 대상 정보 — 박스 유지 */
.credit-report-info-box {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fafbfc;
  padding: 0.15rem 0;
  overflow: hidden;
}

.credit-report-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}

@media (max-width: 640px) {
  .credit-report-info-grid {
    grid-template-columns: 1fr;
  }
}

.credit-report-info-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #f1f5f9;
}

.credit-report-info-item:nth-child(odd) {
  border-right: 1px solid #f1f5f9;
}

@media (max-width: 640px) {
  .credit-report-info-item:nth-child(odd) {
    border-right: none;
  }
}

.credit-report-info-item--full {
  grid-column: 1 / -1;
  border-right: none !important;
  border-bottom: none;
}

.credit-report-info-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.02em;
}

.credit-report-info-value {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.4;
  word-break: break-word;
}

.credit-report-info-sub {
  font-size: 0.76rem;
  color: #64748b;
  line-height: 1.4;
  word-break: break-all;
}

.credit-report-note-box {
  margin-top: 0.85rem;
  margin-bottom: 1.35rem;
  padding: 0.8rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  border-left: 3px solid #cbd5e1;
}

.credit-report-note-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 0.35rem;
}

.credit-report-note-text {
  margin: 0;
  font-size: 0.86rem;
  color: #334155;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.credit-report-scope-text {
  font-size: 0.92rem;
  font-weight: 600;
}

.credit-report-scope-text--usage {
  color: #0369a1;
}

.credit-report-scope-text--msp {
  color: #6d28d9;
}

/* 월별 차감 테이블 */
.credit-report-table-wrap {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.credit-report-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.credit-report-col-month {
  width: 24%;
}

.credit-report-col-cloud {
  width: 28%;
}

.credit-report-col-msp {
  width: 24%;
}

.credit-report-col-deduct {
  width: 24%;
}

.credit-report-table-wrap--cloud .credit-report-col-month {
  width: 30%;
}

.credit-report-table-wrap--cloud .credit-report-col-cloud {
  width: 35%;
}

.credit-report-table-wrap--cloud .credit-report-col-deduct {
  width: 35%;
}

.credit-report-table th,
.credit-report-table td {
  padding: 0.65rem 1rem;
  font-size: 0.84rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.credit-report-table thead th {
  background: #f8fafc;
  color: #64748b;
  font-weight: 600;
  font-size: 0.76rem;
  border-bottom: 1px solid #e2e8f0;
}

.credit-report-th-month,
.credit-report-td-month {
  text-align: left;
  font-weight: 500;
  color: #334155;
}

.credit-report-th-amount,
.credit-report-td-amount {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
  padding-right: 1.15rem !important;
}

.credit-report-th-num,
.credit-report-td-num {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
  padding-right: 0.85rem !important;
  color: #475569;
  font-weight: 500;
}

.credit-report-td-amount {
  font-weight: 600;
  color: #0f172a;
}

.credit-report-table-total td {
  background: #f8fafc;
  font-weight: 700;
  color: #0f172a;
  border-bottom: none;
  border-top: 1px solid #e2e8f0;
}

.credit-report-table-total .credit-report-td-month {
  font-weight: 700;
  color: #475569;
}

.credit-report-table-empty {
  text-align: center;
  padding: 1.35rem 1rem !important;
  color: #94a3b8;
  font-size: 0.84rem;
}

.credit-report-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 0.85rem 0 1.15rem;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  margin-left: -1.35rem;
  margin-right: -1.35rem;
  padding-left: 1.35rem;
  padding-right: 1.35rem;
  border-radius: 0 0 12px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.credit-report-footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.credit-report-footer-logo {
  display: block;
  height: 26px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
}

.credit-report-footer-text {
  margin: 0;
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.65;
  text-align: center;
}

.credit-report-footer-link {
  color: #0369a1;
  text-decoration: none;
  font-weight: 600;
}

.credit-report-footer-link:hover {
  text-decoration: underline;
}
