* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --border: #e7e5e4;
  --border-soft: #f5f5f4;
  --text: #1c1917;
  --text-soft: #57534e;
  --text-mute: #a8a29e;
  --text-faint: #d6d3d1;
  --accent: #1c1917;
  --emerald-bg: #ecfdf5;
  --emerald-fg: #047857;
  --emerald-border: #d1fae5;
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --red-fg: #dc2626;
  --red-bg: #fef2f2;
  --red-border: #fecaca;
}
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1;
  min-height: 100vh;
  line-height: 1.45;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; }
.tabular { font-variant-numeric: tabular-nums; }

/* 상단 네비 */
.nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}
.brand-mark {
  width: 32px;
  height: 32px;
  background: var(--text);
  color: white;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}
.nav-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 13px;
}
.nav-link {
  padding: 6px 12px;
  border-radius: 6px;
  color: var(--text-mute);
  transition: all 0.15s;
}
.nav-link:hover { color: var(--text-soft); background: var(--stone-100); }
.nav-link.active {
  background: var(--stone-100);
  color: var(--text);
}

/* 컨테이너 */
.container { max-width: 1100px; margin: 0 auto; padding: 40px 24px; }
.container-sm { max-width: 580px; margin: 0 auto; padding: 48px 24px; }
.container-md { max-width: 880px; margin: 0 auto; padding: 40px 24px; }

.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-mute);
  margin-bottom: 12px;
}
h1 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text);
}
.subtitle { color: var(--text-soft); font-size: 14px; margin-top: 4px; }

/* 알림 */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 20px;
  border: 1px solid;
}
.alert-success { background: var(--emerald-bg); color: var(--emerald-fg); border-color: var(--emerald-border); }
.alert-error { background: var(--red-bg); color: var(--red-fg); border-color: var(--red-border); }
.alert-info { background: var(--stone-100); color: var(--text-soft); border-color: var(--border); }

/* 폼 */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
}
.field { margin-bottom: 22px; }
.field:last-child { margin-bottom: 0; }
.label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-soft);
  margin-bottom: 8px;
}
.input, .textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--stone-50);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  transition: all 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
.input:focus, .textarea:focus { outline: none; border-color: var(--text); background: white; }
.input::placeholder, .textarea::placeholder { color: var(--text-mute); }
.textarea { min-height: 96px; resize: vertical; font-family: inherit; }

.toggle-group { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.toggle {
  padding: 12px 16px;
  background: var(--stone-50);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-soft);
  transition: all 0.15s;
}
.toggle:hover { border-color: var(--text-mute); }
.toggle.active { background: var(--text); color: white; border-color: var(--text); }

.upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 160px;
  background: var(--stone-50);
  border: 1.5px dashed #d6d3d1;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
  padding: 12px;
}
.upload:hover { border-color: #a8a29e; background: var(--stone-100); }
.upload-icon { font-size: 20px; color: var(--text-mute); margin-bottom: 8px; }
.upload-text { font-size: 13px; color: var(--text-soft); }
.upload-hint { font-size: 11px; color: var(--text-mute); margin-top: 4px; }
.upload input { display: none; }

.upload-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.upload-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 22px 12px;
  background: var(--stone-50);
  border: 1.5px dashed #d6d3d1;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-soft);
  transition: all 0.15s;
  min-height: 110px;
}
.upload-action:hover { border-color: #a8a29e; background: var(--stone-100); color: var(--text); }
.upload-action-icon { font-size: 24px; line-height: 1; }
.upload-action-camera {
  background: var(--text);
  color: white;
  border: 1.5px solid var(--text);
}
.upload-action-camera:hover { background: #292524; color: white; border-color: #292524; }
.preview-wrap { position: relative; }
.preview-img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: block;
}
.preview-change {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(4px);
  color: var(--text-soft);
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.preview-change:hover { background: white; }

.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--text);
  color: white;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  transition: background 0.15s;
}
.btn-primary:hover { background: #292524; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary.success { background: #059669; }

.footnote {
  font-size: 11px;
  color: var(--text-mute);
  text-align: center;
  margin-top: 24px;
}

/* 관리자 목록 */
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 32px;
  gap: 16px;
  flex-wrap: wrap;
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-soft);
  transition: background 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-secondary:hover { background: var(--stone-50); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
.stat {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.stat-label { font-size: 11px; color: var(--text-mute); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.06em; }
.stat-value { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.stat-value.emerald { color: var(--emerald-fg); }
.stat-value.mute { color: var(--text-mute); }

.toolbar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }

.filter-form { margin-bottom: 16px; }
.filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.filter-search-wrap {
  flex: 0 1 240px;
  min-width: 180px;
}
.select {
  padding: 10px 32px 10px 14px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
  -webkit-appearance: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-mute) 50%),
                    linear-gradient(135deg, var(--text-mute) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  height: 38px;
  cursor: pointer;
}
.select:focus { outline: none; border-color: var(--text-mute); }
.select:hover { border-color: var(--text-mute); }
.select-exec { min-width: 150px; }
.select-datefield { min-width: 130px; }
.select-date {
  background-image: none;
  padding: 10px 12px;
  font-variant-numeric: tabular-nums;
  min-width: 140px;
  cursor: pointer;
}
.filter-sep {
  color: var(--text-mute);
  font-size: 13px;
  padding: 0 2px;
}
.btn-search { margin-left: auto; }
.btn-search, .btn-reset { height: 38px; }

.dot-new {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef4444;
  margin-left: 6px;
  vertical-align: middle;
}
.row-unviewed .name { font-weight: 600; }
.search-wrap { position: relative; flex: 1; min-width: 200px; }
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-mute);
  font-size: 14px;
}
.search-input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  -webkit-appearance: none;
  appearance: none;
}
.search-input:focus { outline: none; border-color: var(--text-mute); }

.table-wrap {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
table { width: 100%; border-collapse: collapse; }
thead { background: #fafaf9; border-bottom: 1px solid var(--border); }
th {
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-soft);
  padding: 12px 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
th a { display: inline-flex; align-items: center; gap: 4px; color: inherit; }
th a:hover { color: var(--text); }
tbody tr {
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  transition: background 0.1s;
}
tbody tr:last-child { border-bottom: 0; }
tbody tr:hover { background: #fafaf9; }
td { padding: 14px 20px; font-size: 13px; vertical-align: middle; }
.empty-row td { text-align: center; color: var(--text-mute); padding: 48px 20px; cursor: default; }
.avatar {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--stone-100);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-soft);
  flex-shrink: 0;
}
.name { font-weight: 500; color: var(--text); }
.muted { color: var(--text-soft); }
.muted-light { color: var(--text-mute); font-size: 11px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 5px;
  white-space: nowrap;
}
.badge-success { background: var(--emerald-bg); color: var(--emerald-fg); }
.badge-mute { background: var(--stone-100); color: var(--text-soft); }
.badge-approved { background: #eff6ff; color: #1d4ed8; }

.thumb {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: linear-gradient(135deg, #e7e5e4, #d6d3d1);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  overflow: hidden;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-soft);
  gap: 12px;
  flex-wrap: wrap;
}
.page-btns { display: flex; gap: 4px; flex-wrap: wrap; }
.page-btn {
  padding: 7px 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.page-btn:hover:not(.disabled):not(.active) { background: var(--stone-50); }
.page-btn.active { background: var(--text); color: white; border-color: var(--text); }
.page-btn.disabled { color: var(--text-mute); pointer-events: none; }

/* 상세 페이지 */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 24px;
}
.back-link:hover { color: var(--text); }

.detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
  gap: 16px;
  flex-wrap: wrap;
}
.detail-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-soft);
  margin-top: 6px;
}
.badge-lg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid;
  white-space: nowrap;
}
.badge-lg.success {
  background: var(--emerald-bg);
  color: var(--emerald-fg);
  border-color: var(--emerald-border);
}
.badge-lg.mute {
  background: var(--stone-100);
  color: var(--text-soft);
  border-color: var(--border);
}
.badge-lg.approved {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #dbeafe;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 20px;
}
.info-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 12px;
}
.info-card-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  margin-bottom: 16px;
}
.info-item { margin-bottom: 16px; }
.info-item:last-child { margin-bottom: 0; }
.info-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-mute);
  margin-bottom: 4px;
}
.info-value { font-size: 14px; font-weight: 500; color: var(--text); word-break: break-all; }
.info-value.preserve { white-space: pre-wrap; font-weight: 400; }

