* {
  box-sizing: border-box;
  font-family: Inter, system-ui, sans-serif;
}

body {
  margin: 0;
  background: #f5f7fb;
  color: #111827;
}


.top-menu {
  margin-left: auto;      /* push whole group to the right */
  display: flex;          /* 🔥 REQUIRED */
  align-items: center;
  gap: 10px;              /* space between Free + ☰ */
}

/* ======================
   Upgrade Button (Topbar – Premium)
====================== */
.upgrade-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  height: 28px;
  padding: 0 12px;

  font-size: 12px;
  font-weight: 600;

  color: #fef3c7;                  /* soft amber text */
  background: rgba(255, 255, 255, 0.15); /* subtle glass */

  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;

  cursor: pointer;
  white-space: nowrap;

  backdrop-filter: blur(6px);     /* modern glass feel */

  transition: background 0.15s ease,
              border-color 0.15s ease,
              color 0.15s ease;
}

.upgrade-btn .upgrade-icon {
  font-size: 11px;
  opacity: 0.85;
}

/* Hover: slightly brighter */
.upgrade-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.upgrade-btn:active {
  background: rgba(255, 255, 255, 0.3);
}

.upgrade-btn.hidden {
  display: none;
}


/* ======================
   Auth Identity Pill – FINAL
====================== */

.plan-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ======================
   BASE PILL
====================== */

.auth-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 6px 14px;
  border-radius: 999px;

  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;

  color: #ffffff;

  backdrop-filter: blur(8px);
  transition: background 0.15s ease, border-color 0.15s ease;
}

/* Icon (SVG-safe) */
.auth-pill .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 14px;
  height: 14px;
  line-height: 1;
}

/* Separator */
.auth-pill .sep {
  opacity: 0.45;
}

/* ======================
   GUEST (actionable)
====================== */

.auth-pill.guest {
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.30);
}

.auth-pill.guest:hover {
  background: rgba(255, 255, 255, 0.26);
}

/* Guest label */
.auth-pill.guest .label {
  opacity: 0.9;
}

/* Login action */
.auth-pill.guest .action {
  background: none;
  border: none;
  padding: 0;

  font-size: 12px;
  font-weight: 700;
  line-height: 1;

  color: #ffffff;
  cursor: pointer;
}

.auth-pill.guest .action:hover {
  text-decoration: underline;
}

/* ======================
   USER (authenticated)
====================== */

.auth-pill.user {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  cursor: default;
}

/* Subtle, premium hover (no jump) */
.auth-pill.user:hover {
  background: rgba(255, 255, 255, 0.20);
}

/* ======================
   USER ICON – STRONG GREEN
====================== */

.auth-pill.user .icon {
  color: #4ade80; /* green-400 (brighter, modern) */
  filter: drop-shadow(0 0 4px rgba(74, 222, 128, 0.45));
}

/* ======================
   GUEST ICON – NOT AUTHENTICATED
====================== */

.auth-pill.guest .icon {
  color: #f59e0b; /* amber-500 */
  filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.45));
}



/* ensure hidden always works */
.hidden {
  display: none !important;
}


.menu-btn {
  background: none;
  border: none;
  font-size: 18px;
  opacity: 0.75;
  cursor: pointer;
  padding: 6px 8px;
}

.menu-btn:hover {
  background: #f3f4f6;
  color: #ffffff;
  border-radius: 6px;
  background: rgba(255,255,255,0.15);
  opacity: 1;
}

.menu-dropdown {
  position: absolute;
  right: 15px;      /* 👈 move LEFT (increase value = more left) */
  top: 52px;       /* 👈 move DOWN */
  background: #ffffff;
  color: #111827;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  min-width: 200px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  z-index: 1000;
}


.menu-item {
  padding: 10px 12px;
  cursor: pointer;
  font-size: 14px;
  color: #111827;
}

.menu-item:hover {
  background: #f3f4f6;
}


