/* ===== Base Reset ===== */
*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* Input, Textarea 폰트 명시적 설정 */
input, textarea, select {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
}

/* ===== Theme Variables ===== */
:root[data-theme="dark"]{
  --bg: #070b14;
  --bg2:#05070d;
  --card: rgba(17, 25, 40, 0.72);
  --card2: rgba(12, 18, 30, 0.75);
  --border: rgba(255,255,255,0.08);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.62);

  --blue:#2f6bff;
  --blue2:#1e4fd6;
  --shadow: 0 16px 40px rgba(0,0,0,0.35);

  --pill-red:#ff4d4d;
  --pill-green:#35d07f;
  --pill-blue:#4aa3ff;
  --pill-orange:#ff9f43;
}

:root[data-theme="light"]{
  --bg: #f4f6fb;
  --bg2:#eef2ff;
  --card: rgba(255,255,255,0.85);
  --card2: rgba(255,255,255,0.95);
  --border: rgba(0,0,0,0.08);
  --text: rgba(0,0,0,0.86);
  --muted: rgba(0,0,0,0.56);

  --blue:#2f6bff;
  --blue2:#1e4fd6;
  --shadow: 0 18px 45px rgba(0,0,0,0.10);

  --pill-red:#d94848;
  --pill-green:#1f9d5a;
  --pill-blue:#1b6fd6;
  --pill-orange:#cc7a1a;
}

/* ===== Background Aura ===== */
body::before{
  content:"";
  position:fixed; inset:0;
  background:
    radial-gradient(900px 500px at 20% 0%, rgba(124,58,237,0.22), transparent 55%),
    radial-gradient(900px 500px at 90% 10%, rgba(37,99,235,0.20), transparent 55%),
    radial-gradient(900px 500px at 40% 110%, rgba(16,185,129,0.10), transparent 60%);
  pointer-events:none;
  z-index:-1;
}

/* ===== Layout ===== */
body{
  display: flex;
  min-height: 100vh;
}

