﻿:root {
  --blue-900: #12346b;
  --blue-700: #1e63b6;
  --blue-500: #2f80ed;
  --blue-100: #eaf3ff;
  --orange-500: #f28a22;
  --orange-100: #fff3e4;
  --gray-950: #151923;
  --gray-700: #4a5568;
  --gray-500: #7a8493;
  --gray-300: #d9e1ea;
  --gray-200: #edf1f6;
  --gray-100: #f6f8fb;
  --white: #ffffff;
  --green: #1c9b63;
  --red: #c74438;
  --shadow: 0 18px 45px rgba(18, 52, 107, 0.1);
  --soft-shadow: 0 8px 24px rgba(18, 52, 107, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--gray-950);
  font-family: Inter, Arial, Helvetica, sans-serif;
  font-size: 15px;
  background: #f7f9fd;
}

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

button,
input,
textarea {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 76px 1fr;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

.rail {
  align-items: center;
  background: linear-gradient(180deg, var(--white), #f8fbff);
  border-right: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  padding: 18px 14px;
}

.brand-mark {
  align-items: center;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-900));
  border-radius: 14px;
  box-shadow: var(--soft-shadow);
  color: #ffffff;
  display: inline-flex;
  font-size: 18px;
  font-weight: 800;
  height: 42px;
  justify-content: center;
  width: 42px;
}

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