/* HEADER */
.topbar {
  height: 52px;
  padding: 0 16px;
  display: flex;
  align-items: center;

  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  background: linear-gradient(90deg, #2563eb, #3b82f6);
  border-bottom: none;

  color: #ffffff;
}


.logo {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
}


/* LAYOUT */
.layout {
  display: grid;
  grid-template-columns: 300px 1fr 300px;
  height: calc(100vh - 56px);
}

/* SIDEBAR */

.new-project-btn,
.new-prompt-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;

  border-radius: 10px;
  border: none;

  background: linear-gradient(90deg, #2563eb, #1d4ed8);
  color: #ffffff;
  font-weight: 600;

  cursor: pointer;
  transition: all 0.15s ease;
}

.new-project-
.new-project-btn,
.new-prompt-btn {
  background: linear-gradient(90deg, #2563eb, #1e40af);
  box-shadow: 0 4px 10px rgba(37,99,235,0.35);
}




.sidebar {
  background: #f8faff;
  border-right: 1px solid #e5e7eb;
  padding: 14px;
  display: flex;
  flex-direction: column;
  height: 100vh;  
}

.section {
  margin-bottom: 12px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: 8px;
}

.editor-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
  width: 100%; 
}

.editor-title-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.editor-meta-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.latest-version {
  font-size: 15px;
  color: #6b7280;
  font-weight: 600;
}

.latest-version.hidden {
  display: none;
}


.status-badge {
  font-size: 13px;
  font-weight: 600;
  color: #2563eb;
}

.status-badge.saved {
  background: #dcfce7;
  color: #166534;
}

.status-badge.unsaved {
  background: #fef3c7;
  color: #92400e;
}

.status-badge.hidden {
  display: none;
}

/* PROJECT EMPTY STATE */
.project-empty {
  margin-top: 8px;
}

.project-empty.hidden {
  display: none;
}

.project-empty-text {
  font-size: 12px;
  color: #9ca3af;
  padding-left: 4px;
}

/* PROJECT ROW LAYOUT */
.project-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Project dropdown */
.project-select {
  flex: 1;
}

/* Project action buttons */
.project-actions {
  display: flex;
  gap: 4px;
  align-items: flex-start;   /* ⬅️ key change */
  padding-top: 2px;          /* ⬅️ lifts icons slightly */
  transform: translateY(-6px);
}

.project-actions button {
  padding: 2px 4px;          /* ⬅️ smaller hit area */
  font-size: 12px;           /* ⬅️ smaller icon size */
  line-height: 1;

  border-radius: 5px;
  background: transparent;
  border: 1px solid transparent;

  cursor: pointer;
  
}

.project-actions button:hover {
  opacity: 1;
  background: #f3f4f6;
}

.project-actions .danger:hover {
  background: #fee2e2;
}


/* DISABLED STATES */
.disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* Editor disabled look */
.editor.disabled textarea {
  background: #f3f4f6;
  color: #9ca3af;
}

/* Prompt section disabled */
.sidebar.disabled {
  background: #f9fafb;
}

/* Disabled button */
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#promptList.disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* PROJECT ROW */
.project-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* PROMPTS SECTION — MUST SCROLL */
.prompts-section {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;   /* ✅ stop section scrolling */
  display: flex;
  flex-direction: column;
  position: relative;
}

#promptList {
  flex: 1 1 auto;     /* fills remaining space */
  overflow-y: auto;   /* ✅ ONLY this scrolls */
  min-height: 0;      /* 🔑 required */
  padding-right: 4px;
}


.prompt-search {
  background: #ffffff;
  padding: 6px 8px;
  margin-bottom: 10px;

  border: 1px solid #d1d5db;
  border-radius: 8px;
}


.prompt-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.prompt-icon {
  color: #6b7280; /* subtle gray */
  display: flex;
  flex-shrink: 0;
}

.prompt-item.active .prompt-icon {
  color: #2563eb; /* optional active blue */
}

/* PROMPTS EMPTY STATE */
.prompt-empty {
  margin-top: 0;        /* ⬅️ pull it up */
  padding-top: 20px;  
  position: absolute;
  top: 150px;     /* adjust ↑↓ */
  left: 14px;
  right: 14px;   /* optional subtle breathing space */
}


.prompt-empty.hidden {
  display: none;
}

.prompt-empty-card {
  border: 1.5px dashed #d1d5db;
  border-radius: 10px;
  padding: 14px 12px;
  text-align: center;
  color: #9ca3af;
  
}

.prompt-empty-card .title {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 4px;
}

.prompt-empty-card .desc {
  font-size: 12px;
  line-height: 1.4;
}


#projectSelect {
  width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #d1d5db;

  margin-bottom: 14px; /* 🔥 IMPORTANT for spacing */
}

