:root {
  --bg-0: #0f1f24;
  --bg-1: #0b2f3a;
  --bg-2: #14454e;
  --panel: rgba(255, 255, 255, 0.08);
  --card: rgba(255, 255, 255, 0.9);
  --stroke: rgba(255, 255, 255, 0.16);
  --text: #0b1220;
  --muted: #667085;
  --accent: #3ad3c8;
  --accent-2: #ffd166;
  --danger: #f97066;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Manrope", "Segoe UI", system-ui, sans-serif;
  background: radial-gradient(circle at 15% 10%, #1d6f77 0%, #0f1f24 45%, #0a1418 100%);
  color: var(--text);
  min-height: 100vh;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  padding: 28px 20px;
  background: linear-gradient(180deg, rgba(7, 25, 31, 0.9), rgba(8, 20, 24, 0.9));
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  color: #e8f3f6;
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 26px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #3ad3c8, #2f8bbd);
  color: #0b1220;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.brand-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.brand-sub {
  font-size: 12px;
  color: rgba(232, 243, 246, 0.7);
}

.nav {
  display: grid;
  gap: 10px;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: rgba(232, 243, 246, 0.82);
  background: transparent;
  border: 1px solid transparent;
  font-size: 14px;
}

.nav a:hover {
  background: rgba(58, 211, 200, 0.08);
  border-color: rgba(58, 211, 200, 0.3);
  color: #ffffff;
}

.nav a.active {
  background: rgba(58, 211, 200, 0.18);
  border-color: rgba(58, 211, 200, 0.5);
  color: #ffffff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
}

.nav a.active .nav-dot {
  background: var(--accent);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
}

.main {
  padding: 28px 32px 40px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 18px 22px;
  border-radius: 18px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 18px 40px rgba(3, 17, 21, 0.25);
}

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

.badge {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(58, 211, 200, 0.2);
  color: #0b1220;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.container { max-width: 1100px; margin: 40px auto; padding: 0 20px; }
.card { background: var(--card); border-radius: 18px; padding: 20px; box-shadow: 0 18px 45px rgba(3, 17, 21, 0.18); margin-bottom: 18px; border: 1px solid rgba(255,255,255,0.6); }

.glass {
  backdrop-filter: blur(16px);
}

h1,h2 { margin-top: 0; }
input, button, select, textarea {
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

input:focus, select:focus, textarea:focus {
  border-color: rgba(58, 211, 200, 0.7);
  box-shadow: 0 0 0 3px rgba(58, 211, 200, 0.15);
}

button {
  background: linear-gradient(135deg, #3ad3c8, #2f8bbd);
  color: #0b1220;
  border: 0;
  cursor: pointer;
  font-weight: 600;
}
button.secondary { background: #1f2937; color: #f9fafb; }
button.ghost { background: transparent; color: #e8f3f6; border: 1px solid rgba(255,255,255,0.2); }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; }
th, td { text-align: left; border-bottom: 1px solid #edf2f7; padding: 10px 12px; font-size: 13px; }
th { background: #f7fafc; font-weight: 600; color: #111827; }
.muted { color: var(--muted); font-size: 13px; }

th.sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 18px;
}

th.sortable:hover {
  color: #0f766e;
}

th.sortable.sort-asc::after,
th.sortable.sort-desc::after {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: #0f766e;
}

th.sortable.sort-asc::after { content: "в–І"; }
th.sortable.sort-desc::after { content: "в–ј"; }

.topnav { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.topnav a { text-decoration: none; color: #0b1220; background: #e6f8f6; padding: 8px 10px; border-radius: 8px; font-size: 13px; }
.topnav a.active { background: var(--accent); color: #0b1220; }

.editor-wrap { border: 1px solid #ddd; border-radius: 8px; overflow: hidden; }
.editor-tools { padding: 8px; display: flex; gap: 8px; background: #f3f4f6; }
.editor { min-height: 100px; max-height: 180px; overflow: auto; padding: 10px; background: #fff; }

.thumb {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #ddd;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(100px, 1fr));
  gap: 14px;
}

.day-cell {
  min-width: 100px;
  min-height: 100px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(3, 17, 21, 0.12);
}

.day-cell.has-delivery {
  background: linear-gradient(135deg, rgba(255, 241, 198, 0.85), rgba(255, 255, 255, 0.95));
  border-color: rgba(255, 209, 102, 0.6);
}

.day-head {
  font-size: 12px;
  color: #1f2937;
  margin-bottom: 8px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.day-date {
  font-size: 11px;
  color: #6b7280;
  font-weight: 600;
}

.day-body {
  font-size: 12px;
  color: #111827;
  line-height: 1.35;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.calendar-summary .card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.summary-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.summary-value {
  font-size: 28px;
  font-weight: 700;
  color: #0b1220;
}

.calendar-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 16px;
  align-items: start;
}

.calendar-legend {
  padding: 18px;
}

.calendar-legend h3 {
  margin: 0 0 12px 0;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #1f2937;
  margin-bottom: 8px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.legend-active {
  background: #ffd166;
  box-shadow: 0 0 0 3px rgba(255, 209, 102, 0.3);
}

.legend-empty {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(15, 31, 36, 0.12);
}

.delivery-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.04);
  margin-bottom: 6px;
  font-weight: 600;
}

@media (max-width: 1100px) {
  .calendar-wrap {
    grid-template-columns: 1fr;
  }
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover {
  background: #f8fbfc;
}

.row-overdue {
  background: #fff5f5;
}

.status-chip {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
}

.status-draft { background: #f9fafb; border-color: #d1d5db; }
.status-new_order { background: #eef2ff; border-color: #c7d2fe; }
.status-awaiting_confirmation { background: #ecfeff; border-color: #a5f3fc; }
.status-confirmed { background: #eef6ff; border-color: #bfdbfe; }
.status-created { background: #eef2ff; border-color: #c7d2fe; }
.status-processing { background: #ecfeff; border-color: #a5f3fc; }
.status-invoiced { background: #fff7ed; border-color: #fed7aa; }
.status-in_delivery { background: #fff7ed; border-color: #fdba74; }
.status-deliveries_planned { background: #f0fdf4; border-color: #bbf7d0; }
.status-paid { background: #eff6ff; border-color: #bfdbfe; }
.status-completed { background: #f0fdf4; border-color: #86efac; }
.status-cancelled { background: #fef2f2; border-color: #fecaca; }

.overdue-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  font-size: 11px;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.timeline {
  margin-top: 12px;
  border-left: 2px solid #d1d5db;
  padding-left: 12px;
}

.timeline-item {
  position: relative;
  margin: 0 0 12px 0;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  position: absolute;
  left: -18px;
  top: 5px;
}

.timeline-title {
  font-weight: 600;
}

.timeline-when {
  font-size: 12px;
  color: #6b7280;
}

.timeline-detail {
  font-size: 13px;
}

.chat-box {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  min-height: 180px;
  max-height: 320px;
  overflow-y: auto;
  padding: 10px;
  background: #f8fafc;
  margin-bottom: 10px;
}

.chat-item {
  margin-bottom: 8px;
  padding: 8px 10px;
  border-radius: 8px;
}

.chat-item.from-manager {
  background: #ecfeff;
  border: 1px solid #bae6fd;
}

.chat-item.from-designer {
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.chat-meta {
  font-size: 11px;
  color: #4b5563;
  margin-bottom: 4px;
}

.chat-message {
  font-size: 13px;
  white-space: pre-wrap;
}

.chat-file {
  margin-top: 4px;
  font-size: 12px;
}

.chat-file a {
  color: #0f766e;
  text-decoration: none;
  font-weight: 600;
}

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

.chat-image-wrap {
  margin-top: 6px;
}

.chat-image {
  max-width: 220px;
  width: 100%;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid #e5e7eb;
}

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

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

.messengers-list input {
  width: 100%;
}

.messengers-chat {
  display: grid;
  gap: 10px;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.chat-title {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(15, 23, 42, 0.2);
  display: none;
}

.avatar-name {
  display: flex;
  align-items: center;
  gap: 8px;
}

.avatar-sm {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(15, 23, 42, 0.2);
}

.avatar-placeholder {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(15, 23, 42, 0.15);
  display: inline-block;
}

.chat-header h3 {
  margin: 0 0 4px 0;
}

.chat-input {
  display: grid;
  gap: 8px;
}

.chat-input textarea {
  width: 100%;
  min-height: 90px;
}

.messengers-list table th,
.messengers-list table td {
  font-size: 12.5px;
}

.messengers-list tr.active {
  background: rgba(58, 211, 200, 0.12);
}

.image-modal-card {
  position: relative;
  width: min(70vw, 900px);
  max-height: 70vh;
  display: grid;
  place-items: center;
}

.image-modal-card img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 10px;
}

.modal-close {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

 .docs-box {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  min-height: 120px;
  max-height: 320px;
  overflow-y: auto;
  padding: 10px;
  background: #f9fafb;
}

.doc-item {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 8px;
  background: #fff;
}

textarea {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
  margin-bottom: 8px;
  resize: vertical;
}

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

.bulk-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

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

button.tiny {
  padding: 6px 8px;
  font-size: 12px;
  border-radius: 7px;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  overflow: auto;
}

.modal-backdrop.open {
  display: flex;
}

.modal-card {
  width: min(520px, calc(100vw - 24px));
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 20px 40px rgba(0,0,0,.24);
  overflow: auto;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.modal-grid .full {
  grid-column: 1 / -1;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

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

  .main {
    padding: 20px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

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

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

.catalog-subnav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.catalog-subnav a {
  text-decoration: none;
  color: #0b1220;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(15, 31, 36, 0.06);
  border: 1px solid rgba(15, 31, 36, 0.08);
  font-weight: 700;
}

.catalog-subnav a.active {
  background: rgba(58, 211, 200, 0.18);
  border-color: rgba(58, 211, 200, 0.45);
}

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

.catalog-breadcrumbs span {
  opacity: 0.45;
  margin: 0 6px;
}

.catalog-page-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.catalog-head-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.icon-action {
  min-width: 92px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.icon-action span {
  font-size: 18px;
  line-height: 1;
}

.icon-action.success {
  background: linear-gradient(135deg, #9fe870, #38b06a);
}

.catalog-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.catalog-hub-card {
  display: block;
  text-decoration: none;
  color: var(--text);
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 18px 45px rgba(3, 17, 21, 0.18);
}

.catalog-hub-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.catalog-hub-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #3ad3c8, #2f8bbd);
  color: #0b1220;
  font-size: 22px;
  margin-bottom: 12px;
}

.catalog-hub-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 8px;
}

.catalog-filter-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 14px;
}

.catalog-filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px 16px;
}

.catalog-filter-grid label,
.catalog-edit-grid label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 6px;
}

.catalog-filter-buttons {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

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

.catalog-products-table td {
  vertical-align: top;
}

.catalog-product-thumb-wrap {
  width: 108px;
  height: 108px;
}

.catalog-product-thumb {
  width: 108px;
  height: 108px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #dbe3ea;
  background: #fff;
}

.catalog-product-thumb-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}

.product-name-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.product-name-cell a {
  color: #1565c0;
  text-decoration: none;
  font-weight: 800;
}

.product-sku-cell {
  font-weight: 700;
  margin-bottom: 8px;
}

.product-price-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.status-pill.on {
  color: #0f766e;
  background: #d1fae5;
}

.status-pill.off {
  color: #b42318;
  background: #fee4e2;
}

.catalog-actions-row {
  display: flex;
  gap: 8px;
}

.table-input {
  width: 100%;
  min-width: 96px;
  padding: 8px 10px;
  border-radius: 8px;
}

.compact-top {
  margin-top: 8px;
}

.table-price-stack {
  min-width: 120px;
}

.modal-card-wide {
  width: min(860px, calc(100vw - 24px));
  max-width: calc(100vw - 32px);
}

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

.icon-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  padding: 0;
  font-size: 18px;
}

.catalog-edit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 16px;
}

.catalog-edit-grid .span-2 {
  grid-column: span 2;
}

.inline-check {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
}

.product-detail-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.product-detail-tabs button {
  background: rgba(15, 31, 36, 0.06);
  color: var(--text);
  border: 1px solid rgba(15, 31, 36, 0.08);
}

.product-detail-tabs button.active {
  background: rgba(58, 211, 200, 0.18);
  border-color: rgba(58, 211, 200, 0.45);
}

.detail-tab {
  display: none;
}

.detail-tab.active {
  display: block;
}

.product-image-stage {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  align-items: start;
}

.product-image-stage-preview {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid #dbe3ea;
  background: #fff;
}

.product-gallery-strip {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.product-gallery-thumb {
  width: 86px;
  height: 86px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #dbe3ea;
}

.share-chat-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  max-height: 380px;
  overflow: auto;
}

.share-chat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  width: 100%;
  background: rgba(15, 31, 36, 0.05);
  color: var(--text);
  border: 1px solid rgba(15, 31, 36, 0.08);
}

@media (max-width: 1180px) {
  .catalog-filter-grid,
  .catalog-edit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-filter-buttons {
    align-items: stretch;
  }
}

@media (max-width: 760px) {
  .catalog-page-head,
  .product-image-stage {
    grid-template-columns: 1fr;
    display: grid;
  }

  .catalog-filter-grid,
  .catalog-edit-grid {
    grid-template-columns: 1fr;
  }

  .catalog-edit-grid .span-2 {
    grid-column: span 1;
  }

  .catalog-product-thumb-wrap,
  .catalog-product-thumb {
    width: 84px;
    height: 84px;
  }
}

/* Premium CRM Theme */

:root {
  --bg-0: #eef6ff;
  --bg-1: #dff0ff;
  --bg-2: #f8fbff;
  --panel: rgba(255, 255, 255, 0.84);
  --card: rgba(255, 255, 255, 0.88);
  --stroke: rgba(161, 194, 231, 0.58);
  --text: #12304f;
  --muted: #6d7f96;
  --accent: #1174d7;
  --accent-2: #52c6ff;
  --danger: #ef6a5b;
  --success: #42bf73;
  --shadow-xl: 0 24px 60px rgba(91, 135, 191, 0.22);
  --shadow-lg: 0 18px 36px rgba(95, 131, 181, 0.18);
  --shadow-sm: 0 10px 24px rgba(111, 145, 190, 0.12);
  --line-soft: rgba(186, 210, 235, 0.9);
}

html {
  min-height: 100%;
}

body {
  position: relative;
  background:
    radial-gradient(circle at top left, rgba(121, 188, 255, 0.34), transparent 32%),
    radial-gradient(circle at 88% 16%, rgba(16, 117, 213, 0.18), transparent 18%),
    linear-gradient(180deg, #eff7ff 0%, #f7fbff 52%, #edf6ff 100%);
  color: var(--text);
  overflow-x: hidden;
}

.app-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.backdrop-orb {
  position: absolute;
  border-radius: 44px;
  filter: blur(0.5px);
}

.orb-a {
  width: 380px;
  height: 380px;
  right: -120px;
  top: -70px;
  background: linear-gradient(180deg, rgba(17, 116, 215, 0.92), rgba(17, 116, 215, 0.62));
  border-radius: 0 0 0 140px;
}

.orb-b {
  width: 320px;
  height: 320px;
  left: -120px;
  bottom: -110px;
  background: linear-gradient(180deg, rgba(20, 122, 219, 0.85), rgba(58, 171, 255, 0.58));
  border-radius: 140px 0 0 0;
}

.backdrop-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(106, 141, 185, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(106, 141, 185, 0.08) 1px, transparent 1px);
  background-size: 120px 120px;
  opacity: 0.34;
}

.backdrop-plane {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 34%, rgba(17, 116, 215, 0.12), transparent 14%),
    radial-gradient(circle at 82% 76%, rgba(17, 116, 215, 0.06), transparent 18%);
}

.premium-shell {
  position: relative;
  z-index: 1;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 22px;
  padding: 24px;
  min-height: 100vh;
}

.premium-sidebar {
  position: sticky;
  top: 24px;
  min-height: calc(100vh - 48px);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(24px);
  padding: 24px 14px;
  overflow: hidden;
}

.sidebar-ribbon {
  position: absolute;
  left: -30px;
  top: 112px;
  transform: rotate(-90deg);
  color: #1a3c61;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand-premium {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  margin-bottom: 26px;
  align-items: center;
}

.brand-premium .brand-mark {
  width: 68px;
  height: 68px;
  border-radius: 24px;
  background: linear-gradient(135deg, #0d68c7, #1ea2ff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), var(--shadow-lg);
  color: #fff;
  font-size: 28px;
}

.brand-premium .brand-text {
  text-align: center;
}

.brand-premium .brand-title {
  color: #153b63;
}

.brand-premium .brand-sub {
  color: var(--muted);
}

.nav-premium {
  gap: 12px;
}

.nav-premium a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  text-align: center;
  border-radius: 22px;
  padding: 12px 8px;
  color: #5d728e;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(196, 215, 238, 0.72);
  box-shadow: var(--shadow-sm);
}

.nav-premium a:hover,
.nav-premium a.active {
  color: #0f5ea8;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(232, 244, 255, 0.92));
  transform: translateY(-1px);
}

.nav-premium .nav-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #0f68bf;
  background: linear-gradient(180deg, #ffffff, #edf6ff);
  border: 1px solid rgba(191, 213, 237, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 10px 22px rgba(96, 139, 192, 0.16);
}

.nav-premium a.active .nav-icon {
  color: #fff;
  background: linear-gradient(180deg, #1382ea, #0a65bf);
  border-color: transparent;
}

.nav-premium .nav-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-premium .nav-text strong {
  font-size: 12px;
}

.nav-premium .nav-text small {
  color: var(--muted);
  font-size: 11px;
}

.sidebar-footer-premium {
  padding-top: 20px;
}

.support-card {
  background: linear-gradient(180deg, rgba(20, 116, 210, 0.96), rgba(20, 150, 234, 0.8));
  border-radius: 22px;
  padding: 16px 14px;
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.support-card-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.8;
}

.support-card-title {
  margin: 6px 0 14px;
  font-weight: 700;
}

.support-card .ghost {
  width: 100%;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.premium-main {
  padding: 0;
}

.premium-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 18px 24px;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-xl);
}

.topbar-primary {
  display: flex;
  align-items: center;
  gap: 24px;
}

.topbar-intro h1 {
  margin: 3px 0 0;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.topbar-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
  font-weight: 700;
  color: #6f86a3;
}

.topbar-kicker::before,
.section-kicker::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0d68c7, #73c9ff);
}

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

.top-tab {
  padding: 14px 18px;
  border-radius: 999px;
  text-decoration: none;
  color: #4c678a;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(240, 248, 255, 0.96));
  border: 1px solid rgba(193, 214, 239, 0.86);
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  font-weight: 700;
}

.top-tab.active {
  color: #fff;
  background: linear-gradient(135deg, #0f70d2, #1b9bf2);
  border-color: transparent;
}

.premium-top-actions {
  gap: 12px;
}

.signal-pill,
.profile-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(239, 247, 255, 0.98));
  border: 1px solid rgba(190, 212, 238, 0.85);
  box-shadow: var(--shadow-sm);
  min-width: 84px;
}

.signal-pill {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.signal-pill strong,
.profile-pill strong {
  font-size: 15px;
  color: #163d65;
}

.signal-pill span,
.profile-pill span {
  color: var(--muted);
  font-size: 11px;
}

.profile-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(180deg, #1382ea, #0a65bf);
  font-weight: 800;
}

.premium-content {
  margin-top: 20px;
}

.content {
  gap: 20px;
}

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(250, 252, 255, 0.92));
  border-radius: 30px;
  padding: 24px;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255, 255, 255, 0.92);
}

.glass {
  backdrop-filter: blur(24px);
}

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

h1, h2, h3 {
  margin: 0;
  letter-spacing: -0.03em;
}

input, button, select, textarea {
  border-radius: 16px;
  border: 1px solid rgba(189, 211, 238, 0.95);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  min-height: 48px;
}

input, select, textarea {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

input:focus, select:focus, textarea:focus {
  border-color: rgba(17, 116, 215, 0.54);
  box-shadow: 0 0 0 4px rgba(17, 116, 215, 0.12);
}

button {
  background: linear-gradient(135deg, #0f73d8, #1ea3ff);
  color: #fff;
  border: 0;
  box-shadow: 0 14px 24px rgba(20, 120, 212, 0.25);
}

button.secondary {
  background: linear-gradient(180deg, #ffffff, #eef5ff);
  color: #234c79;
  border: 1px solid rgba(189, 211, 238, 0.95);
  box-shadow: var(--shadow-sm);
}

button.ghost {
  background: transparent;
  color: #35608f;
  border: 1px solid rgba(176, 203, 233, 0.82);
  box-shadow: none;
}

table {
  background: transparent;
}

th {
  background: rgba(235, 244, 255, 0.78);
  color: #416688;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

th, td {
  border-bottom: 1px solid rgba(206, 223, 242, 0.82);
  padding: 14px 12px;
}

tr:last-child td {
  border-bottom: 0;
}

.screen-label {
  position: absolute;
  left: -6px;
  top: 180px;
  transform: rotate(-90deg);
  transform-origin: left top;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #28466f;
}

.calendar-hero,
.catalog-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.dashboard-grid {
  display: grid;
  gap: 18px;
}

.dashboard-hero {
  padding: 26px 28px;
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(11, 105, 197, 0.94), rgba(41, 154, 243, 0.9));
  color: #fff;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
  align-items: center;
}

.dashboard-hero .muted,
.dashboard-hero .section-kicker {
  color: rgba(255, 255, 255, 0.82);
}

.dashboard-hero-actions {
  display: grid;
  gap: 12px;
}

.dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.dashboard-side-stack {
  display: grid;
  gap: 18px;
}

.dashboard-panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(244,249,255,0.94));
  border: 1px solid rgba(195, 216, 240, 0.88);
  box-shadow: var(--shadow-sm);
}

.dashboard-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
}

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

.dashboard-link-card {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(195, 216, 240, 0.88);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 10px 24px rgba(34, 84, 138, 0.06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.dashboard-link-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(34, 84, 138, 0.1);
  border-color: rgba(110, 163, 223, 0.88);
}

.dashboard-link-card strong {
  color: #103a63;
}

.dashboard-link-card span {
  color: #6f86a3;
  font-size: 13px;
  line-height: 1.5;
}

.dashboard-status-list,
.dashboard-queue-list {
  display: grid;
  gap: 10px;
}

.dashboard-status-item,
.dashboard-queue-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(195, 216, 240, 0.88);
}

.dashboard-status-item strong,
.dashboard-queue-item strong {
  color: #123f6b;
}

.premium-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.metric-card {
  padding: 20px 22px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(239, 247, 255, 0.92));
  border: 1px solid rgba(198, 217, 240, 0.92);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.metric-label,
.summary-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7290b3;
}

.metric-value,
.summary-value {
  font-size: 36px;
  color: #103a63;
  line-height: 1;
}

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

.calendar-board,
.calendar-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.7fr);
  gap: 18px;
  align-items: start;
}

.calendar-stage,
.calendar-side-card,
.message-workspace {
  border-radius: 32px;
}

.calendar-stage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

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

.calendar-stage-tabs {
  display: flex;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(234, 243, 255, 0.85);
}

.calendar-stage-tabs span {
  padding: 8px 14px;
  border-radius: 999px;
  color: #7892b1;
  font-size: 12px;
  font-weight: 700;
}

.calendar-stage-tabs span.active {
  background: #fff;
  color: #0f6fcc;
  box-shadow: var(--shadow-sm);
}

.calendar-grid-premium,
.calendar-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.calendar-weekday-card {
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(238, 247, 255, 0.86);
  border: 1px solid rgba(198, 217, 240, 0.86);
  display: grid;
  gap: 4px;
}

.calendar-weekday-card strong {
  color: #0f4f93;
}

.calendar-weekday-card span {
  font-size: 11px;
  color: #6d88a7;
}

.day-cell {
  min-height: 158px;
  border-radius: 24px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 250, 255, 0.95));
  border: 1px solid rgba(200, 219, 241, 0.95);
  box-shadow: var(--shadow-sm);
}

.day-cell.is-today {
  box-shadow: 0 0 0 2px rgba(24, 122, 225, 0.18), var(--shadow-sm);
}

.day-cell.has-delivery {
  background: linear-gradient(180deg, rgba(10, 106, 194, 0.95), rgba(32, 157, 241, 0.88));
  border-color: transparent;
}

.day-cell.has-delivery .day-head,
.day-cell.has-delivery .day-date,
.day-cell.has-delivery .day-body,
.day-cell.has-delivery .muted {
  color: #fff;
}

.day-head {
  margin-bottom: 12px;
  font-size: 13px;
}

.day-date {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(235, 245, 255, 0.84);
  color: #21537f;
}

.day-cell.has-delivery .day-date {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.delivery-item {
  background: rgba(239, 247, 255, 0.9);
  border: 1px solid rgba(199, 219, 243, 0.88);
  border-radius: 16px;
  padding: 8px 10px;
  color: #1b4d7b;
}

.day-cell.has-delivery .delivery-item {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.calendar-upcoming-list {
  display: grid;
  gap: 10px;
}

.calendar-mini-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.calendar-mini-stat {
  padding: 14px;
  border-radius: 18px;
  background: rgba(246, 251, 255, 0.96);
  border: 1px solid rgba(198, 217, 240, 0.88);
  display: grid;
  gap: 4px;
}

.calendar-mini-stat strong {
  font-size: 24px;
  color: #0f4f93;
}

.calendar-mini-stat span {
  font-size: 12px;
  color: #6a7f98;
}

.legend-stack {
  display: grid;
  gap: 8px;
}

.upcoming-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(237, 246, 255, 0.92));
  border: 1px solid rgba(198, 217, 240, 0.88);
}

.upcoming-amount {
  font-weight: 800;
  color: #0f72d6;
}

.calendar-empty-state {
  padding: 20px;
  border-radius: 20px;
  background: rgba(247, 251, 255, 0.96);
  border: 1px solid rgba(198, 217, 240, 0.88);
  display: grid;
  gap: 6px;
  text-align: center;
}

.legend-today {
  background: #0f72d6;
  box-shadow: 0 0 0 3px rgba(15, 114, 214, 0.16);
}

.messenger-top-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.messenger-mini-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.messenger-mini-card h3 {
  font-size: 22px;
}

.message-workspace {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 18px;
  min-height: 760px;
}

.chat-lane {
  padding: 8px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(248, 252, 255, 0.88), rgba(238, 246, 255, 0.9));
  border: 1px solid rgba(198, 217, 240, 0.86);
}

.chat-lane-top {
  padding: 14px 14px 10px;
}

.chat-lane-toolbar {
  display: grid;
  gap: 12px;
  padding: 0 14px 8px;
}

.chat-lane-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chat-lane-stat {
  display: inline-grid;
  gap: 2px;
  min-width: 90px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(197, 217, 240, 0.88);
}

.chat-lane-stat strong {
  color: #0f72d6;
  font-size: 15px;
}

.chat-lane-stat span {
  font-size: 11px;
  color: #6a7f98;
}

.designer-chat-list {
  display: grid;
  gap: 10px;
  max-height: 620px;
  overflow: auto;
  padding: 12px;
}

.designer-chat-card {
  width: 100%;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(243, 249, 255, 0.96));
  border: 1px solid rgba(197, 217, 240, 0.88);
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.designer-chat-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(34, 84, 138, 0.12);
  border-color: rgba(108, 164, 226, 0.88);
}

.designer-chat-card.active {
  background: linear-gradient(135deg, #0f72d6, #1a9af2);
  color: #fff;
}

.designer-chat-card.active .designer-chat-login,
.designer-chat-card.active .designer-chat-preview {
  color: rgba(255, 255, 255, 0.84);
}

.designer-chat-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.designer-chat-content {
  display: grid;
  gap: 4px;
}

.designer-chat-name {
  font-weight: 700;
  font-size: 15px;
}

.designer-chat-login,
.designer-chat-preview {
  color: var(--muted);
  font-size: 12px;
}

.designer-chat-system,
.designer-chat-footer {
  color: #7890aa;
  font-size: 11px;
}

.designer-chat-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.designer-chat-card.active .designer-chat-system,
.designer-chat-card.active .designer-chat-footer {
  color: rgba(255, 255, 255, 0.7);
}

.avatar-sm,
.avatar-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}

.avatar-placeholder {
  display: grid;
  place-items: center;
  color: #0f70cf;
  font-weight: 800;
  background: linear-gradient(180deg, #ffffff, #e8f3ff);
  border: 1px solid rgba(187, 209, 236, 0.88);
}

.chat-stage {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
  min-height: 0;
}

.chat-stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.premium-chat-head {
  padding: 18px 20px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(241,248,255,0.95));
  border: 1px solid rgba(198, 217, 240, 0.86);
  box-shadow: var(--shadow-sm);
}

.chat-stage-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.chat-stage-profile {
  display: grid;
  gap: 6px;
}

.chat-stage-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6d88a7;
}

.chat-stage-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chat-stage-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(240, 247, 255, 0.95);
  border: 1px solid rgba(197, 217, 240, 0.88);
  color: #355d87;
  font-size: 12px;
  font-weight: 700;
}

.chat-avatar {
  width: 74px;
  height: 74px;
  border-radius: 24px;
  object-fit: cover;
  display: none;
  box-shadow: var(--shadow-sm);
}

.premium-chat-box,
.chat-box {
  min-height: 0;
  height: 100%;
  border-radius: 28px;
  border: 1px solid rgba(199, 217, 240, 0.86);
  background:
    linear-gradient(180deg, rgba(248, 252, 255, 0.94), rgba(237, 246, 255, 0.95)),
    radial-gradient(circle at right bottom, rgba(20, 120, 212, 0.12), transparent 28%);
  padding: 18px;
}

.chat-item {
  max-width: min(78%, 760px);
  border-radius: 24px;
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 10px;
}

.chat-item.from-manager {
  margin-left: auto;
  background: linear-gradient(135deg, #1181eb, #0894ec);
  color: #fff;
  border: 0;
}

.chat-item.from-manager .chat-meta {
  color: rgba(255, 255, 255, 0.78);
}

.chat-item.from-designer {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(199, 217, 240, 0.88);
}

.chat-composer {
  padding: 18px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(239, 247, 255, 0.94));
  border: 1px solid rgba(199, 217, 240, 0.88);
  display: grid;
  gap: 12px;
}

.chat-composer textarea {
  min-height: 110px;
}

.chat-file-meta {
  font-size: 12px;
  min-height: 18px;
}

.chat-composer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.file-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid rgba(189, 211, 238, 0.95);
  background: rgba(255, 255, 255, 0.9);
  color: #2e5d90;
  cursor: pointer;
  font-weight: 700;
}

.file-pill input {
  display: none;
}

.chat-image {
  max-width: min(100%, 360px);
  border-radius: 18px;
  display: block;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.chat-image-wrap {
  display: grid;
  gap: 10px;
}

.chat-image-open {
  width: fit-content;
}

.chat-file {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(197, 217, 240, 0.88);
}

.chat-file a {
  font-weight: 700;
  color: #145ca7;
  text-decoration: none;
}

.chat-empty-state {
  min-height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 8px;
}

.image-modal-card {
  width: min(70vw, 980px);
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 28px;
  position: relative;
  overflow: auto;
}

.image-modal-card img {
  display: block;
  width: 100%;
  max-height: calc(100vh - 96px);
  object-fit: contain;
  border-radius: 20px;
}

.modal-close,
.icon-close {
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 22px;
}

.login-body {
  min-height: 100vh;
}

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

.login-side-note {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: rotate(-90deg);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  font-weight: 700;
  color: #23476d;
}

.login-card {
  width: min(540px, calc(100vw - 32px));
  padding: 32px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.login-copy {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.login-copy h1 {
  font-size: 38px;
}

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

.login-form label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #7790ad;
  margin-bottom: 8px;
}

.catalog-subnav {
  display: inline-flex;
  gap: 10px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(192, 214, 239, 0.82);
  box-shadow: var(--shadow-sm);
}

.catalog-subnav a {
  padding: 10px 14px;
  border-radius: 999px;
  background: transparent;
  color: #4e6d92;
  font-weight: 700;
}

.catalog-subnav a.active {
  background: linear-gradient(135deg, #0f72d6, #1a9af2);
  color: #fff;
}

.catalog-filter,
.catalog-products-card,
.modal-card,
.calendar-side-card,
.messenger-mini-card {
  border-radius: 28px;
}

.catalog-filter-title,
.catalog-table-head h3 {
  color: #123e66;
}

.catalog-product-thumb-wrap,
.catalog-product-thumb {
  width: 128px;
  height: 128px;
  border-radius: 22px;
  background: rgba(242, 248, 255, 0.96);
}

.status-pill.on {
  background: rgba(66, 191, 115, 0.14);
  color: #23804b;
}

.status-pill.off {
  background: rgba(239, 106, 91, 0.12);
  color: #c14d40;
}

@media (max-width: 1280px) {
  .premium-topbar,
  .calendar-hero,
  .catalog-page-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .message-workspace,
  .calendar-board,
  .calendar-wrap {
    grid-template-columns: 1fr;
  }

  .messenger-top-grid,
  .premium-summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .premium-shell {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .premium-sidebar {
    position: static;
    min-height: auto;
  }

  .sidebar-ribbon,
  .screen-label,
  .login-side-note {
    display: none;
  }

  .nav-premium {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nav-premium a {
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    padding: 12px;
  }

  .topbar-primary,
  .premium-topbar {
    gap: 16px;
  }

  .top-tabs {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .nav-premium {
    grid-template-columns: 1fr;
  }

  .message-workspace {
    min-height: auto;
  }

  .chat-item {
    max-width: 100%;
  }

  .top-tabs,
  .premium-top-actions,
  .chat-composer-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Catalog product refinement */

.products-filter-card {
  border-radius: 22px;
}

.products-filter-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
}

.filter-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.products-grid-card {
  padding: 0;
  overflow: hidden;
}

.catalog-products-layout {
  grid-template-columns: 320px minmax(0, 1fr);
}

.product-highlight-stack {
  display: grid;
  gap: 12px;
}

.catalog-feed-list {
  display: grid;
  gap: 12px;
}

.catalog-feed-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(248, 251, 255, 0.9);
  border: 1px solid rgba(207, 224, 243, 0.8);
}

.catalog-feed-main,
.catalog-feed-side {
  display: grid;
  gap: 6px;
}

.catalog-feed-side {
  justify-items: end;
  text-align: right;
}

.product-highlight-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(195, 216, 240, 0.88);
  text-decoration: none;
  color: inherit;
}

.product-highlight-thumb-wrap,
.product-highlight-thumb {
  width: 74px;
  height: 74px;
  border-radius: 16px;
}

.product-highlight-thumb {
  object-fit: cover;
}

.product-highlight-thumb-empty {
  display: grid;
  place-items: center;
  color: #7c93af;
  background: rgba(239, 246, 255, 0.95);
  border: 1px solid rgba(195, 216, 240, 0.88);
  font-size: 11px;
  text-align: center;
}

.product-highlight-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.product-highlight-meta strong {
  color: #123e66;
}

.product-highlight-meta span {
  color: #7187a3;
  font-size: 12px;
}

.products-table-head {
  padding: 20px 24px 14px;
}

.products-table-side {
  font-size: 12px;
}

.products-table-refined thead th {
  background: #fff;
}

.products-table-refined td {
  vertical-align: top;
}

.catalog-product-thumb-wrap {
  width: 148px;
  height: 148px;
  padding: 10px;
}

.catalog-product-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
}

.product-name-cell {
  display: grid;
  gap: 8px;
}

.product-name-cell a {
  color: #1770ca;
  font-weight: 700;
  text-decoration: none;
}

.product-sku-cell {
  font-weight: 700;
  color: #3d5c7d;
}

.table-stack {
  display: grid;
  gap: 6px;
}

.action-icon-btn {
  width: 42px;
  min-height: 42px;
  height: 42px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 16px;
}

.product-detail-shell {
  padding: 18px;
}

.detail-tabs-premium {
  padding: 6px;
  border-radius: 999px;
  background: rgba(235, 244, 255, 0.82);
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.detail-tabs-premium button {
  border-radius: 999px;
  min-height: 42px;
  padding: 10px 16px;
  background: transparent;
  color: #6887ab;
  box-shadow: none;
}

.detail-tabs-premium button.active {
  background: linear-gradient(135deg, #0f72d6, #1a9af2);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.product-detail-workspace {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.product-detail-sidebar {
  display: grid;
  gap: 16px;
}

.product-side-note {
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(247, 251, 255, 0.96);
  border: 1px solid rgba(195, 216, 240, 0.88);
  display: grid;
  gap: 6px;
}

.product-preview-card,
.product-quick-stats,
.detail-form-sheet {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 249, 255, 0.94));
  border: 1px solid rgba(195, 216, 240, 0.88);
  box-shadow: var(--shadow-sm);
}

.product-preview-card {
  padding: 18px;
  border-radius: 24px;
}

.detail-preview-main {
  height: 300px;
  object-fit: cover;
  border-radius: 20px;
  margin-bottom: 12px;
}

.product-preview-meta {
  display: grid;
  gap: 4px;
}

.product-preview-kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #6f88a8;
}

.product-quick-stats {
  display: grid;
  gap: 10px;
  border-radius: 24px;
  padding: 18px;
}

.quick-stat {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(203, 221, 242, 0.84);
}

.quick-stat:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.quick-stat span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.quick-stat strong {
  color: #173f67;
}

.product-detail-content {
  min-width: 0;
}

.product-detail-header-card {
  padding: 18px 20px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(242,248,255,0.95));
  border: 1px solid rgba(195, 216, 240, 0.88);
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.product-detail-header-main {
  display: grid;
  gap: 6px;
}

.product-detail-header-main h3 {
  margin: 0;
}

.product-detail-header-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.product-detail-pill {
  display: inline-grid;
  gap: 2px;
  min-width: 128px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(195, 216, 240, 0.88);
}

.product-detail-pill strong {
  color: #0f4f93;
}

.product-detail-pill span {
  font-size: 11px;
  color: #6c86a5;
}

.detail-form-sheet {
  border-radius: 24px;
  overflow: hidden;
}

.detail-form-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(203, 221, 242, 0.84);
}

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

.detail-form-row > label {
  padding-top: 14px;
  color: #4b6686;
  font-size: 13px;
  font-weight: 700;
}

.detail-form-row-area textarea {
  min-height: 240px;
}

.product-gallery-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 10px;
}

.product-gallery-thumb {
  width: 100%;
  height: 92px;
  border-radius: 14px;
}

@media (max-width: 1180px) {
  .products-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-detail-workspace,
  .catalog-products-layout {
    grid-template-columns: 1fr;
  }

  .product-detail-header-card {
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .products-filter-grid,
  .filter-range,
  .detail-form-row {
    grid-template-columns: 1fr;
  }

  .detail-form-row > label {
    padding-top: 0;
  }

  .catalog-product-thumb-wrap {
    width: 112px;
    height: 112px;
  }
}

/* Sales refinement */

.sales-summary-line {
  padding: 16px 22px;
  border-radius: 22px;
  color: #3e6288;
  font-weight: 600;
}

.sales-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 320px 340px;
  gap: 16px;
  align-items: start;
}

.sales-list-card {
  padding: 0;
  overflow: hidden;
}

.sales-table-refined td {
  vertical-align: middle;
}

.sales-timeline-card,
.sales-chat-card {
  min-height: 760px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
}

.sales-timeline-card {
  grid-template-rows: auto 1fr;
}

.sales-side-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.sales-timeline {
  padding-left: 18px;
  max-height: 640px;
  overflow: auto;
}

.modal-card-xl {
  width: min(1220px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
}

@media (max-width: 980px) {
  .modal-backdrop {
    align-items: flex-start;
  }

  .modal-card,
  .modal-card-wide,
  .modal-card-xl,
  .image-modal-card {
    width: min(100%, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    margin: auto 0;
    padding: 14px;
  }
}

.sale-editor-modal {
  display: grid;
  gap: 18px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(245,250,255,0.96));
}

.sale-editor-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 16px;
  align-items: end;
}

.sale-editor-designer,
.sale-editor-buyer {
  padding: 18px 20px;
  border: 1px solid rgba(127, 165, 206, 0.2);
  border-radius: 22px;
  background: rgba(247, 251, 255, 0.95);
}

.sale-editor-designer {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sale-editor-designer-avatar {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  object-fit: cover;
  box-shadow: 0 12px 28px rgba(34, 84, 138, 0.12);
}

.sale-editor-designer-meta {
  display: grid;
  gap: 4px;
}

.sale-editor-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.sale-editor-pill {
  display: inline-grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(127, 165, 206, 0.18);
  min-width: 102px;
}

.sale-editor-pill strong {
  color: #0f4f93;
  font-size: 14px;
}

.sale-editor-pill span {
  font-size: 11px;
  color: #6481a2;
}

.sale-editor-buyer-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.sale-editor-table-wrap {
  border: 1px solid rgba(127, 165, 206, 0.18);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255,255,255,0.9);
}

.sales-items-table td,
.sales-items-table th {
  vertical-align: middle;
}

.sale-editor-section-card {
  display: grid;
  gap: 14px;
}

.sale-editor-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.sale-editor-section-head h4,
.sale-editor-tool-head strong {
  margin: 0;
}

.sale-item-kind-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1e5ea9;
  background: rgba(30, 94, 169, 0.1);
}

.sale-item-row-delivery td {
  background: rgba(238, 246, 255, 0.8);
}

.sale-editor-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.sale-editor-tool-card {
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(127, 165, 206, 0.18);
  background: rgba(250, 252, 255, 0.96);
  box-shadow: 0 10px 24px rgba(34, 84, 138, 0.06);
  display: grid;
  gap: 12px;
}

.sale-editor-tool-head {
  display: grid;
  gap: 4px;
}

.sale-editor-add-item,
.sale-editor-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.sale-editor-footnote {
  line-height: 1.45;
}

.sale-editor-add-item select,
.sale-editor-actions input,
.sale-editor-buyer select {
  min-width: 170px;
}

.sale-editor-docs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.sale-delivery-drafts {
  display: grid;
  gap: 14px;
}

.sale-delivery-draft-card {
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(127, 165, 206, 0.18);
  background: rgba(250, 252, 255, 0.96);
  box-shadow: 0 10px 24px rgba(34, 84, 138, 0.06);
  display: grid;
  gap: 14px;
}

.sale-delivery-draft-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.sale-delivery-draft-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.sale-editor-doc-card {
  padding: 18px 20px;
  border: 1px solid rgba(127, 165, 206, 0.18);
  border-radius: 22px;
  background: rgba(250, 252, 255, 0.96);
  display: grid;
  gap: 14px;
}

.sale-editor-doc-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.sale-editor-doc-head h4 {
  margin: 0;
}

.sale-editor-doc-list {
  display: grid;
  gap: 10px;
}

.sale-editor-doc-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(34, 84, 138, 0.08);
}

.sale-product-filter-card {
  margin-bottom: 16px;
}

.sale-product-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  max-height: 540px;
  overflow: auto;
}

.sale-product-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(127, 165, 206, 0.18);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(245,250,255,0.96));
  text-align: left;
  color: inherit;
  box-shadow: 0 10px 24px rgba(34, 84, 138, 0.08);
}

.sale-product-card img {
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: 18px;
}

.sale-product-card-body {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.sale-product-card-price {
  font-weight: 800;
  color: #0f72d6;
}

.catalog-split-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.catalog-side-summary,
.catalog-main-panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(244,249,255,0.94));
  border: 1px solid rgba(195, 216, 240, 0.88);
  box-shadow: var(--shadow-sm);
}

.catalog-side-summary {
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: 28px;
}

.catalog-main-panel {
  padding: 0;
  overflow: hidden;
}

.catalog-panel-kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #6f88a8;
}

.catalog-stat-list {
  display: grid;
  gap: 10px;
}

.catalog-stat-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 10px 22px rgba(28, 76, 130, 0.06);
}

.catalog-stat-item span {
  color: #6784a7;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.catalog-stat-item strong {
  color: #183c63;
  font-size: 20px;
}

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

.category-tree-card {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(200, 218, 240, 0.75);
  box-shadow: 0 14px 26px rgba(28, 76, 130, 0.06);
  display: grid;
  gap: 12px;
}

.category-tree-root {
  font-weight: 800;
  color: #173f67;
}

.category-tree-children {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-node,
.audit-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 114, 214, 0.09);
  color: #0f72d6;
  font-size: 12px;
  font-weight: 700;
}

.category-table-wrap {
  border-top: 1px solid rgba(203, 221, 242, 0.84);
}

.category-title-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-depth-mark {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0f72d6, #3db4ff);
  box-shadow: 0 0 0 4px rgba(15, 114, 214, 0.12);
  flex: 0 0 auto;
}

.brand-dealer-stack {
  display: grid;
  gap: 10px;
}

.brand-dealer-card {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 10px 22px rgba(28, 76, 130, 0.06);
}

.audit-split-layout .catalog-main-panel,
.brand-split-layout .catalog-main-panel {
  min-height: 520px;
}

.audit-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.audit-action {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(15, 114, 214, 0.1);
  color: #0f72d6;
  font-size: 12px;
  font-weight: 700;
}

.audit-detail-cell {
  min-width: 280px;
  color: #577494;
}

.designer-split-layout {
  grid-template-columns: 320px minmax(0, 1fr);
}

.dealer-split-layout {
  grid-template-columns: 320px minmax(0, 1fr);
}

.designer-main-stack {
  display: grid;
  gap: 18px;
}

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

.designer-control-card,
.designer-table-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(244,249,255,0.94));
  border: 1px solid rgba(195, 216, 240, 0.88);
  box-shadow: var(--shadow-sm);
}

