/* Legacy application components extracted from views/layout.php. */
:root {
  --bg: #0b1220;
  --card: rgba(255, 255, 255, 0.06);
  --muted: #9db0d0;
  --text: #e9f0ff;
  --accent: #00aeef;
  --border: rgba(255, 255, 255, 0.12);
  --danger: #ff6b6b;
  --ok: #34d399;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

body[data-theme='light'] {
  --bg: #f5f7fb;
  --card: rgba(0, 0, 0, 0.06);
  --muted: #4a5873;
  --text: #0b1220;
  --border: rgba(0, 0, 0, 0.12);
  --shadow: 0 12px 26px rgba(10, 18, 32, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    'Aeonik Pro',
    Aeonik,
    -apple-system,
    system-ui,
    Segoe UI,
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px;
}

.card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.card.flat {
  box-shadow: none;
}

.section {
  margin-top: 14px;
}

.app {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
  align-items: start;
}

.brand {
  font-weight: 800;
  letter-spacing: 0.2px;
}

.brand-logo {
  display: block;
  width: 100%;
  max-width: 210px;
  height: auto;
}

.sidebar {
  position: sticky;
  top: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: var(--shadow);
  padding: 14px;
}

.sidehead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.userchip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.12);
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  flex: 0 0 auto;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mini-avatar {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.12);
  overflow: hidden;
  flex: 0 0 auto;
}

body[data-theme='light'] .mini-avatar {
  background: rgba(255, 255, 255, 0.75);
}

.mini-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.name-with-avatar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

/* AI chat */
.chat-workspace {
  display: flex;
  gap: 0;
  height: min(720px, calc(100vh - 220px));
  min-height: 420px;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: var(--shadow);
}

.chat-sidebar {
  width: 240px;
  flex: 0 0 240px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.12);
  min-height: 0;
}

body[data-theme='light'] .chat-sidebar {
  background: rgba(255, 255, 255, 0.55);
}

.chat-sidebar-head {
  height: 69px;
  padding: 12px;
  min-height: 69px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: center;
}

.chat-sidebar-head .btn {
  flex: 1 1 auto;
  text-align: center;
  border-radius: 12px;
}

.chat-conv-list {
  flex: 1 1 auto;
  overflow: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-conv-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  color: var(--text);
  text-align: left;
  background: transparent;
  width: 100%;
}

.chat-conv-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.chat-conv-item.is-active {
  background: rgba(0, 174, 239, 0.12);
  border-color: rgba(0, 174, 239, 0.28);
}

.chat-conv-item-body {
  flex: 1 1 auto;
  min-width: 0;
}

.chat-conv-title {
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-conv-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

.chat-conv-del {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1;
}

.chat-conv-del:hover {
  color: var(--danger);
  background: rgba(255, 107, 107, 0.12);
}

.chat-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 40;
}

.chat-sidebar-backdrop.is-open {
  display: block;
  z-index: 45;
}

.chat-workspace.is-sidebar-collapsed .chat-sidebar {
  display: none;
}

.chat-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.chat-main-head {
  height: 69px;
  min-height: 69px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-main-head-text {
  flex: 1 1 auto;
  min-width: 0;
}

.chat-main-head h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.chat-main-head .muted {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.chat-sidebar-toggle,
.chat-sidebar-close {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.12);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chat-sidebar-toggle svg,
.chat-sidebar-close svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

.chat-sidebar-toggle.is-active {
  border-color: rgba(0, 174, 239, 0.46);
  background: rgba(0, 174, 239, 0.14);
  color: var(--accent);
}

.chat-sidebar-close {
  display: none;
}

.chat-shell,
.chat-workspace .chat-main {
  height: 100%;
}

.chat-log {
  flex: 1 1 auto;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 12px;
  min-height: 0;
}

.chat-welcome {
  margin: auto;
  max-width: 520px;
  text-align: center;
  padding: 24px 16px;
  color: var(--muted);
}

.chat-welcome strong {
  display: block;
  color: var(--text);
  font-size: 18px;
  margin-bottom: 8px;
}

.chat-row {
  display: flex;
}

.chat-row.me {
  justify-content: flex-end;
}

.chat-row.ai {
  justify-content: flex-start;
}

.chat-bubble {
  max-width: min(720px, 92%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.chat-sources {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(157, 176, 208, 0.35);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.chat-sources-label {
  font-weight: 650;
  color: var(--muted);
  margin-bottom: 4px;
}

.chat-sources-list {
  margin: 0;
  padding-left: 1.15em;
  list-style: disc;
}

.chat-sources-list li {
  margin: 4px 0;
}

.chat-source-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.chat-source-link:hover {
  text-decoration: underline;
}

.chat-actions {
  margin-top: 8px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.chat-actions .pill {
  cursor: pointer;
}

.chat-actions .btn {
  padding: 10px 12px;
  border-radius: 12px;
}

.chat-row.ai .chat-bubble {
  position: relative;
  padding-right: 42px;
}

.chat-speak-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.12);
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
}

.chat-speak-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.chat-speak-btn.is-speaking {
  color: var(--accent);
  border-color: rgba(0, 174, 239, 0.45);
  background: rgba(0, 174, 239, 0.12);
}

.chat-speak-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.chat-row.me .chat-bubble {
  border-color: rgba(0, 174, 239, 0.35);
  background: rgba(0, 174, 239, 0.1);
}

.chat-meta {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 6px;
}

.chat-composer {
  flex: 0 0 auto;
  border-top: 1px solid var(--border);
  padding: 10px 12px 12px;
  display: block;
  background: rgba(0, 0, 0, 0.08);
}

.chat-composer-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.chat-attach-btn {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.12);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.chat-attach-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.chat-control-icon,
.chat-voice-dock-icon svg,
.chat-voice-dock-chevron svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chat-mic-btn.is-recording {
  border-color: rgba(239, 68, 68, 0.65);
  background: rgba(239, 68, 68, 0.18);
  animation: chat-mic-pulse 1.2s ease-in-out infinite;
}

@keyframes chat-mic-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.35);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
  }
}

.chat-attach-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.chat-attach-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 4px 8px 4px 4px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.12);
  font-size: 12px;
}

