/* ============================================================
   SNS Platform - Global Styles
   ============================================================ */
:root {
  --primary: #0f172a;
  --primary-dark: #020617;
  --primary-light: #334155;
  --secondary: #2563eb;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #0284c7;
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-input: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --radius: 12px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --transition: all 0.2s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--secondary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary); }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── Layout ─────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.page-wrap { min-height: calc(100vh - 64px); padding-top: 64px; }

/* ── Header / Nav ───────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border); height: 64px;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}
.nav .container {
  display: flex; align-items: center; justify-content: space-between; height: 100%;
}
.nav-brand {
  font-size: 20px; font-weight: 800; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.nav-brand span { color: var(--secondary); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 8px 16px; border-radius: var(--radius-sm); color: var(--text-muted);
  font-size: 14px; font-weight: 500; transition: var(--transition);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text); background: #f1f5f9;
}
.nav-right { display: flex; align-items: center; gap: 8px; }
.nav-mobile-toggle {
  display: none; background: none; border: none; color: var(--text); font-size: 24px;
}

/* ── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: var(--radius-sm); font-size: 14px;
  font-weight: 600; border: 1px solid transparent; transition: var(--transition); white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(15, 23, 42, 0.2); }
.btn-secondary { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg-card-hover); border-color: #cbd5e1; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-outline {
  background: transparent; border: 1px solid var(--primary); color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }

/* ── Form ───────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 10px 14px; border-radius: var(--radius-sm);
  background: var(--bg-input); border: 1px solid var(--border); color: var(--text);
  font-size: 14px; transition: var(--transition); outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: #94a3b8; box-shadow: 0 0 0 3px rgba(148,163,184,0.2);
}
.form-textarea { min-height: 100px; resize: vertical; }

/* ── Cards ──────────────────────────────────────────── */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; transition: var(--transition);
}
.card:hover { border-color: #dbe3ee; box-shadow: var(--shadow); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-title { font-size: 18px; font-weight: 700; }

/* ── Campaign Cards ─────────────────────────────────── */
.campaign-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px;
}
.campaign-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; transition: var(--transition);
  cursor: pointer; position: relative;
}
.campaign-card:hover { border-color: #dbe3ee; transform: translateY(-2px); box-shadow: var(--shadow); }
.campaign-card .thumb {
  width: 100%; height: 180px; background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  display: flex; align-items: center; justify-content: center; font-size: 48px; position: relative;
}
.campaign-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.campaign-card .premium-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--warning); color: #000; padding: 3px 10px;
  border-radius: 20px; font-size: 11px; font-weight: 700;
}
.campaign-card .status-badge {
  position: absolute; top: 12px; right: 12px;
  padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700;
}
.badge-recruiting { background: var(--success); color: #fff; }
.badge-reviewing { background: var(--warning); color: #000; }
.badge-completed { background: var(--text-dim); color: #fff; }
.badge-active { background: var(--info); color: #fff; }
.campaign-card .body { padding: 16px; }
.campaign-card .category-tag {
  display: inline-block; padding: 2px 10px; border-radius: 20px;
  background: #e2e8f0; color: var(--primary-light);
  font-size: 11px; font-weight: 600; margin-bottom: 8px;
}
.campaign-card .title { font-size: 16px; font-weight: 700; margin-bottom: 6px; line-height: 1.4; }
.campaign-card .desc {
  font-size: 13px; color: var(--text-muted); margin-bottom: 12px;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.campaign-card .meta {
  display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--text-dim);
}
.campaign-card .meta span { display: flex; align-items: center; gap: 4px; }
.campaign-card .footer {
  padding: 12px 16px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; font-size: 13px;
}
.campaign-card .reward { color: var(--secondary); font-weight: 700; }
.campaign-card .applicants { color: var(--text-muted); }

/* ── Hero Section ───────────────────────────────────── */
.hero {
  padding: 60px 0 40px; text-align: center;
  background: radial-gradient(1000px 360px at 50% 0, rgba(37,99,235,0.08), transparent 72%);
}
.hero h1 { font-size: 36px; font-weight: 800; margin-bottom: 12px; }
.hero h1 span { color: var(--primary); }
.hero p { font-size: 16px; color: var(--text-muted); max-width: 600px; margin: 0 auto 24px; }
.hero .search-bar {
  max-width: 560px; margin: 0 auto; display: flex; gap: 8px;
}
.hero .search-bar input {
  flex: 1; padding: 14px 20px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text);
  font-size: 15px; outline: none;
}
.hero .search-bar input:focus { border-color: #94a3b8; }
.hero .search-bar button { border-radius: var(--radius); padding: 14px 24px; }

/* ── Category Tabs ──────────────────────────────────── */
.category-tabs {
  display: flex; gap: 8px; overflow-x: auto; padding: 16px 0;
  scrollbar-width: none; -ms-overflow-style: none;
}
.category-tabs::-webkit-scrollbar { display: none; }
.category-tab {
  padding: 8px 18px; border-radius: 24px; font-size: 13px; font-weight: 600;
  white-space: nowrap; border: 1px solid var(--border); background: transparent;
  color: var(--text-muted); transition: var(--transition); cursor: pointer;
}
.category-tab:hover, .category-tab.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
}

/* ── Filter Bar ─────────────────────────────────────── */
.filter-bar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; padding: 16px 0;
}
.filter-bar .filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-chip {
  padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--border); background: transparent; color: var(--text-muted);
  cursor: pointer; transition: var(--transition);
}
.filter-chip:hover, .filter-chip.active {
  background: #eef2ff; color: var(--primary); border-color: #c7d2fe;
}
.sort-select {
  padding: 6px 12px; border-radius: var(--radius-sm);
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text); font-size: 13px;
}

