:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --secondary: #8b5cf6;
  --accent: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;
  --bg: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }

/* ── NAV ── */
nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.nav-logo {
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links { display: flex; gap: 1rem; align-items: center; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1.2rem;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .15s;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover { background: var(--border); color: var(--text); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }

.btn-success { background: var(--success); color: #fff; }
.btn-lg { padding: .75rem 1.8rem; font-size: 1rem; }
.btn-sm { padding: .35rem .8rem; font-size: .8rem; }
.btn-block { width: 100%; justify-content: center; }

/* ── CARD ── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

/* ── FORM ── */
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-size: .85rem; font-weight: 600; color: var(--text); margin-bottom: .35rem; }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: .6rem .9rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .9rem;
  color: var(--text);
  background: var(--surface);
  transition: border .15s;
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,.12); }
.form-group textarea { resize: vertical; min-height: 80px; }

.form-error { font-size: .78rem; color: var(--danger); margin-top: .3rem; display: none; }
.form-error.show { display: block; }

/* ── BADGE ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: .2rem .6rem;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 700;
}
.badge-primary { background: #ede9fe; color: var(--secondary); }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-gray    { background: #f1f5f9; color: var(--text-muted); }

/* ── CONTAINER ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.page-content { padding: 2rem 0; }

/* ── AVATAR ── */
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem;
  flex-shrink: 0;
}

/* ── PROGRESS BAR ── */
.progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 4px;
  transition: width .4s;
}

/* ── TABS ── */
.tabs { display: flex; gap: .25rem; border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; }
.tab-btn {
  padding: .5rem 1rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all .15s;
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-btn:hover:not(.active) { color: var(--text); }

/* ── CALENDAR ── */
.calendar-grid {
  display: grid;
  grid-template-columns: 60px repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.cal-header { background: var(--primary); color: #fff; text-align: center; padding: .5rem; font-size: .8rem; font-weight: 700; }
.cal-time { background: #f8fafc; text-align: right; padding: .3rem .5rem; font-size: .7rem; color: var(--text-muted); }
.cal-cell {
  background: var(--surface);
  min-height: 40px;
  cursor: pointer;
  transition: background .1s;
  position: relative;
}
.cal-cell:hover { background: #ede9fe; }
.cal-cell.available { background: #d1fae5; }
.cal-cell.full { background: #c7d2fe; }
.cal-cell.partial { background: #e0e7ff; }
.cal-cell.mine { background: #a7f3d0; }

/* ── VOTE CARD ── */
.vote-option {
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: .75rem;
  cursor: pointer;
  transition: all .15s;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.vote-option:hover { border-color: var(--primary); background: #faf5ff; }
.vote-option.voted { border-color: var(--primary); background: #ede9fe; }
.vote-check {
  width: 22px; height: 22px;
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all .15s;
}
.vote-option.voted .vote-check { border-color: var(--primary); background: var(--primary); color: #fff; }

/* ── NOTIFICATION ── */
.notif {
  position: fixed;
  top: 80px; right: 1.5rem;
  background: var(--text);
  color: #fff;
  padding: .75rem 1.2rem;
  border-radius: 10px;
  font-size: .875rem;
  z-index: 999;
  opacity: 0;
  transform: translateY(-8px);
  transition: all .25s;
  max-width: 320px;
}
.notif.show { opacity: 1; transform: translateY(0); }
.notif.success { background: var(--success); }
.notif.error { background: var(--danger); }

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  width: min(480px, 90vw);
  max-height: 85vh;
  overflow-y: auto;
  transform: scale(.95);
  transition: transform .2s;
}
.modal-overlay.open .modal { transform: scale(1); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.modal-title { font-size: 1.15rem; font-weight: 700; }

/* ── UTILS ── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.text-sm { font-size: .875rem; }
.text-xs { font-size: .75rem; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.w-full { width: 100%; }
.divider { border: none; border-top: 1px solid var(--border); margin: 1.25rem 0; }

@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  nav { padding: 0 1rem; }
  .container { padding: 0 1rem; }
}
