/* =============================================
   ANCHORAGE - Global Styles
   인천국립해사고 동문회 커뮤니티
   ============================================= */

:root {
  --primary: #0066FF;
  --primary-dark: #0052CC;
  --primary-light: #4D94FF;
  --primary-gradient: linear-gradient(135deg, #0066FF 0%, #00C6FF 100%);
  --secondary: #00C6FF;
  --accent: #FF6B35;
  --success: #00D68F;
  --warning: #FFAA00;
  --danger: #FF3D71;
  
  --bg: #F7F9FF;
  --bg-card: #FFFFFF;
  --bg-input: #F0F4FF;
  --text-primary: #1A1F36;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;
  --border: #E5E9F7;
  --shadow-sm: 0 2px 8px rgba(0, 102, 255, 0.08);
  --shadow-md: 0 8px 24px rgba(0, 102, 255, 0.12);
  --shadow-lg: 0 16px 48px rgba(0, 102, 255, 0.16);
  
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  
  --nav-height: 64px;
  --bottom-nav-height: 70px;
  
  --font-sans: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
}

[data-theme="dark"] {
  --bg: #0D1117;
  --bg-card: #161B22;
  --bg-input: #21262D;
  --text-primary: #E6EDF3;
  --text-secondary: #8B949E;
  --text-muted: #6E7681;
  --border: #30363D;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font-sans); background: var(--bg); color: var(--text-primary); line-height: 1.6; min-height: 100vh; transition: background 0.3s, color 0.3s; }

h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.3; }
h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 4vw, 2rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.5rem); }
a { text-decoration: none; color: inherit; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.card { background: var(--bg-card); border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow-sm); border: 1px solid var(--border); transition: transform 0.2s, box-shadow 0.2s; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; border-radius: var(--radius-sm); font-size: 0.95rem; font-weight: 600; cursor: pointer; border: none; transition: all 0.2s ease; white-space: nowrap; font-family: var(--font-sans); }
.btn-primary { background: var(--primary-gradient); color: white; box-shadow: 0 4px 16px rgba(0, 102, 255, 0.3); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0, 102, 255, 0.4); }
.btn-primary:active { transform: translateY(0); }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-ghost { background: var(--bg-input); color: var(--text-primary); }
.btn-ghost:hover { background: var(--border); }
.btn-danger { background: var(--danger); color: white; }
.btn-success { background: var(--success); color: white; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 16px 32px; font-size: 1.1rem; border-radius: var(--radius-md); }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 0.9rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.form-label .required { color: var(--danger); margin-left: 4px; }
.form-input, .form-select, .form-textarea { width: 100%; padding: 12px 16px; background: var(--bg-input); border: 2px solid transparent; border-radius: var(--radius-sm); font-size: 1rem; color: var(--text-primary); font-family: var(--font-sans); transition: border-color 0.2s, box-shadow 0.2s; outline: none; }
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.1); background: var(--bg-card); }
.form-textarea { resize: vertical; min-height: 120px; }

.badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; }
.badge-primary { background: rgba(0, 102, 255, 0.1); color: var(--primary); }
.badge-success { background: rgba(0, 214, 143, 0.1); color: var(--success); }
.badge-warning { background: rgba(255, 170, 0, 0.1); color: var(--warning); }
.badge-danger { background: rgba(255, 61, 113, 0.1); color: var(--danger); }

.navbar { position: fixed; top: 0; left: 0; right: 0; height: var(--nav-height); background: rgba(255,255,255,0.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); z-index: 1000; transition: background 0.3s; }
[data-theme="dark"] .navbar { background: rgba(13,17,23,0.92); }
.navbar-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; max-width: 1200px; margin: 0 auto; }
.navbar-logo { font-size: 1.3rem; font-weight: 800; background: var(--primary-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.navbar-actions { display: flex; align-items: center; gap: 12px; }
.navbar-desktop-menu { display: flex; align-items: center; gap: 4px; }
.nav-link { padding: 8px 16px; border-radius: var(--radius-sm); color: var(--text-secondary); font-weight: 500; transition: all 0.2s; font-size: 0.95rem; cursor: pointer; }
.nav-link:hover, .nav-link.active { color: var(--primary); background: rgba(0,102,255,0.08); }

.theme-toggle { width: 40px; height: 40px; border-radius: 50%; border: none; background: var(--bg-input); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; transition: background 0.2s; }
.theme-toggle:hover { background: var(--border); }

.bottom-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; height: var(--bottom-nav-height); background: var(--bg-card); border-top: 1px solid var(--border); z-index: 1000; padding-bottom: env(safe-area-inset-bottom); }
.bottom-nav-inner { display: flex; height: 100%; }
.bottom-nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; color: var(--text-muted); font-size: 0.7rem; font-weight: 500; text-decoration: none; transition: color 0.2s; padding: 8px 0; }
.bottom-nav-item.active, .bottom-nav-item:hover { color: var(--primary); }
.bottom-nav-item .icon { font-size: 1.4rem; line-height: 1; }

.page-wrapper { padding-top: calc(var(--nav-height) + 20px); padding-bottom: calc(var(--bottom-nav-height) + 20px); min-height: 100vh; }

