/* =============================================
   KYC Admin Design System
   shadcn/ui-inspired with Dark/Light Mode
   ============================================= */

/* CSS Custom Properties - Light Mode (기본) */
:root {
  --background: 0 0% 100%;
  --foreground: 240 10% 3.9%;
  --card: 0 0% 100%;
  --card-foreground: 240 10% 3.9%;
  --popover: 0 0% 100%;
  --popover-foreground: 240 10% 3.9%;
  --primary: 24 95% 53%;
  --primary-foreground: 0 0% 100%;
  --secondary: 240 4.8% 95.9%;
  --secondary-foreground: 240 5.9% 10%;
  --muted: 240 4.8% 95.9%;
  --muted-foreground: 240 3.8% 46.1%;
  --accent: 240 4.8% 95.9%;
  --accent-foreground: 240 5.9% 10%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 0 0% 98%;
  --success: 142 76% 36%;
  --success-foreground: 0 0% 100%;
  --warning: 38 92% 50%;
  --warning-foreground: 0 0% 100%;
  --border: 240 5.9% 90%;
  --input: 240 5.9% 90%;
  --ring: 24 95% 53%;
  --radius: 0.5rem;
  --sidebar-width: 250px;
  --sidebar-collapsed: 64px;
  --navbar-height: 56px;
  --chart-1: 24 95% 53%;
  --chart-2: 142 76% 36%;
  --chart-3: 221 83% 53%;
  --chart-4: 262 83% 58%;
  --chart-5: 0 84% 60%;
}

/* Dark Mode */
[data-theme="dark"] {
  --background: 240 10% 3.9%;
  --foreground: 0 0% 98%;
  --card: 240 10% 6%;
  --card-foreground: 0 0% 98%;
  --popover: 240 10% 6%;
  --popover-foreground: 0 0% 98%;
  --primary: 24 95% 53%;
  --primary-foreground: 0 0% 100%;
  --secondary: 240 3.7% 15.9%;
  --secondary-foreground: 0 0% 98%;
  --muted: 240 3.7% 15.9%;
  --muted-foreground: 240 5% 64.9%;
  --accent: 240 3.7% 15.9%;
  --accent-foreground: 0 0% 98%;
  --destructive: 0 62.8% 30.6%;
  --destructive-foreground: 0 0% 98%;
  --success: 142 70% 25%;
  --success-foreground: 0 0% 98%;
  --warning: 38 80% 40%;
  --warning-foreground: 0 0% 98%;
  --border: 240 3.7% 15.9%;
  --input: 240 3.7% 15.9%;
  --ring: 24 95% 53%;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-family: 'Pretendard', 'Inter', -apple-system, BlinkMacSystemFont, 'Noto Sans KR', 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.25;
  color: hsl(var(--foreground));
}
h1 { font-size: 30px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
h4 { font-size: 18px; }

a { color: hsl(var(--primary)); text-decoration: none; }
a:hover { opacity: 0.85; }

/* ======= LAYOUT ======= */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: hsl(var(--card));
  border-right: 1px solid hsl(var(--border));
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  transition: width 0.2s ease;
  overflow: hidden;
}

.admin-sidebar.collapsed { width: var(--sidebar-collapsed); }

.sidebar-brand {
  height: var(--navbar-height);
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid hsl(var(--border));
  gap: 12px;
  flex-shrink: 0;
}

.sidebar-brand-icon {
  width: 32px;
  height: 32px;
  background: hsl(var(--primary));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--primary-foreground));
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.sidebar-brand-text {
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
  color: hsl(var(--foreground));
}

.collapsed .sidebar-brand-text { display: none; }

.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  overflow-y: auto;
}

.sidebar-nav-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: hsl(var(--muted-foreground));
  padding: 16px 12px 8px;
  white-space: nowrap;
}

.collapsed .sidebar-nav-label { display: none; }

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius);
  color: hsl(var(--muted-foreground));
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}

.sidebar-nav-item:hover {
  background: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.sidebar-nav-item.active {
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  font-weight: 600;
}

.sidebar-nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.collapsed & display: none; }

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid hsl(var(--border));
}

/* Main Content Area */
.admin-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.2s ease;
}

.sidebar-collapsed .admin-main { margin-left: var(--sidebar-collapsed); }

/* Navbar */
.admin-navbar {
  height: var(--navbar-height);
  background: hsl(var(--card));
  border-bottom: 1px solid hsl(var(--border));
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 30;
  gap: 16px;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: hsl(var(--muted-foreground));
}