.chat-attach-chip img {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 6px;
  flex: 0 0 auto;
}

.chat-attach-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 160px;
}

.chat-attach-chip-rm {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 2px;
}

.chat-attach-chip-rm:hover {
  color: var(--danger);
}

.chat-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.chat-attach-img {
  max-width: min(240px, 100%);
  max-height: 180px;
  border-radius: 10px;
  border: 1px solid var(--border);
  object-fit: contain;
  background: rgba(0, 0, 0, 0.15);
}

.chat-attach-file {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.1);
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
}

.chat-attach-file:hover {
  text-decoration: underline;
}

.chat-bubble-text {
  margin-top: 6px;
}

body[data-theme='light'] .chat-composer {
  background: rgba(255, 255, 255, 0.65);
}

.chat-voice-dock {
  flex: 0 0 auto;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.06);
}

.chat-voice-dock-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.chat-voice-dock-toggle:hover {
  background: rgba(255, 255, 255, 0.04);
}

.chat-voice-dock-toggle[aria-expanded='true'] .chat-voice-dock-chevron {
  transform: rotate(180deg);
}

.chat-voice-dock-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chat-voice-dock-label {
  font-weight: 650;
  flex: 1 1 auto;
}

.chat-voice-dock-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: transform 0.15s ease;
}

.chat-voice-dock-chevron svg {
  width: 16px;
  height: 16px;
}

.chat-voice-dock-body {
  padding: 0 14px 14px;
  border-top: 1px dashed rgba(157, 176, 208, 0.25);
}

.chat-voice-dock-hint {
  font-size: 12px;
  margin: 10px 0 12px;
  line-height: 1.45;
}

.chat-voice-call-ui {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 0 14px;
}

.chat-voice-orb {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
  position: relative;
}

.chat-voice-orb::after {
  content: '';
  position: absolute;
  inset: 14px;
  border-radius: 999px;
  background: var(--muted);
  opacity: 0.35;
  transition:
    background 0.2s ease,
    opacity 0.2s ease,
    transform 0.2s ease;
}

.chat-voice-orb[data-state='listening'] {
  border-color: rgba(52, 211, 153, 0.55);
}

.chat-voice-orb[data-state='listening']::after {
  background: #34d399;
  opacity: 0.85;
  animation: chat-voice-pulse 1.4s ease-in-out infinite;
}

.chat-voice-orb[data-state='thinking'] {
  border-color: rgba(0, 174, 239, 0.5);
}

.chat-voice-orb[data-state='thinking']::after {
  background: var(--accent);
  opacity: 0.75;
  animation: chat-voice-pulse 1s ease-in-out infinite;
}

.chat-voice-orb[data-state='speaking'] {
  border-color: rgba(167, 139, 250, 0.55);
}

.chat-voice-orb[data-state='speaking']::after {
  background: #a78bfa;
  opacity: 0.8;
  animation: chat-voice-pulse 0.9s ease-in-out infinite;
}

@keyframes chat-voice-pulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.08);
  }
}

.chat-voice-call-status {
  font-weight: 650;
  font-size: 14px;
  text-align: center;
}

.chat-voice-call-sub {
  font-size: 12px;
  text-align: center;
  min-height: 1.2em;
}

.chat-voice-dock-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.chat-voice-dock.is-active .chat-voice-dock-toggle {
  color: var(--accent);
}

body[data-theme='light'] .chat-voice-dock {
  background: rgba(255, 255, 255, 0.5);
}

.chat-composer-inner {
  flex: 1 1 auto;
  min-width: 0;
}

.chat-composer-status {
  min-height: 0;
  margin-top: 6px;
  font-size: 12px;
}

.chat-composer-status:empty {
  display: none;
}

.chat-composer textarea {
  display: block;
  min-height: 46px;
  max-height: 160px;
  resize: none;
}

.chat-composer #chat_send {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 999px;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.typing i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(157, 176, 208, 0.85);
  display: inline-block;
  animation: bounce 1.2s infinite ease-in-out;
}

.typing i:nth-child(2) {
  animation-delay: 0.15s;
  opacity: 0.8;
}

.typing i:nth-child(3) {
  animation-delay: 0.3s;
  opacity: 0.65;
}

@keyframes bounce {
  0%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-4px);
  }
}

/* AI chat: hibajegy varázsló cikkszám javaslatok */
.chat-wizard-sku-suggest {
  display: none;
  margin-top: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  max-height: 220px;
  overflow: auto;
  font-size: 13px;
}

.chat-wizard-sku-suggest.is-open {
  display: block;
}

.chat-wizard-sku-suggest .sku-row {
  padding: 8px 10px;
  cursor: pointer;
  border-radius: 10px;
}

.chat-wizard-sku-suggest .sku-row:hover {
  background: rgba(0, 174, 239, 0.12);
}