.skeleton { background: linear-gradient(90deg, var(--border) 25%, var(--bg-input) 50%, var(--border) 75%); background-size: 200% 100%; animation: skeleton-shimmer 1.5s infinite; border-radius: var(--radius-sm); }
@keyframes skeleton-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.toast-container { position: fixed; top: calc(var(--nav-height) + 16px); right: 16px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { padding: 14px 20px; border-radius: var(--radius-sm); font-size: 0.9rem; font-weight: 600; color: white; box-shadow: var(--shadow-md); pointer-events: auto; transform: translateX(120%); transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); max-width: 320px; }
.toast.show { transform: translateX(0); }
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-info { background: var(--primary); }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); z-index: 2000; display: flex; align-items: flex-end; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.modal-overlay.show { opacity: 1; pointer-events: auto; }
.modal { background: var(--bg-card); border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: 24px; width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.modal-overlay.show .modal { transform: translateY(0); }
@media (min-width: 600px) { .modal-overlay { align-items: center; padding: 20px; } .modal { border-radius: var(--radius-lg); transform: scale(0.9); } .modal-overlay.show .modal { transform: scale(1); } }
.modal-handle { width: 40px; height: 4px; background: var(--border); border-radius: 2px; margin: 0 auto 20px; }

.avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar-placeholder { border-radius: 50%; background: var(--primary-gradient); display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; flex-shrink: 0; }

.divider { height: 1px; background: var(--border); margin: 24px 0; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state h3 { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 8px; }

.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.section-title { font-size: 1.2rem; font-weight: 700; }
.section-more { font-size: 0.85rem; color: var(--primary); font-weight: 600; }

.stat-card { padding: 20px; background: var(--bg-card); border-radius: var(--radius-md); text-align: center; border: 1px solid var(--border); }
.stat-value { font-size: 2rem; font-weight: 800; background: var(--primary-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-label { font-size: 0.85rem; color: var(--text-secondary); margin-top: 4px; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 32px; }
.page-btn { width: 40px; height: 40px; border-radius: var(--radius-sm); border: 2px solid var(--border); background: var(--bg-card); color: var(--text-secondary); cursor: pointer; font-weight: 600; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.page-btn.active, .page-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(0,102,255,0.05); }

.step-indicator { display: flex; align-items: center; justify-content: center; margin-bottom: 32px; }
.step-item { display: flex; align-items: center; }
.step-circle { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--border); background: var(--bg-card); color: var(--text-muted); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; transition: all 0.3s; }
.step-item.active .step-circle { background: var(--primary-gradient); border-color: var(--primary); color: white; box-shadow: 0 4px 12px rgba(0,102,255,0.3); }
.step-item.done .step-circle { background: var(--success); border-color: var(--success); color: white; }
.step-line { width: 40px; height: 2px; background: var(--border); transition: background 0.3s; }
.step-line.done { background: var(--success); }

.profile-card { display: flex; align-items: center; gap: 16px; padding: 16px; background: var(--bg-card); border-radius: var(--radius-md); border: 1px solid var(--border); transition: all 0.2s; }
.profile-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.search-bar { display: flex; gap: 8px; margin-bottom: 24px; }
.search-input { flex: 1; padding: 12px 16px; background: var(--bg-input); border: 2px solid transparent; border-radius: var(--radius-sm); font-size: 1rem; color: var(--text-primary); font-family: var(--font-sans); outline: none; transition: border-color 0.2s; }
.search-input:focus { border-color: var(--primary); background: var(--bg-card); }

.table-wrapper { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
th { background: var(--bg-input); font-weight: 700; color: var(--text-secondary); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-input); }

.fade-up { animation: fadeUp 0.5s ease forwards; opacity: 0; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }

.spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-center { display: flex; align-items: center; justify-content: center; padding: 60px; }

.hero-bg { background: linear-gradient(135deg, #0066FF 0%, #00C6FF 50%, #0066FF 100%); background-size: 200% 200%; animation: hero-gradient 6s ease infinite; }
@keyframes hero-gradient { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

.glass { background: rgba(255,255,255,0.15); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.2); }

.checkbox-group { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; padding: 12px; border-radius: var(--radius-sm); transition: background 0.2s; }
.checkbox-group:hover { background: var(--bg-input); }
.checkbox-custom { width: 22px; height: 22px; border: 2px solid var(--border); border-radius: 6px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: all 0.2s; margin-top: 2px; }
.checkbox-group.checked .checkbox-custom { background: var(--primary); border-color: var(--primary); }
.checkbox-group.checked .checkbox-custom::after { content: '✓'; color: white; font-size: 0.8rem; font-weight: 700; }

@media (max-width: 768px) {
  .bottom-nav { display: block; }
  .navbar-desktop-menu { display: none !important; }
  .container { padding: 0 16px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (min-width: 769px) { .bottom-nav { display: none !important; } }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.text-center { text-align: center; }
.text-primary-color { color: var(--primary); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.gap-8 { gap: 8px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-gap-8 { display: flex; align-items: center; gap: 8px; }

/* ===== 네비게이션 드롭다운 ===== */
.nav-dropdown { position: relative; display: inline-block; }
.nav-dropdown > span { padding: 8px 16px; border-radius: var(--radius-sm); color: var(--text-secondary); font-weight: 500; transition: all 0.2s; font-size: 0.95rem; cursor: pointer; }
.nav-dropdown:hover > span, .nav-dropdown > span.active { color: var(--primary); background: rgba(0,102,255,0.08); }
.nav-dropdown-menu { display: none; position: absolute; top: calc(100% + 8px); left: 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); min-width: 160px; z-index: 999; overflow: hidden; }
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-item { display: block; padding: 12px 16px; font-size: 0.9rem; color: var(--text-secondary); font-weight: 500; transition: background 0.2s; }
.nav-dropdown-item:hover { background: var(--bg-input); color: var(--primary); }

/* ===== 회비 - 은행 링크 버튼 ===== */
.bank-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  transition: all 0.2s;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.bank-link-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