/* ── Section ────────────────────────────────────────── */
.section { padding: 32px 0; }
.section-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px;
}
.section-title { font-size: 22px; font-weight: 800; }
.section-subtitle { font-size: 14px; color: var(--text-muted); }

/* ── Stats Grid ─────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; text-align: center;
}
.stat-value { font-size: 28px; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ── Analysis Cards ─────────────────────────────────── */
.analysis-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.analysis-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; transition: var(--transition);
  cursor: pointer;
}
.analysis-card:hover { border-color: #cbd5e1; transform: translateY(-2px); box-shadow: var(--shadow); }
.analysis-card .icon {
  width: 48px; height: 48px; border-radius: 12px; display: flex;
  align-items: center; justify-content: center; font-size: 24px; margin-bottom: 16px;
}
.analysis-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.analysis-card p { font-size: 13px; color: var(--text-muted); }

/* ── Grade Badge ────────────────────────────────────── */
.grade { display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%; font-weight: 800; font-size: 16px; }
.grade-S { background: linear-gradient(135deg, #f59e0b, #f97316); color: #000; }
.grade-A { background: var(--primary); color: #fff; }
.grade-B { background: var(--success); color: #fff; }
.grade-C { background: var(--text-dim); color: #fff; }
.grade-D { background: var(--danger); color: #fff; }

/* ── Table ──────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
th { font-weight: 600; color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
tr:hover td { background: #f8fafc; }

/* ── Tabs ───────────────────────────────────────────── */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 24px; }
.tab {
  padding: 12px 24px; font-size: 14px; font-weight: 600; color: var(--text-muted);
  border: none; background: none; cursor: pointer; position: relative; transition: var(--transition);
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); }
.tab.active::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
  height: 2px; background: var(--primary);
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Modal ──────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,0.32); backdrop-filter: blur(2px);
  z-index: 2000; display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); max-width: 500px; width: 100%;
  max-height: 90vh; overflow-y: auto; padding: 32px;
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-title { font-size: 20px; font-weight: 700; }
.modal-close {
  background: none; border: none; color: var(--text-muted); font-size: 24px;
  cursor: pointer; padding: 4px;
}

/* ── Toast ──────────────────────────────────────────── */
.toast-container { position: fixed; top: 80px; right: 20px; z-index: 3000; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 12px 20px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500;
  animation: slideIn 0.3s ease; min-width: 280px; box-shadow: var(--shadow);
}
.toast-success { background: var(--success); color: #fff; }
.toast-error { background: var(--danger); color: #fff; }
.toast-info { background: var(--info); color: #fff; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Sidebar (Admin) ────────────────────────────────── */
.admin-layout { display: flex; min-height: calc(100vh - 64px); }
.sidebar {
  width: 260px; background: var(--bg-card); border-right: 1px solid var(--border);
  padding: 24px 0; flex-shrink: 0;
}
.sidebar-link {
  display: flex; align-items: center; gap: 10px; padding: 10px 24px;
  color: var(--text-muted); font-size: 14px; font-weight: 500; transition: var(--transition);
}
.sidebar-link:hover, .sidebar-link.active {
  color: var(--text); background: #f1f5f9;
  border-right: 3px solid var(--primary);
}
.admin-content { flex: 1; padding: 32px; overflow-y: auto; }

/* ── Dashboard Stats ────────────────────────────────── */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 32px; }
.dash-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.dash-card .label { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.dash-card .value { font-size: 32px; font-weight: 800; }
.dash-card .change { font-size: 12px; margin-top: 4px; }
.dash-card .change.up { color: var(--success); }
.dash-card .change.down { color: var(--danger); }

/* ── Progress Bar ───────────────────────────────────── */
.progress { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 4px; transition: width 0.5s ease; }
.progress-bar.primary { background: var(--primary); }
.progress-bar.success { background: var(--success); }
.progress-bar.warning { background: var(--warning); }

/* ── Empty State ────────────────────────────────────── */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state .icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { font-size: 18px; margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); font-size: 14px; }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-mobile-toggle { display: block; }
  .hero h1 { font-size: 24px; }
  .hero .search-bar { flex-direction: column; }
  .campaign-grid { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .admin-content { padding: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Nav Dropdowns ─────────────────────────────────── */
.nav-dropdown { position: relative; }
.nav-dropdown-trigger {
  padding: 8px 16px; border-radius: var(--radius-sm); color: var(--text-muted);
  font-size: 14px; font-weight: 500; transition: var(--transition);
  display: flex; align-items: center; gap: 4px;
}
.nav-dropdown-trigger:hover, .nav-dropdown:hover .nav-dropdown-trigger {
  color: var(--text); background: #f1f5f9;
}
.nav-dropdown-trigger .caret { font-size: 10px; opacity: 0.6; transition: transform 0.2s; }
.nav-dropdown:hover .caret { transform: rotate(180deg); }
.nav-dropdown-menu {
  position: absolute; top: 100%; left: 0; min-width: 200px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px 0;
  box-shadow: 0 12px 28px rgba(15,23,42,0.12);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all 0.2s ease; z-index: 1001;
}
.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav-dropdown-menu a {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; font-size: 13px; color: var(--text-muted);
  transition: var(--transition); white-space: nowrap;
}
.nav-dropdown-menu a:hover {
  background: #f8fafc; color: var(--text);
}
.nav-dropdown-divider {
  height: 1px; background: var(--border); margin: 6px 0;
}

/* ── User Avatar Dropdown ──────────────────────────── */
.nav-user-dropdown { position: relative; }
.nav-user-trigger {
  display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px;
  border-radius: 24px; border: 1px solid var(--border); background: var(--bg-card);
  cursor: pointer; transition: var(--transition); color: var(--text);
}
.nav-user-trigger:hover { border-color: var(--primary); }
.nav-user-avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: #fff;
}
.nav-user-name { font-size: 13px; font-weight: 600; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-user-dropdown .nav-dropdown-menu { left: auto; right: 0; min-width: 180px; }
.nav-user-dropdown:hover .nav-dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dropdown-menu .menu-danger { color: var(--danger); }
.nav-dropdown-menu .menu-danger:hover { background: #fef2f2; }

/* ── Notification Bell ─────────────────────────────── */
.nav-bell {
  position: relative; background: none; border: none; color: var(--text-muted);
  font-size: 20px; padding: 6px; cursor: pointer; transition: var(--transition);
}
.nav-bell:hover { color: var(--text); }
.nav-bell-badge {
  position: absolute; top: 2px; right: 2px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--danger); color: #fff;
  font-size: 9px; font-weight: 800; display: flex; align-items: center;
  justify-content: center; border: 2px solid var(--bg);
}

/* ── Mobile Drawer ─────────────────────────────────── */
.mobile-drawer-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,0.32); z-index: 1100;
  opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.mobile-drawer-overlay.open { opacity: 1; visibility: visible; }
.mobile-drawer {
  position: fixed; top: 0; right: -300px; width: 300px; height: 100vh;
  background: var(--bg-card); z-index: 1200; transition: right 0.3s ease;
  display: flex; flex-direction: column; overflow-y: auto;
}
.mobile-drawer.open { right: 0; }
.mobile-drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.mobile-drawer-close {
  background: none; border: none; color: var(--text-muted); font-size: 20px; cursor: pointer;
}
.mobile-drawer-user {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.mobile-drawer-user:empty { display: none; }
.mobile-drawer-body { flex: 1; padding: 8px 0; }
.mobile-section-title {
  padding: 16px 20px 6px; font-size: 11px; font-weight: 700;
  color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px;
}
.mobile-drawer-body a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 20px; font-size: 14px; color: var(--text-muted);
  transition: var(--transition);
}
.mobile-drawer-body a:hover { background: #f1f5f9; color: var(--text); }
.mobile-drawer-footer {
  padding: 16px 20px; border-top: 1px solid var(--border);
}

/* ── Registration Type Cards ────────────────────────── */
.reg-type-card {
  padding: 16px 12px; border-radius: var(--radius); border: 2px solid var(--border);
  text-align: center; cursor: pointer; transition: var(--transition);
  background: var(--bg-card);
}
.reg-type-card:hover { border-color: #cbd5e1; background: #f8fafc; }
.reg-type-card.active {
  border-color: #94a3b8; background: #f1f5f9;
  box-shadow: 0 0 0 1px var(--primary);
}

/* ── Loading Spinner ────────────────────────────────── */
.spinner {
  width: 40px; height: 40px; border: 3px solid var(--border);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin 0.8s linear infinite; margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Footer ─────────────────────────────────────────── */
.footer {
  background: var(--bg-card); border-top: 1px solid var(--border);
  padding: 40px 0; margin-top: 60px;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; }
.footer h4 { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.footer a { display: block; color: var(--text-muted); font-size: 13px; padding: 3px 0; }
.footer a:hover { color: var(--text); }
.footer-bottom {
  margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border);
  text-align: center; font-size: 12px; color: var(--text-dim);
}

/* ── Chip / Tag ─────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600;
}
.chip-primary { background: #e2e8f0; color: #1e293b; }
.chip-success { background: #ecfdf5; color: #047857; }
.chip-warning { background: #fffbeb; color: #b45309; }
.chip-danger { background: #fef2f2; color: #b91c1c; }

/* ── Chart placeholder ──────────────────────────────── */
.chart-placeholder {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; min-height: 200px;
  display: flex; align-items: center; justify-content: center;
}
.chart-bar-group { display: flex; align-items: flex-end; gap: 6px; height: 160px; }
.chart-bar {
  width: 24px; border-radius: 4px 4px 0 0; background: var(--primary);
  transition: height 0.5s ease; min-height: 4px;
}
.chart-bar:hover { background: var(--primary-light); }

/* ── PandaRank-Inspired Analysis UI ─────────────────── */
.panda-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 20px 40px;
}
.panda-hero {
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 28px;
  background:
    radial-gradient(480px 180px at 10% -10%, rgba(245, 158, 11, 0.16), transparent 70%),
    radial-gradient(420px 160px at 90% -20%, rgba(37, 99, 235, 0.12), transparent 70%),
    #ffffff;
  box-shadow: var(--shadow);
}
.panda-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #92400e;
  font-size: 12px;
  font-weight: 700;
}
.panda-title {
  margin-top: 14px;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.panda-subtitle {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 14px;
}
.panda-hero .panda-action-links {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.panda-action-links a,
.panda-action-links button {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
}
.panda-action-links a:hover,
.panda-action-links button:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}
.panda-mini-stats {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}
.panda-mini-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  padding: 14px;
}
.panda-mini-card .label {
  font-size: 12px;
  color: var(--text-muted);
}
.panda-mini-card .value {
  margin-top: 4px;
  font-size: 24px;
  font-weight: 800;
}
.panda-mini-card .hint {
  margin-top: 3px;
  font-size: 12px;
  color: var(--text-dim);
}

.panda-tool-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}
.panda-tool-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  background: #fff;
  cursor: pointer;
  transition: var(--transition);
}
.panda-tool-card:hover {
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.panda-tool-card .head {
  display: flex;
  align-items: center;
  gap: 9px;
}
.panda-tool-card .icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  background: #f1f5f9;
}
.panda-tool-card h3 {
  font-size: 15px;
  font-weight: 700;
}
.panda-tool-card p {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.panda-layout-two {
  margin-top: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
  gap: 14px;
}
.panda-panel {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  padding: 18px;
}
.panda-panel h3 {
  font-size: 17px;
  margin-bottom: 10px;
}
.panda-panel h4 {
  font-size: 14px;
  margin-bottom: 8px;
}
.panda-divider {
  margin: 14px 0;
  border-top: 1px dashed #e2e8f0;
}

.panda-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}
.panda-filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.panda-input,
.panda-select,
.panda-textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  padding: 10px 12px;
}
.panda-input:focus,
.panda-select:focus,
.panda-textarea:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.3);
}
.panda-textarea {
  min-height: 120px;
  resize: vertical;
}

.panda-inline-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.panda-inline-actions .btn {
  min-width: 88px;
}

.panda-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}
.panda-summary-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #f8fafc;
}
.panda-summary-card .k {
  font-size: 11px;
  color: var(--text-muted);
}
.panda-summary-card .v {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 800;
}

