/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/.pnpm/next@15.5.29_react-dom@19.2.9_react@19.2.9__react@19.2.9/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/.pnpm/next@15.5.29_react-dom@19.2.9_react@19.2.9__react@19.2.9/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/globals.css ***!
  \*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
:root {
  --bg: #f5f6fa;
  --card: #ffffff;
  --ink: #23283a;
  --muted: #8b90a5;
  --line: #e8e9f2;
  --accent: #6c5ce7;
  --accent-soft: #edeafd;
  --danger-bg: #fdecec;
  --danger-ink: #b3261e;
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}

button { font-family: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.55; }
textarea, input, select { font-family: inherit; color: inherit; }

/* ---------- 헤더 ---------- */
.header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 26px;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #7d6cf0, #5a4bd4);
  color: #fff;
  font-size: 18px;
}
.brand { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.server-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fafafe;
  color: var(--muted);
}
.server-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c4c8d8;
}
.server-badge.ok .dot { background: #35c46a; }
.server-badge.bad .dot { background: #e5484d; }
.server-badge .refresh {
  border: none;
  background: none;
  font-size: 13px;
  padding: 0 2px;
  color: var(--muted);
}

/* ---------- 레이아웃 ---------- */
.wrap {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  padding: 22px 26px 48px;
  max-width: 1480px;
  margin: 0 auto;
}
.side {
  width: 350px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: -webkit-sticky;
  position: sticky;
  top: 84px;
}
.canvas { flex: 1 1; min-width: 0; }

/* ---------- 카드 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
  margin: 0 0 14px;
}
.card-title .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 6px;
}

.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}
textarea.prompt {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  background: #fbfbfe;
}
textarea.negative { min-height: 60px; color: #7a6a6a; }
textarea:focus, input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.12);
}
select.select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfbfe;
  font-size: 13px;
}
input.num {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfbfe;
  font-size: 13px;
}

/* 세그먼트 버튼 */
.seg {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.seg button {
  flex: 1 1;
  min-width: 60px;
  padding: 8px 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  background: #f4f5fa;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.seg button.on {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: #cfc6f8;
}

/* 슬라이더 */
.slider-row { display: flex; align-items: center; gap: 10px; }
.slider-row input[type='range'] { flex: 1 1; accent-color: var(--accent); }
.slider-row .val {
  min-width: 42px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 6px;
  padding: 3px 0;
}

/* 생성 버튼 */
.generate-btn {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #7d6cf0, #5a4bd4);
  border: none;
  border-radius: 12px;
  transition: filter 0.15s;
}
.generate-btn:not(:disabled):hover { filter: brightness(1.08); }

/* ---------- 캔버스 ---------- */
.canvas-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 2px 14px;
}
.canvas-label { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; color: var(--muted); }
.canvas-title { font-size: 20px; font-weight: 800; margin: 0; }
.count-badge {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 4px 12px;
}

.results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  grid-gap: 18px;
  gap: 18px;
}
.imgcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.imgcard img { display: block; width: 100%; height: auto; }
.imgcard .info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  font-size: 11.5px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.imgcard .info .tags { flex: 1 1; min-width: 0; }
.imgcard .info .tag {
  display: inline-block;
  background: #f4f5fa;
  border-radius: 6px;
  padding: 2px 7px;
  margin: 2px 3px 2px 0;
  font-weight: 600;
}
.dl {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid #cfc6f8;
  background: var(--accent-soft);
  border-radius: 8px;
  padding: 5px 10px;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 480px;
  border: 2px dashed #dcdef0;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fdfdff, #f8f8fe);
  color: var(--muted);
  text-align: center;
  padding: 30px;
}
.empty .big { font-size: 16px; font-weight: 700; color: #6d7288; }
.empty .small { font-size: 13px; line-height: 1.6; }
.empty .icon { font-size: 44px; opacity: 0.6; }

.err {
  background: var(--danger-bg);
  color: var(--danger-ink);
  border: 1px solid #f5c6c4;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
  white-space: pre-wrap;
  word-break: keep-all;
}

/* ---------- 헤더 내비/계정 ---------- */
.nav { display: flex; gap: 4px; margin-left: 10px; }
.navlink {
  padding: 7px 14px;
  font-size: 13.5px;
  font-weight: 700;
  color: #5b6072;
  text-decoration: none;
  border-radius: 10px;
}
.navlink:hover { background: #f1f2f8; }
.navlink.on { color: var(--accent); background: var(--accent-soft); }
.account { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.who { font-size: 13.5px; font-weight: 800; display: inline-flex; align-items: center; gap: 6px; }
.admin-tag {
  font-size: 10.5px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #7d6cf0, #5a4bd4);
  border-radius: 6px;
  padding: 2px 7px;
}
.pending-tag {
  font-size: 10.5px;
  font-weight: 800;
  color: #9a6700;
  background: #fff3d6;
  border-radius: 6px;
  padding: 2px 7px;
  margin-left: 6px;
}

/* ---------- 로그인 카드 ---------- */
.auth-wrap { display: flex; justify-content: center; padding: 70px 20px; }
.auth-card {
  width: 420px;
  max-width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 12px 40px rgba(50, 50, 90, 0.08);
}
.auth-card h2 { margin: 0 0 6px; font-size: 21px; }

/* ---------- 페이지 공통 ---------- */
.page-pad { max-width: 1480px; margin: 0 auto; padding: 26px 26px 60px; }
.page-title { font-size: 26px; font-weight: 800; margin: 0; }
.records-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }

/* ---------- 기록 카드 ---------- */
.record-meta { padding: 10px 12px; border-top: 1px solid var(--line); flex: 1 1; }
.meta-row { display: flex; gap: 8px; font-size: 11.5px; margin-bottom: 4px; }
.meta-k { flex-shrink: 0; width: 62px; color: var(--muted); font-weight: 700; }
.meta-v { color: #3c4155; word-break: break-word; }
.scrollbox {
  max-height: 64px;
  overflow-y: auto;
  background: #f7f8fc;
  border-radius: 6px;
  padding: 3px 6px;
}

/* ---------- 세션 푸터 ---------- */
.session-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 26px;
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.session-title { font-size: 15px; font-weight: 800; margin: 0; }

/* ---------- 사용자 관리 ---------- */
.user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.user-name { font-size: 14px; font-weight: 800; display: inline-flex; align-items: center; gap: 8px; }

/* ---------- 탭 ---------- */
.tabs { display: flex; gap: 8px; }
.tab {
  flex: 1 1;
  padding: 12px 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--muted);
  background: #f4f5fa;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.tab.on {
  color: var(--accent);
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

/* ---------- 잡다 ---------- */
.hint { font-size: 12px; color: var(--muted); margin: 10px 0 0; line-height: 1.5; }
.label-note { font-weight: 500; color: #b3b7c8; margin-left: 4px; }
.title-side { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted); }
.link-btn {
  border: none;
  background: none;
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 700;
  padding: 0;
  margin-left: auto;
}
.link-btn.danger { color: var(--danger-ink); margin-left: 0; }
.row-flex { display: flex; gap: 8px; align-items: center; }
.row-flex .select, .row-flex .num { flex: 1 1; min-width: 0; }
.ghost-btn {
  padding: 9px 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: #5b6072;
  background: #f4f5fa;
  border: 1px solid var(--line);
  border-radius: 10px;
  white-space: nowrap;
}
.ghost-btn.accent { color: var(--accent); background: var(--accent-soft); border-color: #cfc6f8; }

/* ---------- LoRA ---------- */
.lora-add { display: flex; gap: 8px; margin-top: 10px; }
.lora-add .select { flex: 1 1; }
.lora-row {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfbfe;
}
.lora-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.lora-name {
  flex: 1 1;
  min-width: 0;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lora-strength-label { font-size: 11.5px; font-weight: 700; color: var(--muted); }

/* ---------- img2img 업로드 ---------- */
.upload-box {
  width: 100%;
  padding: 26px 12px;
  border: 2px dashed #dcdef0;
  border-radius: 12px;
  background: #fbfbfe;
  color: #6d7288;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
}
.upload-box .small { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.upload-preview img {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafafe;
  margin-bottom: 10px;
}

/* ---------- 카운터/콜랩시블 ---------- */
.counter { text-align: right; font-size: 11px; color: var(--muted); margin-top: 4px; }
.collapsible { margin-bottom: 14px; }
.collapsible > summary {
  cursor: pointer;
  list-style: none;
  font-size: 12.5px;
  font-weight: 800;
  color: #4b5065;
  padding: 6px 0;
}
.collapsible > summary::-webkit-details-marker { display: none; }
.collapsible[open] > summary { margin-bottom: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; grid-gap: 0 12px; gap: 0 12px; }

/* ---------- 알림 ---------- */
.notice {
  background: #eafaf0;
  color: #157a42;
  border: 1px solid #bfe8cf;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
}

/* ---------- LoRA 관리 모달 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(35, 40, 58, 0.42);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 60px 20px;
  z-index: 50;
  overflow-y: auto;
}
.modal {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 18px 60px rgba(35, 40, 58, 0.25);
  width: 100%;
  max-width: 640px;
  padding: 22px 24px 24px;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.modal-title { font-size: 20px; font-weight: 800; margin: 0; }
.modal-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}
.modal-sub { font-size: 14.5px; font-weight: 800; margin: 0; }
.lora-file {
  width: 100%;
  border: 1.5px dashed #c9cde0;
  border-radius: 12px;
  background: #fafbff;
  padding: 14px 12px;
  font-size: 13px;
  color: #3c4155;
}
.prog {
  height: 8px;
  border-radius: 6px;
  background: var(--line);
  overflow: hidden;
  margin-top: 10px;
}
.prog-fill {
  height: 100%;
  border-radius: 6px;
  background: var(--accent);
  transition: width 0.2s ease;
}
.lora-items { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.lora-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
}
.lora-item-info {
  flex: 1 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mine-tag {
  flex-shrink: 0;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 2px 8px;
}

@media (max-width: 900px) {
  .wrap { flex-direction: column; }
  .side { width: 100%; position: static; }
}

