/* ===== CSS Variables — CuratorDojo Design System ===== */
:root {
  --ocean: #2B7A9F;
  --ocean-dark: #1e5a78;
  --ocean-light: #e3f4fb;
  --teal: #17A2B8;
  --teal-light: #d1f5fb;
  --orange: #E8720C;
  --orange-light: #fff0e6;
  --green: #28A745;
  --green-light: #d4edda;
  --red: #DC3545;
  --red-light: #f8d7da;
  --yellow: #FFC107;
  --yellow-light: #fff3cd;
  --purple: #6F42C1;
  --gray-50: #f8f9fa;
  --gray-100: #f1f3f5;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;
  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow: 0 4px 12px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.14);
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --font: 'Noto Sans JP', 'Inter', sans-serif;
  --transition: 0.18s ease;
  --header-h: 64px;
  --bottom-nav-h: 64px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 15px;
  color: var(--gray-900);
  background: var(--gray-50);
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font); }
input, textarea, select {
  font-family: var(--font);
  font-size: 15px;
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--ocean);
  box-shadow: 0 0 0 3px rgba(43,122,159,.15);
}
input.error, select.error, textarea.error { border-color: var(--red); }
textarea { resize: vertical; }
.hidden { display: none !important; }

/* ===== Utility ===== */
.full-width { width: 100%; }
.required { color: var(--red); }

/* ===== Splash Screen ===== */
.splash {
  position: fixed; inset: 0;
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity .4s ease;
}
.splash-content { text-align: center; }
.splash-logo { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.splash-brand { font-size: 2rem; font-weight: 700; letter-spacing: -0.5px; }
.brand-curator { color: var(--ocean); }
.brand-dojo { color: var(--orange); }
.splash-tagline { color: var(--gray-600); margin-top: 8px; font-size: 14px; }
.splash-spinner {
  margin: 24px auto 0;
  width: 32px; height: 32px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--ocean);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Toast ===== */
.toast-container {
  position: fixed; bottom: 80px; right: 16px;
  z-index: 8888;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  background: var(--gray-800); color: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  animation: slideInRight .25s ease;
  max-width: 320px;
}
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }
.toast.warning { background: var(--yellow); color: var(--gray-900); }
@keyframes slideInRight { from { transform: translateX(120%); opacity: 0; } to { transform: none; opacity: 1; } }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 7777; padding: 16px;
}
.modal-content {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 560px; width: 100%;
  padding: 32px;
  position: relative;
  max-height: 90vh; overflow-y: auto;
  animation: scaleIn .2s ease;
}
@keyframes scaleIn { from { transform: scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: var(--gray-100); border: none;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-600);
}
.modal-close:hover { background: var(--gray-200); }

/* ===== App Layout ===== */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.app-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  height: var(--header-h);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 16px; height: 100%;
  display: flex; align-items: center; gap: 16px;
}
.header-logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 1.25rem; font-weight: 700; flex-shrink: 0;
}
.header-brand { display: none; }
@media (min-width: 768px) { .header-brand { display: inline; } }
.header-nav {
  display: flex; gap: 4px; flex: 1;
}
.header-nav a {
  padding: 6px 14px; border-radius: var(--radius-sm);
  color: var(--gray-700); font-weight: 500; font-size: 14px;
  transition: background var(--transition);
}
.header-nav a:hover, .header-nav a.active { background: var(--ocean-light); color: var(--ocean); }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.btn-icon {
  background: none; border: none;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-600); font-size: 16px;
}
.btn-icon:hover { background: var(--gray-100); }
.user-menu-wrap { position: relative; }
.user-avatar-btn {
  display: flex; align-items: center; gap: 6px;
  background: none; border: none; padding: 4px 8px;
  border-radius: var(--radius-full);
}
.user-avatar-btn:hover { background: var(--gray-100); }
.avatar-sm {
  width: 32px; height: 32px; border-radius: 50%;
  object-fit: cover; background: var(--ocean-light);
}
.username-text { font-size: 14px; font-weight: 500; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 180px; overflow: hidden;
  animation: scaleIn .15s ease;
}
.user-dropdown a {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  font-size: 14px; color: var(--gray-700);
}
.user-dropdown a:hover { background: var(--gray-50); }
.user-dropdown a.danger { color: var(--red); }
.user-dropdown hr { border: none; border-top: 1px solid var(--gray-200); }
.hamburger { display: none; background: none; border: none; font-size: 20px; color: var(--gray-700); margin-left: 8px; }
@media (max-width: 767px) { .hamburger { display: flex; } .desktop-only { display: none !important; } }
.mobile-nav {
  background: var(--white); border-top: 1px solid var(--gray-200);
  padding: 8px 0;
}
.mobile-nav a {
  display: block; padding: 12px 20px;
  color: var(--gray-700); font-weight: 500;
}
.mobile-nav a:hover { background: var(--gray-50); }
.main-content { flex: 1; padding-bottom: var(--bottom-nav-h); }
.page { min-height: calc(100vh - var(--header-h) - var(--bottom-nav-h)); }