.rail-btn {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 16px;
  color: var(--gray-500);
  display: inline-flex;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.rail-btn.active {
  background: var(--blue-100);
  border-color: #d6e9ff;
  color: var(--blue-700);
}

.rail-btn svg {
  height: 23px;
  width: 23px;
}

.rail-bottom {
  margin-top: auto;
  position: relative;
}

.rail-user {
  align-items: center;
  background: linear-gradient(135deg, var(--orange-500), #ffbf72);
  border-radius: 50%;
  box-shadow: var(--soft-shadow);
  color: #ffffff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  height: 38px;
  justify-content: center;
  border: 0;
  cursor: pointer;
  width: 38px;
}

.rail-user-menu {
  position: relative;
}

.rail-logout-menu {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  bottom: 0;
  box-shadow: var(--soft-shadow);
  left: 48px;
  padding: 8px;
  position: absolute;
  width: 116px;
  z-index: 30;
}

.rail-logout-menu[hidden] {
  display: none;
}

.rail-logout-menu button {
  background: var(--gray-100);
  border: 0;
  border-radius: 10px;
  color: var(--gray-700);
  cursor: pointer;
  font-weight: 800;
  min-height: 36px;
  width: 100%;
}

.workspace {
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.operator-layout {
  display: grid;
  grid-template-columns: 360px minmax(520px, 1fr) 372px;
  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.inbox-panel {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  border-right: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  padding: 22px 18px;
}

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

.title-block h1 {
  color: var(--blue-900);
  font-size: 22px;
  line-height: 1.15;
  margin: 0;
}

.title-block p {
  color: var(--gray-500);
  font-size: 13px;
  margin: 5px 0 0;
}

.icon-btn,
.plain-icon-button {
  align-items: center;
  background: var(--gray-100);
  border: 0;
  border-radius: 14px;
  color: var(--gray-700);
  cursor: pointer;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.plain-icon-button {
  width: auto;
  padding: 0 14px;
}

.icon-btn svg {
  height: 20px;
  width: 20px;
}

.search {
  margin-bottom: 14px;
  position: relative;
}

.search input {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 15px;
  box-shadow: 0 4px 14px rgba(18, 52, 107, 0.04);
  color: var(--gray-950);
  height: 46px;
  outline: 0;
  padding: 0 16px 0 42px;
  width: 100%;
}

.search svg {
  color: var(--gray-500);
  height: 20px;
  left: 14px;
  position: absolute;
  top: 12px;
  width: 20px;
}

.inbox-tabs {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
  padding-bottom: 2px;
}

.inbox-tabs a {
  align-items: center;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  color: var(--gray-700);
  display: inline-flex;
  font-size: 13px;
  font-weight: 600;
  height: 42px;
  justify-content: center;
  line-height: 1;
  min-width: 0;
  padding: 0 12px;
  text-align: center;
  white-space: nowrap;
}

.inbox-tabs a.active {
  background: var(--blue-700);
  border-color: var(--blue-700);
  color: #ffffff;
}

.thread-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.thread-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 18px;
  box-shadow: 0 5px 16px rgba(18, 52, 107, 0.04);
  color: var(--gray-950);
  display: grid;
  gap: 11px;
  grid-template-columns: 46px minmax(0, 1fr);
  padding: 15px;
}

.thread-item.active {
  background: linear-gradient(135deg, #f9fcff, #eff6ff);
  border-color: #c8ddff;
  box-shadow: var(--soft-shadow);
}

.client-avatar {
  align-items: center;
  background: linear-gradient(135deg, #6aa9f7, #9bcbff);
  border-radius: 15px;
  color: #ffffff;
  display: inline-flex;
  flex: 0 0 auto;
  font-weight: 800;
  height: 46px;
  justify-content: center;
  text-transform: uppercase;
  width: 46px;
}

.client-avatar.large {
  height: 48px;
  width: 48px;
}

img.client-avatar {
  object-fit: cover;
}

.thread-main,
.thread-row {
  min-width: 0;
}

.thread-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.thread-row {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.thread-row strong {
  font-size: 15px;
  font-weight: 800;
}

.thread-row time {
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.thread-preview {
  color: var(--gray-500);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.badge {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  height: 28px;
  justify-content: center;
  line-height: 1;
  padding: 0 11px;
  white-space: nowrap;
}

.badge.office {
  background: #f8eddf;
  border-color: #ead9c3;
  color: #6a4d2a;
}

.badge.status {
  background: #edf3f8;
  border-color: #d9e4ec;
  color: #38556f;
}

.thread-item.active .badge.office {
  background: #f3e3cf;
  border-color: #dec6a7;
  color: #5e411d;
}

.thread-item.active .badge.status {
  background: #e3edf5;
  border-color: #c9d8e4;
  color: #2e4b65;
}

.status-dot {
  border-radius: 50%;
  display: inline-flex;
  flex: 0 0 auto;
  height: 10px;
  width: 10px;
}

.status-dot-new {
  background: var(--orange-500);
  box-shadow: 0 0 0 5px rgba(242, 138, 34, 0.14);
}

.status-dot-in_progress {
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(28, 155, 99, 0.12);
}

.status-dot-closed {
  background: var(--gray-500);
  box-shadow: 0 0 0 5px rgba(122, 132, 147, 0.12);
}

.unread-count {
  align-items: center;
  background: #55d99d;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(85, 217, 157, 0.16);
  color: #ffffff;
  display: inline-flex;
  flex: 0 0 26px;
  font-size: 12px;
  font-weight: 800;
  height: 26px;
  justify-content: center;
  line-height: 1;
  width: 26px;
}

.conversation-panel,
.conversation-empty {
  background: #fbfcff;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.chat-topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  flex: 0 0 auto;
  gap: 20px;
  height: 82px;
  justify-content: space-between;
  padding: 0 28px;
}

.chat-person {
  align-items: center;
  display: flex;
  gap: 14px;
  min-width: 0;
}

.client-menu-wrap {
  min-width: 0;
  position: relative;
}

.client-menu-trigger {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.client-menu-trigger:hover h1 {
  color: var(--blue-700);
}

.client-history-menu {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(18, 52, 107, 0.18);
  left: 0;
  padding: 16px;
  position: absolute;
  top: calc(100% + 12px);
  width: min(480px, calc(100vw - 150px));
  z-index: 20;
}

.client-history-menu[hidden] {
  display: none;
}

.client-history-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.client-history-head strong,
.client-history-head span {
  display: block;
}

.client-history-head strong {
  color: var(--blue-900);
  font-size: 16px;
}

.client-history-head span {
  color: var(--gray-500);
  font-size: 12px;
  margin-top: 3px;
}

.client-history-controls {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 12px;
}

.client-history-controls label {
  display: grid;
  gap: 5px;
}

.client-history-controls label span {
  color: var(--gray-500);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.client-history-controls select {
  appearance: none;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  color: var(--gray-950);
  min-width: 0;
  padding: 9px 10px;
}

.client-history-list {
  display: grid;
  gap: 8px;
  max-height: 330px;
  overflow: auto;
  padding-right: 3px;
}

.client-history-item {
  align-items: center;
  background: var(--gray-100);
  border: 0;
  border-radius: 14px;
  color: var(--gray-950);
  cursor: pointer;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px;
  text-align: left;
  width: 100%;
}

.client-history-item:hover {
  background: var(--blue-100);
}

.client-history-item strong,
.client-history-item small {
  display: block;
}

.client-history-item strong {
  color: var(--blue-900);
  font-size: 14px;
}

.client-history-item small {
  color: var(--gray-500);
  font-size: 12px;
  margin-top: 4px;
}

.client-history-item .status {
  flex: 0 0 auto;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.chat-person h1,
.chat-topbar h1 {
  font-size: 18px;
  margin: 0;
}

.chat-topbar p {
  color: var(--gray-500);
  font-size: 13px;
  margin: 3px 0 0;
}

.chat-actions,
.user-pill {
  align-items: center;
  display: flex;
  gap: 10px;
}

.status {
  background: var(--blue-100);
  border-radius: 999px;
  color: var(--blue-900);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 10px;
}

.status-in_progress {
  background: #e6f8ee;
  color: #126b43;
}

.status-closed {
  background: var(--gray-200);
  color: var(--gray-700);
}

.status-strip {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
  justify-content: center;
  padding: 16px 24px 0;
}

.status-strip form {
  margin: 0;
}

.card-status-strip {
  flex-wrap: wrap;
  justify-content: flex-start;
  padding: 8px 0 0;
}

.card-status-strip form {
  flex: 1 1 100%;
}

.card-status-strip .soft-button {
  box-shadow: none;
  width: 100%;
}

.soft-button {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  box-shadow: var(--soft-shadow);
  color: var(--gray-700);
  cursor: pointer;
  font-weight: 700;
  padding: 9px 14px;
}

.soft-button.danger {
  background: #fff4f2;
  color: var(--red);
}

.soft-button.success {
  background: #e9f9f1;
  color: #126b43;
}

.soft-button.primary-action {
  background: linear-gradient(135deg, var(--orange-500), #ffad4a);
  border-color: transparent;
  color: #ffffff;
}

.soft-button.secondary-action {
  background: var(--white);
  box-shadow: none;
  color: var(--gray-500);
}

.messages {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 28px;
}

.date-pill {
  align-self: center;
  background: var(--blue-100);
  border-radius: 999px;
  color: var(--blue-900);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
  padding: 7px 14px;
}

.msg-row {
  display: flex;
  gap: 10px;
  max-width: 75%;
}

.msg-row.right {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.msg-row.center {
  align-self: center;
  max-width: 80%;
}

.msg {
  border-radius: 18px;
  box-shadow: 0 5px 18px rgba(18, 52, 107, 0.06);
  font-size: 14px;
  line-height: 1.45;
  padding: 12px 14px;
}

.msg .author {
  color: var(--blue-700);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 5px;
}

.msg .stamp {
  color: var(--gray-500);
  font-size: 11px;
  margin-top: 8px;
  text-align: right;
}

.msg.client {
  background: var(--white);
  border: 1px solid var(--gray-200);
}

.msg.bot {
  background: #eef6ff;
  border: 1px solid #d8eaff;
}

.msg.manager {
  background: linear-gradient(135deg, #d9ebff, #c8e1ff);
  border: 1px solid #b6d6ff;
  color: var(--blue-900);
}

.msg.manager .author,
.msg.manager .stamp {
  color: rgba(18, 52, 107, 0.72);
}

.msg.system {
  background: rgba(255, 255, 255, 0.76);
  border: 1px dashed var(--gray-300);
  box-shadow: none;
  color: var(--gray-700);
  text-align: center;
}

.composer {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--gray-200);
  flex: 0 0 auto;
  padding: 18px 24px 24px;
}

.composer-box {
  align-items: flex-end;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 22px;
  box-shadow: var(--soft-shadow);
  display: flex;
  gap: 12px;
  padding: 12px;
  position: relative;
}

.locked-composer {
  align-items: center;
  color: var(--gray-500);
  font-size: 14px;
  min-height: 58px;
}

.composer-form {
  align-items: flex-end;
  display: flex;
  gap: 12px;
  position: relative;
}

.composer-input {
  align-items: flex-end;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 22px;
  box-shadow: var(--soft-shadow);
  display: flex;
  flex-wrap: wrap;
  flex: 1;
  gap: 8px;
  min-height: 64px;
  min-width: 0;
  padding: 8px 10px;
}

.composer-tools {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 2px;
}

.emoji-button,
.attach-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 12px;
  color: var(--gray-500);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 40px;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.emoji-button:hover,
.emoji-button.active,
.attach-button:hover {
  background: var(--gray-100);
  color: var(--gray-700);
}

.emoji-button svg,
.attach-button svg {
  height: 28px;
  width: 28px;
}

.emoji-menu {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  bottom: calc(100% + 10px);
  box-shadow: var(--soft-shadow);
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(8, 40px);
  left: 0;
  padding: 8px;
  position: absolute;
  z-index: 25;
}

.emoji-menu[hidden] {
  display: none;
}

.emoji-option {
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  font-size: 30px;
  height: 40px;
  line-height: 1;
  width: 40px;
}

.emoji-option:hover {
  background: var(--gray-100);
}

.quick-reply-menu {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  bottom: calc(100% + 10px);
  box-shadow: var(--soft-shadow);
  left: 0;
  max-height: 260px;
  overflow: auto;
  padding: 8px;
  position: absolute;
  right: 0;
  z-index: 20;
}

.quick-reply-menu[hidden] {
  display: none;
}

.quick-reply-option {
  background: transparent;
  border: 0;
  border-radius: 10px;
  color: var(--gray-700);
  cursor: pointer;
  display: block;
  font-family: inherit;
  padding: 10px;
  text-align: left;
  width: 100%;
}

.quick-reply-option:hover {
  background: var(--gray-100);
}

.quick-reply-option strong,
.quick-reply-option span {
  display: block;
}

.quick-reply-option strong {
  color: var(--gray-950);
  font-size: 13px;
  margin-bottom: 4px;
}

.quick-reply-option span {
  font-size: 13px;
  line-height: 1.35;
}

.composer textarea {
  align-self: flex-start;
  border: 0;
  color: var(--gray-950);
  flex: 1 1 auto;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.45;
  max-height: 112px;
  min-height: 44px;
  min-width: 0;
  outline: 0;
  overflow-y: hidden;
  padding: 6px 8px;
  resize: none;
}

.attachment-preview {
  align-self: stretch;
  display: flex;
  flex: 0 0 100%;
  flex-wrap: wrap;
  gap: 6px;
  padding: 2px 8px 4px 48px;
}

.attachment-preview[hidden] {
  display: none;
}

.attachment-chip {
  align-items: center;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  color: var(--gray-700);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 7px;
  max-width: 260px;
  overflow: hidden;
  padding: 5px 6px 5px 10px;
}

.attachment-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-chip button {
  align-items: center;
  background: #dfe7f1;
  border: 0;
  border-radius: 999px;
  color: var(--gray-700);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 20px;
  font: inherit;
  height: 20px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  transition: background 0.16s ease, color 0.16s ease;
  width: 20px;
}

.attachment-chip button:hover {
  background: #cfd9e7;
  color: var(--blue-900);
}

.composer textarea::placeholder {
  color: #aeb7c2;
  opacity: 1;
}

.send-btn,
.primary-button {
  align-items: center;
  background: linear-gradient(135deg, var(--orange-500), #ffad4a);
  border: 0;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(242, 138, 34, 0.25);
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  height: 48px;
  justify-content: center;
  overflow: hidden;
  white-space: nowrap;
  width: 48px;
}

.send-btn svg {
  display: block;
  height: 23px;
  width: 23px;
}

.details-panel {
  background: #fbfcff;
  border-left: 1px solid var(--gray-200);
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 18px;
}

.details-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(18, 52, 107, 0.055);
  margin-bottom: 14px;
  padding: 16px;
}

.details-card h3 {
  color: var(--blue-900);
  font-size: 15px;
  margin: 0 0 12px;
}

.order-card {
  padding: 0;
  overflow: hidden;
}

.order-card-head {
  align-items: center;
  background: linear-gradient(135deg, #e8f2ff, #f7fbff);
  border: 1px solid #cfe0fb;
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  display: flex;
  justify-content: space-between;
  margin: 14px 14px 0;
  padding: 16px;
}

.order-card-head .eyebrow {
  color: var(--gray-500);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin: 0 0 4px;
  text-transform: uppercase;
}

.order-card-head h3 {
  color: var(--blue-900);
  font-size: 24px;
  line-height: 1;
  margin: 0;
}

.folder-action-form {
  padding: 12px 16px 0;
}

.order-card-section {
  border-top: 1px solid var(--gray-200);
  padding: 14px 16px;
}

.folder-action-form + .order-card-section,
.order-card-head + .order-card-section {
  border-top: 0;
}

.order-actions-section {
  background: #fbfcff;
}

.section-title {
  color: var(--blue-900);
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 10px;
}

.info-list {
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  overflow: hidden;
}

.info-row,
.status-control-row {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.info-row {
  background: #ffffff;
  border-bottom: 1px solid var(--gray-200);
  padding: 10px 12px;
}

.info-row:last-child {
  border-bottom: 0;
}

.info-row span,
.status-control-row span,
.description-block span {
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 800;
}

.info-row strong,
.status-control-row strong {
  color: var(--gray-950);
  font-size: 13px;
  line-height: 1.35;
  text-align: right;
}

.status-control-row {
  background: #f7fbff;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  margin-bottom: 10px;
  padding: 10px 12px;
}

.status-control-row strong {
  background: #e6f8ee;
  border-radius: 999px;
  color: #126b43;
  padding: 6px 9px;
}

.description-block {
  background: #ffffff;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  margin-top: 10px;
  padding: 11px 12px;
}

.description-block p {
  color: var(--gray-700);
  font-size: 13px;
  line-height: 1.45;
  margin: 5px 0 0;
  overflow-wrap: anywhere;
}

.path-block p {
  color: var(--gray-500);
  font-size: 12px;
}

.details-muted {
  color: var(--gray-500);
  line-height: 1.45;
}

.details-card-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.details-card-head h3 {
  margin: 0;
}

.settings-page {
  min-height: 100%;
  overflow: auto;
  padding: 28px;
}

.settings-head {
  margin-bottom: 18px;
}

.settings-head h1 {
  color: var(--blue-900);
  font-size: 28px;
  margin: 0 0 6px;
}

.settings-head p {
  color: var(--gray-500);
  margin: 0;
}

.settings-form {
  align-items: end;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(160px, 0.7fr) minmax(220px, 1fr) minmax(280px, 2fr) auto;
  margin-bottom: 20px;
  padding: 18px;
}

.settings-form label {
  display: grid;
  gap: 7px;
}

.settings-form span {
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.settings-form input,
.settings-form select,
.settings-form textarea {
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  color: var(--gray-950);
  font-family: inherit;
  font-size: 14px;
  outline: 0;
  padding: 12px;
}

.settings-form textarea {
  min-height: 78px;
  resize: vertical;
}

.settings-submit {
  height: 44px;
  padding: 0 18px;
  width: auto;
}

.settings-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-column {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.settings-column h2 {
  color: var(--blue-900);
  font-size: 18px;
  margin: 0 0 14px;
}

.reply-admin-list {
  display: grid;
  gap: 10px;
}

.reply-admin-item {
  align-items: start;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 14px;
}

.reply-admin-item strong {
  color: var(--gray-950);
}

.reply-admin-item p {
  color: var(--gray-600);
  line-height: 1.4;
  margin: 6px 0 0;
}

.order-number {
  align-items: center;
  background: linear-gradient(135deg, var(--blue-100), #f7fbff);
  border-radius: 14px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 12px;
}

.order-number strong {
  color: var(--blue-900);
  font-size: 22px;
}

.order-meta-list {
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  overflow: hidden;
}

.order-meta-row {
  align-items: center;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px;
}

.order-meta-row:last-child {
  border-bottom: 0;
}

.order-meta-row span {
  color: var(--gray-500);
  font-size: 13px;
  font-weight: 700;
}

.order-meta-row strong {
  color: var(--gray-950);
  font-size: 13px;
  text-align: right;
}

.field {
  border-bottom: 1px solid var(--gray-200);
  padding: 10px 0;
}

.field:last-child {
  border-bottom: 0;
}

.history-jump {
  align-items: center;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  color: var(--gray-700);
  cursor: pointer;
  display: flex;
  font-family: inherit;
  gap: 12px;
  justify-content: space-between;
  margin: 12px 0;
  padding: 13px;
  text-align: left;
  width: 100%;
}

.top-history-jump {
  margin: 0;
  min-height: 44px;
  padding: 9px 12px;
  width: 240px;
}

.file-row {
  align-items: center;
  background: var(--gray-100);
  border-radius: 14px;
  display: flex;
  gap: 12px;
  padding: 12px;
}

.file-icon {
  align-items: center;
  background: #e8f1ff;
  border-radius: 10px;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.file-row strong,
.file-row small {
  display: block;
}

.file-row strong {
  color: var(--gray-950);
  font-size: 13px;
}

.file-row small {
  color: var(--gray-500);
  font-size: 12px;
  line-height: 1.35;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.description-preview {
  color: var(--gray-700);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
  max-height: 120px;
  overflow: hidden;
}

.history-jump strong,
.history-jump small {
  display: block;
}

.history-jump strong {
  color: var(--blue-900);
  font-size: 14px;
}

.history-jump small {
  color: var(--gray-500);
  font-size: 12px;
  margin-top: 4px;
}

.order-control-block {
  border-bottom: 1px solid var(--gray-200);
  padding: 10px 0;
}

.label {
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.value {
  color: var(--gray-950);
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.primary-link {
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
  border: 0;
  border-radius: 16px;
  box-shadow: 0 12px 24px rgba(47, 128, 237, 0.2);
  color: #ffffff;
  cursor: pointer;
  display: block;
  font-family: inherit;
  font-weight: 800;
  margin-top: 14px;
  padding: 13px 16px;
  text-align: center;
  width: 100%;
}

.detail-action {
  align-items: center;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  color: var(--blue-700);
  cursor: pointer;
  display: flex;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  justify-content: space-between;
  margin-top: 10px;
  min-height: 46px;
  padding: 0 12px;
  width: 100%;
}

.detail-action:first-of-type {
  margin-top: 0;
}

.detail-action strong {
  color: var(--gray-500);
  font-size: 20px;
  line-height: 1;
}

.compact-folder-button {
  margin: 0;
}

.quick-replies {
  display: grid;
  gap: 8px;
}

.history-list {
  display: grid;
  gap: 8px;
}

.history-item {
  align-items: center;
  background: var(--gray-100);
  border: 0;
  border-radius: 14px;
  color: var(--gray-950);
  cursor: pointer;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px;
  text-align: left;
  width: 100%;
}

.history-item strong,
.history-item small {
  display: block;
}

.history-item strong {
  color: var(--blue-900);
  font-size: 14px;
}

.history-item small {
  color: var(--gray-500);
  font-size: 12px;
  margin-top: 4px;
}

.modal-backdrop {
  align-items: center;
  background: rgba(21, 25, 35, 0.42);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 32px;
  position: fixed;
  z-index: 50;
}

.modal-backdrop[hidden] {
  display: none;
}

.history-modal {
  background: var(--white);
  border-radius: 26px;
  box-shadow: 0 28px 80px rgba(18, 52, 107, 0.28);
  display: flex;
  flex-direction: column;
  height: min(820px, calc(100vh - 64px));
  max-width: 1080px;
  min-height: 0;
  overflow: hidden;
  width: min(1080px, calc(100vw - 64px));
}

.history-modal-head {
  align-items: center;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  flex: 0 0 auto;
  justify-content: space-between;
  padding: 22px 24px;
}

.history-modal-head h2 {
  color: var(--blue-900);
  font-size: 20px;
  margin: 0;
}

.history-modal-body {
  display: grid;
  flex: 1;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 0;
}

.history-summary {
  border-right: 1px solid var(--gray-200);
  min-height: 0;
  overflow: visible;
  padding: 22px;
}

.history-dialog {
  background:
    linear-gradient(rgba(246, 248, 251, 0.92), rgba(246, 248, 251, 0.92)),
    repeating-linear-gradient(135deg, transparent, transparent 18px, rgba(30, 99, 182, 0.035) 18px, rgba(30, 99, 182, 0.035) 26px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  overflow: auto;
  padding: 24px;
}

.modal-open {
  overflow: hidden;
}

.reply {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  color: var(--gray-700);
  cursor: pointer;
  font-size: 13px;
  padding: 10px 12px;
  text-align: left;
}

.empty-chat-card {
  align-self: center;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  box-shadow: var(--shadow);
  justify-self: center;
  margin: auto;
  max-width: 460px;
  padding: 28px;
  text-align: center;
}

.empty-chat-card h2 {
  color: var(--blue-900);
  margin-bottom: 10px;
}

.empty-chat-card p,
.empty-list {
  color: var(--gray-500);
}

.empty-list {
  padding: 24px;
  text-align: center;
}

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

.user-pill span {
  background: linear-gradient(135deg, var(--orange-500), #ffbf72);
  border-radius: 50%;
  color: #ffffff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  height: 38px;
  justify-content: center;
  padding-top: 11px;
  width: 38px;
}

.user-pill form {
  margin: 0;
}

.user-pill button {
  background: var(--gray-100);
  border: 0;
  border-radius: 14px;
  color: var(--gray-700);
  cursor: pointer;
  font-weight: 700;
  min-height: 38px;
  padding: 0 14px;
}

.inline-alert {
  margin: 12px 24px 0;
}

.alert {
  background: var(--orange-100);
  border-radius: 14px;
  color: #934e00;
  padding: 12px 14px;
}

.login-body {
  background:
    radial-gradient(circle at top left, rgba(47, 128, 237, 0.14), transparent 30%),
    radial-gradient(circle at bottom right, rgba(242, 138, 34, 0.12), transparent 32%),
    var(--gray-100);
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--gray-200);
  border-radius: 24px;
  box-shadow: var(--shadow);
  max-width: 420px;
  padding: 34px;
  width: 100%;
}

.eyebrow {
  color: var(--orange-500);
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.login-panel h1 {
  color: var(--blue-900);
}

.form-stack {
  display: grid;
  gap: 16px;
}

.form-stack label {
  display: grid;
  gap: 7px;
}

.form-stack input {
  border: 1px solid var(--gray-200);
  border-radius: 15px;
  height: 46px;
  padding: 0 12px;
}

.form-stack .primary-button {
  border-radius: 15px;
  height: 46px;
  text-indent: 0;
  width: 100%;
}

.form-stack .primary-button::before {
  content: none;
}

.badges {
  align-items: center;
}

.badge {
  align-items: center;
  display: inline-flex;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  justify-content: center;
  line-height: 1;
  min-height: 28px;
  padding: 0 10px;
}

.chat-actions .status,
.chat-actions .plain-icon-button {
  align-items: center;
  border-radius: 16px;
  display: inline-flex;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  height: 44px;
  justify-content: center;
  line-height: 1;
  min-width: 96px;
  padding: 0 16px;
}

.chat-actions .plain-icon-button {
  color: var(--gray-700);
  font-weight: 700;
}

.chat-actions .danger-action {
  background: #fff4f2;
  color: var(--red);
}

.handoff-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 10px;
}

.bot-handoff-form {
  margin: 0;
}

.bot-handoff-form .soft-button {
  box-shadow: none;
}

.composer-box {
  align-items: center;
  min-height: 82px;
}

.composer textarea {
  min-height: 58px;
  padding: 8px 14px 18px;
}

.send-btn.primary-button {
  align-self: center;
  border-radius: 16px;
  flex: 0 0 54px;
  height: 54px;
  width: 54px;
}

.send-btn.primary-button svg {
  height: 32px;
  transform: translateX(1px);
  width: 32px;
}

