/* Ügyfélportál — bswebit hangulat */

:root {
  --bg: #f4efe6;
  --bg-deep: #e8dfd0;
  --ink: #141210;
  --ink-muted: #5c534a;
  --accent: #c2410c;
  --accent-soft: rgba(194, 65, 12, 0.14);
  --sage: #2f4d3c;
  --cream: #fffdf9;
  --radius-lg: 1.35rem;
  --radius-md: 0.8rem;
  --shadow-soft: 0 22px 55px -18px rgba(20, 18, 16, 0.22);
  --shadow-lift: 0 12px 40px -14px rgba(20, 18, 16, 0.18);
  --font-sans: "Outfit", system-ui, sans-serif;
  --font-serif: "Fraunces", Georgia, serif;
  --sidebar-w: 260px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --space: clamp(0.75rem, 2.5vw, 1.35rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

body:has(.app-shell) {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

a {
  color: var(--accent);
}

/* —— Login —— */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem;
  position: relative;
  overflow: visible;
}

.login-card__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.login-brand--compact {
  margin-bottom: 0;
}

.login-card .lang-dock__panel {
  z-index: 50;
}

.login-topbar {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 10;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: flex-end;
}

.login-mesh {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(47, 77, 60, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 100%, rgba(194, 65, 12, 0.12), transparent 50%),
    var(--bg);
  z-index: 0;
}

.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: var(--cream);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(20, 18, 16, 0.06);
  overflow: visible;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.75rem;
  text-decoration: none;
  color: var(--ink);
}

.login-brand img {
  width: 40px;
  height: 40px;
}

.login-brand span {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.login-card h1 {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}

.login-lead {
  margin: 0 0 1.5rem;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 0.35rem;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(20, 18, 16, 0.12);
  border-radius: var(--radius-md);
  background: #fff;
  font: inherit;
  color: var(--ink);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: var(--radius-md);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s var(--ease), filter 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  width: 100%;
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(20, 18, 16, 0.15);
  color: var(--ink);
}

.btn-sage {
  background: var(--sage);
  color: #fff;
}

.btn-danger {
  background: #b42318;
  color: #fff;
  border: 1px solid transparent;
}

.btn-danger:hover {
  filter: brightness(1.06);
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  font-size: 0.9rem;
  background: rgba(194, 65, 12, 0.1);
  border: 1px solid rgba(194, 65, 12, 0.25);
  color: #9a3412;
}

.login-hint {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(20, 18, 16, 0.08);
  font-size: 0.78rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

/* —— Dashboard shell —— */
.app-shell {
  display: flex;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
}

.app-sidebar {
  position: sticky;
  top: 0;
  width: var(--sidebar-w);
  height: 100%;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--sage) 0%, #1f3328 100%);
  color: #f8f6f2;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow: hidden;
  z-index: 30;
}

.app-sidebar .brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: inherit;
  text-decoration: none;
  padding: 0 0.5rem;
  flex-shrink: 0;
}

.app-sidebar .brand img {
  width: 32px;
  height: 32px;
}

.app-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.app-sidebar nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  color: rgba(248, 246, 242, 0.85);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  flex-shrink: 0;
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

.app-sidebar nav a.is-active .nav-badge {
  background: #fff;
  color: var(--accent);
}

.app-sidebar nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.app-sidebar nav a.is-active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.sidebar-footer {
  margin-top: auto;
  padding: 0.5rem;
  font-size: 0.8rem;
  opacity: 0.75;
  flex-shrink: 0;
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.app-topbar {
  padding: 1.25rem 1.75rem;
  background: var(--cream);
  border-bottom: 1px solid rgba(20, 18, 16, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 20;
}

.app-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.app-topbar h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 600;
}

.app-content {
  padding: 1.5rem 1.75rem 2.5rem;
  flex: 1;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

/* —— Page change animations —— */
@keyframes pageTopEnter {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pageContentEnter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pageItemEnter {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pageLeave {
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@keyframes pageNavIn {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pageSidebarBrandIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.app-shell .app-topbar {
  animation: pageTopEnter 0.42s var(--ease) both;
}

.app-shell .app-content {
  animation: pageContentEnter 0.48s var(--ease) 0.04s both;
}

.app-shell .app-content > * {
  animation: pageItemEnter 0.5s var(--ease) both;
}

.app-shell .app-content > *:nth-child(1) { animation-delay: 0.06s; }
.app-shell .app-content > *:nth-child(2) { animation-delay: 0.11s; }
.app-shell .app-content > *:nth-child(3) { animation-delay: 0.16s; }
.app-shell .app-content > *:nth-child(4) { animation-delay: 0.21s; }
.app-shell .app-content > *:nth-child(5) { animation-delay: 0.26s; }
.app-shell .app-content > *:nth-child(n + 6) { animation-delay: 0.3s; }

.app-shell .work-layout > *,
.app-shell .admin-stat-grid > *,
.app-shell .work-shortcuts > *,
.app-shell .admin-quick-links > *,
.app-shell .updates-response > * {
  animation: pageItemEnter 0.48s var(--ease) both;
}

.app-shell .work-layout > *:nth-child(1),
.app-shell .admin-stat-grid > *:nth-child(1),
.app-shell .work-shortcuts > *:nth-child(1),
.app-shell .admin-quick-links > *:nth-child(1),
.app-shell .updates-response > *:nth-child(1) { animation-delay: 0.1s; }

.app-shell .work-layout > *:nth-child(2),
.app-shell .admin-stat-grid > *:nth-child(2),
.app-shell .work-shortcuts > *:nth-child(2),
.app-shell .admin-quick-links > *:nth-child(2),
.app-shell .updates-response > *:nth-child(2) { animation-delay: 0.16s; }

.app-shell .work-layout > *:nth-child(3),
.app-shell .admin-stat-grid > *:nth-child(3),
.app-shell .work-shortcuts > *:nth-child(3),
.app-shell .admin-quick-links > *:nth-child(3),
.app-shell .updates-response > *:nth-child(3) { animation-delay: 0.22s; }

.app-shell .work-layout > *:nth-child(n + 4),
.app-shell .admin-stat-grid > *:nth-child(n + 4) { animation-delay: 0.28s; }

.app-shell .app-sidebar .brand {
  animation: pageSidebarBrandIn 0.45s var(--ease) both;
}

.app-shell .app-sidebar nav a {
  animation: pageNavIn 0.4s var(--ease) both;
  transition:
    background 0.2s var(--ease),
    color 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.app-shell .app-sidebar nav a:nth-child(1) { animation-delay: 0.05s; }
.app-shell .app-sidebar nav a:nth-child(2) { animation-delay: 0.09s; }
.app-shell .app-sidebar nav a:nth-child(3) { animation-delay: 0.13s; }
.app-shell .app-sidebar nav a:nth-child(4) { animation-delay: 0.17s; }
.app-shell .app-sidebar nav a:nth-child(5) { animation-delay: 0.21s; }
.app-shell .app-sidebar nav a:nth-child(6) { animation-delay: 0.25s; }
.app-shell .app-sidebar nav a:nth-child(n + 7) { animation-delay: 0.28s; }

.app-shell .app-sidebar nav a:active {
  transform: scale(0.98);
}

.login-page .login-card {
  animation: pageContentEnter 0.55s var(--ease) both;
}

html.page-leave .app-shell .app-topbar,
html.page-leave .app-shell .app-content,
html.page-leave .login-page .login-card {
  animation: pageLeave 0.22s ease forwards !important;
}

html.page-leave .app-shell .app-content > * {
  animation: none !important;
}

html.page-leave .app-shell .app-sidebar .brand,
html.page-leave .app-shell .app-sidebar nav a {
  animation: none !important;
  opacity: 0.55;
  transition: opacity 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
  .app-shell .app-topbar,
  .app-shell .app-content,
  .app-shell .app-content > *,
  .app-shell .work-layout > *,
  .app-shell .admin-stat-grid > *,
  .app-shell .work-shortcuts > *,
  .app-shell .admin-quick-links > *,
  .app-shell .updates-response > *,
  .app-shell .app-sidebar .brand,
  .app-shell .app-sidebar nav a,
  .login-page .login-card,
  html.page-leave .app-shell .app-topbar,
  html.page-leave .app-shell .app-content,
  html.page-leave .login-page .login-card {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

.panel {
  background: var(--cream);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 8px 30px -12px rgba(20, 18, 16, 0.12);
  border: 1px solid rgba(20, 18, 16, 0.05);
  margin-bottom: 1.25rem;
}

.panel--danger {
  border-color: rgba(180, 35, 24, 0.22);
  background: color-mix(in srgb, #b42318 5%, var(--cream));
}

.panel h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-progress {
  background: rgba(194, 65, 12, 0.15);
  color: #9a3412;
}

.badge-done {
  background: rgba(47, 77, 60, 0.2);
  color: var(--sage);
}

.badge-wait {
  background: rgba(212, 162, 76, 0.25);
  color: #854d0e;
}

.badge-waiting {
  background: rgba(100, 116, 139, 0.18);
  color: #475569;
}

.badge-collect {
  background: rgba(37, 99, 235, 0.14);
  color: #1d4ed8;
}

.badge-reject {
  background: rgba(160, 60, 40, 0.14);
  color: #8a3222;
}

.work-layout {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
}

.work-hero {
  padding: 1.75rem 1.75rem 1.5rem;
  background: linear-gradient(145deg, var(--cream) 0%, color-mix(in srgb, var(--sage) 8%, var(--cream)) 100%);
}

.work-hero__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.work-hero__identity {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.work-hero__avatar {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 1rem;
  background: var(--sage);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.work-hero__eyebrow {
  margin: 0 0 0.15rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.work-hero__title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.work-hero__badge {
  font-size: 0.8rem;
  padding: 0.35rem 0.85rem;
}

.work-hero__lead {
  margin: 0 0 0.75rem;
  color: var(--ink-muted);
  font-size: 1.02rem;
}

.work-hero__status-note {
  margin: 0 0 1.35rem;
  font-size: 0.92rem;
  color: var(--ink);
  padding: 0.65rem 0.9rem;
  background: rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-md);
  border: 1px solid rgba(20, 18, 16, 0.06);
}

.work-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.btn--lg {
  padding: 0.85rem 1.35rem;
  width: auto;
}

.work-preview-panel {
  padding: 0;
  overflow: hidden;
}

.work-preview-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem 0.75rem;
}

.work-preview-panel__head h2 {
  margin: 0;
  font-size: 1.1rem;
}

.work-preview-live {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage);
}

.work-browser {
  margin: 0 1.25rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(20, 18, 16, 0.1);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 12px 40px -16px rgba(20, 18, 16, 0.2);
  width: calc(100% - 2.5rem);
  max-width: none;
}

.work-browser__chrome {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.85rem;
  background: color-mix(in srgb, var(--ink) 6%, var(--cream));
  border-bottom: 1px solid rgba(20, 18, 16, 0.08);
}

.work-browser__dots::before {
  content: "● ● ●";
  letter-spacing: 0.15em;
  font-size: 0.45rem;
  color: color-mix(in srgb, var(--ink) 35%, transparent);
}

.work-browser__bar {
  flex: 1;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.work-browser__frame {
  display: block;
  width: 100%;
  height: min(640px, calc(100vh - 14rem));
  border: none;
  background: #fff;
}

.work-preview-hint {
  margin: 0;
  padding: 0 1.5rem 1.25rem;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.work-shortcuts {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .work-shortcuts {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 960px) {
  .work-shortcuts {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.work-shortcut {
  display: block;
  text-decoration: none;
  color: inherit;
  margin-bottom: 0;
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}

.work-shortcut:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px -14px rgba(20, 18, 16, 0.18);
}

.work-shortcut__icon {
  display: inline-flex;
  width: 2.25rem;
  height: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.65rem;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 0.65rem;
}

.work-shortcut__title {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.work-shortcut__text {
  display: block;
  font-size: 0.88rem;
  color: var(--ink-muted);
  line-height: 1.45;
}

.changelog-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.changelog-list li {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(20, 18, 16, 0.08);
}

.changelog-list li:last-child {
  border-bottom: none;
}

.changelog-meta {
  font-size: 0.8rem;
  color: var(--ink-muted);
  margin-bottom: 0.35rem;
}

.approve-box {
  margin-top: 1.25rem;
  padding: 1.25rem;
  background: var(--accent-soft);
  border-radius: var(--radius-md);
  border: 1px solid rgba(194, 65, 12, 0.2);
}

.approve-box label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  cursor: pointer;
  font-weight: 500;
}

.approve-box input {
  margin-top: 0.25rem;
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--accent);
}

.chat-thread {
  max-height: 420px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.5rem 0;
}

.chat-bubble {
  max-width: 85%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
}

.chat-bubble.client {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-bubble.developer {
  align-self: flex-start;
  background: #fff;
  border: 1px solid rgba(20, 18, 16, 0.1);
  border-bottom-left-radius: 4px;
}

.chat-bubble .who {
  font-size: 0.72rem;
  opacity: 0.85;
  margin-bottom: 0.25rem;
}

.chat-form textarea {
  min-height: 88px;
  resize: vertical;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.table th,
.table td {
  text-align: left;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid rgba(20, 18, 16, 0.08);
}

.table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.empty {
  color: var(--ink-muted);
  font-style: italic;
}

@media (max-width: 768px) {
  .app-shell {
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }

  .app-sidebar {
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    overflow: visible;
    z-index: 40;
  }

  .app-sidebar nav {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    flex: none;
    overflow: visible;
  }

  .sidebar-footer {
    width: 100%;
  }

  .app-main {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
  }
}

/* —— Language dock (bswebit) —— */
.lang-dock-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9990;
  background: rgba(20, 18, 16, 0.42);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s;
}

.lang-dock-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

/* Panel a backdrop fölött (különben nem kattintható a nyelvlista) */
html.is-lang-ui-lock .login-card,
html.is-lang-ui-lock .app-topbar {
  position: relative;
  z-index: 10001;
}

html.is-lang-ui-lock .lang-dock {
  position: relative;
  z-index: 10002;
}

html.is-lang-ui-lock,
html.is-lang-ui-lock body {
  overflow: hidden !important;
}

.lang-dock {
  position: relative;
  z-index: 5;
  font-family: var(--font-sans);
}

.lang-dock--login .lang-dock__trigger-meta {
  display: none;
}

.lang-dock__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  background: color-mix(in srgb, var(--cream) 94%, var(--ink));
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow-lift);
  font-size: 0.68rem;
  font-weight: 600;
}

.lang-dock__trigger-code {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--sage);
}

.lang-dock__trigger-chevron {
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid color-mix(in srgb, var(--ink) 38%, transparent);
  border-bottom: 2px solid color-mix(in srgb, var(--ink) 38%, transparent);
  transform: rotate(45deg) translateY(-2px);
}

.lang-dock__panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 40;
  width: min(20rem, calc(100vw - 2rem));
  border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  background: var(--cream);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px) scale(0.98);
  transition: opacity 0.35s var(--ease-out-expo), transform 0.4s var(--ease-out-expo), visibility 0.35s;
}

.lang-dock__panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  z-index: 10003;
}

.lang-dock__panel-header {
  padding: 1.15rem 1.25rem 0.85rem;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
}

.lang-dock__title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
}

.lang-dock__subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.lang-dock__choices {
  list-style: none;
  margin: 0;
  padding: 0.5rem;
}

.lang-dock__choice {
  width: 100%;
  display: flex;
  padding: 0.75rem 0.85rem;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.lang-dock__choice:hover:not(:disabled) {
  background: color-mix(in srgb, var(--sage) 8%, var(--bg));
}

.lang-dock__choice:disabled {
  opacity: 0.45;
  cursor: default;
}

.lang-dock__choice-left {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.lang-dock__choice-name {
  font-family: var(--font-serif);
  font-weight: 700;
}

.lang-dock__choice-tagline {
  font-size: 0.72rem;
  color: var(--ink-muted);
}

.lang-dock__panel-footer {
  padding: 0.5rem;
  border-top: 1px solid color-mix(in srgb, var(--ink) 7%, transparent);
}

.lang-dock__panel-close {
  width: 100%;
  padding: 0.55rem;
  border: none;
  background: transparent;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
}

.lang-transition {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse 78% 65% at 50% 50%, #1e2a22 0%, #0f0e0d 70%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.lang-transition.is-on {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lang-transition__inner {
  text-align: center;
  padding: 1.5rem;
}

.lang-transition__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 252, 247, 0.92);
  margin-bottom: 0.75rem;
}

.lang-transition__code {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 8vw, 4rem);
  font-weight: 700;
  color: #fffdf9;
  opacity: 0;
}

.lang-transition.is-animate .lang-transition__code {
  animation: langCodeIn 0.62s var(--ease-out-expo) forwards;
}

@keyframes langCodeIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.lang-transition__bar {
  width: min(12rem, 60vw);
  height: 3px;
  margin: 1.25rem auto 0;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  overflow: hidden;
}

.lang-transition__bar::after {
  content: "";
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
}

.lang-transition.is-animate .lang-transition__bar::after {
  animation: langBar 0.55s var(--ease-out-expo) forwards;
}

@keyframes langBar {
  to {
    width: 100%;
  }
}

/* —— Developer admin —— */
.app-main--chat {
  min-height: 0;
  max-height: none;
  height: 100%;
}

.body-admin-chat .app-shell {
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
}

.app-content--chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-bottom: 1rem;
}

.admin-lead {
  margin: 0 0 1.25rem;
  color: var(--ink-muted);
  font-size: 1rem;
}

.admin-meta {
  margin: 0 0 1rem;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.alert--ok {
  background: rgba(47, 77, 60, 0.12);
  border-color: var(--sage);
  color: var(--sage);
}

.admin-stat-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.25rem;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 900px) {
  .admin-stat-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .admin-stat-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .admin-stat-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1400px) {
  .admin-stat-grid {
    grid-template-columns: repeat(7, 1fr);
  }
}

.admin-stat {
  text-align: center;
  padding: 1.25rem 1rem;
  margin-bottom: 0;
}

.admin-stat__value {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--sage);
  line-height: 1.2;
}

.admin-stat__label {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.admin-toolbar__picker {
  flex: 1;
  min-width: 220px;
  max-width: 420px;
  margin-bottom: 0;
}

.admin-toolbar__picker label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 0.35rem;
}

.btn--sm {
  padding: 0.5rem 1rem;
  width: auto;
  font-size: 0.88rem;
}

.table-wrap {
  overflow-x: auto;
}

.admin-table-meta {
  font-size: 0.88rem;
  color: var(--ink-muted);
}

.admin-table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  font-size: 0.88rem;
  font-weight: 600;
  align-items: center;
}

.admin-db-inline-form {
  display: inline-flex;
  margin: 0;
}

.admin-db-browse {
  display: grid;
  gap: 1rem;
}

@media (min-width: 960px) {
  .admin-db-browse {
    grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
    align-items: start;
  }
}

.admin-db-browse__main {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.admin-db-fields {
  display: grid;
  gap: 0.85rem;
  margin: 0.85rem 0 1rem;
}

@media (min-width: 800px) {
  .admin-db-fields {
    grid-template-columns: 1fr 1fr;
  }
}

.admin-db-field textarea {
  min-height: 2.6rem;
  resize: vertical;
}

.admin-db-null {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
  font-weight: 500;
}

.admin-db-table-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
  max-height: min(70vh, 640px);
  overflow: auto;
}

.admin-db-table-list a {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid transparent;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.admin-db-table-list a:hover {
  background: color-mix(in srgb, var(--sage, #6b8f71) 12%, transparent);
}

.admin-db-table-list a.is-active {
  background: color-mix(in srgb, var(--sage, #6b8f71) 18%, transparent);
  border-color: color-mix(in srgb, var(--sage, #6b8f71) 35%, transparent);
}

.admin-db-table-list__count {
  font-weight: 500;
  color: var(--ink-muted);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.admin-db-preview-wrap {
  max-height: min(70vh, 640px);
  overflow: auto;
}

.admin-db-preview-table td code {
  font-size: 0.78rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.admin-quick-links {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .admin-quick-links {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1100px) {
  .admin-quick-links {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.admin-quick-link {
  display: block;
  text-decoration: none;
  color: inherit;
  margin-bottom: 0;
}

.admin-quick-link span {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.88rem;
  color: var(--ink-muted);
  font-weight: 400;
}

.admin-chat-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-bottom: 0;
  padding: 1rem 1.25rem;
}

.admin-chat-lead {
  flex-shrink: 0;
  margin-bottom: 0.75rem;
}

.admin-chat-thread {
  flex: 1;
  min-height: 12rem;
  max-height: none;
  overflow-y: auto;
  margin-bottom: 1rem;
  padding: 0.5rem;
  background: color-mix(in srgb, var(--bg) 50%, var(--cream));
  border-radius: var(--radius-md);
  border: 1px solid rgba(20, 18, 16, 0.06);
}

.admin-chat-form {
  flex-shrink: 0;
  border-top: 1px solid rgba(20, 18, 16, 0.08);
  padding-top: 1rem;
}

.admin-form-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 720px) {
  .admin-form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.field-hint {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.admin-password-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.admin-password-row input[type="text"],
.admin-password-row input[type="password"] {
  flex: 1;
  min-width: 10rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(20, 18, 16, 0.12);
  border-radius: var(--radius-md);
  font: inherit;
}

.table tr.is-highlight td {
  background: color-mix(in srgb, var(--sage) 10%, transparent);
}

.table tr.is-highlight-reject td {
  background: color-mix(in srgb, #a03c28 10%, transparent);
}

.body-admin-chat .admin-chat-thread {
  height: calc(100vh - 17.5rem);
  max-height: calc(100vh - 17.5rem);
}

.dev-identity-backdrop {
  position: fixed;
  inset: 0;
  z-index: 12000;
  background: rgba(20, 18, 16, 0.55);
  backdrop-filter: blur(4px);
}

.dev-identity-modal {
  position: fixed;
  inset: 0;
  z-index: 12001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  pointer-events: none;
}

.dev-identity-modal__card {
  pointer-events: auto;
  width: min(100%, 22rem);
  margin: 0;
}

.dev-identity-modal__card h2 {
  margin-top: 0;
}

.sidebar-dev-name {
  font-weight: 600;
  color: #fff;
}

.sidebar-dev-switch {
  color: rgba(248, 246, 242, 0.75);
}

.changelog-item--pending {
  border-left: 3px solid var(--accent);
  padding-left: 0.75rem;
}

.changelog-item--acked {
  opacity: 0.92;
}

.changelog-item--rejected {
  border-left: 3px solid #a03c28;
  padding-left: 0.75rem;
}

.changelog-ack-label {
  color: var(--sage);
  font-weight: 600;
}

.changelog-reject-label {
  color: #a03c28;
  font-weight: 600;
}

.changelog-reject-reason {
  margin-top: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-md);
  background: rgba(160, 60, 40, 0.08);
  color: #6e2a1e;
  font-size: 0.9rem;
  line-height: 1.45;
}

.updates-response {
  display: grid;
  gap: 1rem;
}

@media (min-width: 800px) {
  .updates-response {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.updates-response__title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.approve-box--reject {
  border-color: rgba(160, 60, 40, 0.35);
  background: rgba(160, 60, 40, 0.05);
}

.btn-reject {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.7rem 1.1rem;
  border: none;
  border-radius: var(--radius-md);
  background: #a03c28;
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.btn-reject:hover {
  background: #8a3222;
}

.alert--warn {
  background: rgba(160, 60, 40, 0.1);
  border: 1px solid rgba(160, 60, 40, 0.35);
  color: #8a3222;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.work-handover-box {
  border-color: var(--accent);
}

.work-handover-actions {
  margin-bottom: 1.25rem;
}

.work-complete-note {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-muted);
  line-height: 1.45;
}

/* SweetAlert2 — portal look */
.portal-swal {
  font-family: var(--font-sans) !important;
  border-radius: 1.25rem !important;
  padding: 1.5rem !important;
  background: #fffdf9 !important;
  box-shadow: 0 28px 60px -20px rgba(20, 18, 16, 0.45) !important;
}

.portal-swal .swal2-title {
  font-family: var(--font-serif) !important;
  font-size: 1.45rem !important;
  color: var(--ink) !important;
}

.portal-swal .swal2-html-container {
  color: var(--ink-muted) !important;
  font-size: 0.95rem !important;
}

.portal-swal__confirm,
.portal-swal__cancel {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 7.5rem;
  margin: 0.25rem !important;
  padding: 0.7rem 1.15rem !important;
  border: none !important;
  border-radius: 0.8rem !important;
  font: inherit !important;
  font-weight: 600 !important;
  cursor: pointer !important;
}

.portal-swal__confirm {
  background: var(--accent) !important;
  color: #fff !important;
}

.portal-swal__confirm:hover {
  filter: brightness(1.05);
}

.portal-swal__cancel {
  background: rgba(20, 18, 16, 0.08) !important;
  color: var(--ink) !important;
}

.portal-swal__cancel:hover {
  background: rgba(20, 18, 16, 0.12) !important;
}

.swal2-icon.swal2-question {
  border-color: rgba(194, 65, 12, 0.35) !important;
  color: var(--accent) !important;
}

/* —— Fancy selects —— */
.fancy-select--native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.fancy-select-ui {
  position: relative;
  width: 100%;
}

.fancy-select-ui__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3.1rem;
  padding: 0.65rem 0.9rem 0.65rem 1rem;
  border: 1px solid rgba(20, 18, 16, 0.1);
  border-radius: 1rem;
  background:
    linear-gradient(165deg, rgba(255, 253, 249, 0.98), rgba(248, 242, 232, 0.92)),
    #fffdf9;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 10px 28px -18px rgba(20, 18, 16, 0.35);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.2s var(--ease),
    box-shadow 0.25s var(--ease),
    transform 0.2s var(--ease);
}

.fancy-select-ui__trigger:hover {
  border-color: rgba(194, 65, 12, 0.28);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.75) inset,
    0 14px 34px -16px rgba(20, 18, 16, 0.4);
  transform: translateY(-1px);
}

.fancy-select-ui.is-open .fancy-select-ui__trigger {
  border-color: var(--accent);
  box-shadow:
    0 0 0 3px var(--accent-soft),
    0 16px 36px -14px rgba(194, 65, 12, 0.28);
  transform: none;
}

.fancy-select-ui__value {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
  flex: 1;
}

.fancy-select-ui__label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.25;
}

.fancy-select-ui__meta {
  font-size: 0.78rem;
  color: var(--ink-muted);
  padding-left: 1.15rem;
}

.fancy-select-ui.is-placeholder .fancy-select-ui__label {
  color: var(--ink-muted);
  font-weight: 500;
}

.fancy-select-ui__chevron {
  width: 1.65rem;
  height: 1.65rem;
  flex-shrink: 0;
  border-radius: 999px;
  background: rgba(20, 18, 16, 0.06);
  position: relative;
  transition: background 0.2s, transform 0.28s var(--ease);
}

.fancy-select-ui__chevron::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid var(--ink-muted);
  border-bottom: 2px solid var(--ink-muted);
  transform: translateY(-15%) rotate(45deg);
}

.fancy-select-ui.is-open .fancy-select-ui__chevron {
  background: var(--accent-soft);
  transform: rotate(180deg);
}

.fancy-select-ui.is-open .fancy-select-ui__chevron::before {
  border-color: var(--accent);
}

.fancy-select-ui__list {
  position: absolute;
  z-index: 80;
  left: 0;
  right: 0;
  top: calc(100% + 0.45rem);
  max-height: min(18rem, 55vh);
  overflow: auto;
  padding: 0.4rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(20, 18, 16, 0.08);
  background:
    linear-gradient(180deg, #fffdf9 0%, #faf4ea 100%);
  box-shadow:
    0 24px 50px -20px rgba(20, 18, 16, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top center;
  transition:
    opacity 0.18s var(--ease),
    transform 0.22s var(--ease),
    visibility 0.18s;
  pointer-events: none;
}

.fancy-select-ui.is-open .fancy-select-ui__list,
.fancy-select-ui__list.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.fancy-select-ui__list.is-portal {
  position: fixed;
  z-index: 20000;
  right: auto;
}

.fancy-select-ui__list.is-portal.is-up {
  transform-origin: bottom center;
}

.fancy-select-ui__list.is-portal.is-up:not(.is-open) {
  transform: translateY(6px) scale(0.98);
}

.fancy-select-ui__option {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.7rem 0.8rem;
  border: none;
  border-radius: 0.75rem;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.fancy-select-ui__option:hover:not(:disabled),
.fancy-select-ui__option:focus-visible {
  background: rgba(194, 65, 12, 0.09);
  outline: none;
}

.fancy-select-ui__option.is-selected {
  background: linear-gradient(120deg, rgba(194, 65, 12, 0.14), rgba(47, 77, 60, 0.1));
}

.fancy-select-ui__option.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.fancy-select-ui__option-main {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  font-size: 0.92rem;
}

.fancy-select-ui__option-meta {
  font-size: 0.76rem;
  color: var(--ink-muted);
  padding-left: 1.15rem;
}

.fancy-select-ui__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.55);
}

.fancy-select-ui__dot--progress {
  background: #c2410c;
}

.fancy-select-ui__dot--wait {
  background: #b45309;
}

.fancy-select-ui__dot--waiting {
  background: #64748b;
}

.fancy-select-ui__dot--collect {
  background: #2563eb;
}

.fancy-select-ui__dot--done {
  background: var(--sage);
}

.fancy-select-ui__dot--declined {
  background: #a03c28;
}

.fancy-select-ui--identity .fancy-select-ui__trigger {
  min-height: 3.25rem;
}

.dev-identity-modal .fancy-select-ui {
  z-index: 1;
}

.dev-identity-modal .fancy-select-ui.is-open {
  z-index: 5;
}

.admin-toolbar__picker .fancy-select-ui {
  max-width: 100%;
}

/* —— Feature requests —— */
.request-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.request-item {
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(20, 18, 16, 0.08);
  background: rgba(255, 253, 249, 0.7);
}

.request-item--waiting {
  border-left: 3px solid rgba(92, 83, 74, 0.45);
}

.request-item--seen {
  border-left: 3px solid #2563eb;
}

.request-item--planned {
  border-left: 3px solid #b45309;
}

.request-item--replied {
  border-left: 3px solid var(--sage);
}

.request-item--done {
  border-left: 3px solid var(--sage);
}

.request-item--declined {
  border-left: 3px solid #a03c28;
}

.request-item__detail {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
  color: var(--ink-muted);
  line-height: 1.45;
}

.request-steps {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0.75rem 0.85rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
  border-radius: var(--radius-md);
  background: rgba(20, 18, 16, 0.035);
}

.request-steps__item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
  opacity: 0.45;
}

.request-steps__item.is-done,
.request-steps__item.is-current {
  opacity: 1;
}

.request-steps__dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  background: rgba(20, 18, 16, 0.18);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.65);
}

.request-steps__item.is-done .request-steps__dot {
  background: var(--sage);
}

.request-steps__item.is-current .request-steps__dot {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(194, 65, 12, 0.18);
}

.request-steps__label {
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink-muted);
}

.request-steps__item.is-current .request-steps__label {
  color: var(--ink);
}

.request-status--waiting {
  background: rgba(92, 83, 74, 0.12);
  color: #5c534a;
}

.request-status--seen {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.request-status--replied {
  background: rgba(47, 77, 60, 0.14);
  color: var(--sage);
}

.request-item__note--warn {
  background: rgba(160, 60, 40, 0.08);
  color: #8a3222;
}

@media (max-width: 640px) {
  .request-steps {
    grid-template-columns: 1fr 1fr;
  }
}

.request-item--new {
  box-shadow: 0 0 0 1px rgba(194, 65, 12, 0.2);
}

.request-item__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.55rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.request-item__body {
  line-height: 1.55;
}

.request-item__note {
  margin-top: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-md);
  background: rgba(47, 77, 60, 0.08);
  font-size: 0.9rem;
  color: var(--sage);
}

.request-status {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.request-status--open {
  background: rgba(194, 65, 12, 0.12);
  color: #9a3412;
}

.request-status--planned {
  background: rgba(180, 83, 9, 0.14);
  color: #92400e;
}

.request-status--done {
  background: rgba(47, 77, 60, 0.14);
  color: var(--sage);
}

.request-status--declined {
  background: rgba(160, 60, 40, 0.12);
  color: #8a3222;
}

.request-new-pill {
  display: inline-flex;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}

.request-admin-form {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(20, 18, 16, 0.08);
}

.request-admin-form .btn {
  margin-top: 0.75rem;
}

/* —— Activity timeline —— */
.activity-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.activity-panel-head h2 {
  margin: 0;
}

.activity-panel-head a {
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

.activity-filters__form {
  margin: 0;
}

.activity-timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 2px solid rgba(20, 18, 16, 0.08);
}

.activity-timeline__item {
  position: relative;
  padding: 0 0 1.15rem 1.15rem;
}

.activity-timeline__item:last-child {
  padding-bottom: 0;
}

.activity-timeline__dot {
  position: absolute;
  left: -0.4rem;
  top: 0.35rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  background: rgba(20, 18, 16, 0.25);
  box-shadow: 0 0 0 3px var(--cream);
}

.activity-timeline__item--work .activity-timeline__dot { background: var(--accent); }
.activity-timeline__item--chat .activity-timeline__dot { background: #2563eb; }
.activity-timeline__item--status .activity-timeline__dot { background: #b45309; }
.activity-timeline__item--review .activity-timeline__dot { background: #a03c28; }
.activity-timeline__item--admin .activity-timeline__dot { background: var(--sage); }

.activity-timeline__card {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(20, 18, 16, 0.07);
  background: rgba(255, 253, 249, 0.85);
}

.activity-timeline__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.activity-timeline__type {
  display: inline-flex;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(20, 18, 16, 0.06);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.68rem;
  color: var(--ink);
}

.activity-timeline__who {
  font-weight: 700;
  color: var(--ink);
}

.activity-timeline__who--developer {
  color: var(--sage);
}

.activity-timeline__who--client {
  color: #9a3412;
}

.activity-timeline__project {
  font-weight: 600;
  text-decoration: none;
}

.activity-timeline__summary {
  margin: 0;
  font-weight: 600;
  font-size: 0.95rem;
}

.activity-timeline__detail {
  margin-top: 0.55rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.65rem;
  background: rgba(20, 18, 16, 0.035);
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--ink-muted);
  white-space: pre-wrap;
}