/* =========================
   TAG FILTER SCROLL BOX
========================= */

.tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;

  align-content: flex-start;
  justify-content: flex-start;   /* 🔥 IMPORTANT */

  flex-shrink: 0;
  min-height: 220px;
  max-height: 220px;

  overflow-y: auto;
  overflow-x: hidden;

  padding: 8px;
  background: #f8fafc;
}


/* TAG FILTER WRAPPER */
.tag-filter-wrapper {
  flex-shrink: 0;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;
  background: #f8fafc;
}


/* HEADER */

.clear-tags-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 26px;
  height: 26px;
  margin-left: auto;
  margin-right: 8px;   /* ✅ ADD THIS */

  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background: #ffffff;

  font-size: 14px;
  color: #6b7280;
  cursor: pointer;

  transition: all 0.15s ease;
}


.clear-tags-btn:hover {
  background: #eef2ff;
  color: #4f46e5;
  border-color: #c7d2fe;
}

.clear-tags-btn:active {
  transform: scale(0.95);
}

.tag-filter-header {
  display: flex;
  align-items: center;
  gap: 6px;

  font-size: 13px;
  font-weight: 600;
  color: #374151;

  margin-bottom: 8px;
}

/* ICON */
.tag-filter-icon {
  font-size: 14px;
  opacity: 0.8;
}

.tag-empty {
  width: 100%;
  text-align: center;
  margin-top: 12px;

  font-size: 16px;
  color: #9ca3af;
}

/* Optional: smooth scroll */
/* =========================
   PROFESSIONAL SCROLLBARS
========================= */

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #c7d2fe transparent;
}

/* Chrome / Edge / Safari */
*::-webkit-scrollbar {
  width: 8px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background-color: #c7d2fe;      /* soft indigo */
  border-radius: 999px;
  border: 2px solid transparent;  /* padding illusion */
  background-clip: content-box;
}

*::-webkit-scrollbar-thumb:hover {
  background-color: #a5b4fc;      /* subtle hover */
}


.tag-chip {
  white-space: nowrap;   /* 🔑 prevents tall chips */
  font-size: 12px;
}

.tag-chip.filter {
  border: 1px solid #c7d2fe;
  background: #eef2ff;
  cursor: pointer;
}

.tag-chip.filter.active {
  background: #4f46e5;
  color: #ffffff;

  box-shadow: inset 0 0 0 1.5px #4f46e5; /* visual only */
  border-color: #4f46e5;

  font-weight: 500;   /* 🔒 SAME as normal */
}


.tag-chip.filter .count {
  margin-left: 4px;
  font-size: 11px;
  opacity: 0.8;
}

/* TAG FILTER CHIP – FIXED HEIGHT */
.tag-filter .tag-chip {
  height: 34px;                 /* 🔒 lock height */
  min-height: 34px;
  max-height: 34px;

  display: inline-flex;
  align-items: center;          /* vertical center */
  justify-content: center;

  padding: 0 12px;              /* horizontal only */
  line-height: 1;               /* 🔥 prevent font stretch */

  border-radius: 999px;
  white-space: nowrap;

  font-size: 12px;
  font-weight: 500;

  box-sizing: border-box;
  flex: 0 0 auto; 
}

.tag-chip.active {
  background: #eef2ff;
  color: #3730a3;

  /* visual emphasis WITHOUT layout change */
  box-shadow: inset 0 0 0 1.5px #6366f1;
  font-weight: 500;   /* keep same */
}

.tag-chip .count {
  margin-left: 6px;
  font-size: 11px;

  line-height: 1;
  display: inline-flex;
  align-items: center;
}

/* PROMPT CARD */
.prompt-card {
  position: relative;
  padding: 10px 12px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  cursor: pointer;

  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;

  transition: background 0.15s ease, border-color 0.15s ease;
}

.prompt-card:hover {
  background: #f9fafb;
}

.prompt-card.active {
  background: #f8fafc;                 /* near-white */
  border-left: 3px solid #4f46e5;       /* indigo accent */
  border-top: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

.prompt-card.active .prompt-card-title {
  font-weight: 600;
}


/* MAIN CONTENT */
.prompt-card-main {
  flex: 1;
  min-width: 0;        /* 🔥 ADD THIS */
  display: flex;
  flex-direction: column;
  gap: 4px;
}


/* TITLE */
.prompt-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #111827;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;  /* 🔥 ADD */
  max-width: 100%;
}

