body {
  font-family: Inter, Arial, sans-serif;
  background: #060b16;
  color: #d8e5ff;
  margin: 0;
  min-height: 100vh;
  zoom: 1.25;
  overflow-x: hidden;
}
#brainBackground {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
}
.app-shell {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 22px;
}
.login-screen {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow: hidden;
}
.login-card {
  width: min(460px, 92vw);
  background: rgba(10, 18, 38, 0.82);
  border: 1px solid rgba(90, 128, 210, 0.45);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.45);
  padding: 22px;
}
.login-card h1 {
  margin-top: 0;
}
.login-card p {
  color: #a4b9df;
}
.login-message {
  margin-top: 10px;
  color: #ffb5b5;
  min-height: 20px;
}
.hero {
  background: rgba(10, 18, 38, 0.65);
  border: 1px solid rgba(90, 128, 210, 0.35);
  border-radius: 14px;
  backdrop-filter: blur(8px);
  padding: 18px;
  margin-bottom: 14px;
}
.hero h1 {
  margin: 0 0 8px;
}
.hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  text-align: right;
}
.hero-meta-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.greeting-discrete {
  font-size: 13px;
  font-weight: 400;
  color: rgba(180, 200, 235, 0.72);
  letter-spacing: 0.02em;
}
.btn-text {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  color: rgba(140, 170, 230, 0.85);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.btn-text:hover {
  color: #dbe8ff;
}
.hero p {
  color: #a4b9df;
  margin: 0;
}
.incident-banner {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #f06363;
  background: rgba(194, 43, 43, 0.35);
  color: #ffd8d8;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.hidden {
  display: none;
}
.app-body {
  display: grid;
  grid-template-columns: minmax(200px, 228px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.app-sidebar {
  position: sticky;
  top: 18px;
  padding: 14px 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(73, 105, 173, 0.45);
  background: rgba(9, 16, 32, 0.78);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
}
.sidebar-heading {
  margin: 0 0 12px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(148, 172, 218, 0.75);
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidebar-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  margin: 0;
  padding: 11px 12px 11px 9px;
  border-radius: 10px;
  border: 1px solid transparent;
  border-left: 3px solid transparent;
  background: rgba(15, 26, 52, 0.35);
  color: #cfe0ff;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}
.sidebar-item:hover {
  background: rgba(24, 44, 86, 0.55);
  border-color: rgba(90, 128, 190, 0.35);
}
.sidebar-item.active {
  border-color: rgba(106, 166, 255, 0.45);
  border-left-color: #6aa6ff;
  background: linear-gradient(90deg, rgba(47, 95, 212, 0.38), rgba(18, 32, 62, 0.55));
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
}
.sidebar-item-main {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(120, 170, 255, 0.35);
  flex-shrink: 0;
}
.sidebar-item.active .sidebar-dot {
  background: radial-gradient(circle at 30% 30%, #d4ecff, #5ca9ff);
  box-shadow: 0 0 12px rgba(120, 190, 255, 0.55);
}
.sidebar-item-label {
  font-size: 15px;
  font-weight: 600;
}
.sidebar-item-desc {
  margin-left: 18px;
  font-size: 12px;
  color: rgba(155, 176, 215, 0.88);
  line-height: 1.35;
}
.sidebar-memo {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(74, 105, 165, 0.38);
}
.sidebar-memo-heading {
  margin: 0 0 4px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(148, 172, 218, 0.88);
}
.sidebar-memo-hint {
  margin: 0 0 10px 8px;
  font-size: 11px;
  line-height: 1.35;
}
.sidebar-memo-list {
  list-style: none;
  margin: 0;
  padding: 0 4px 0 0;
  max-height: min(42vh, 340px);
  overflow-y: auto;
}
.sidebar-memo-item {
  padding: 9px 8px;
  margin-bottom: 6px;
  border-radius: 8px;
  background: rgba(12, 22, 44, 0.55);
  border: 1px solid rgba(58, 88, 140, 0.38);
}
.sidebar-memo-empty {
  padding: 10px 8px;
  font-size: 12px;
  font-style: italic;
  list-style: none;
}
.sidebar-memo-num {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #c8dcff;
  font-variant-numeric: tabular-nums;
}
.sidebar-memo-line-title {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(188, 206, 238, 0.92);
}
.app-content {
  min-width: 0;
}
.app-view {
  margin-bottom: 8px;
}
@media (max-width: 860px) {
  .app-body {
    grid-template-columns: 1fr;
  }
  .app-sidebar {
    position: static;
  }
  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
  .sidebar-item {
    flex: 1 1 calc(50% - 6px);
    min-width: min(160px, 100%);
  }
}
.grid-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}
.card {
  background: rgba(9, 16, 32, 0.72);
  border: 1px solid rgba(73, 105, 173, 0.5);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  padding: 16px;
  margin-bottom: 16px;
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
label {
  display: block;
  margin-bottom: 8px;
  color: #bfd0f2;
}
input,
textarea,
select {
  width: 100%;
  margin-top: 4px;
  padding: 8px;
  box-sizing: border-box;
  border-radius: 8px;
  border: 1px solid #37517f;
  background: #0f1d38;
  color: #ebf2ff;
}
textarea {
  min-height: 100px;
}
button {
  margin-right: 8px;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #4e73b8;
  background: #2f5fd4;
  color: #fff;
  cursor: pointer;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid #3a5383;
  background: #132544;
}
.status-ok {
  background: rgba(37, 130, 79, 0.3);
  border-color: #2ea46a;
}
.status-ko {
  background: rgba(148, 51, 54, 0.35);
  border-color: #d15462;
}
.status-idle {
  background: rgba(47, 76, 134, 0.25);
  border-color: #4f73ba;
}
.muted {
  color: #9bb0d7;
}
.actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.chat-card {
  min-height: 0;
  padding-bottom: 12px;
  position: relative;
  background: rgba(7, 13, 26, 0.88);
  border-color: rgba(94, 128, 196, 0.62);
}
.chat-card-heading {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.chat-card-badge {
  flex-shrink: 0;
  width: 11px;
  height: 11px;
  margin-top: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #d4ecff, #5ca9ff 45%, #2a5cb8);
  box-shadow:
    0 0 20px rgba(120, 190, 255, 0.65),
    0 0 40px rgba(80, 140, 255, 0.25);
  animation: chat-pulse 3.2s ease-in-out infinite;
}
@keyframes chat-pulse {
  0%,
  100% {
    opacity: 1;
    box-shadow:
      0 0 18px rgba(120, 190, 255, 0.55),
      0 0 36px rgba(80, 140, 255, 0.2);
  }
  50% {
    opacity: 0.92;
    box-shadow:
      0 0 26px rgba(140, 210, 255, 0.75),
      0 0 48px rgba(100, 170, 255, 0.35);
  }
}
.chat-card-heading-text {
  min-width: 0;
}
.chat-card-title {
  margin: 0 0 6px;
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #eef5ff;
  text-shadow: 0 1px 24px rgba(100, 160, 255, 0.25);
}
.chat-card-lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  max-width: 52ch;
}
.dify-frame-shell {
  margin-top: 2px;
  border-radius: 20px;
  padding: 2px;
  background: linear-gradient(
    145deg,
    rgba(120, 180, 255, 0.55) 0%,
    rgba(55, 95, 190, 0.4) 42%,
    rgba(100, 170, 255, 0.35) 100%
  );
  box-shadow:
    0 0 0 1px rgba(106, 166, 255, 0.12) inset,
    0 28px 56px rgba(0, 0, 0, 0.5),
    0 0 100px rgba(70, 130, 230, 0.1);
}
.dify-frame-inner {
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(6, 11, 22, 0.995), rgba(4, 8, 16, 0.995));
  backdrop-filter: blur(8px);
  box-shadow:
    0 2px 20px rgba(0, 0, 0, 0.45) inset,
    0 0 0 1px rgba(120, 160, 230, 0.12) inset;
}
.dify-chat {
  height: min(62vh, 680px);
  min-height: 360px;
  max-height: 680px;
  display: grid;
  grid-template-rows: 1fr auto;
}
.dify-messages {
  overflow-y: auto;
  padding: 14px;
  display: grid;
  gap: 10px;
  align-content: start;
  background: radial-gradient(circle at 50% 0%, rgba(28, 46, 90, 0.22), rgba(6, 12, 24, 0.85) 45%, rgba(3, 7, 15, 0.94));
}
.dify-msg-row {
  display: flex;
  align-items: flex-start;
}
.dify-msg-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.dify-msg-user {
  justify-content: flex-end;
}
.dify-msg-assistant {
  justify-content: flex-start;
}
.dify-msg-user .dify-msg-stack {
  align-items: flex-end;
}
.dify-msg-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgba(178, 202, 244, 0.9);
  padding: 0;
}
.dify-msg-label::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(137, 186, 255, 0.75);
  box-shadow: 0 0 6px rgba(120, 180, 255, 0.35);
}
.dify-msg-user .dify-msg-label {
  color: rgba(225, 238, 255, 0.95);
}
.dify-msg-user .dify-msg-label::before {
  background: rgba(218, 235, 255, 0.9);
  box-shadow: 0 0 6px rgba(160, 210, 255, 0.4);
}
.dify-msg-bubble {
  display: inline-block;
  align-self: flex-start;
  width: fit-content;
  max-width: min(90%, 760px);
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid rgba(70, 104, 175, 0.45);
  background: rgba(20, 34, 64, 0.88);
  color: #e8f0ff;
}
.dify-msg-bubble p {
  margin: 0 0 8px;
}
.dify-msg-bubble p:last-child {
  margin-bottom: 0;
}
.dify-msg-bubble ul,
.dify-msg-bubble ol {
  margin: 4px 0 8px 20px;
  padding: 0;
}
.dify-msg-bubble li {
  margin: 3px 0;
}
.dify-msg-bubble hr {
  border: none;
  border-top: 1px solid rgba(112, 146, 210, 0.35);
  margin: 10px 0;
}
.dify-msg-bubble h1,
.dify-msg-bubble h2,
.dify-msg-bubble h3,
.dify-msg-bubble h4 {
  margin: 2px 0 8px;
  font-size: 15px;
  line-height: 1.35;
}
.dify-msg-bubble code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(13, 24, 49, 0.8);
  border: 1px solid rgba(80, 118, 187, 0.4);
}
.dify-msg-bubble table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0;
  font-size: 12px;
  border-radius: 8px;
  overflow: hidden;
}
.dify-msg-bubble th,
.dify-msg-bubble td {
  border: 1px solid rgba(90, 126, 192, 0.35);
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}
.dify-msg-bubble thead th {
  background: rgba(45, 78, 146, 0.45);
  color: #eff5ff;
  font-weight: 600;
}
.dify-msg-bubble tbody tr:nth-child(odd) td {
  background: rgba(22, 38, 72, 0.55);
}
.dify-msg-bubble tbody tr:nth-child(even) td {
  background: rgba(17, 31, 60, 0.55);
}
.dify-msg-user .dify-msg-bubble {
  background: rgba(44, 88, 190, 0.78);
  border-color: rgba(112, 165, 255, 0.55);
}
.dify-msg-bubble.dify-thinking {
  position: relative;
  padding-right: 40px;
}
.dify-msg-bubble.dify-thinking::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(205, 226, 255, 0.95);
  transform: translateY(-50%);
  box-shadow:
    -10px 0 0 rgba(205, 226, 255, 0.35),
    10px 0 0 rgba(205, 226, 255, 0.35);
  animation: dify-thinking-dots 1s ease-in-out infinite;
}
@keyframes dify-thinking-dots {
  0% {
    opacity: 0.35;
    box-shadow:
      -10px 0 0 rgba(205, 226, 255, 0.25),
      10px 0 0 rgba(205, 226, 255, 0.25);
  }
  50% {
    opacity: 1;
    box-shadow:
      -10px 0 0 rgba(205, 226, 255, 0.95),
      10px 0 0 rgba(205, 226, 255, 0.95);
  }
  100% {
    opacity: 0.35;
    box-shadow:
      -10px 0 0 rgba(205, 226, 255, 0.25),
      10px 0 0 rgba(205, 226, 255, 0.25);
  }
}
.dify-composer {
  border-top: 1px solid rgba(70, 104, 175, 0.35);
  padding: 10px;
  display: flex;
  gap: 8px;
  background: rgba(7, 14, 28, 0.92);
}
.dify-input {
  flex: 1;
  margin: 0;
}
.dify-send-btn {
  margin: 0;
  flex-shrink: 0;
  padding: 8px 12px;
}
.dify-send-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.dify-input:disabled {
  opacity: 0.75;
}
.dify-embed {
  width: 100%;
  height: 84vh;
  min-height: 520px;
  border: none;
  display: block;
}
.ticket-filters-help {
  margin: 0 0 10px;
  font-size: 13px;
}
.ticket-limit-note {
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(90, 128, 190, 0.35);
  background: rgba(12, 22, 44, 0.55);
  font-size: 13px;
}
.ticket-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.filter-pill {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(78, 115, 184, 0.55);
  background: rgba(18, 32, 62, 0.65);
  color: #cfe0ff;
  font-size: 13px;
  cursor: pointer;
  line-height: 1.2;
}
.filter-pill .pill-count {
  display: inline-block;
  min-width: 1.25em;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(55, 92, 160, 0.45);
  color: #e8f0ff;
}
.filter-pill:hover {
  border-color: rgba(120, 160, 230, 0.75);
  background: rgba(24, 44, 86, 0.75);
}
.filter-pill.active {
  border-color: #6aa6ff;
  background: rgba(47, 95, 212, 0.35);
  box-shadow: 0 0 0 1px rgba(106, 166, 255, 0.25);
}
.filter-pill-muted {
  opacity: 0.85;
}
.tickets-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}
.ticket-item {
  border: 1px solid #355792;
  background: rgba(20, 34, 64, 0.5);
  border-radius: 10px;
  padding: 8px;
}
.ticket-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.ticket-head-main {
  min-width: 0;
  flex: 1;
}
.ticket-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 10px;
  margin-bottom: 2px;
}
.ticket-ref {
  font-weight: 700;
  font-size: 14px;
  color: #b8d4ff;
  font-variant-numeric: tabular-nums;
}
.ticket-kind-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 7px;
}
.ticket-kind-incident {
  background: rgba(210, 95, 35, 0.42);
  border: 1px solid rgba(255, 150, 75, 0.65);
  color: #ffe8d4;
}
.ticket-kind-demande {
  background: rgba(35, 145, 95, 0.38);
  border: 1px solid rgba(85, 205, 140, 0.55);
  color: #d4f5e5;
}
.ticket-title-text {
  flex: 1 1 180px;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  color: #eef4ff;
  line-height: 1.35;
}
.ticket-desc-preview {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(74, 105, 165, 0.38);
  font-size: 13px;
  line-height: 1.45;
  color: rgba(198, 216, 250, 0.9);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  overflow: hidden;
}
.ticket-desc-empty {
  font-style: italic;
}
.ticket-status {
  flex-shrink: 0;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #4f73ba;
}
.ticket-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(74, 105, 165, 0.38);
}
@media (max-width: 560px) {
  .ticket-dates {
    grid-template-columns: 1fr;
  }
}
.ticket-date-block {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.ticket-date-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(148, 172, 218, 0.92);
}
.ticket-date-value {
  font-size: 14px;
  font-weight: 500;
  color: #e8f0ff;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 1250px) {
  .grid-layout {
    grid-template-columns: 1fr;
  }
  .chat-card {
    min-height: auto;
  }
  .dify-chat,
  .dify-embed {
    height: 56vh;
    min-height: 360px;
  }
}
