:root {
  --novapanel-color: white;
}

.novaPanelBackdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.16);
  z-index: 1190;
}

.novaPanel.open {
  right: 0;
  pointer-events: auto;
}

.novaPanel {
  position: fixed;
  top: 0;
  right: calc(var(--nova-panel-width, 360px) * -1);
  width: var(--nova-panel-width, 360px);
  min-width: 270px;
  max-width: min(760px, calc(100vw - 150px));
  height: 100vh;
  z-index: 1200;
  transition: right 0.28s ease;
  pointer-events: none;
  background: var(--dashboard-bg);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
}

.novaPanelInner {
  position: relative;
  height: 100%;

  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.novaPanelTopBar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  flex-shrink: 0;
}

.novaPanelBrand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.novaPanelLogo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #4f46e5 0%, #8b5cf6 45%, #f59e0b 100%);
  color: var(--novapanel-color);
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.novaPanelBrandText span {
  font-size: 18px;
  font-weight: 800;
  color: var(--novapanel-color);
  line-height: 1;
}

.novaPanelClose {
  width: 29px;
  height: 29px;
  border: none;
  background: transparent;
  border-radius: 12px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: #ffffff;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.novaPanelClose:hover {
  background: rgba(15, 23, 42, 0.06);
  color: #898989;
}

.novaPanelContent {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  padding: 0 22px 170px;
  overflow: hidden;
}

.novaPanelHeroIcon {
  position: relative;
  width: 82px;
  height: 82px;
  margin: 0 auto 24px;
}

.novaPanelHeroBubble {
  position: absolute;
  border-radius: 26px;
}

.novaPanelHeroBubble.bubble1 {
  width: 48px;
  height: 48px;
  left: 8px;
  top: 8px;
  background: conic-gradient(
    from 180deg,
    #8b5cf6,
    #2563eb,
    #16a34a,
    #f59e0b,
    #8b5cf6
  );
}

.novaPanelHeroBubble.bubble2 {
  width: 48px;
  height: 48px;
  right: 4px;
  bottom: 4px;
  background: #d1d5db;
}

.novaPanelTitle {
  margin: 0 0 30px;
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.28;
  color: var(--novapanel-color);
}

.novaSuggestionList {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.novaSuggestionBtn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 15px;
  background: var(--dashboard-bg);
  border: 1px solid var(--dashboard-border);
  border-radius: var(--dashboard-radius-lg);
  text-align: left;
  cursor: pointer;

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.novaSuggestionBtn:hover {
  transform: translateY(-1px);

  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.novaSuggestionIcon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}

.novaSuggestionBtn span:last-child {
  font-size: 13px;
  font-weight: 500;
  color: var(--novapanel-color);
  line-height: 1.4;
}

.novaComposerWrap {
  padding: 18px 20px 16px;
  flex-shrink: 0;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: auto;
  z-index: 20;
  background: linear-gradient(
    to top,
    rgba(10, 12, 18, 0.92) 0%,
    rgba(10, 12, 18, 0.78) 52%,
    rgba(10, 12, 18, 0) 100%
  );
}

.novaComposer {
  background: var(--dashboard-bg);
  border: 1px solid var(--dashboard-border);
  border-radius: var(--dashboard-radius-lg);
  padding: 14px 14px 12px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.novaComposerInput {
  width: 100%;
  min-height: 58px;
  max-height: 180px;
  resize: none;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  line-height: 1.5;
  color: var(--novapanel-color);
  box-sizing: border-box;
  font-family: inherit;
}

.novaComposerInput::placeholder {
  color: #6b7280;
  font-size: 12px;
}

.novaComposerBottom {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 10px;
}

.novaComposerRight {
  display: flex;
  align-items: center;

  gap: 8px;
}

.novaMiniBtn,
.novaAutoBtn,
.novaSendBtn {
  border: none;
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.2s ease,
    color 0.2s ease;
}

.novaMiniBtn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: transparent;
  color: #4b5563;
  font-size: 20px;
}

.novaMiniBtn:hover {
  background: #f3f4f6;
}

.novaAutoBtn {
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  background: transparent;
  color: #374151;
  font-size: 15px;
  font-weight: 700;
}

.novaAutoBtn:hover {
  background: #f3f4f6;
}

.novaSendBtn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #e5e7eb;
  color: #6b7280;
  font-size: 18px;
  font-weight: 700;
}