.prompt-card-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
}

.prompt-card-meta-row .project-name {
  flex-shrink: 0;
  max-width: 90px;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  font-size: 12px;
  color: #6b7280;
}

.prompt-card-meta-row .versions,
.prompt-card-meta-row .separator {
  flex-shrink: 0;
}

/* 🔥 REMOVE BADGE LOOK FROM VERSION TEXT */
.prompt-card-meta-row .versions {
  background: none !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;

  display: inline;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

.prompt-card-meta-row .separator {
  opacity: 0.6;
}


/* NEW PROMPT */


/* PROMPT ITEM ROW */
.prompt-item {
  display: flex;
  align-items: center;
  gap: 8px;

  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  position: relative;
}

.prompt-item:hover {
  background: #eef2ff;
}

.prompt-item.active {
  background: #e0e7ff;
  font-weight: 600;
}


/* File icon */
.prompt-icon {
  font-size: 14px;
  color: #6b7280;
}

/* Prompt title */
.prompt-title {
  flex: 1;
  font-size: 14px;
}

/* Actions (edit / delete) */
/* PROMPT ACTION ICONS — EFFECTIVE HOVER */
.prompt-actions {
  display: none;
  gap: 4px;

  flex-shrink: 0;     /* 🔥 ADD */
  margin-left: auto; /* 🔥 ADD */
}


.prompt-card:hover .prompt-actions {
  display: flex;
}


/* PROMPT ACTION ICONS */
.prompt-actions button {
  padding: 2px 4px;
  font-size: 12px;
  line-height: 1;

  border: none;
  background: transparent;
  cursor: pointer;

  color: #6b7280;        /* darker gray */
  opacity: 1;            /* 🔥 remove fade */

  transition: color 0.15s ease, transform 0.15s ease;
}

.prompt-actions button:hover {
  color: #111827;        /* near-black */
  transform: translateY(-1px);
}

/* DELETE — clearly destructive */
.prompt-actions .delete {
  color: #b91c1c;        /* deeper red */
}

.prompt-actions .delete:hover {
  color: #dc2626;
}

/* LIST */
ul {
  list-style: none;
  padding: 0;
}


/* EDITOR */
.editor {
  padding: 16px;
}

#editor {
  width: 100%;
  min-height: 300px;
  max-height: 480px;

  padding: 16px 18px;
  font-size: 16px;
  line-height: 1.6;
  font-family: Inter, system-ui, sans-serif;

  border-radius: 12px;
  border: 1px solid #d1d5db;
  resize: vertical;
}


.editor-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}


/* SAVE VERSION BUTTON */
.save-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 8px 14px;
  border-radius: 8px;
  border: none;

  background: #111827;          /* dark */
  color: #ffffff;

  font-size: 13px;
  font-weight: 600;

  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-discard {
  padding: 8px 14px;
  border-radius: 8px;

  background: #f3f4f6;          /* light grey */
  color: #374151;               /* dark grey text */
  border: 1px solid #d1d5db;

  font-size: 13px;
  font-weight: 600;
  cursor: pointer;

  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-discard:hover {
  background: #e5e7eb;          /* slightly darker grey on hover */
  border-color: #cbd5f5;
}


.editor-actions {
  margin-left: auto;          /* ⬅️ pushes both buttons right */
  display: flex;
  gap: 10px;                  /* ⬅️ space between Discard & Save */
}

.save-btn:hover {
  background: #1f2937;
  transform: translateY(-1px);
}

.save-btn:active {
  transform: translateY(0);
}

.save-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.save-icon {
  display: flex;
}

/* RIGHT PANEL */
.versions {
  background: #ffffff;
  border-left: 1px solid #e5e7eb;
  padding: 14px;

  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;

  position: relative; /* 🔥 ADD THIS */
}

#versionList {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;      /* 🔑 CRITICAL */
  padding-right: 4px; /* space for scrollbar */
}

.version-title {
  display: flex;
  align-items: center;
  gap: 8px;

  font-size: 14px;              /* ⬅️ smaller */
  font-weight: 600;
  color: #6b7280;               /* ⬅️ grey shade */

  margin-bottom: 12px;          /* tighter spacing */
}