.navbar-breadcrumb a { color: hsl(var(--muted-foreground)); }
.navbar-breadcrumb a:hover { color: hsl(var(--foreground)); }
.navbar-breadcrumb .current { color: hsl(var(--foreground)); font-weight: 500; }

/* Sidebar Toggle Button */
.sidebar-toggle {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: var(--radius);
  cursor: pointer;
  color: hsl(var(--muted-foreground));
  transition: all 0.15s;
}
.sidebar-toggle:hover {
  background: hsl(var(--accent));
  color: hsl(var(--foreground));
}

/* Theme Toggle */
.theme-toggle {
  width: 36px;
  height: 20px;
  background: hsl(var(--muted));
  border: 1px solid hsl(var(--border));
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
}

.theme-toggle::after {
  content: '';
  width: 16px;
  height: 16px;
  background: hsl(var(--foreground));
  border-radius: 50%;
  position: absolute;
  top: 1px;
  left: 1px;
  transition: transform 0.2s;
}

[data-theme="dark"] .theme-toggle {
  background: hsl(var(--primary));
}

[data-theme="dark"] .theme-toggle::after {
  transform: translateX(16px);
  background: white;
}

/* Content */
.admin-content {
  flex: 1;
  padding: 24px;
}

/* ======= COMPONENTS ======= */

/* Card */
.card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid hsl(var(--border));
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.card-description {
  font-size: 13px;
  color: hsl(var(--muted-foreground));
}

.card-body { padding: 20px; }
.card-footer {
  padding: 12px 20px;
  border-top: 1px solid hsl(var(--border));
}

/* Stats Card */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.stat-info { display: flex; flex-direction: column; gap: 4px; }

.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: hsl(var(--foreground));
  line-height: 1;
}

.stat-change {
  font-size: 12px;
  margin-top: 4px;
}
.stat-change.up { color: hsl(var(--success)); }
.stat-change.down { color: hsl(var(--destructive)); }

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon svg { width: 20px; height: 20px; }

.stat-icon.primary { background: hsl(var(--primary) / 0.1); color: hsl(var(--primary)); }
.stat-icon.success { background: hsl(var(--success) / 0.15); color: hsl(var(--success)); }
.stat-icon.warning { background: hsl(var(--warning) / 0.15); color: hsl(var(--warning)); }
.stat-icon.destructive { background: hsl(var(--destructive) / 0.15); color: hsl(var(--destructive)); }

/* Charts Grid */
.charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.chart-container {
  position: relative;
  height: 260px;
}

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  line-height: 1.4;
  font-family: inherit;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn svg { width: 14px; height: 14px; }

.btn-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary));
}
.btn-primary:hover { opacity: 0.9; }

.btn-secondary {
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  border-color: hsl(var(--border));
}
.btn-secondary:hover { background: hsl(var(--accent)); }

.btn-outline {
  background: transparent;
  color: hsl(var(--foreground));
  border-color: hsl(var(--border));
}
.btn-outline:hover { background: hsl(var(--accent)); }

.btn-ghost {
  background: transparent;
  color: hsl(var(--foreground));
}
.btn-ghost:hover { background: hsl(var(--accent)); }

.btn-destructive {
  background: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
}

.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-lg { padding: 10px 20px; font-size: 15px; }
.btn-icon { padding: 8px; }

/* Input */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: hsl(var(--foreground));
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
  font-family: inherit;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--input));
  border-radius: var(--radius);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.form-input:focus {
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.form-input::placeholder { color: hsl(var(--muted-foreground)); }

.form-select {
  width: 100%;
  height: 36px;
  padding: 0 32px 0 12px;
  font-size: 13px;
  font-family: inherit;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--input));
  border-radius: var(--radius);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  outline: none;
  cursor: pointer;
}

.form-select:focus {
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

/* Filter Bar */
.filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.filter-bar .form-group { margin-bottom: 0; flex: 1; min-width: 140px; }

.filter-actions {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

/* Table */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table thead {
  background: hsl(var(--muted));
}

.data-table th {
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border-bottom: 1px solid hsl(var(--border));
}

.data-table td {
  padding: 10px 12px;
  color: hsl(var(--foreground));
  border-bottom: 1px solid hsl(var(--border));
  white-space: nowrap;
}

.data-table tbody tr:hover {
  background: hsl(var(--muted) / 0.5);
}

.data-table tbody tr:last-child td { border-bottom: none; }

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 9999px;
  text-transform: capitalize;
}

.badge-success {
  background: hsl(var(--success) / 0.12);
  color: hsl(var(--success));
}

.badge-warning {
  background: hsl(var(--warning) / 0.12);
  color: hsl(var(--warning));
}

.badge-destructive {
  background: hsl(var(--destructive) / 0.12);
  color: hsl(var(--destructive));
}

.badge-secondary {
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
}

.badge-primary {
  background: hsl(var(--primary) / 0.12);
  color: hsl(var(--primary));
}

/* Pagination */
.pagination-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.pagination .page-item .page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  font-size: 13px;
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.15s;
}

