@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&family=Plus+Jakarta+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg:        #f0f4ff;
  --surface:   #ffffff;
  --surface2:  #f5f7ff;
  --border:    #e2e8f8;
  --border2:   #c7d2f0;
  --accent:    #4361ee;
  --accent2:   #7c3aed;
  --accent-lt: #eef1ff;
  --green:     #10b981;
  --green-lt:  #ecfdf5;
  --yellow:    #f59e0b;
  --yellow-lt: #fffbeb;
  --red:       #ef4444;
  --red-lt:    #fef2f2;
  --sky:       #0ea5e9;
  --sky-lt:    #f0f9ff;
  --text:      #1e2a4a;
  --text2:     #4a5880;
  --text3:     #94a3c8;
  --radius:    12px;
  --shadow:    0 4px 24px rgba(67,97,238,0.10);
  --shadow-md: 0 8px 40px rgba(67,97,238,0.14);
  --shadow-lg: 0 16px 60px rgba(67,97,238,0.18);
}

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

body {
  font-family: 'Noto Sans KR', 'Plus Jakarta Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.6;
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

/* ── 버튼 ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  border: none;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 12px rgba(67,97,238,0.25);
}
.btn-primary:hover {
  background: #3451d1;
  box-shadow: 0 4px 20px rgba(67,97,238,0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text2);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-lt);
}

.btn-danger {
  background: var(--red-lt);
  color: var(--red);
  border: 1.5px solid #fecaca;
}
.btn-danger:hover { background: #fee2e2; }

.btn-success {
  background: var(--green-lt);
  color: var(--green);
  border: 1.5px solid #a7f3d0;
}
.btn-success:hover { background: #d1fae5; }

.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 8px; }
.btn-icon { padding: 7px; border-radius: 8px; }

/* ── 입력 ── */
.input {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 13px;
  color: var(--text);
  outline: none;
  width: 100%;
  transition: all 0.18s;
}
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(67,97,238,0.10);
}
.input::placeholder { color: var(--text3); }

/* ── 카드 ── */
.card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
}

/* ── 토스트 ── */
#toast-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
}

.toast {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  min-width: 220px;
  max-width: 340px;
  box-shadow: var(--shadow-md);
  animation: toastIn 0.3s cubic-bezier(.34,1.56,.64,1);
}

@keyframes toastIn {
  from { opacity:0; transform: translateX(30px) scale(0.95); }
  to   { opacity:1; transform: translateX(0) scale(1); }
}

.toast-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.toast.success .toast-dot { background: var(--green); }
.toast.error   .toast-dot { background: var(--red); }
.toast.info    .toast-dot { background: var(--accent); }
.toast-msg { color: var(--text2); flex:1; font-weight:500; }

/* ── 모달 ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(30,42,74,0.35);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

.modal {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  width: 90%;
  max-width: 480px;
  box-shadow: var(--shadow-md);
  animation: slideUp 0.28s cubic-bezier(.34,1.56,.64,1);
}

@keyframes slideUp {
  from { opacity:0; transform: translateY(24px) scale(0.97); }
  to   { opacity:1; transform: translateY(0) scale(1); }
}

.modal-title { font-size:16px; font-weight:700; margin-bottom:20px; color:var(--text); }
.modal-footer { display:flex; gap:8px; justify-content:flex-end; margin-top:20px; }

/* ── 폼 ── */
.form-group { margin-bottom:14px; }
.form-label {
  display:block;
  font-size:12px;
  color:var(--text2);
  margin-bottom:6px;
  font-weight:600;
  letter-spacing:0.3px;
}

/* ── 뱃지 ── */
.badge {
  display:inline-flex;
  padding:3px 9px;
  border-radius:6px;
  font-size:11px;
  font-weight:700;
  letter-spacing:0.2px;
}
.badge-blue   { background:rgba(67,97,238,0.1);  color:var(--accent); }
.badge-green  { background:var(--green-lt);       color:var(--green); }
.badge-red    { background:var(--red-lt);         color:var(--red); }
.badge-yellow { background:var(--yellow-lt);      color:var(--yellow); }
.badge-gray   { background:var(--surface2);       color:var(--text3); }

/* ── 스피너 ── */
.spinner {
  width:22px; height:22px;
  border:2.5px solid var(--border);
  border-top-color:var(--accent);
  border-radius:50%;
  animation:spin 0.7s linear infinite;
  display:inline-block;
}
@keyframes spin { to { transform:rotate(360deg); } }

/* ── 반응형 ── */
@media (max-width:768px) {
  .modal { padding:20px; }
  .hide-mobile { display:none !important; }
}