.version-title svg {
  color: #6b7280;
}


/* EMPTY STATE */
.version-empty {
  position: absolute;        /* 🔥 key change */
  top: 90px;                 /* ⬅️ move UP / DOWN freely */
  left: 50%;
  transform: translateX(-50%);

  display: flex;
  justify-content: center;
  width: 100%;
  pointer-events: none;      /* optional, prevents click issues */
}

.version-empty.hidden {
  display: none;
}

.version-empty-card {
  border: 1.5px dashed #d1d5db;
  border-radius: 12px;
  padding: 28px 22px;
  text-align: center;
  max-width: 220px;
  color: #9ca3af;
}

.version-empty-card svg {
  margin-bottom: 12px;
}

.version-empty-card .title {
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 4px;
}

.version-empty-card .desc {
  font-size: 13px;
  line-height: 1.4;
}

.version-meta {
  display: flex;
  align-items: center;
  gap: 12px;              /* ⬆ more breathing space */
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  margin-top: 10px;       /* ⬆ better separation */
}

/* 🔥 ICON IMPROVEMENT (refined) */
.version-meta .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 26px;
  height: 26px;
  border-radius: 8px;

  font-size: 14px;          /* ⬇ smaller = cleaner */
  font-weight: 700;

  background: #eef2ff;      /* ✅ match tag filter tone */
  color: #4f46e5;           /* indigo like filter tags */

  margin-top: 0;            /* ⬅️ REMOVE vertical push */
  flex-shrink: 0;
}

/* Optional: subtle hover */
.version-meta .icon:hover {
  background: #e5e7eb;
}

/* Text stays secondary */
.version-meta .text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
  font-size: 12px;
  opacity: 0.85;         /* ⬇ slightly softer */
}

/* VERSION CARD – ACTIVE (match prompt card) */
.version-card.active {
  background: #eef7ee;        /* same light green */
  border: 1px solid #16a34a;  /* same green border */
}


/* MODAL */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal.hidden {
  display: none;
}

.modal-box {
  width: 420px;
  background: #ffffff;
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
}

.modal-desc {
  font-size: 14px;
  color: #4b5563;
  margin-bottom: 12px;
}

.modal-input {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1.5px solid #d1d5db;
  margin-bottom: 18px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-outline {
  padding: 8px 16px;
  border-radius: 10px;
  border: 1.5px solid #d1d5db;
  background: #ffffff;
}

.btn-primary {
  padding: 8px 18px;
  border-radius: 10px;
  background: #111827;
  color: #ffffff;
  border: none;
}

.btn-danger {
  background: #dc2626;
  color: #ffffff;
  border: none;
}

.meta-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

#tagInput,
#notesInput {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  font-size: 13px;
}



.version-header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 25px;
  margin-bottom: 6px;
  position: relative !important;
  padding-right: 36px; /* ⬅️ space for copy icon */
}



.version-badge {
  font-size: 16px;          /* ⬆ bigger text */
  font-weight: 700;         /* ⬆ stronger emphasis */

  background: #eef2ff;
  color: #3730a3;

  padding: 4px 10px;        /* ⬆ bigger pill */
  border-radius: 999px;     /* ⬆ fully rounded pill */
  line-height: 1;           /* ⬅️ prevents height jump */
}


.version-time {
  font-size: 12px;
  color: #6b7280;
}

.version-preview {
  font-size: 13px;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 6px;
}

.version-tags,
.version-notes {
  font-size: 12px;
  color: #374151;
  margin-top: 4px;
}


#notesInput {
  max-height: 120px;
  resize: vertical;
}

.notes-wrapper {
  margin-bottom: 10px;
}

.notes-toggle {
  background: none;
  border: none;
  color: #4f46e5;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  margin-bottom: 6px;
}

#notesInput {
  background: #f9fafb;
  border: 1px dashed #e5e7eb;
}

.hidden {
  display: none !important;
}

.prompt-block {
  margin-top: 16px;
}

.prompt-label {
  font-size: 16px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

#notesInput {
  background: #f9fafb;
  border: 1px dashed #e5e7eb;
  font-size: 13px;
}

.notes-toggle {
  font-size: 13px;
  color: #4f46e5;
}


.version-card:hover {
  background: #f3fbf4;       /* subtle green hover */
  border-color: #22c55e;
}