/* ===== Bottom Nav ===== */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-h);
  background: var(--white); border-top: 1px solid var(--gray-200);
  display: flex; z-index: 100;
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 10px; color: var(--gray-500);
  transition: color var(--transition);
}
.bottom-nav a i { font-size: 20px; }
.bottom-nav a.active, .bottom-nav a:hover { color: var(--ocean); }
@media (min-width: 768px) { .bottom-nav { display: none; } .main-content { padding-bottom: 0; } }

/* ===== Page Container ===== */
.page-container {
  max-width: 1200px; margin: 0 auto;
  padding: 24px 16px;
}
.page-container.narrow { max-width: 720px; }
.page-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 20px; color: var(--gray-900); }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.page-header h2 { font-size: 1.4rem; font-weight: 700; }
.btn-back {
  background: var(--gray-100); border: none;
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-700); font-size: 16px; flex-shrink: 0;
}
.btn-back:hover { background: var(--gray-200); }

/* ===== Buttons ===== */
.btn-primary {
  background: var(--ocean); color: var(--white);
  border: none; border-radius: var(--radius-sm);
  padding: 10px 20px; font-weight: 600; font-size: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background var(--transition);
}
.btn-primary:hover { background: var(--ocean-dark); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }
.btn-secondary {
  background: var(--gray-100); color: var(--gray-700);
  border: 1.5px solid var(--gray-300); border-radius: var(--radius-sm);
  padding: 10px 20px; font-weight: 600; font-size: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background var(--transition);
}
.btn-secondary:hover { background: var(--gray-200); }
.btn-danger {
  background: var(--red-light); color: var(--red);
  border: 1.5px solid var(--red); border-radius: var(--radius-sm);
  padding: 10px 20px; font-weight: 600; font-size: 14px;
}
.btn-danger:hover { background: var(--red); color: var(--white); }
.btn-google {
  width: 100%; background: var(--white); color: var(--gray-800);
  border: 1.5px solid var(--gray-300); border-radius: var(--radius-sm);
  padding: 12px 20px; font-weight: 600; font-size: 14px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: background var(--transition);
}
.btn-google:hover { background: var(--gray-50); }
.btn-like {
  background: none; border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-full);
  padding: 6px 14px; font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--gray-600);
  transition: all var(--transition);
}
.btn-like:hover, .btn-like.liked { background: var(--red-light); border-color: var(--red); color: var(--red); }
.btn-approve { background: var(--green); color: var(--white); border: none; border-radius: var(--radius-sm); padding: 7px 14px; font-weight: 600; font-size: 13px; }
.btn-approve:hover { background: #218838; }
.btn-reject { background: var(--red); color: var(--white); border: none; border-radius: var(--radius-sm); padding: 7px 14px; font-weight: 600; font-size: 13px; }
.btn-reject:hover { background: #c82333; }

/* ===== Auth ===== */
.auth-container { min-height: calc(100vh - var(--header-h)); display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card { background: var(--white); border-radius: var(--radius-lg); padding: 40px 36px; width: 100%; max-width: 440px; box-shadow: var(--shadow-lg); }
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo h1 { font-size: 1.8rem; font-weight: 800; letter-spacing: -1px; margin-top: 8px; }
.auth-logo p { color: var(--gray-600); font-size: 13px; margin-top: 4px; }
.auth-tabs { display: flex; background: var(--gray-100); border-radius: var(--radius-sm); padding: 4px; margin-bottom: 24px; }
.auth-tab {
  flex: 1; padding: 8px; border: none; border-radius: var(--radius-sm);
  background: none; color: var(--gray-600); font-weight: 600; font-size: 14px;
  transition: all var(--transition);
}
.auth-tab.active { background: var(--white); color: var(--ocean); box-shadow: var(--shadow-sm); }
.divider { display: flex; align-items: center; gap: 10px; margin: 16px 0; color: var(--gray-400); font-size: 13px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--gray-200); }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; font-size: 13px; color: var(--gray-700); margin-bottom: 6px; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 44px; }
.btn-eye { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--gray-400); }
.field-error { display: block; font-size: 12px; color: var(--red); margin-top: 4px; min-height: 16px; }
.auth-hint { text-align: center; font-size: 13px; color: var(--gray-500); margin-top: 16px; }
.auth-hint a { color: var(--ocean); font-weight: 600; }
.form-actions { display: flex; gap: 10px; margin-top: 24px; }