.action-btn {
  display: block;
  width: 100%;
  padding: 11px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  margin-bottom: 8px;
  transition: all 0.15s;
  text-align: center;
}
.action-btn:last-child { margin-bottom: 0; }
.action-btn.primary { background: var(--text); color: white; }
.action-btn.primary:hover { background: #292524; }
.action-btn.outline {
  background: white;
  border: 1px solid var(--border);
  color: var(--text-soft);
}
.action-btn.outline:hover { background: var(--stone-50); }
.action-btn.danger { color: var(--red-fg); }
.action-btn.danger:hover { background: var(--red-bg); }

.screenshot-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.screenshot-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 8px;
}
.screenshot-frame {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, #f5f5f4 0%, #fafaf9 50%, #e7e5e4 100%);
  border-radius: 8px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.screenshot-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #1c1917;
  cursor: zoom-in;
}
.screenshot-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-mute);
}
.screenshot-empty-icon { font-size: 24px; }
.screenshot-empty-text { font-size: 13px; margin-top: 8px; }
.screenshot-meta { font-size: 11px; color: var(--text-mute); margin-top: 12px; }

.ico { display: inline-block; line-height: 1; }

/* 로그인 카드 */
.login-card {
  max-width: 400px;
  margin: 80px auto;
  padding: 0 24px;
}

/* 반응형 - 태블릿 */
@media (max-width: 768px) {
  .container { padding: 24px 16px; }
  .container-sm { padding: 32px 16px; }
  .container-md { padding: 24px 16px; }
  .nav-inner { padding: 10px 16px; }
  .card { padding: 22px; border-radius: 12px; }
  .detail-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stat { padding: 14px; }
  .stat-value { font-size: 20px; }
  h1 { font-size: 22px; }
  .page-head { align-items: flex-start; }
}

/* 반응형 - 모바일: 테이블 → 카드 변환 */
@media (max-width: 640px) {
  .table-wrap {
    background: transparent;
    border: 0;
    overflow: visible;
  }
  table, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }
  tbody tr {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 10px;
  }
  tbody tr:hover { background: white; }
  td {
    padding: 6px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    border: 0;
  }
  td:first-child { padding-top: 0; padding-bottom: 10px; border-bottom: 1px solid var(--border-soft); margin-bottom: 6px; }
  td::before {
    content: attr(data-label);
    font-size: 11px;
    color: var(--text-mute);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
  }
  td:first-child::before { display: none; }
  td.cell-action { display: none; }
  .empty-row td { padding: 48px 20px; }
  .empty-row td::before { display: none; }

  .stats { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  .stat { padding: 12px; }
  .stat-label { font-size: 10px; }
  .stat-value { font-size: 18px; }

  .toolbar { flex-direction: column; }
  .search-wrap { width: 100%; }
  .filter-search-wrap { flex: 1 1 100%; max-width: none; min-width: 0; }
  .select-exec, .select-datefield { flex: 1 1 calc(50% - 4px); min-width: 0; }
  .select-date { flex: 1 1 calc(50% - 16px); min-width: 0; }
  .filter-sep { display: none; }
  .btn-search { flex: 1 1 100%; margin-left: 0; justify-content: center; }
  .btn-reset { flex: 0 0 auto; margin-left: 0; }

  .pagination { flex-direction: column; align-items: stretch; text-align: center; }
  .page-btns { justify-content: center; }
}

@media (max-width: 480px) {
  .nav-inner { gap: 6px; }
  .nav-actions { font-size: 12px; }
  .nav-link { padding: 5px 8px; }
  .brand { font-size: 14px; }
  .brand-mark { width: 28px; height: 28px; font-size: 12px; }
  h1 { font-size: 20px; }
  .container, .container-sm, .container-md { padding: 20px 14px; }
}