.panda-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.panda-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}
.panda-table th,
.panda-table td {
  border-bottom: 1px solid #edf2f7;
  padding: 11px 10px;
  font-size: 13px;
  text-align: left;
  vertical-align: middle;
}
.panda-table th {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #f8fafc;
}
.panda-table tr:last-child td {
  border-bottom: none;
}
.panda-table tr:hover td {
  background: #f8fafc;
}
.panda-table .is-me td {
  background: #fefce8;
}

.panda-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 12px;
  color: #1f2937;
  background: #e5e7eb;
}
.panda-rank-badge.top {
  background: linear-gradient(140deg, #fbbf24, #f59e0b);
}

.panda-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
}
.panda-pill-neutral {
  background: #f1f5f9;
  color: #334155;
}
.panda-pill-success {
  background: #ecfdf5;
  color: #047857;
}
.panda-pill-danger {
  background: #fef2f2;
  color: #b91c1c;
}
.panda-pill-warn {
  background: #fffbeb;
  color: #b45309;
}

.panda-account {
  display: flex;
  align-items: center;
  gap: 8px;
}
.panda-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #0f172a;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.panda-chip-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.panda-keyword-chip {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 12px;
}
.panda-keyword-chip strong {
  margin-left: 4px;
}

.panda-checklist {
  display: grid;
  gap: 8px;
}
.panda-check-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.panda-check-item .label {
  font-size: 13px;
  font-weight: 600;
}
.panda-check-item .desc {
  font-size: 12px;
  color: var(--text-muted);
}

.panda-trace-list {
  display: grid;
  gap: 8px;
}
.panda-trace-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #fff;
}
.trend-up {
  color: #047857;
  font-weight: 700;
}
.trend-down {
  color: #b91c1c;
  font-weight: 700;
}
.trend-flat {
  color: #64748b;
  font-weight: 700;
}

.panda-empty {
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  text-align: center;
  padding: 30px 12px;
  color: var(--text-muted);
  font-size: 13px;
}

@media (max-width: 980px) {
  .panda-layout-two {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .panda-shell {
    padding: 20px 14px 30px;
  }
  .panda-hero {
    border-radius: 16px;
    padding: 18px;
  }
  .panda-title {
    font-size: 24px;
  }
  .panda-tool-grid {
    grid-template-columns: 1fr;
  }
}
