body, html {
  height: 100%;
  margin: 0;
  overflow: auto; 
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background: linear-gradient(180deg, #f8fafc, #eef2ff); 
  color: #1e293b;
}

.brand {
  color: #ffffff;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.5px;
  text-shadow: 0 0 8px rgba(255,255,255,0.3);
}

.header-buttons button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  height: 32px;              /* 🔥 exact compact */
  padding: 0 12px;           /* 🔥 tighter */

  border-radius: 6px;        /* 🔥 square + slight curve */

  font-size: 13px;
  font-weight: 500;

  border: none;
  cursor: pointer;
white-space: nowrap;
min-width: fit-content;
  transition: all 0.2s ease;
}

#incidentBtn {
  background: linear-gradient(135deg, #6366f1, #4f46e5); /* purple */
  color: #fff;
  box-shadow: none;
}

#trackBtn {
  background: linear-gradient(135deg, #22c55e, #16a34a); /* green */
  color: #fff;
  box-shadow: none;
}

#logoutBtn {
  background: linear-gradient(135deg, #ef4444, #dc2626); /* red */
  color: #fff;
  box-shadow: none;
}

.login-btn,
.signup-btn {
  height: 40px;           /* 🔥 SAME AS HEADER BUTTONS */
  padding: 0 18px;

  font-size: 14px;
  font-weight: 600;

  border-radius: 999px;

  display: flex;
  align-items: center;
  gap: 8px;
}

/* ✅ SIGN IN BUTTON */
.login-btn {
  background: linear-gradient(135deg, #22c55e, #4ade80);
  box-shadow: 0 6px 18px rgba(34,197,94,0.35);
}

/* ✅ CREATE ACCOUNT BUTTON */
.signup-btn {
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  box-shadow: 0 6px 18px rgba(59,130,246,0.35);
}

/* ✅ HOVER EFFECT */
.login-btn:hover,
.signup-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.header-buttons button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.user-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;

  box-shadow: 0 4px 12px rgba(99,102,241,0.4);
}

.auth-success { color: green; }
.auth-error { color: red; }

.content {
  padding: 20px;
  box-sizing: border-box;

  flex: 1;

  overflow: auto;       /* 🔥 NO SCROLL */
  width: 100%;
  max-width: 100%;
}

/* 🧾 CARD */
.card {
	min-height: 320px;
  background: #f8fafc;
  backdrop-filter: blur(10px);
  padding: 20px;
  width: 100%;
  border-radius: 10px;
  margin-bottom: 20px;
border: 1px solid #e2e8f0;
  position: relative;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

/* ✏️ INPUTS */
input, textarea {
  width: 100%;
  padding: 12px;
   margin: 0;
  margin-top: 12px;
  margin-bottom: 8px;   /* ✅ ADD */
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}
.auth-card {
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}
#jiraDescription {
  min-height: 60px;
  max-height: 200px;
  overflow-y: auto;
}

#jsonInput {
  width: 100%;

  height: auto;          /* ✅ dynamic */
  min-height: 0;         /* ✅ remove forced space */
  max-height: 400px;     /* optional scroll limit */

  background: #0f172a;
  color: #e2e8f0;

  border: 1px solid #334155;
  border-radius: 10px;

  padding: 14px;

  font-family: "Fira Code", monospace;
  font-size: 14px;
  line-height: 1.5;

  overflow: hidden;      /* ✅ important */
  resize: none;

  box-shadow: inset 0 2px 8px rgba(0,0,0,0.4);
}

/* 🔘 BUTTON */
.content button {
  margin-top: 10px;
}

button {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;

  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;

  font-weight: 500;
  cursor: pointer;

  transition: all 0.2s ease;
}

/* 🔥 TABS */
.tabs {
  display: flex;
  justify-content: space-between; /* 🔥 THIS FIXES GAP */
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}