.designer-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 10px;
}

.designer-summary-stack {
  display: grid;
  gap: 10px;
}

.dealer-side-stack {
  display: grid;
  gap: 12px;
}

.dealer-side-card {
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(195, 216, 240, 0.88);
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(244,249,255,0.94));
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 8px;
}

.dealer-side-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: #6e819a;
}

.dealers-link {
  cursor: pointer;
  color: #164a87;
}

.dealers-link:hover {
  color: #0e6bd8;
}

.dealers-source-cell {
  max-width: 240px;
  word-break: break-word;
}

.designer-modal-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.designer-modal-preview {
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(244,249,255,0.94));
  border: 1px solid rgba(195, 216, 240, 0.88);
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 14px;
}

.designer-avatar-large {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 24px;
}

.designer-preview-meta {
  display: grid;
  gap: 6px;
}

@media (max-width: 1380px) {
  .sales-workspace {
    grid-template-columns: 1fr;
  }

  .sales-timeline-card,
  .sales-chat-card {
    min-height: auto;
  }

  .sale-editor-head,
  .sale-editor-docs,
  .catalog-split-layout,
  .sale-editor-tools-grid,
  .dashboard-main-grid,
  .dashboard-hero {
    grid-template-columns: 1fr;
  }

  .designer-modal-layout,
  .designer-control-grid,
  .sale-delivery-draft-grid,
  .dealer-split-layout,
  .designer-split-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .sale-editor-add-item select,
  .sale-editor-actions input,
  .sale-editor-buyer select {
    min-width: 100%;
  }

  .sale-editor-add-item,
  .sale-editor-actions {
    width: 100%;
  }

  .sale-product-card {
    grid-template-columns: 1fr;
  }

  .sale-product-card img {
    width: 100%;
    height: 180px;
  }

  .dashboard-links {
    grid-template-columns: 1fr;
  }
}