/* ===== Hero Banner ===== */
.hero-banner {
  background: linear-gradient(135deg, var(--ocean) 0%, var(--teal) 100%);
  color: var(--white); border-radius: var(--radius-lg);
  padding: 40px 32px; margin-bottom: 24px;
}
.hero-banner h2 { font-size: 1.6rem; font-weight: 800; margin-bottom: 8px; }
.hero-banner p { opacity: .85; margin-bottom: 20px; }
.hero-banner .btn-primary { background: var(--white); color: var(--ocean); font-weight: 700; }
.hero-banner .btn-primary:hover { background: var(--ocean-light); }

/* ===== Filter Bar ===== */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }
.category-tabs { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.cat-tab {
  padding: 6px 14px; background: var(--gray-100); border: none;
  border-radius: var(--radius-full); font-size: 13px; font-weight: 600; color: var(--gray-600);
  transition: all var(--transition);
}
.cat-tab:hover { background: var(--ocean-light); color: var(--ocean); }
.cat-tab.active { background: var(--ocean); color: var(--white); }
.sort-wrap select { width: auto; padding: 6px 12px; font-size: 13px; border-radius: var(--radius-full); }
.event-filter-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 13px; color: var(--gray-600); }
.event-filter-bar select { width: auto; font-size: 13px; padding: 6px 12px; border-radius: var(--radius-full); }
.search-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--white); border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-full); padding: 0 16px;
  margin-bottom: 20px; box-shadow: var(--shadow-sm);
}
.search-bar i { color: var(--gray-400); }
.search-bar input { border: none; box-shadow: none; padding: 10px 0; flex: 1; }
.search-bar input:focus { border: none; box-shadow: none; }

/* ===== Collection Grid ===== */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.collection-card {
  background: var(--white); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}
.collection-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-image { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: var(--gray-200); }
.card-image-placeholder { width: 100%; aspect-ratio: 4/3; background: var(--gray-100); display: flex; align-items: center; justify-content: center; color: var(--gray-400); font-size: 2rem; }
.card-body { padding: 14px 16px; }
.card-category { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--teal); margin-bottom: 4px; }
.card-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--gray-500); }
.card-meta .user-info { display: flex; align-items: center; gap: 5px; }
.card-meta .avatar-xs { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; background: var(--gray-200); }
.card-footer { padding: 10px 16px 14px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--gray-100); }
.card-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.tag { background: var(--gray-100); color: var(--gray-600); font-size: 11px; padding: 2px 8px; border-radius: var(--radius-full); }
.status-badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: var(--radius-full); }
.status-pending { background: var(--yellow-light); color: #856404; }
.status-approved { background: var(--green-light); color: #155724; }
.status-rejected { background: var(--red-light); color: #721c24; }

/* ===== Loading / Empty ===== */
.loading-spinner { display: flex; justify-content: center; align-items: center; padding: 40px; color: var(--gray-400); font-size: 1.5rem; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--gray-400); }
.empty-state i { font-size: 3rem; margin-bottom: 12px; display: block; }

/* ===== Collection Detail ===== */
.detail-image { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius); margin-bottom: 20px; }
.detail-header { margin-bottom: 16px; }
.detail-title { font-size: 1.5rem; font-weight: 800; line-height: 1.3; margin-bottom: 8px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--gray-500); align-items: center; }
.detail-meta .user-chip { display: flex; align-items: center; gap: 6px; }
.detail-meta .avatar-sm2 { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--gray-200); }
.detail-body { line-height: 1.8; color: var(--gray-700); margin-bottom: 16px; white-space: pre-wrap; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.detail-event-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--ocean-light); color: var(--ocean);
  border-radius: var(--radius-full); padding: 4px 12px; font-size: 13px; font-weight: 600; margin-bottom: 16px;
}
.detail-actions-row { display: flex; align-items: center; gap: 12px; padding: 16px 0; border-top: 1px solid var(--gray-200); }