.tab {
  flex: 1;
  text-align: center;
  padding: 12px 18px;
  border-radius: 12px;
  background: #f1f5f9;
  color: #334155;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}
.success-btn {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.banner {
background: #eef2ff;
color: #4338ca;             /* strong indigo text */
  border-top: 1px solid #c7d2fe;
  border-bottom: 1px solid #c7d2fe;
  text-align: center;
  padding: 10px;
  font-weight: 500;
}

.tab svg {
  width: 18px;
  height: 18px;
  stroke: #475569;
  stroke-width: 2;
  transition: all 0.25s ease;
}

.tab.active {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
}

.tab.active svg {
  stroke: #ffffff;
}
.tab:hover {
  background: #e2e8f0;
  transform: translateY(-1px);
}

.tab:hover svg {
  stroke: #1d4ed8;
}
.header-buttons button i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

/* 💬 CHAT RESPONSE */
.response {
  background: #f1f5f9;
  padding: 15px;
  margin-top: 10px;
  border-radius: 12px;
  white-space: pre-wrap;
  font-family: monospace;
  max-height: 400px;   /* 🔥 increased */
  overflow-y: auto;
  scroll-behavior: smooth;
  display: flex;
  flex-direction: column;
}

/* 💬 CHAT BUBBLES */
.chat-bubble {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  margin: 4px 0;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.4;
  font-family: 'Inter', 'Segoe UI', sans-serif;
   max-width: 100%;
  word-break: break-word;
}

.user {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  margin-left: auto;       /* 🔥 PUSH TO RIGHT */
  align-self: flex-end;    /* 🔥 ENSURE RIGHT */
  border-bottom-right-radius: 4px;
}

.ai {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #1e293b;
}

.chat-bubble pre {
  margin: 0;
  font-family: monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

/* 🔒 LOCK */
.locked {
  opacity: 0.6;
  pointer-events: none;
}

.lock-highlight {
  color: #a5b4fc;   /* premium soft indigo */
  font-weight: 700;
}

.lock-overlay {
  position: absolute;
  inset: 0;

  display: flex;
  justify-content: center;
  align-items: center;

  background: rgba(255,255,255,0.5); 
  backdrop-filter: blur(10px);

  border-radius: 12px;

  z-index: 10;   /* 🔥 FIX OVERLAP ISSUE */
}

/* ❌ ERROR */
.error-text {
  color: red;
  font-weight: bold;
}
input:focus, textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  outline: none;
}

#incidentScreen,
#trackScreen {
  padding: 20px;
}

#incidentScreen h2,
#trackScreen h2 {
  margin-bottom: 12px;
}

#incidentScreen input,
#incidentScreen textarea,
#trackScreen input {
  margin-top: 6px;
  margin-bottom: 10px;
}

#incidentScreen button,
#trackScreen button {
  margin-top: 8px;
  margin-right: 8px;
}

#trackResponse {
  margin-top: 15px;
}

.track-card {
  background: #ffffff;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 6px 20px rgba(0,0,0,0.05);
  max-width: 800px;
}

.track-card p {
  margin: 4px 0;
}

.track-section {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid #e5e7eb;
}

.comment-box {
  background: #f8fafc;
  padding: 6px;
  border-radius: 8px;
  margin-bottom: 5px;
  border-left: 4px solid #6366f1;
}

.comment-meta {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 4px;
}
h2, h3, h4, p {
  margin: 2px 0;
}
/* 🔥 COMPACT ROW LAYOUT */
.track-row {
  display: flex;
  gap: 6px;
  margin: 2px 0;
  font-size: 14px;
}

.label {
  font-weight: 600;
  min-width: 140px;
}

/* 🔥 TITLE */
.incident-title {
  margin-bottom: 6px;
}

/* 🔥 ACTIVITY BOX */
.activity-box {
  background: #ffffff;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  border-left: 4px solid #cbd5f5;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* 🔵 Comments */
.activity-box.comments {
  border-left-color: #3b82f6;
}

/* 🟡 Work Notes */
.activity-box.work_notes {
  border-left-color: #f59e0b;
}

/* HEADER */
.activity-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 6px;
}

/* META */
.activity-header .meta {
  color: #64748b;
}

/* BODY */
.activity-body {
  font-size: 14px;
  color: #111827;
}
.activity-header .user {
  font-weight: 600;
  color: #111827;
  background: none;     /* 🔥 remove blue highlight */
  padding: 0;
}
.activity-header span {
  background: transparent !important;
}
/* 🔥 BUTTON GROUP */
.track-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

/* 🔵 PRIMARY BUTTON */
.primary-btn {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
}

/* ⚫ SECONDARY BUTTON */
.secondary-btn {
  background: #64748b;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
}
.danger-btn {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}
.primary-btn:hover {
  opacity: 0.9;
}