.chat-wizard-sku-suggest .sku-row .sku-main {
  font-weight: 700;
}

.chat-wizard-sku-suggest .sku-row .sku-sub {
  font-size: 12px;
  margin-top: 2px;
  color: var(--muted);
}

/* AI tudásbázis böngésző */
.kb-browser-head {
  margin-bottom: 12px;
}

.kb-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  margin: 0 0 14px;
  color: var(--muted);
}

.kb-crumb a {
  color: var(--accent);
  text-decoration: none;
}

.kb-crumb a:hover {
  text-decoration: underline;
}

.kb-crumb-sep {
  opacity: 0.5;
}

.kb-toolbar {
  margin-bottom: 14px;
}

.kb-search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.kb-search-form input[type='search'] {
  flex: 1 1 200px;
  min-width: 0;
}

#kb-live-results.kb-search-results {
  margin-top: 12px;
  margin-bottom: 0;
}

.kb-search-loading {
  font-size: 13px;
}

.kb-search-clear[hidden] {
  display: none !important;
}

.kb-admin-panel {
  margin: 14px 0;
  padding: 12px;
}

.kb-admin-details summary {
  cursor: pointer;
  font-weight: 650;
}

.kb-admin-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 12px;
}

.kb-admin-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

.log-filters {
  margin-bottom: 14px;
  padding: 14px;
}

.log-filters label {
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
  color: var(--muted);
}

.log-table td {
  vertical-align: top;
}

.log-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.log-pill--auth {
  border-color: rgba(52, 211, 153, 0.35);
  color: #34d399;
}

.log-pill--kb {
  border-color: rgba(0, 174, 239, 0.35);
  color: var(--accent);
}

.log-pill--ticket {
  border-color: rgba(250, 204, 21, 0.35);
  color: #facc15;
}

.log-pill--ai_chat {
  border-color: rgba(167, 139, 250, 0.35);
  color: #a78bfa;
}

.log-pill--admin {
  border-color: rgba(248, 113, 113, 0.35);
  color: #f87171;
}

.log-pill--ocr {
  border-color: rgba(251, 146, 60, 0.35);
  color: #fb923c;
}

body[data-theme='light'] .log-pill {
  background: rgba(15, 23, 42, 0.04);
}

.kb-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
}

.kb-section-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.kb-section-count {
  font-size: 12px;
}

.kb-folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.kb-folder-card {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  overflow: visible;
  transition:
    border-color 0.15s,
    background 0.15s,
    transform 0.15s;
}

.kb-folder-card:hover {
  border-color: rgba(0, 174, 239, 0.4);
  background: rgba(255, 255, 255, 0.05);
}

.kb-folder-face {
  flex: 0 0 88px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-decoration: none;
  color: inherit;
  padding: 14px 10px 12px;
  background: linear-gradient(165deg, rgba(0, 174, 239, 0.18), transparent 60%), rgba(0, 0, 0, 0.2);
  border-radius: 15px 0 0 15px;
  overflow: hidden;
}

.kb-folder-card.kb-tone-1 .kb-folder-face {
  background: linear-gradient(165deg, rgba(56, 189, 248, 0.2), transparent 60%), rgba(0, 0, 0, 0.2);
}

.kb-folder-card.kb-tone-2 .kb-folder-face {
  background:
    linear-gradient(165deg, rgba(52, 211, 153, 0.18), transparent 60%), rgba(0, 0, 0, 0.2);
}

.kb-folder-card.kb-tone-3 .kb-folder-face {
  background:
    linear-gradient(165deg, rgba(167, 139, 250, 0.18), transparent 60%), rgba(0, 0, 0, 0.2);
}

.kb-folder-tab {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 28px;
  height: 8px;
  border-radius: 4px 6px 0 0;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}

.kb-folder-body {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 54px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.kb-folder-mono {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.88);
}

.kb-folder-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px 12px 12px;
}

.kb-folder-title {
  display: block;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.kb-folder-title:hover {
  color: var(--accent);
}

.kb-folder-meta {
  font-size: 12px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kb-folder-card .kb-card-actions-row {
  margin-top: auto;
}

.kb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 0;
}

.kb-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  padding: 0;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  overflow: hidden;
  transition:
    border-color 0.15s,
    transform 0.15s,
    background 0.15s;
}

.kb-card:hover {
  border-color: rgba(0, 174, 239, 0.35);
  background: rgba(255, 255, 255, 0.045);
}

.kb-card-preview {
  display: block;
  position: relative;
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(160deg, rgba(0, 174, 239, 0.12), transparent 55%), rgba(0, 0, 0, 0.22);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.kb-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.kb-card-preview.is-fallback .kb-card-thumb {
  display: none;
}

.kb-card-preview-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 1;
}

.kb-card-preview--file .kb-card-preview-badge,
.kb-card-preview--pdf.is-fallback .kb-card-preview-badge {
  left: 50%;
  bottom: auto;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.35);
}

.kb-card-content {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.kb-card-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  text-decoration: none;
  word-break: break-word;
  overflow-wrap: anywhere;
  min-width: 0;
}

.kb-card-title:hover {
  color: var(--accent);
}

.kb-card-meta {
  font-size: 12px;
  line-height: 1.35;
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  align-items: baseline;
  min-width: 0;
  overflow: hidden;
}

.kb-card-meta-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kb-card-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: auto;
}

.kb-card-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
}

.kb-icon {
  font-size: 28px;
  line-height: 1;
  flex: 0 0 auto;
}