/* ===== Post Form ===== */
.post-form { background: var(--white); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.image-upload-area {
  border: 2px dashed var(--gray-300); border-radius: var(--radius);
  min-height: 180px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative; overflow: hidden;
  transition: border-color var(--transition);
}
.image-upload-area:hover { border-color: var(--ocean); }
.image-placeholder { text-align: center; color: var(--gray-400); padding: 20px; }
.image-placeholder i { font-size: 2.5rem; margin-bottom: 8px; display: block; }
.image-placeholder p { font-size: 14px; margin-bottom: 4px; }
.image-preview { width: 100%; max-height: 320px; object-fit: cover; border-radius: var(--radius-sm); }
.compress-info { position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,.6); color: white; font-size: 11px; padding: 3px 8px; border-radius: var(--radius-full); }
.hint { font-size: 12px; color: var(--gray-500); margin-top: 4px; }
.submit-note { text-align: center; font-size: 12px; color: var(--gray-500); margin-top: 12px; }

/* ===== MyPage ===== */
.mypage-profile-card {
  background: linear-gradient(135deg, var(--ocean) 0%, var(--teal) 100%);
  color: var(--white); border-radius: var(--radius-lg);
  padding: 28px 24px; margin-bottom: 24px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.mypage-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid rgba(255,255,255,.4); background: var(--ocean-light); }
.mypage-info { flex: 1; min-width: 200px; }
.mypage-name { font-size: 1.3rem; font-weight: 800; margin-bottom: 4px; }
.mypage-email { font-size: 13px; opacity: .8; margin-bottom: 8px; }
.mypage-title-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,.2); border-radius: var(--radius-full);
  padding: 4px 12px; font-size: 13px; font-weight: 600;
}
.mypage-stats { display: flex; gap: 20px; flex-wrap: wrap; margin-left: auto; }
.stat-item { text-align: center; }
.stat-num { font-size: 1.4rem; font-weight: 800; display: block; }
.stat-label { font-size: 11px; opacity: .75; }
.points-card {
  background: var(--white); border-radius: var(--radius);
  padding: 20px; margin-bottom: 20px; box-shadow: var(--shadow-sm);
}
.points-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.points-value { font-size: 2rem; font-weight: 800; color: var(--orange); }
.points-label { font-size: 13px; color: var(--gray-500); }
.progress-bar-wrap { background: var(--gray-200); border-radius: var(--radius-full); height: 8px; margin: 8px 0; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--orange), var(--yellow)); border-radius: var(--radius-full); transition: width .5s ease; }
.progress-text { font-size: 12px; color: var(--gray-500); }
.mypage-tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 2px solid var(--gray-200); }
.mypage-tab { background: none; border: none; padding: 10px 16px; font-weight: 600; font-size: 14px; color: var(--gray-500); border-bottom: 2px solid transparent; margin-bottom: -2px; }
.mypage-tab.active { color: var(--ocean); border-bottom-color: var(--ocean); }

/* ===== Events ===== */
.events-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.event-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.event-header { background: linear-gradient(135deg, var(--ocean), var(--teal)); color: var(--white); padding: 20px; }
.event-header h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.event-status-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: var(--radius-full); background: rgba(255,255,255,.2); }
.event-body { padding: 16px; }
.event-detail-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--gray-600); margin-bottom: 8px; }
.event-detail-row i { color: var(--ocean); width: 16px; flex-shrink: 0; }