.secondary-btn:hover {
  opacity: 0.9;
}
/* 🔥 AUTO EXPAND DESCRIPTION */
#desc {
  min-height: 100px;
  resize: none;
  overflow: hidden;
}
.layout {
  display: flex;
  height: 100vh;

  overflow: hidden;     /* 🔥 CRITICAL */
}

.sidebar {
  width: 240px;
  min-width: 240px;        /* 🔥 prevent shrink */
  max-width: 240px;        /* 🔥 prevent expand */
  background: linear-gradient(180deg, #020617, #0f172a);
  color: white;
  padding: 16px 14px;

  display: flex;
  flex-direction: column;
  align-items: stretch;   /* ✅ FIX */
  height: 100vh;           /* 🔥 FULL HEIGHT */
  overflow: hidden;        /* 🔥 NO SCROLL */
}

.logo {
  display: flex;
  justify-content: center;   /* ✅ CENTER FIX */
  align-items: center;
  height: 90px;             /* ✅ MORE SPACE */
  margin-bottom: 16px;
}

.logo-img {
  width: 225px;              /* ✅ PERFECT SIZE */
  height: auto;
  object-fit: contain;
}


.menu-item:hover {
  background: #334155;
}

.menu-item.active {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  box-shadow: 0 6px 18px rgba(99,102,241,0.4);
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100vh;
  min-width: 0;
}

.dashboard {
  padding: 10px 0 20px 0;
  width: 100%;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  width: 100%;
}

.stat-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.06);
  transition: all 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
}
.welcome-box {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.header {
  background: linear-gradient(135deg, #0f172a, #1e1b4b);
  color: white;
  padding: 14px 40px;   /* 🔥 increase horizontal padding */

  display: grid;
    grid-template-columns: auto 1fr auto;
  overflow: hidden;
  align-items: center;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  gap: 24px;            /* 🔥 THIS IS THE MAIN FIX */
}

.header-left {
  justify-self: start;
  padding-right: 20px;
  border-right: 1px solid rgba(255,255,255,0.06);

  white-space: nowrap;   /* 🔥 FIX */
}

.header-center {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.85;   /* 🔥 subtle */
}

.header-right {
  justify-self: end;
  display: flex;
  gap: 14px;   /* 🔥 increase from 10 → 14 */
}

.welcome-text {
  margin-right: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #e2e8f0;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.user-info {
  color: #94a3b8;   /* 🔥 softer premium */
  font-size: 13px;
}
.chat-input-bar {
  display: flex;
  gap: 10px;
}
@media (max-width: 768px) {

  .header-right {
    width: 100%;
    display: flex;
    flex-direction: column;
  }

  .header-buttons button {
    width: 100%;
  }

}
/* 🔥 MOBILE FIX */
@media (max-width: 768px) {
  .chat-input-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .chat-input-bar input {
    width: 100%;
  }

  .chat-input-bar button {
    width: 100%;
  }
}
* {
  box-sizing: border-box;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 8px;

  padding: 7px 10px;       /* 🔥 reduced */
  border-radius: 8px;

  font-size: 13px;         /* 🔥 slightly smaller */
  margin-bottom: 3px;      /* 🔥 tighter spacing */

  cursor: pointer;
  transition: all 0.2s ease;
}

.menu-item i {
  width: 16px;     /* 🔥 smaller */
  height: 16px;
  stroke-width: 2;
  color: #cbd5f5;
  transition: 0.2s;
}

.menu-item:hover i {
  color: #ffffff;
}

.menu-item.active i {
  color: #ffffff;
}

.welcome-box i {
  width: 18px;
  height: 18px;
}

.header-title {
  color: white;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.5px;

  white-space: nowrap;   /* 🔥 FORCE SINGLE LINE */
}
.menu {
  width: 100%;
  display: flex;
  flex-direction: column;

  gap: 6px;
  margin-top: 6px;
  flex: 1;
  overflow: hidden;     /* 🔥 no scroll */
}
.header-buttons i {
  width: 14px;
  height: 14px;
}
.premium-lock {
  background: rgba(255,255,255,0.55);  /* 🔥 less fade */
  backdrop-filter: blur(4px);
}

.lock-box {
  width: 300px;

  background: #ffffff; /* 🔥 light card like sample */
border: 1px solid #d1d5db;

  padding: 28px 24px;
  border-radius: 16px;

  text-align: center;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;

  box-shadow: none; /* 🔥 REMOVE heavy shadow */
}

.lock-icon {
  width: 56px;
  height: 56px;

  border-radius: 50%;

  background: #c7d2fe;   /* 🔥 darker purple bg */

  display: flex;
  align-items: center;
  justify-content: center;

  margin-bottom: 10px;
}

.lock-icon svg {
  width: 26px;
  height: 26px;
  color: #4f46e5;   /* 🔥 DARK PURPLE ICON */
}

.lock-title {
	letter-spacing: 0.3px;
  font-size: 19px;          /* 🔥 slightly bigger */
  font-weight: 700;         /* 🔥 FULL BOLD */
  color: #000000;           /* 🔥 PURE BLACK */
}

.lock-sub {
	letter-spacing: 0.2px;
  font-size: 14px;
  font-weight: 600;         /* 🔥 stronger */
  color: #111827;           /* 🔥 dark black (not grey) */
}
.lock-text {
  text-align: center;
  line-height: 1.5;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
}

.hamburger span {
  width: 22px;
  height: 2px;
  background: white;
  border-radius: 2px;
  display: block;
}

/* =========================
   📱 MOBILE SIDEBAR TOGGLE
   ========================= */

@media (max-width: 768px) {

  .hamburger {
    display: flex;
  }

  /* 🔥 Sidebar hidden by default */
  .sidebar {
    position: fixed;
    top: 0;
    left: -260px;   /* hidden */
    height: 100%;
    width: 240px;

    z-index: 9999;

    transition: all 0.3s ease;
  }

.sidebar.active {
  left: 0;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.4); /* 🔥 overlay effect */
}
}
/* =========================
   📱 CLEAN RESPONSIVE FIX
   ========================= */

/* ✅ REAL OVERLAY */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);

  opacity: 0;
  pointer-events: none;

  transition: 0.3s;
  z-index: 9998;
}

.overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ✅ Sidebar always on top */
.sidebar {
  z-index: 9999;
}
@media (max-width: 1024px) {

  .header {
    position: relative;
    z-index: 1;   /* 🔥 keep below sidebar */
  }

  .banner {
    position: relative;
    z-index: 1;
  }

}
@media (max-width: 1024px) {

  .header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
  }

  .header-right {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }

  .header-buttons button {
    width: auto;
  }
}
/* =========================
   FIX: CONTENT SHIFT ON SIDEBAR
========================= */

@media (max-width: 1024px) {

  .main {
    width: 100%;
  }

  .content {
    width: 100%;
    padding: 15px;
  }

  /* prevent hidden UI */
  body.sidebar-open {
    overflow: hidden;
  }

}
.submenu {
  display: none;

  padding-left: 10px;
  margin-top: 4px;

  max-height: 180px;     /* 🔥 prevents overflow */
  overflow: hidden;      /* 🔥 no scroll */
}

.submenu.open {
  display: block;
}

.submenu-item {
  padding: 6px 8px; 
  margin: 2px 0;
  border-radius: 6px;
  font-size: 12px;
  color: #cbd5f5;
  cursor: pointer;
}

.submenu-item:hover {
  background: #1e293b;
  color: #fff;
}
* {
  max-width: 100%;
}
.auth-container {
  padding: 40px;
  display: flex;
  justify-content: center;
}

.auth-response {
  width: 100%;
  margin-top: 20px;
  padding: 16px;

  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #ffffff;

  min-height: 120px;
}

#authBox {
  width: 100%;
}

#authBox input {
  margin-top: 10px;
  margin-bottom: 6px;
}

#authBox button {
  width: auto;              /* ❌ remove full width */
  min-width: 160px;         /* ✅ compact size */
  padding: 10px 18px;
  border-radius: 6px;       /* ✅ less rounded (Anypoint style) */
  display: inline-block;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-form button {
  align-self: center;   /* 🔥 center button */
}
.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field label {
  font-size: 13px;
  color: #334155;
  font-weight: 500;
}

.req {
  color: #ef4444;   /* 🔥 red star */
  font-weight: 700;
}
#sfPostBody,
#sfPutBody {
  width: 100%;
  height: auto;
  min-height: 80px;
  max-height: 400px;
  overflow: hidden;
  resize: none;
}