.pagination .page-item .page-link:hover {
  background: hsl(var(--accent));
}

.pagination .page-item.active .page-link,
.pagination .page-item .page-link.active-page {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary));
}

.pagination .page-item.disabled .page-link {
  opacity: 0.5;
  pointer-events: none;
}

/* Avatar */
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  flex-shrink: 0;
}

/* Dropdown */
.dropdown { position: relative; }

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 180px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  padding: 4px;
  z-index: 50;
  display: none;
}

.dropdown-menu.show { display: block; }

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 13px;
  color: hsl(var(--foreground));
  border-radius: calc(var(--radius) - 2px);
  cursor: pointer;
  text-decoration: none;
}

.dropdown-item:hover { background: hsl(var(--accent)); }

/* Separator */
.separator {
  height: 1px;
  background: hsl(var(--border));
  margin: 4px 0;
}

/* ======= LOGIN PAGE ======= */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: hsl(var(--muted));
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.login-brand-icon {
  width: 48px;
  height: 48px;
  background: hsl(var(--primary));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 20px;
}

.login-brand h1 {
  font-size: 20px;
  font-weight: 700;
}

.login-brand p {
  font-size: 13px;
  color: hsl(var(--muted-foreground));
}

.password-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: hsl(var(--muted-foreground));
  padding: 2px;
}

/* ======= DETAIL PAGE ======= */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.detail-section { margin-bottom: 24px; }

.detail-row {
  display: flex;
  padding: 10px 0;
  border-bottom: 1px solid hsl(var(--border));
  font-size: 13px;
}

.detail-label {
  width: 140px;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  flex-shrink: 0;
}

.detail-value {
  flex: 1;
  color: hsl(var(--foreground));
}