.copy-btn {
  position: absolute;
  top: 20px;
  right: 12px;

  transform: translateY(-50%); /* 🔥 vertical centering */

  border: none;
  background: transparent;
  cursor: pointer;

  width: 28px;
  height: 28px;
  padding: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0.6;
  z-index: 2; /* 🔒 stay above text */
}


.copy-btn:hover {
  opacity: 1;
}

.copy-btn svg {
  display: block;
  width: 20px;
  height: 20px;
}

.copy-btn.copied {
  color: #16a34a;
}

.copy-btn svg {
  transition: transform 0.15s ease, color 0.15s ease;
}


/* COMPARE BUTTON – PROFESSIONAL SECONDARY ACTION */
.compare-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;

  padding: 6px 12px;
  border-radius: 8px;

  background: #ffffff;
  border: 1px solid #e5e7eb;

  font-size: 13px;
  font-weight: 600;
  color: #374151;

  cursor: pointer;
  user-select: none;

  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    color 0.15s ease;
}

.compare-btn:hover {
  background: #f9fafb;
  border-color: #c7d2fe;
  color: #111827;
}

.compare-btn:active {
  background: #eef2ff;
  border-color: #6366f1;
}

.compare-btn.active {
  background: #eef2ff;
  border-color: #6366f1;
  color: #3730a3;
  box-shadow: inset 0 0 0 1px #6366f1;
}

.compare-btn .compare-icon {
  font-size: 14px;
  opacity: 0.85;
  line-height: 1;
}


/* Compare container = full split screen */
.compare-view {
  display: grid;
  grid-template-columns: 1fr;   /* ✅ single panel by default */
  gap: 12px;
  height: calc(100vh - 160px);
}


.compare-column {
  display: flex;
  flex-direction: column;
  height: 100%;
  display: none;

  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 8px;
}

.compare-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.compare-empty-card {
  background: #f9fafb;
  border: 1.5px dashed #d1d5db;
  border-radius: 12px;
  padding: 28px 32px;
  text-align: center;
  max-width: 320px;
  color: #6b7280;
}