.kb-sort-hint {
  font-size: 12px;
  color: var(--muted);
  margin: 14px 0 0;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px dashed var(--border);
}

.kb-card.kb-sortable-item,
.kb-folder-card.kb-sortable-item {
  cursor: grab;
  touch-action: pan-y;
}

.kb-card.kb-sortable-item.kb-sort-chosen,
.kb-folder-card.kb-sortable-item.kb-sort-chosen {
  cursor: grabbing;
}

.kb-card.kb-sort-ghost,
.kb-folder-card.kb-sort-ghost {
  opacity: 0.45;
  border-style: dashed;
}

.kb-card.kb-sortable-item .pill,
.kb-card.kb-sortable-item button,
.kb-card.kb-sortable-item summary,
.kb-folder-card.kb-sortable-item .pill,
.kb-folder-card.kb-sortable-item button,
.kb-folder-card.kb-sortable-item summary {
  cursor: pointer;
}

body[data-theme='light'] .kb-folder-face {
  background:
    linear-gradient(165deg, rgba(0, 174, 239, 0.14), transparent 60%), rgba(15, 23, 42, 0.06);
}

body[data-theme='light'] .kb-folder-mono {
  color: rgba(15, 23, 42, 0.78);
}

body[data-theme='light'] .kb-folder-body {
  border-color: rgba(15, 23, 42, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.55));
}

body[data-theme='light'] .kb-folder-tab {
  background: rgba(15, 23, 42, 0.18);
}

.kb-dropzone {
  margin: 14px 0 0;
  padding: 28px 20px;
  border: 2px dashed var(--border);
  border-radius: 16px;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  transition:
    border-color 0.15s,
    background 0.15s;
}

.kb-dropzone.is-dragover {
  border-color: var(--accent);
  background: rgba(0, 174, 239, 0.08);
}

.kb-dropzone-title {
  font-weight: 700;
  margin: 0 0 6px;
}

.kb-dropzone-lead {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.kb-dropzone-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.kb-dropzone-btn {
  margin: 0;
}

.kb-upload-queue {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kb-upload-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.03);
}