/* ===== Ranking ===== */
.ranking-tabs { display: flex; gap: 4px; margin-bottom: 20px; background: var(--gray-100); padding: 4px; border-radius: var(--radius-sm); }
.rank-tab { flex: 1; padding: 8px; border: none; border-radius: var(--radius-sm); background: none; font-weight: 600; font-size: 14px; color: var(--gray-600); transition: all var(--transition); }
.rank-tab.active { background: var(--white); color: var(--ocean); box-shadow: var(--shadow-sm); }
.ranking-list { display: flex; flex-direction: column; gap: 10px; }
.rank-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--white); border-radius: var(--radius);
  padding: 12px 16px; box-shadow: var(--shadow-sm);
}
.rank-number { font-size: 1.2rem; font-weight: 800; width: 32px; text-align: center; flex-shrink: 0; }
.rank-number.gold { color: var(--yellow); }
.rank-number.silver { color: var(--gray-500); }
.rank-number.bronze { color: #cd7f32; }
.rank-thumb { width: 56px; height: 56px; border-radius: var(--radius-sm); object-fit: cover; background: var(--gray-200); flex-shrink: 0; }
.rank-info { flex: 1; min-width: 0; }
.rank-title { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-user { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.rank-likes { display: flex; align-items: center; gap: 4px; color: var(--red); font-weight: 700; font-size: 14px; flex-shrink: 0; }

/* ===== Admin ===== */
.admin-layout { display: flex; gap: 24px; align-items: flex-start; }
.admin-sidebar {
  width: 220px; flex-shrink: 0;
  background: var(--white); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-sm); position: sticky; top: 80px;
}
.admin-sidebar h3 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--gray-400); margin-bottom: 12px; }
.admin-nav { display: flex; flex-direction: column; gap: 2px; }
.admin-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: var(--gray-700);
  transition: background var(--transition);
}
.admin-nav-item:hover { background: var(--gray-50); }
.admin-nav-item.active { background: var(--ocean-light); color: var(--ocean); font-weight: 700; }
.admin-nav-item .badge {
  margin-left: auto; background: var(--red); color: var(--white);
  font-size: 11px; font-weight: 700; padding: 1px 7px;
  border-radius: var(--radius-full);
}
.admin-main { flex: 1; min-width: 0; }
@media (max-width: 767px) { .admin-layout { flex-direction: column; } .admin-sidebar { width: 100%; position: relative; top: 0; } }

/* ===== Admin Dashboard ===== */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; }
.kpi-card { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.kpi-icon { width: 40px; height: 40px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 18px; margin-bottom: 10px; }
.kpi-num { font-size: 1.8rem; font-weight: 800; color: var(--gray-900); }
.kpi-label { font-size: 12px; color: var(--gray-500); margin-top: 2px; }

/* ===== Admin Table ===== */
.admin-table-wrap { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.admin-table-header { padding: 16px 20px; border-bottom: 1px solid var(--gray-200); display: flex; align-items: center; justify-content: space-between; }
.admin-table-header h3 { font-size: 1rem; font-weight: 700; }
table.data-table { width: 100%; border-collapse: collapse; }
table.data-table th { padding: 12px 16px; text-align: left; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--gray-500); border-bottom: 1px solid var(--gray-200); background: var(--gray-50); }
table.data-table td { padding: 14px 16px; font-size: 14px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tr:hover td { background: var(--gray-50); }

/* ===== Point Grant Form ===== */
.point-grant-form { background: var(--white); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }

/* ===== Settings ===== */
.settings-card { background: var(--white); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); margin-bottom: 20px; }
.settings-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 16px; }
.danger-zone { border: 1.5px solid var(--red-light); }
.danger-zone h3 { color: var(--red); }

/* ===== Responsive ===== */
@media (max-width: 480px) {
  .auth-card { padding: 28px 20px; }
  .hero-banner { padding: 28px 20px; }
  .hero-banner h2 { font-size: 1.3rem; }
  .collection-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 360px) {
  .collection-grid { grid-template-columns: 1fr; }
}