.compare-empty-card .title {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.compare-empty-card .desc {
  font-size: 13px;
}
/* 1 version selected */
.compare-view.one-selected {
  grid-template-columns: 1fr;
}

.compare-view.one-selected .compare-column {
  display: flex;
}
.compare-view.one-selected .compare-column + .compare-column {
  display: none;
}

/* 🔒 LOCK SELECTED VERSION — hover must NOT override */
.compare-mode .version-card.selected:hover {
  background: #eef2ff;              /* same as selected */
  border-left: 3px solid #6366f1;
  border-color: #6366f1;
}

/* Prevent hover styling from affecting selected cards */
.compare-mode .version-card.selected {
  pointer-events: auto;
}

/* 2 versions selected */
.compare-view.two-selected {
  grid-template-columns: 1fr 1fr;
}

.compare-view.two-selected .compare-column {
  display: flex;
}

/* Header + dropdown stay natural */
.compare-header {
  background: transparent;   /* ✅ remove grey background */
  padding: 0;                /* optional: tighter look */
  margin-bottom: 6px;
  font-weight: 600;
  color: #111827;
}


/* 🔥 THIS IS THE KEY PART */
.compare-column pre {
  flex: 1;                       /* fill remaining height */
  overflow: auto;

  background: #ffffff;           /* ✅ white text background */
  padding: 14px;
  border-radius: 6px;

  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.6;
  color: #111827;

  border: 1px solid #e5e7eb;     /* subtle separation */
}

/* 🔥 HARD OVERRIDE: selected ALWAYS wins over active */
/* Professional selected state */
.version-card.active {
  background: #f8fafc;                 /* near-white */
  border-left: 3px solid #22c55e;       /* subtle green accent */
  border-top: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

.version-card.active .version-badge {
  background: #dcfce7;
  color: #166534;
}

/* Compare mode: disable active styling entirely */
.compare-mode .version-card.active:not(.selected) {
  background: #ffffff;
  border: 1px solid #e5e7eb;
}


.compare-mode .version-card:hover {
  background: #f5f7ff;   /* light indigo */
  border-color: #c7d2fe;
}

/* ======================
   COMPARE MODE – VERSION SELECTION
====================== */


/* hidden by default */
.version-select {
  display: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #c7cdd4;
  margin-top: 8px;
  flex-shrink: 0;
}

/* SHOW ONLY IN COMPARE MODE */
.compare-mode .version-select {
  display: block;
}

/* layout for selection + content */


/* SELECTED STATE */
.version-card {
  position: relative;
  display: flex;
  gap: 10px;

  cursor: pointer;

  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  background: #ffffff;
}

.version-card.selected {
  background: #eef2ff;        /* light indigo */
  border-left: 3px solid #6366f1;
}

.version-card.selected .version-select {
  background: #6366f1;
  border-color: #6366f1;
}

/* ======================
   DIFF STYLES
====================== */

.diff-empty {
  height: 1.2em;
}

/* 🔥 REQUIRED FOR <pre> */
.diff-line span {
  display: inline-block;
}


/* ======================
   DIFF STYLES (WORD ONLY)
====================== */

.diff-empty {
  height: 1.2em;
}

.diff-line {
  white-space: pre-wrap;
}

.diff-line span {
  display: inline-block;
}

.diff-word-added {
  background-color: #dcfce7;
  color: #065f46;
  padding: 1px 3px;
  border-radius: 3px;
}

.diff-word-removed {
  background-color: #fee2e2;
  color: #7f1d1d;
  padding: 1px 3px;
  border-radius: 3px;
  text-decoration: line-through;
}


.diff-word-same {
  background: transparent;
}

.import-status {
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 6px;
  margin: 8px 12px;
}

.import-status.loading {
  background: #fef3c7;
  color: #92400e;
}

.import-status.success {
  background: #ecfdf5;
  color: #065f46;
}

.import-status.error {
  background: #fef2f2;
  color: #991b1b;
}


/* TAG INPUT CONTAINER */
.tag-input-wrapper {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;

  padding: 6px 8px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;

  cursor: text;
}

/* Focus ring */
.tag-input-wrapper:focus-within {
  border-color: #6366f1;
  box-shadow: 0 0 0 1px #6366f1;
}

/* REAL INPUT — visually invisible */
.tag-input-wrapper input {
  border: none;
  outline: none;
  background: transparent;

  padding: 4px 2px;
  line-height: 1.4;

  flex: 1;
  min-width: 120px;

  font-size: 14px;
}

/* Placeholder */
.tag-input-wrapper input::placeholder {
  color: #9ca3af;
  font-size: 13px;
}

/* TAG LIST */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* TAG CHIP */
.tag-chip {
  background: #eef2ff;
  color: #3730a3;

  padding: 4px 8px;
  border-radius: 999px;

  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* # symbol */
.tag-chip .hash {
  opacity: 0.6;
  font-weight: 600;
}

/* Remove button */
.tag-chip button {
  background: none;
  border: none;
  cursor: pointer;

  font-size: 12px;
  color: #4f46e5;
}

/* TAG FILTER CHIP – HOVER */
.tag-chip.filter:hover {
  background: #e0e7ff;          /* light indigo */
  border-color: #6366f1;
  color: #1e3a8a;

  box-shadow: inset 0 0 0 1px #6366f1;
}
/* Active + hover */
.tag-chip.filter.active:hover {
  background: #4f46e5;          /* keep active color */
  color: #ffffff;
}

/* 🔥 Max character count */
.char-count {
  font-size: 12px;
  color: #6b7280;
  text-align: right;
  margin-top: -10px;
  margin-bottom: 12px;
}

.char-count.warning {
  color: #d97706; /* amber */
}

.char-count.error {
  color: #dc2626; /* red */
}

/* ======================
   Plan Indicator – Pro Emphasis
====================== */

.plan-badge {
  display: inline-flex;
  align-items: center;       /* 🔥 fixes vertical alignment */
  gap: 6px;

  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

/* FREE */
.plan-badge.free {
  color: #ffffff;     /* pure white */
  font-weight: 700;   /* bold */
}
/* PRO */
.plan-badge.pro {
  color: #fbbf24;            /* amber */
  font-size: 13px;           /* ⬆️ slightly bigger */
  font-weight: 700;  
  gap: 2px;        /* ⬆️ bolder */
}

/* Crown slightly up */
.plan-badge.pro .icon {
  font-size: 15px;
  position: relative;
  top: -1px;
  
}

/* Pro text – compact premium */
.plan-badge.pro .label {
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  font-size: 11.5px;
}