.kb-upload-item-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kb-upload-item-status {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.kb-upload-item.is-ok .kb-upload-item-status {
  color: var(--ok);
}

.kb-upload-item.is-err .kb-upload-item-status {
  color: var(--danger);
}

.kb-upload-item.is-busy .kb-upload-item-status {
  color: var(--accent);
}

.kb-reorder-toast {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 1200;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  background: rgba(52, 211, 153, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.kb-reorder-toast.is-visible {
  opacity: 1;
}

.kb-reorder-toast.is-error {
  background: rgba(255, 107, 107, 0.12);
  border-color: rgba(255, 107, 107, 0.35);
}

.kb-mini-menu {
  position: relative;
}

.kb-mini-menu summary {
  cursor: pointer;
  list-style: none;
}

.kb-mini-menu summary::-webkit-details-marker {
  display: none;
}

.kb-mini-menu[open] summary {
  background: rgba(255, 255, 255, 0.06);
}

.kb-mini-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  width: min(260px, calc(100vw - 48px));
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  box-shadow: var(--shadow);
}

.kb-mini-menu form {
  min-width: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kb-mini-menu form + form {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.kb-mini-menu form .btn {
  width: 100%;
}

.kb-empty {
  padding: 24px;
  text-align: center;
  margin-top: 14px;
}

.kb-empty strong {
  display: block;
  margin-bottom: 8px;
  font-size: 17px;
}

.kb-search-results {
  margin-bottom: 18px;
}

.kb-search-results-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 14px;
}

.kb-search-hits {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kb-search-hit {
  display: block;
  text-decoration: none;
  color: var(--text);
  padding: 12px 14px;
  transition:
    border-color 0.15s,
    background 0.15s;
}

.kb-search-hit:hover {
  border-color: rgba(0, 174, 239, 0.45);
  background: rgba(0, 174, 239, 0.06);
}

.kb-search-hit-title {
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 4px;
}

.kb-search-hit-meta {
  font-size: 12px;
  margin-bottom: 8px;
}

.kb-search-hit-snippet {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  word-break: break-word;
}

.kb-search-hit-snippet mark.kb-hl,
.kb-doc-body mark.kb-hl {
  background: rgba(250, 204, 21, 0.35);
  color: inherit;
  padding: 0 2px;
  border-radius: 3px;
}

.kb-search-empty {
  padding: 14px;
  margin-bottom: 14px;
}

.ticket-kb-hints {
  margin-top: 10px;
  border: 1px solid rgba(0, 174, 239, 0.35);
  border-radius: 14px;
  background: rgba(0, 174, 239, 0.06);
  padding: 12px 14px;
}

.ticket-kb-hints[hidden] {
  display: none !important;
}

.ticket-kb-hints-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.ticket-kb-hints-loading {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

.ticket-kb-hints .kb-search-hits {
  gap: 6px;
}

.ticket-kb-hints .kb-search-hit {
  padding: 10px 12px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.ticket-kb-hints .kb-search-hit:hover {
  border-color: rgba(0, 174, 239, 0.45);
  background: rgba(0, 174, 239, 0.08);
}

.ticket-kb-hints .kb-search-hit-snippet {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kb-chunk {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.kb-chunk:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.kb-chunk-focus {
  border-left: 3px solid var(--accent);
  padding-left: 10px;
  background: rgba(0, 174, 239, 0.05);
  border-radius: 0 8px 8px 0;
}

.textLayer span.kb-hl-pdf {
  background: rgba(255, 230, 0, 0.72) !important;
  color: transparent !important;
  border-radius: 2px;
  box-shadow: 0 0 0 2px rgba(255, 200, 0, 0.45);
}

mark.kb-hl {
  background: rgba(255, 230, 0, 0.55);
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}

/* Dokumentum webes megjelenítő */
.kb-viewer-shell {
  overflow: hidden;
}

.kb-viewer-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.kb-viewer-head-text {
  min-width: 0;
  flex: 1 1 200px;
}

.kb-viewer-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kb-viewer-search-banner {
  margin-bottom: 12px;
  padding: 10px 12px;
  font-size: 13px;
  border-color: rgba(0, 174, 239, 0.25);
  background: rgba(0, 174, 239, 0.06);
}

.kb-viewer-frame {
  padding: 0;
  overflow: hidden;
  min-height: 320px;
  max-height: 78vh;
  display: flex;
  flex-direction: column;
}

.kb-viewer-status {
  padding: 20px;
  text-align: center;
  font-size: 14px;
}

.kb-viewer {
  flex: 1 1 auto;
  overflow: auto;
  background: rgba(0, 0, 0, 0.18);
}

.kb-text-viewer {
  padding: 20px 24px;
  max-width: 900px;
  margin: 0 auto;
}

.kb-text-plain {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.kb-markdown-body,
.kb-docx-body {
  line-height: 1.65;
  font-size: 15px;
  color: var(--text);
}

.kb-markdown-body h1,
.kb-markdown-body h2,
.kb-docx-body h1,
.kb-docx-body h2 {
  margin: 1.2em 0 0.5em;
}

.kb-markdown-body p,
.kb-docx-body p {
  margin: 0 0 0.85em;
}

.kb-markdown-body ul,
.kb-docx-body ul {
  margin: 0 0 0.85em 1.2em;
}

.kb-pdf-stage {
  padding: 16px 12px 24px;
}

.kb-viewer-pdfjs {
  padding: 0;
  overflow: hidden;
  background: #323639;
  min-height: 72vh;
}

.kb-pdfjs-iframe {
  display: block;
  width: 100%;
  height: 72vh;
  min-height: 520px;
  border: 0;
}

.kb-pdf-page {
  position: relative;
  margin: 0 auto 16px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
  background: #fff;
}

.kb-pdf-canvas {
  display: block;
  width: 100%;
  height: auto;
}

.kb-pdf-text-layer {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  opacity: 1;
  line-height: 1;
}

.kb-pdf-text-layer span {
  color: transparent !important;
  position: absolute;
  white-space: pre;
  transform-origin: 0 0;
  cursor: text;
}

.kb-text-viewer mark.kb-hl,
.kb-markdown-body mark.kb-hl,
.kb-docx-body mark.kb-hl,
.kb-doc-body mark.kb-hl {
  background: rgba(250, 204, 21, 0.55);
  color: inherit;
  border-radius: 2px;
  box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.35);
}

/* PDF: csak háttérkiemelés — a szöveg átlátszó marad, hogy ne duplázódjon a vászon szövege */
.kb-pdf-text-layer span.kb-hl {
  color: transparent !important;
  background: rgba(250, 204, 21, 0.45);
  border-radius: 2px;
  box-shadow: none;
}

@media (max-width: 640px) {
  .kb-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .kb-folder-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .kb-folder-face {
    flex-basis: 76px;
  }

  .kb-card-preview {
    aspect-ratio: 16 / 10;
  }

  .kb-search-form .btn,
  .kb-search-form .pill {
    width: 100%;
    text-align: center;
  }

  .kb-card-actions {
    position: static;
    align-self: flex-end;
  }

  .kb-card-actions-row .pill {
    flex: 1 1 auto;
    text-align: center;
    justify-content: center;
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  .kb-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kb-folder-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.sparkbar {
  position: relative;
  cursor: default;
}

.sparkbar:hover::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(100% + 8px);
  background: rgba(0, 0, 0, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 10px;
  white-space: nowrap;
  z-index: 50;
  pointer-events: none;
}

body[data-theme='light'] .sparkbar:hover::after {
  background: rgba(11, 18, 32, 0.92);
  border-color: rgba(0, 0, 0, 0.16);
}

.userchip .who {
  font-weight: 750;
}

.userchip details {
  min-width: 0;
}

.userchip summary {
  min-width: 0;
}

.userchip .who {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.08);
  color: var(--muted);
  text-decoration: none;
}

.nav a:hover {
  background: rgba(0, 0, 0, 0.12);
  color: var(--text);
  text-decoration: none;
}

.nav a.is-active {
  background: rgba(0, 174, 239, 0.12);
  border-color: rgba(0, 174, 239, 0.32);
  color: var(--text);
  box-shadow: inset 3px 0 0 var(--accent);
}

.nav a .muted {
  font-size: 12px;
}

.nav a .left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
  color: currentColor;
}

.icon svg {
  width: 18px;
  height: 18px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(0, 174, 239, 0.16);
  border: 1px solid rgba(0, 174, 239, 0.3);
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
}

.toprow {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bell {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.08);
  color: var(--muted);
  text-decoration: none;
  display: grid;
  place-items: center;
  position: relative;
}

.bell:hover {
  background: rgba(0, 0, 0, 0.12);
  color: var(--text);
}

.bell .badge-count {
  position: absolute;
  top: 4px;
  right: 4px;
  transform: none;
}

.main {
  min-width: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
  font-size: 14px;
  color: var(--muted);
}

summary.pill {
  list-style: none;
}

summary.pill::-webkit-details-marker {
  display: none;
}

label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

input,
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  outline: none;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.row > * {
  flex: 1;
  min-width: 220px;
}

.btn {
  display: inline-block;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(105, 167, 255, 0.14);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  background: rgba(105, 167, 255, 0.22);
  text-decoration: none;
}

.btn-primary {
  background: rgba(0, 174, 239, 0.22);
  border-color: rgba(0, 174, 239, 0.45);
}

.btn-primary:hover {
  background: rgba(0, 174, 239, 0.32);
}

.btn-ghost {
  background: rgba(0, 0, 0, 0.08);
  color: var(--muted);
}

.btn-ghost:hover {
  background: rgba(0, 0, 0, 0.14);
  color: var(--text);
}

body[data-theme='light'] .btn-ghost {
  background: rgba(255, 255, 255, 0.55);
}

.page-shell {
  padding: 24px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.page-title {
  margin: 0;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: 0.2px;
}

.page-lead {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.45;
}

.page-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.toolbar {
  padding: 18px 0;
  margin: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.toolbar-form .row {
  align-items: flex-end;
  margin: 0;
}

.toolbar-form .toolbar-actions {
  flex: 0 0 auto;
  min-width: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.1);
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.chip:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.16);
  text-decoration: none;
}

.chip.is-active {
  background: rgba(0, 174, 239, 0.16);
  border-color: rgba(0, 174, 239, 0.38);
  color: var(--text);
}

body[data-theme='light'] .chip {
  background: rgba(255, 255, 255, 0.5);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid transparent;
  white-space: nowrap;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.stat-card {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.08);
}

body[data-theme='light'] .stat-card {
  background: rgba(255, 255, 255, 0.6);
}

.stat-card .meta {
  margin: 0;
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  margin-top: 8px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.stat-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.section-title {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 700;
}

.page-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.empty-state {
  text-align: center;
  padding: 44px 24px;
  border: 1px dashed var(--border);
  border-radius: 14px;
}

.empty-state p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 15px;
}

.data-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

body[data-theme='light'] .data-table tbody tr:hover td {
  background: rgba(0, 0, 0, 0.02);
}

.ticket-card.is-unread {
  border-color: rgba(255, 107, 107, 0.38);
}

.main footer {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.page-eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ticket-header-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.ticket-section {
  margin-top: 0;
}

.ticket-section + .ticket-section {
  margin-top: 28px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px 18px;
}

.field-item label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--muted);
}

.field-value {
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px 18px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.info-item label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--muted);
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.comment-item {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.08);
}

body[data-theme='light'] .comment-item {
  background: rgba(255, 255, 255, 0.55);
}

.comment-item--internal {
  border-color: rgba(0, 174, 239, 0.28);
  background: rgba(0, 174, 239, 0.06);
}

.comment-meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.comment-meta strong {
  color: var(--text);
  font-weight: 650;
}

.comment-body {
  white-space: pre-wrap;
  line-height: 1.5;
  font-size: 15px;
}

.form-panel {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.45;
  cursor: pointer;
}

.form-check input[type='checkbox'] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  margin-top: 2px;
  padding: 0;
  flex: 0 0 16px;
  accent-color: var(--accent);
}

.attach-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.attach-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.06);
  text-decoration: none;
  color: var(--text);
}

.attach-item:hover {
  background: rgba(0, 0, 0, 0.1);
  text-decoration: none;
}

body[data-theme='light'] .attach-item {
  background: rgba(255, 255, 255, 0.5);
}

.attach-item .muted {
  font-size: 12px;
  white-space: nowrap;
}

.subsection {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.subsection:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.subsection-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
}

.notif-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notif-item {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.06);
}

body[data-theme='light'] .notif-item {
  background: rgba(255, 255, 255, 0.55);
}

.notif-item.is-unread {
  border-color: rgba(0, 174, 239, 0.35);
  background: rgba(0, 174, 239, 0.08);
  box-shadow: inset 3px 0 0 var(--accent);
}

.notif-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.notif-title {
  font-weight: 750;
  font-size: 15px;
  line-height: 1.35;
}

.notif-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.4;
}

.notif-body {
  margin-top: 10px;
  white-space: pre-wrap;
  line-height: 1.5;
  font-size: 14px;
  color: var(--text);
}

.empty-hint {
  color: var(--muted);
  font-size: 14px;
  margin: 4px 0 0;
}

.page-shell--narrow {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-shell--form {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.page-header + .page-section {
  margin-top: 16px;
  padding-top: 0;
  border-top: none;
}

.alert-success {
  border: 1px solid rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.08);
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
}

.alert-warn {
  border: 1px solid rgba(250, 204, 21, 0.35);
  background: rgba(250, 204, 21, 0.08);
  padding: 10px 12px;
  border-radius: 10px;
}

.form-field {
  margin-bottom: 12px;
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 14px;
}

.form-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar-lg {
  width: 84px;
  height: 84px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.avatar-placeholder {
  width: 84px;
  height: 84px;
  border-radius: 999px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  flex-shrink: 0;
}

.panel-card {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.06);
}

body[data-theme='light'] .panel-card {
  background: rgba(255, 255, 255, 0.55);
}

.panel-card--warn {
  border-color: rgba(250, 204, 21, 0.35);
  background: rgba(250, 204, 21, 0.06);
}

.list-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.list-item {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.06);
  text-decoration: none;
  color: var(--text);
  display: block;
}

.list-item:hover {
  background: rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: var(--text);
}

body[data-theme='light'] .list-item {
  background: rgba(255, 255, 255, 0.55);
}

.list-item-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.list-item-title {
  font-weight: 750;
  line-height: 1.35;
}

.list-item-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.suggest-box {
  margin-top: 8px;
  padding: 4px;
  max-height: 220px;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.1);
  display: none;
}