.sidebar{
  width: 240px;
  min-height: 100vh;
  background: var(--card2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
}

.sidebar-header{
  padding: 20px 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-nav{
  flex: 1;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

.nav-item{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.nav-item:hover{
  background: rgba(255,255,255,0.05);
  color: var(--text);
}

.nav-item.active{
  background: rgba(47, 107, 255, 0.15);
  color: var(--blue);
  border: 1px solid rgba(47, 107, 255, 0.3);
}

.nav-item-primary{
  background: var(--blue);
  color: white;
  margin-top: 8px;
}

.nav-item-primary:hover{
  background: var(--blue2);
  color: white;
}

.nav-item-ghost{
  background: transparent;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-family: inherit;
}

.nav-icon{
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

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

.sidebar-footer{
  padding: 12px 8px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ===== Sidebar Profile Menu ===== */
.profile-menu-wrapper-sidebar{
  position: relative;
  margin-top: 4px;
}

.profile-btn-sidebar{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  width: 100%;
  text-align: left;
  color: var(--text);
}

.profile-btn-sidebar:hover{
  background: rgba(255,255,255,0.05);
}

.profile-avatar-sidebar{
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-info-sidebar{
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-name-sidebar{
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  line-height: 1.2;
}

.profile-role-sidebar{
  font-size: 12px;
  color: var(--muted);
  line-height: 1.2;
}

.profile-chevron-sidebar{
  color: var(--muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.profile-menu-sidebar{
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 1000;
  animation: profileMenuSlideUp 0.2s ease-out;
  margin-bottom: 8px;
}

@keyframes profileMenuSlideUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-menu-sidebar .profile-menu-items{
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-menu-sidebar .profile-menu-item{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.profile-menu-sidebar .profile-menu-item:hover{
  background: var(--card2);
  color: var(--blue);
}

.profile-menu-sidebar .profile-menu-item svg{
  color: var(--muted);
  flex-shrink: 0;
}

.profile-menu-sidebar .profile-menu-item:hover svg{
  color: var(--blue);
}

.main-wrapper{
  flex: 1;
  margin-left: 240px;
  min-height: 100vh;
}

.container{
  max-width: 1600px;
  margin: 0 auto;
  padding: 22px 16px 80px;
}

/* ===== Sidebar ===== */
.brand{ display:flex; align-items:center; gap:10px; }
.logo{
  width:32px; height:32px;
  border-radius:50%;
  display:grid; place-items:center;
  background: rgba(255,255,255,0.10);
  border:1px solid var(--border);
  font-weight:600;
  font-size:14px;
}
.title strong{ display:block; font-size:14px; line-height:1.2; font-weight:700; }
.title span{ display:block; font-size:11px; color:var(--muted); margin-top:2px; }

/* ===== Buttons ===== */
.btn{
  border:1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  padding: 7px 12px;
  border-radius:999px;
  font-weight:500;
  font-size:12px;
  cursor:pointer;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.btn:hover{ filter:brightness(1.06); }
.btn.primary{
  background: linear-gradient(180deg, var(--blue), var(--blue2));
  border-color: rgba(255,255,255,0.16);
  color: white;
}
.btn.ghost{
  background: transparent;
}

.iconbtn{
  width:34px; height:34px;
  display:grid; place-items:center;
  border-radius:10px;
  border:1px solid var(--border);
  background: rgba(255,255,255,0.06);
  cursor:pointer;
}
.iconbtn[aria-pressed="true"]{
  background: rgba(255,255,255,0.12);
}
.icon{ width:18px; height:18px; }

/* ===== Inputs ===== */
.input, .textarea, select.input{
  width: 260px;
  border-radius: 12px;
  border:1px solid var(--border);
  background: var(--card2);
  color: var(--text);
  padding: 9px 12px;
  font-size:12px;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
  outline:none;
}
select.input{
  background: var(--card2);
  color: var(--text);
  cursor: pointer;
}
select.input option{
  background: var(--card2);
  color: var(--text);
}
/* Multiple select 스크롤 바 스타일 */
select.input[multiple] {
  scrollbar-width: thin;
  scrollbar-color: var(--border) var(--card2);
}
select.input[multiple]::-webkit-scrollbar {
  width: 8px;
}
select.input[multiple]::-webkit-scrollbar-track {
  background: var(--card2);
  border-radius: 4px;
}
select.input[multiple]::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
  border: 1px solid var(--card2);
}
select.input[multiple]::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}
.textarea{
  width:100%;
  min-height: 92px;
  resize: vertical;
}
.label{
  display:block;
  font-size:12px;
  font-weight:600;
  color: var(--muted);
  margin-bottom:6px;
}

/* ===== Headings ===== */
h1{
  margin: 10px 0 6px;
  font-size: 28px;
  letter-spacing: -0.02em;
  font-weight: 600;
}
.subrow{
  display:flex;
  align-items:center;
  gap:12px;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 12px;
}

/* ===== Panels ===== */
.panel{
  border:1px solid var(--border);
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.panel-pad{ padding: 16px; }

.hr{ height:1px; background: var(--border); }

/* ===== Table-like grid ===== */
.grid-table{
  border:1px solid var(--border);
  background: var(--card);
  border-radius: 16px;
  overflow:hidden;
  box-shadow: var(--shadow);
}
.gt-head, .gt-row{
  display:grid;
  grid-template-columns: var(--cols);
  gap:0;
  align-items:center;
}
.gt-head{
  padding: 10px 12px;
  background: rgba(255,255,255,0.06);
  font-size:12px;
  font-weight:600;
  color: var(--muted);
}
.gt-row{
  padding: 12px;
  border-top:1px solid var(--border);
  font-size:13px;
}
.cell{ padding-right: 12px; }

.name-link{
  color: var(--text);
  font-weight: 900;
  text-decoration: none;
}
.name-link:hover{ text-decoration: underline; }

/* ===== Pills ===== */
.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 5px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,0.06);
  font-size:12px;
  font-weight:500;
}
.pill .dot{
  width:8px; height:8px; border-radius:50%;
  background: var(--muted);
}
.pill.st-not_started .dot{ background: var(--pill-red); }
.pill.st-wip .dot{ background: var(--pill-green); }
.pill.st-done .dot{ background: var(--pill-blue); }
.pill.st-paid .dot{ background: var(--pill-orange); }

/* ===== Kanban ===== */
.board{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.col{
  border:1px solid var(--border);
  background: var(--card);
  border-radius: 16px;
  overflow:hidden;
  box-shadow: var(--shadow);
}
.col-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding: 10px 12px;
  background: rgba(255,255,255,0.06);
  font-weight:600;
  font-size:12px;
  color: var(--muted);
}
.col-body{
  padding: 10px;
  min-height: 160px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.kcard{
  border:1px solid var(--border);
  background: rgba(255,255,255,0.05);
  border-radius: 14px;
  padding: 12px;
}
.k-title{ 
  font-weight: 900; 
  margin-bottom: 8px;
}
.kmeta{
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
}
.kmeta-row{
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}
.kmeta-label{
  font-weight: 600;
  min-width: 60px;
  color: var(--muted);
}
.kmeta-row > span:not(.kmeta-label):not(.pill){
  color: var(--text);
}

/* ===== JSON pre ===== */
pre.json{
  margin:0;
  padding: 12px;
  border-radius: 14px;
  border:1px solid var(--border);
  background: rgba(0,0,0,0.35);
  overflow:auto;
  font-size: 12px;
  color: var(--text);
}
:root[data-theme="light"] pre.json{
  background: rgba(0,0,0,0.05);
}

/* ===== Modal ===== */
#modalRoot[hidden]{ display:none; }
.modal-backdrop{
  position:fixed; inset:0;
  background: rgba(0,0,0,0.55);
  display:grid;
  place-items:center;
  padding: 16px;
  z-index: 1000;
}
.modal{
  width: min(720px, 96vw);
  border-radius: 18px;
  border:1px solid var(--border);
  background: var(--card2);
  box-shadow: var(--shadow);
}
.modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 12px 14px;
  border-bottom:1px solid var(--border);
}
.modal-head strong{ font-size:13px; }
.modal-close{
  width:30px; height:30px;
  border-radius:10px;
  border:1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  cursor:pointer;
}
.modal-body{ padding: 14px; }

.form-row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-row .full{ grid-column: 1 / -1; }

/* ===== Contact Sidebar ===== */
.contact-sidebar {
  position: fixed;
  top: 0;
  right: -500px;
  width: 500px;
  height: 100vh;
  background: var(--card);
  border-left: 1px solid var(--border);
  box-shadow: -4px 0 20px rgba(0,0,0,0.1);
  z-index: 1000;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.contact-sidebar.open {
  right: 0;
}

.contact-sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card2);
}

.contact-sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.contact-sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.contact-sidebar-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* ===== Toast ===== */
#toastRoot{
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10010;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast{
  z-index: 10010;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  min-width: 320px;
  max-width: 500px;
  pointer-events: auto;
  animation: toastSlideIn 0.3s ease-out;
  position: relative;
}

/* Success Toast - 이미지 스타일 */
.toast.toast-success{
  background: #f0f9f4;
  border: none;
  border-radius: 12px;
  padding: 20px 24px;
}

:root[data-theme="dark"] .toast.toast-success{
  background: #1a5d3a;
  border: none;
}

.toast.toast-success .toast-icon{
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 12px;
}

.toast.toast-success .toast-icon svg{
  width: 14px;
  height: 14px;
  stroke: white;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.toast.toast-success .toast-content{
  flex: 1;
}

.toast.toast-success .toast-title{
  font-weight: 700;
  font-size: 16px;
  color: #111827;
  margin-bottom: 4px;
}

:root[data-theme="dark"] .toast.toast-success .toast-title{
  color: #ffffff;
}

.toast.toast-success .toast-message{
  font-size: 14px;
  color: #374151;
  line-height: 1.5;
}

:root[data-theme="dark"] .toast.toast-success .toast-message{
  color: rgba(255, 255, 255, 0.9);
}

.toast.toast-success .toast-close{
  position: absolute;
  top: 16px;
  right: 16px;
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  padding: 0;
}

:root[data-theme="dark"] .toast.toast-success .toast-close{
  color: rgba(255, 255, 255, 0.7);
}

.toast.toast-success .toast-close:hover{
  color: #111827;
}

:root[data-theme="dark"] .toast.toast-success .toast-close:hover{
  color: #ffffff;
}

.toast.toast-success .toast-close svg{
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Error Toast */
.toast.toast-error{
  background: #fef2f2;
  border: none;
  border-radius: 12px;
  padding: 20px 24px;
}

:root[data-theme="dark"] .toast.toast-error{
  background: #7f1d1d;
  border: none;
}

.toast.toast-error .toast-icon{
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 12px;
}

.toast.toast-error .toast-icon svg{
  width: 14px;
  height: 14px;
  stroke: white;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.toast.toast-error .toast-content{
  flex: 1;
}

.toast.toast-error .toast-title{
  font-weight: 700;
  font-size: 16px;
  color: #111827;
  margin-bottom: 4px;
}

:root[data-theme="dark"] .toast.toast-error .toast-title{
  color: #ffffff;
}

.toast.toast-error .toast-message{
  font-size: 14px;
  color: #374151;
  line-height: 1.5;
}

:root[data-theme="dark"] .toast.toast-error .toast-message{
  color: rgba(255, 255, 255, 0.9);
}

.toast.toast-error .toast-close{
  position: absolute;
  top: 16px;
  right: 16px;
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  padding: 0;
}

:root[data-theme="dark"] .toast.toast-error .toast-close{
  color: rgba(255, 255, 255, 0.7);
}

.toast.toast-error .toast-close:hover{
  color: #111827;
}

:root[data-theme="dark"] .toast.toast-error .toast-close:hover{
  color: #ffffff;
}

.toast.toast-error .toast-close svg{
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.toast-header{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.toast-title{
  font-weight: 700;
  font-size: 14px;
}

.toast-body{
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 8px;
}

.toast-input{
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg2);
  color: var(--text);
  font-size: 14px;
}

.toast-input:focus{
  outline: none;
  border-color: var(--blue);
}

.toast-actions{
  display: flex;
  gap: 8px;
  margin-top: 12px;
  justify-content: flex-end;
}

/* ===== Chatbot Widget ===== */
.chatbot-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.chatbot-toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: transform 0.2s, box-shadow 0.2s;
}

.chatbot-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.chatbot-toggle svg {
  width: 24px;
  height: 24px;
}

.chatbot-panel {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 400px;
  max-height: 600px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chatbot-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card2);
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 300px;
  max-height: 400px;
}

.chatbot-message {
  display: flex;
  gap: 8px;
}

.chatbot-message.user {
  justify-content: flex-end;
}

.chatbot-message.bot {
  justify-content: flex-start;
}

.message-content {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  word-wrap: break-word;
  white-space: pre-wrap;
  line-height: 1.5;
  box-sizing: border-box;
}

.chatbot-message.user .message-content {
  background: var(--blue);
  color: white;
  border-bottom-right-radius: 4px;
}

.chatbot-message.bot .message-content {
  background: var(--card2);
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.chatbot-input-area {
  padding: 12px;
  border-top: 1px solid var(--border);
  background: var(--card2);
}

.chatbot-input-area form {
  display: flex;
  gap: 8px;
}

.chatbot-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  line-height: 1.5;
}

.chatbot-input:focus {
  outline: none;
  border-color: var(--blue);
}

.chatbot-input::placeholder {
  color: var(--muted);
}

.chatbot-send {
  padding: 10px 20px;
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}

.chatbot-send:hover {
  background: var(--blue-hover, #0056b3);
}

/* ChatFlow 스타일 업데이트 */
.chatbot-toggle {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
  width: 64px;
  height: 64px;
}

.chatbot-toggle:hover {
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.chatbot-toggle svg {
  width: 28px;
  height: 28px;
}

.chatbot-panel {
  width: 420px;
  max-height: 650px;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.2);
  border: none;
}

.chatbot-header {
  padding: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-bottom: none;
}

.chatbot-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.chatbot-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  flex-shrink: 0;
}

.chatbot-header-text {
  flex: 1;
  min-width: 0;
}

.chatbot-title {
  font-weight: 700;
  font-size: 18px;
  color: white;
  margin-bottom: 4px;
}

.chatbot-subtitle {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.4;
}

.chatbot-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}

.chatbot-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.chatbot-close svg {
  width: 18px;
  height: 18px;
}

.chatbot-messages {
  padding: 20px;
  gap: 16px;
  max-height: 450px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) var(--card2);
}

.chatbot-messages::-webkit-scrollbar {
  width: 8px;
}

.chatbot-messages::-webkit-scrollbar-track {
  background: var(--card2);
  border-radius: 4px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
  border: 1px solid var(--card2);
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

.chatbot-message {
  align-items: flex-start;
  gap: 12px;
}

.chatbot-message.user .message-wrapper {
  align-items: flex-end;
  width: 100%;
}

.chatbot-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--card2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--muted);
}

.chatbot-message.user .chatbot-avatar {
  display: none;
}

.message-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  align-items: flex-start;
}

.message-sender {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 2px;
}

.chatbot-message.user .message-sender {
  display: none;
}

.message-content {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  word-wrap: break-word;
  white-space: pre-wrap;
  line-height: 1.5;
  box-sizing: border-box;
}

.chatbot-message.user .message-content {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-bottom-right-radius: 4px;
}

.chatbot-message.bot .message-content {
  background: var(--card2);
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

:root[data-theme="dark"] .chatbot-message.bot .message-content {
  background: rgba(255, 255, 255, 0.05);
}

.message-time {
  font-size: 11px;
  color: var(--muted);
  padding: 0 4px;
}

.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.7;
  }
  30% {
    transform: translateY(-8px);
    opacity: 1;
  }
}

.chatbot-input-area {
  padding: 16px;
}

.chatbot-input-area form {
  align-items: center;
}

.chatbot-emoji-btn,
.chatbot-attach-btn,
.chatbot-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.chatbot-emoji-btn:hover,
.chatbot-attach-btn:hover {
  background: var(--card);
  color: var(--text);
}

.chatbot-send-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.chatbot-send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.chatbot-emoji-btn svg,
.chatbot-attach-btn svg,
.chatbot-send-btn svg {
  width: 20px;
  height: 20px;
}

.chatbot-input {
  border-radius: 12px;
}

/* ===== Top Header ===== */
.top-header{
  position: sticky;
  top: 0;
  z-index: 99;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.top-header-content{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 32px;
  max-width: 100%;
}

.top-header-left{
  flex: 1;
}

.top-header-right{
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ===== Profile Menu ===== */
.profile-menu-wrapper{
  position: relative;
}

.profile-btn{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.profile-btn:hover{
  background: var(--card);
  border-color: var(--blue);
}

.profile-avatar{
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-chevron{
  color: var(--muted);
  transition: transform 0.2s;
}

.profile-menu{
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 1000;
  animation: profileMenuSlideIn 0.2s ease-out;
}

@keyframes profileMenuSlideIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-menu-header{
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card2);
}

.profile-menu-avatar{
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-menu-info{
  flex: 1;
  min-width: 0;
}

.profile-menu-name{
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 2px;
}

.profile-menu-email{
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.profile-menu-items{
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-menu-item{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.profile-menu-item:hover{
  background: var(--card2);
  color: var(--blue);
}

.profile-menu-item svg{
  color: var(--muted);
  flex-shrink: 0;
}

.profile-menu-item:hover svg{
  color: var(--blue);
}