.novaSendBtn:hover {
  background: #d1d5db;
  color: #111827;
  transform: translateY(-1px);
}

.novaPanelFootnote {
  margin: 10px 4px 0;
  text-align: center;
  font-size: 11px;
  color: #6b7280;
}

@media (max-width: 900px) {
  .novaPanel {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    right: -100%;
  }

  .novaResizeHandle {
    display: none;
  }

  .novaPanelContent {
    padding: 24px 20px 150px;
  }

  .novaPanelTitle {
    font-size: 22px;
  }

  .novaSuggestionBtn span:last-child {
    font-size: 15px;
  }
}

.novaResultBox,
.novaLoadingBox {
  margin-top: 18px;
  padding: 18px 0;
  color: var(--novapanel-color);
  flex: 1;
  min-height: 0;
  max-height: 55vh;
  overflow: hidden;
}

.novaResultScroll {
  height: 100%;
  max-height: calc(100vh - 310px);
  overflow-y: auto;
  padding-right: 6px;
}

.novaResultLabel {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
  opacity: 0.9;
  color: var(--novapanel-color);
}

.novaResultText {
  margin: 0;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.45;
  color: #f5f7fb;
  word-break: break-word;
}

.novaLoading {
  font-size: 14px;
  opacity: 0.85;
  color: var(--novapanel-color);
}

.novaError {
  margin-top: 12px;
  font-size: 13px;
  color: #ff9c9c;
  color: var(--novapanel-color);
}

.novaResultText p,
.novaResultText ul,
.novaResultText ol {
  margin-top: 0;
  margin-bottom: 8px;
}

.novaResultText h1,
.novaResultText h2,
.novaResultText h3 {
  margin-top: 0;
  margin-bottom: 10px;
  line-height: 1.25;
}

.novaResultText ul,
.novaResultText ol {
  padding-left: 18px;
  list-style: circle;
}

.novaResultText li {
  margin-bottom: 4px;
}

.novaResizeHandle {
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 100%;
  cursor: ew-resize;
  z-index: 50;
}

.novaResizeHandle::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 100%;
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.2s ease;
}

.novaResizeHandle:hover::before {
  background: rgba(255, 255, 255, 0.24);
}

body.nova-resizing,
body.nova-resizing * {
  cursor: ew-resize !important;
  user-select: none !important;
}

.novaErrorCard {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(
    135deg,
    rgba(255, 140, 60, 0.14),
    rgba(255, 90, 40, 0.08)
  );
  border: 1px solid rgba(255, 170, 120, 0.22);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
}

.novaErrorIcon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
  color: #ffd7b0;
  background: rgba(255, 170, 120, 0.12);
  border: 1px solid rgba(255, 170, 120, 0.16);
}

.novaErrorContent {
  min-width: 0;
}

.novaErrorTitle {
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 700;
  color: #fff4ea;
  letter-spacing: 0.01em;
}

.novaErrorText {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 244, 234, 0.82);
}

/* 테이블 */
.novaResultText table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 14px;
  font-size: 13px;
}

.novaResultText th,
.novaResultText td {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
}

.novaResultText th {
  background: rgba(255, 255, 255, 0.06);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.novaResultText tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.03);
}

/* 구분선 */
.novaResultText hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 14px 0;
}

/* 인용구 (> 블록) */
.novaResultText blockquote {
  margin: 0;
  padding: 10px 14px;
  border-left: 3px solid #6366f1;
  background: rgba(99, 102, 241, 0.08);
  border-radius: 0 8px 8px 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
}

/* h2, h3 */
.novaResultText h2 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 4px;
  color: #fff;
}

.novaResultText h3 {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 8px;
}