.suggest-item {
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
}

.suggest-item:hover {
  background: rgba(0, 174, 239, 0.12);
}

.suggest-item strong {
  display: block;
  font-weight: 700;
}

.suggest-item span {
  display: block;
  font-size: 13px;
  margin-top: 2px;
  opacity: 0.92;
}

.theme-toggle {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.theme-toggle label.pill {
  cursor: pointer;
}

.theme-toggle input[type='radio'] {
  width: auto;
  margin: 0;
}

.content-body {
  white-space: pre-wrap;
  line-height: 1.55;
  font-size: 15px;
}

.textarea-lg {
  min-height: 320px;
}

.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.crop-panel {
  margin-top: 12px;
}

.crop-canvas {
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.12);
  touch-action: none;
}

.kb-browser.page-shell {
  padding: 24px;
}

.kb-browser .page-title {
  font-size: 22px;
}

.unit-choice-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.unit-choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.06);
  cursor: pointer;
}

body[data-theme='light'] .unit-choice {
  background: rgba(255, 255, 255, 0.55);
}

.unit-choice input {
  width: auto;
  margin-top: 2px;
  flex: 0 0 auto;
  accent-color: var(--accent);
}

.unit-choice strong {
  display: block;
  font-size: 14px;
}

.unit-panel {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px dashed var(--border);
  background: rgba(0, 0, 0, 0.04);
}