.image-preview {
  width: 100%;
  aspect-ratio: 4/3;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  overflow: hidden;
  background: hsl(var(--muted));
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* 3컬럼 상세 레이아웃 (정보 | 셀피 | 신분증) */
.detail-3col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.image-preview-compact {
  width: 100%;
  min-height: 280px;
  max-height: 420px;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  overflow: hidden;
  background: hsl(var(--muted));
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-preview-compact img {
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
}

.image-fallback {
  align-items: center;
  justify-content: center;
}

@media (max-width: 1200px) {
  .detail-3col {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 768px) {
  .detail-3col {
    grid-template-columns: 1fr;
  }
}

/* Alert styles */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 15px;
}
.alert-success {
  background: hsl(var(--success) / 0.1);
  color: hsl(var(--success));
  border: 1px solid hsl(var(--success) / 0.3);
}
.alert-error {
  background: hsl(var(--destructive) / 0.1);
  color: hsl(var(--destructive));
  border: 1px solid hsl(var(--destructive) / 0.3);
}

/* Badge variants */
.badge-primary {
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
}
.badge-secondary {
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
}

/* ======= UTILITIES ======= */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.p-4 { padding: 16px; }
.p-6 { padding: 24px; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.text-muted { color: hsl(var(--muted-foreground)); }
.text-right { text-align: right; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-full { width: 100%; }
.hidden { display: none; }

/* Transitions */
.transition { transition: all 0.2s ease; }

/* ======= RESPONSIVE ======= */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .charts-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .admin-sidebar {
    transform: translateX(-100%);
    z-index: 50;
  }
  .admin-sidebar.mobile-open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .stats-grid { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; align-items: stretch; }
}

/* Toast / Alert */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  border: 1px solid;
  margin-bottom: 16px;
}

.alert-success {
  background: hsl(var(--success) / 0.1);
  border-color: hsl(var(--success) / 0.3);
  color: hsl(var(--success));
}

.alert-error {
  background: hsl(var(--destructive) / 0.1);
  border-color: hsl(var(--destructive) / 0.3);
  color: hsl(var(--destructive));
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: hsl(var(--border));
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: hsl(var(--muted-foreground)); }

/* Tab Navigation */
.tab-nav {
  display: flex;
  border-bottom: 1px solid hsl(var(--border));
  gap: 0;
  margin-bottom: 16px;
}

.tab-item {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: inherit;
}

.tab-item:hover { color: hsl(var(--foreground)); }
.tab-item.active {
  color: hsl(var(--primary));
  border-bottom-color: hsl(var(--primary));
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* Overlay for mobile sidebar */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 45;
  display: none;
}
.sidebar-overlay.show { display: block; }

/* ======= 언어 토글 버튼 ======= */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', monospace;
}
.lang-toggle:hover {
  background: hsl(var(--accent));
  border-color: hsl(var(--primary));
  color: hsl(var(--primary));
}

/* 타이포그래피 개선 - tabular-nums for data */
.data-table td,
.stat-value,
.pagination .page-link {
  font-variant-numeric: tabular-nums;
}

/* 한국어 heading 최적화 */
h1, h2, h3, h4, h5, h6 {
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* 데이터 테이블 본문 크기 조정 */
.data-table {
  font-size: 13px;
  letter-spacing: -0.01em;
}
.data-table th {
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* 필터 라벨 */
.filter-bar .form-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ======= 타이포그래피 (crypto-gold-market 벤치마킹, px 단위 통일) ======= */

/* Headings */
h1 {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}
h2 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
h3 {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
h4 {
  font-size: 26px;
  font-weight: 600;
}

/* Body */
body {
  font-size: 22px;
  line-height: 1.6;
  letter-spacing: -0.01em;
}

/* 통계 카드 */
.stat-value {
  font-size: 48px;
  font-weight: 800;
  font-family: 'JetBrains Mono', 'Inter', monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.stat-label {
  font-size: 21px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: hsl(var(--muted-foreground));
}

/* 카드 제목 */
.card-title {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* 테이블 */
.data-table {
  font-size: 21px;
}
.data-table td {
  font-size: 21px;
  font-variant-numeric: tabular-nums;
}
.data-table th {
  font-size: 20px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* 배지 */
.badge {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* 버튼 */
.btn {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.btn-lg {
  font-size: 23px;
}

/* 폼 */
.form-input,
.form-select {
  font-size: 21px;
}
.filter-bar .form-label {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* 사이드바 */
.sidebar-nav-item span {
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.sidebar-nav-label {
  font-size: 21px;
}

/* 브레드크럼 */
.navbar-breadcrumb {
  font-size: 21px;
  letter-spacing: 0.01em;
}
.navbar-breadcrumb .current {
  font-weight: 600;
}

/* 상세 페이지 */
.detail-label {
  font-size: 21px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: hsl(var(--muted-foreground));
}
.detail-value {
  font-size: 22px;
  font-weight: 500;
  color: hsl(var(--foreground));
}

/* 유틸리티 텍스트 */
.text-sm {
  font-size: 21px;
}
.text-xs {
  font-size: 19px;
}

/* 페이지네이션 */
.pagination .page-link {
  font-size: 21px;
  font-weight: 500;
}

/* 드롭다운 */
.dropdown-item {
  font-size: 21px;
}

/* 푸터 */
.admin-content footer,
footer {
  font-size: 20px;
}

/* 로그인 */
.login-brand h1 {
  font-size: 36px;
  letter-spacing: -0.02em;
}
.login-brand p {
  font-size: 22px;
  color: hsl(var(--muted-foreground));
  letter-spacing: 0.01em;
}

/* 숫자 전용 폰트 */
.font-mono {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-variant-numeric: tabular-nums;
}

/* 2행 상세 레이아웃 (상단: 정보 전체, 하단: 셀피 좌 + 신분증 우) */
.detail-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 40px;
}
.detail-info-grid .detail-row {
  border-bottom: 1px solid hsl(var(--border));
  padding: 10px 0;
}
.detail-info-grid .detail-row:last-child {
  border-bottom: none;
}
.detail-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
.image-preview-large {
  width: 100%;
  min-height: 320px;
  max-height: 500px;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  overflow: hidden;
  background: hsl(var(--muted));
  display: flex;
  align-items: center;
  justify-content: center;
}
.image-preview-large img {
  max-width: 100%;
  max-height: 500px;
  object-fit: contain;
}

/* 5컬럼 통계 그리드 반응형 */
@media (max-width: 1200px) {
  .detail-info-grid {
    grid-template-columns: 1fr;
  }
  .detail-2col {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 768px) {
  .detail-2col {
    grid-template-columns: 1fr;
  }
}