body[data-theme='light'] .unit-panel {
  background: rgba(255, 255, 255, 0.45);
}

.unit-panel[hidden] {
  display: none !important;
}

.serial-input-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.serial-input-row input[type='text'] {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.serial-scan-wrap {
  position: relative;
  flex: 0 0 auto;
}

.serial-scan-toggle {
  min-width: 48px;
  height: 100%;
  padding: 0 14px;
  align-self: stretch;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border-color: rgba(0, 174, 239, 0.35);
  color: var(--accent);
}

.serial-scan-toggle:hover {
  background: rgba(0, 174, 239, 0.12);
}

.serial-scan-toggle[aria-expanded='true'] {
  background: rgba(0, 174, 239, 0.18);
}

.serial-scan-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  min-width: 210px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body[data-theme='light'] .serial-scan-menu {
  background: #fff;
}

.serial-scan-menu[hidden] {
  display: none !important;
}

.serial-scan-menu button {
  width: 100%;
  text-align: left;
  padding: 9px 11px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
}

.serial-scan-menu button:hover {
  background: rgba(255, 255, 255, 0.08);
}

body[data-theme='light'] .serial-scan-menu button:hover {
  background: rgba(0, 0, 0, 0.05);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.55);
}

.modal-overlay[hidden] {
  display: none !important;
}

.modal-card {
  width: min(520px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg);
  box-shadow: var(--shadow);
}

body[data-theme='light'] .modal-card {
  background: #fff;
}

.btn.danger {
  background: rgba(255, 107, 107, 0.12);
}

.btn.danger:hover {
  background: rgba(255, 107, 107, 0.18);
}

.btn,
.pill,
.tab {
  transition:
    background 0.12s ease,
    border-color 0.12s ease,
    color 0.12s ease,
    transform 0.06s ease;
}

.btn:active,
.pill:active {
  transform: translateY(1px);
}

.error {
  border: 1px solid rgba(255, 107, 107, 0.35);
  background: rgba(255, 107, 107, 0.08);
  padding: 10px 12px;
  border-radius: 10px;
}

.muted {
  color: var(--muted);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-wrap table {
  min-width: 760px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  font-size: 14px;
}

th {
  text-align: left;
  color: var(--muted);
  font-weight: 600;
}

th {
  text-align: left;
  color: var(--muted);
  font-weight: 600;
}

tr.row-alert td {
  background: rgba(255, 255, 255, 0.035);
}

tr.row-alert td:first-child {
  box-shadow:
    inset 4px 0 0 rgba(255, 255, 255, 0),
    inset 4px 0 0 var(--danger);
}

tr.row-excellence td {
  background: rgba(212, 175, 55, 0.1);
}

tr.row-excellence.row-alert td {
  background: rgba(212, 175, 55, 0.14);
}

tr.row-excellence td:first-child {
  box-shadow: inset 4px 0 0 rgba(212, 175, 55, 0.65);
}

body[data-theme='light'] tr.row-excellence td {
  background: rgba(180, 140, 20, 0.08);
}

body[data-theme='light'] tr.row-excellence.row-alert td {
  background: rgba(180, 140, 20, 0.11);
}

.chip-excellence {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #d4af37;
  border: 1px solid rgba(212, 175, 55, 0.45);
  background: rgba(212, 175, 55, 0.12);
}

.ticket-card.is-excellence {
  border-color: rgba(212, 175, 55, 0.35);
  background: rgba(212, 175, 55, 0.08);
}

body[data-theme='light'] .ticket-card.is-excellence {
  background: rgba(180, 140, 20, 0.06);
}

tr.row-vip td {
  background: rgba(120, 140, 220, 0.12);
}

tr.row-vip.row-alert td {
  background: rgba(120, 140, 220, 0.16);
}

tr.row-vip td:first-child {
  box-shadow: inset 4px 0 0 rgba(120, 140, 220, 0.75);
}

body[data-theme='light'] tr.row-vip td {
  background: rgba(90, 110, 190, 0.09);
}

body[data-theme='light'] tr.row-vip.row-alert td {
  background: rgba(90, 110, 190, 0.12);
}

.chip-vip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #9db0ff;
  border: 1px solid rgba(120, 140, 220, 0.45);
  background: rgba(120, 140, 220, 0.14);
}

.ticket-card.is-vip {
  border-color: rgba(120, 140, 220, 0.35);
  background: rgba(120, 140, 220, 0.1);
}

body[data-theme='light'] .ticket-card.is-vip {
  background: rgba(90, 110, 190, 0.07);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--muted);
}

.dot.new {
  background: var(--danger);
}

.dot.done {
  background: var(--ok);
}

.grid {
  display: grid;
  gap: 12px;
}

.ticket-card {
  padding: 14px;
}

.ticket-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.ticket-id {
  font-weight: 750;
  letter-spacing: 0.2px;
}

.meta {
  font-size: 13px;
  color: var(--muted);
}

/* Bejelentkezés / regisztráció / jelszó-visszaállítás */
body.auth-page .container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
}

.auth-shell {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.auth-card {
  padding: 28px 24px 22px;
}

.auth-card > .error {
  margin-bottom: 14px;
}

.auth-header {
  text-align: center;
  margin-bottom: 22px;
}

.auth-logo {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
  margin: 0 auto 18px;
}

.auth-title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: 0.2px;
}

.auth-sub {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}

.auth-form {
  margin-top: 4px;
}

.auth-field {
  margin-bottom: 14px;
}

.auth-field > label {
  display: block;
  margin-bottom: 6px;
}

.auth-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.auth-label-row label {
  margin-bottom: 0;
}

.auth-label-row a {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

.auth-label-row a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.auth-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 16px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
}

.auth-check input[type='checkbox'] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  margin: 0;
  padding: 0;
  flex: 0 0 16px;
  border-radius: 4px;
  cursor: pointer;
  accent-color: var(--accent);
}

.auth-submit {
  width: 100%;
  text-align: center;
  padding: 12px 14px;
  font-size: 15px;
}

.auth-success {
  border: 1px solid rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.06);
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.45;
  margin-bottom: 14px;
}

.auth-footer {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.auth-footer-note {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.auth-footer--plain {
  border-top: none;
  margin-top: 8px;
  padding-top: 0;
}

.kv {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
}

.kv .k {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.kv .v {
  font-size: 14px;
}

/* Mobile cards: long serial/SKU should wrap nicely */
.ticket-card .kv .v {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.14);
}

.split {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.only-mobile {
  display: none;
}

.only-desktop {
  display: block;
}

.bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(160px, 320px) 1fr minmax(54px, 80px);
  gap: 10px;
  align-items: center;
}

.bar-track {
  height: 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--accent);
  width: 0;
}

.photos {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.photos a {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.photos img {
  display: block;
  width: 160px;
  height: 160px;
  object-fit: cover;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tab {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.08);
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
}

.tab:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.12);
  text-decoration: none;
}

.tab.active {
  background: rgba(0, 174, 239, 0.16);
  border-color: rgba(0, 174, 239, 0.38);
  color: var(--text);
  font-weight: 600;
}

.timeline {
  position: relative;
  margin-top: 10px;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.timeline:before {
  content: '';
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: rgba(255, 255, 255, 0.1);
}

.titem {
  position: relative;
  padding: 12px 12px 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.08);
}

.titem:before {
  content: '';
  position: absolute;
  left: -16px;
  top: 16px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(0, 174, 239, 0.35);
  border: 1px solid rgba(0, 174, 239, 0.55);
}

.ttop {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.ttag {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.1);
  color: var(--muted);
}

footer {
  margin-top: 18px;
  padding: 14px 6px 6px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 640px) {
  .container {
    padding: 12px;
  }

  .chat-workspace {
    height: min(640px, calc(100dvh - 200px));
    min-height: 360px;
    border-radius: 14px;
  }

  .chat-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(300px, 88vw);
    z-index: 50;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    box-shadow: var(--shadow);
  }

  .chat-sidebar.is-open {
    transform: translateX(0);
  }

  .chat-workspace.is-sidebar-collapsed .chat-sidebar {
    display: flex;
  }

  .chat-sidebar-backdrop.is-open {
    display: block;
    z-index: 45;
  }

  .chat-sidebar-close {
    display: inline-flex;
  }

  .chat-bubble {
    max-width: 94%;
  }

  .chat-composer .btn {
    padding: 12px 14px;
  }

  .card {
    padding: 14px;
    border-radius: 16px;
  }

  .auth-card {
    padding: 22px 18px 18px;
  }

  .auth-logo {
    max-width: 190px;
  }

  .pill {
    font-size: 13px;
    padding: 7px 9px;
  }

  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .row {
    flex-direction: column;
  }

  .row > * {
    min-width: 0;
    width: 100%;
  }

  .photos img {
    width: 140px;
    height: 140px;
  }

  .only-mobile {
    display: block;
  }

  .only-desktop {
    display: none;
  }

  .table-wrap {
    display: none;
  }

  .bar-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}
