/* EuroChem Trading Portal — aligned with eurochemtrading.com */

:root {
  --brand-primary: #1a1a1a;
  --brand-accent: #0d5c3f;
  --brand-dark: #313539;
  --brand-muted: #667079;
  --brand-light: #e8e8ea;
  --line: #e5e7eb;
  --cabinet-bg: #f4f4f5;
  --cabinet-glass: #ffffff;
  --cabinet-glass-solid: #ffffff;
  --cabinet-glass-border: var(--line);
  --cabinet-glass-blur: none;
  --cabinet-glass-shadow:
    0 1px 3px rgba(15, 23, 42, 0.05), 0 6px 20px rgba(15, 23, 42, 0.06);
  --topstrip-gradient: linear-gradient(
    90deg,
    var(--brand-primary) 0%,
    var(--brand-accent) 100%
  );
  --text: var(--brand-dark);
  --muted: var(--brand-muted);
  --primary: var(--brand-accent);
  --primary-hover: #117a52;
  --accent-dim: rgba(13, 92, 63, 0.12);
  --danger: #dc2626;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-heading: "Syne", "DM Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --form-surface: #ffffff;
  --form-surface-glass: #ffffff;
  --form-option-bg: #ffffff;
  --form-glass-blur: none;
  --form-glass-shadow: 0 0 0 1px var(--line);
}

html {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--cabinet-bg);
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.cabinet-scene {
  min-height: 100vh;
  background-color: var(--cabinet-bg);
  background-image: radial-gradient(
    ellipse 90% 60% at 50% -10%,
    rgba(13, 92, 63, 0.06),
    transparent 55%
  );
}

.glass-panel {
  background: var(--cabinet-glass);
  border: 1px solid var(--cabinet-glass-border);
  border-radius: 4px;
  box-shadow: var(--cabinet-glass-shadow);
}
.glass-sidebar {
  background: #ffffff;
  border-right: 1px solid var(--cabinet-glass-border);
  box-shadow: 1px 0 0 rgba(15, 23, 42, 0.04);
}
.topstrip {
  background: var(--topstrip-gradient);
  color: #fff;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.cabinet-app {
  display: flex;
  min-height: 100vh;
}
.cabinet-sidebar {
  width: 260px;
  padding: 1rem 0.75rem;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.cabinet-sidebar__brand {
  display: flex;
  align-items: center;
  padding: 0.75rem 0.5rem 1rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.5rem;
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}
.brand-lockup__mark {
  display: block;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  object-fit: contain;
}
.brand-lockup__name {
  font-family: "Saira Extra Expanded", "Syne", sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  line-height: 1.05;
  text-transform: uppercase;
  color: #111;
}
.brand-lockup--login {
  width: 100%;
  justify-content: center;
  padding: 0.15rem 0 0.9rem;
  margin-bottom: 0.15rem;
  border-bottom: 1px solid #111;
}
.brand-lockup--login .brand-lockup__mark {
  width: 44px;
  height: 44px;
}
.brand-lockup--login .brand-lockup__name {
  font-size: 0.92rem;
  font-weight: 800;
}
.brand-lockup--sidebar .brand-lockup__mark {
  width: 36px;
  height: 36px;
}
.brand-lockup--sidebar .brand-lockup__name {
  font-size: 0.58rem;
  font-weight: 700;
}
.cabinet-sidebar__brand-text { min-width: 0; }
.cabinet-sidebar__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
}
.cabinet-sidebar__sub {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.15rem;
}

.cabinet-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
}
.cabinet-nav__section {
  margin: 0.75rem 0.75rem 0.25rem;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.cabinet-nav__link {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 4px;
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  box-sizing: border-box;
}
.cabinet-nav__link:hover {
  background: var(--brand-light);
  text-decoration: none;
  color: var(--brand-primary);
}
.cabinet-nav__link.is-active {
  background: rgba(13, 92, 63, 0.1);
  color: var(--primary);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--primary);
}

.cabinet-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.cabinet-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 1rem;
  padding: 0.85rem 1.25rem;
  border-radius: 14px;
}
.cabinet-topbar__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.25rem;
}
.cabinet-topbar__user {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.cabinet-topbar__name {
  font-weight: 600;
  font-size: 14px;
}
.cabinet-topbar__role {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}

.cabinet-content {
  padding: 0 1rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.panel-pad {
  padding: 1.25rem;
}
.panel-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-heading);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}
.stat-card {
  padding: 1rem 1.25rem;
}
.stat-card__label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.stat-card__value {
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 0.35rem;
}

.welcome-banner__title {
  margin: 0 0 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.5rem;
}
.btn-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

/* Buttons aligned with eurochemtrading.com (.btn / .btn--primary / .btn--secondary) */
.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.25;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
}
.btn-primary:hover {
  background: #333333;
  border-color: #333333;
  color: #fff;
  text-decoration: none;
}
.btn-primary:focus-visible,
.btn-ghost:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 2px;
}
.btn-ghost {
  background: #ffffff;
  border-color: #d8e5ee;
  color: var(--brand-dark);
  box-shadow: none;
}
.btn-ghost:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  text-decoration: none;
}
.btn-sm {
  padding: 4px 12px;
  font-size: 12px;
  border-radius: 8px;
}

.text-muted {
  color: var(--muted);
}
.text-small {
  font-size: 13px;
}
.alert {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  margin: 0.75rem 0;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.alert--error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.alert--success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.alert--warn {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}
.alert--info {
  background: #f0fdf4;
  color: #14532d;
  border: 1px solid #bbf7d0;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 1rem;
}
.data-table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 14px;
}
.data-table th {
  text-align: left;
  padding: 0.5rem 1rem 0.5rem 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  border-bottom: 1px solid var(--cabinet-glass-border);
}
.data-table td {
  padding: 0.65rem 1rem 0.65rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.data-table tr:last-child td {
  border-bottom: 0;
}
.mono {
  font-family: ui-monospace, monospace;
}
.capitalize {
  text-transform: capitalize;
}
.form-inline-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}
.form-field--grow {
  flex: 1;
  min-width: 200px;
}
.inline-form {
  display: inline;
  margin: 0;
}

.page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.back-link {
  display: inline-block;
  margin-bottom: 0.25rem;
  font-size: 14px;
  color: var(--muted);
}
.back-link:hover {
  color: var(--text);
}
.link-strong {
  font-weight: 600;
  color: var(--primary);
}
.nowrap {
  white-space: nowrap;
}
.empty-state {
  text-align: center;
}

.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  border-bottom: 1px solid var(--cabinet-glass-border);
  margin-bottom: 0.25rem;
}
.tab-bar__link {
  padding: 0.55rem 0.85rem;
  font-size: 14px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  text-decoration: none;
  margin-bottom: -1px;
}
.tab-bar__link:hover {
  color: var(--text);
  text-decoration: none;
}
.tab-bar__link.is-active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.status-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.status-badge--neutral {
  background: #f3f4f6;
  color: #4b5563;
}
.status-badge--warn {
  background: #fffbeb;
  color: #92400e;
}
.status-badge--success {
  background: #ecfdf5;
  color: #065f46;
}
.status-badge--danger {
  background: #fef2f2;
  color: #991b1b;
}
.status-badge--info {
  background: #f0fdf4;
  color: #14532d;
}

.form-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 960px;
}
.form-page .glass-panel {
  background: #fff;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.form-field--full {
  grid-column: 1 / -1;
}
.form-input:disabled,
.form-textarea:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.field-hint {
  margin: 0.25rem 0 0;
  font-size: 12px;
  color: var(--muted);
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 1rem 1.25rem;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: #fafafa;
  box-shadow: none;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}
.detail-header__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.5rem;
}
.detail-header__badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 960px) {
  .detail-grid {
    grid-template-columns: 2fr 1fr;
  }
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem 1.25rem;
  margin: 0;
}
@media (min-width: 560px) {
  .field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 900px) {
  .field-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.field-item dt {
  margin: 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.field-item dd {
  margin: 0.25rem 0 0;
  font-size: 14px;
  font-weight: 500;
  word-break: break-word;
}
.detail-extra {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--cabinet-glass-border);
}
.manager-note {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
}
.manager-note__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fde68a;
  margin-bottom: 0.35rem;
}
.kv-list {
  margin: 0;
}
.kv-list div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  font-size: 14px;
}
.kv-list dt {
  color: var(--muted);
}
.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.comment-item {
  border-left: 2px solid var(--cabinet-glass-border);
  padding-left: 0.75rem;
}
.comment-item__meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 12px;
  margin-bottom: 0.25rem;
}
.comment-item p {
  margin: 0;
  font-size: 14px;
}

.action-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.25rem;
  border-radius: 16px;
  border: 1px solid var(--cabinet-glass-border);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
}
.action-banner--warn {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.35);
}
.action-banner--success {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.35);
}
.action-banner--danger {
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.35);
}
.action-banner__title {
  margin: 0;
  font-weight: 600;
}

.pdf-panel {
  overflow: hidden;
  padding: 0;
}
.pdf-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--cabinet-glass-border);
  font-size: 14px;
  font-weight: 600;
}
.pdf-frame {
  display: block;
  width: 100%;
  height: 600px;
  border: 0;
  background: #111;
}

.attachment-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.attachment-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.attachment-item:last-child {
  border-bottom: 0;
}
.attachment-item__ext {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
}
.attachment-item__meta {
  flex: 1;
  min-width: 0;
}
.attachment-item__name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attachment-item__sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.2rem;
  font-size: 13px;
  line-height: 1.4;
}
.attachment-item__sep {
  opacity: 0.55;
}

.doc-groups {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 52rem;
}
.doc-group__head {
  margin-bottom: 0.45rem;
  font-size: 13px;
  letter-spacing: 0.01em;
}
.kind-pill {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.btn-row-inline {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
  margin-left: auto;
}

@media (max-width: 640px) {
  .attachment-item {
    flex-wrap: wrap;
  }
  .attachment-item__meta {
    flex: 1 1 calc(100% - 3.5rem);
  }
  .btn-row-inline {
    width: 100%;
    margin-left: 0;
    padding-left: 3.35rem;
  }
}

.tab-bar__link.is-disabled {
  padding: 0.55rem 0.85rem;
  font-size: 14px;
  color: rgba(148, 163, 184, 0.45);
  cursor: not-allowed;
}
.tab-bar--pills {
  border-bottom: 0;
  gap: 0.5rem;
}
.tab-bar--pills .tab-bar__link {
  border: 1px solid var(--cabinet-glass-border);
  border-radius: 8px;
  border-bottom-width: 1px;
  margin-bottom: 0;
}
.tab-bar--pills .tab-bar__link.is-active {
  border-color: var(--primary);
  background: rgba(13, 148, 136, 0.15);
}

.shipment-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.shipment-card {
  padding: 0;
  overflow: hidden;
}
.shipment-card__track {
  padding: 1rem;
  border-top: 1px solid var(--cabinet-glass-border);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.data-table--compact th,
.data-table--compact td {
  font-size: 13px;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.request-status-track {
  width: 100%;
  overflow-x: auto;
}
.request-status-steps {
  display: flex;
  align-items: flex-start;
  min-width: 640px;
}
.request-status-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 4.5rem;
  flex: 1;
  padding: 0 0.15rem;
}
.request-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--line);
  flex-shrink: 0;
}
.request-status-step.is-done .request-status-dot {
  border-color: var(--primary);
  background: var(--primary);
}
.request-status-step.is-current .request-status-dot {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 92, 63, 0.2);
}
.request-status-step.is-current .request-status-label {
  color: var(--primary);
  font-weight: 600;
}
.request-status-connector {
  height: 2px;
  min-width: 8px;
  flex: 1;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--line);
}
.request-status-connector.is-done {
  background: var(--primary);
}
.shipment-status-track--placeholder {
  opacity: 0.6;
}

.chat-page {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: calc(100vh - 10rem);
  width: 100%;
  max-width: none;
  margin: 0;
}
.chat-page__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chat-page__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.1rem;
}
.chat-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0;
  overflow: hidden;
  min-height: min(70vh, 640px);
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.chat-empty {
  margin: auto;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.chat-bubble-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 80%;
}
.chat-bubble-row.is-mine {
  align-self: flex-end;
  align-items: flex-end;
}
.chat-bubble {
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  font-size: 14px;
  background: var(--brand-light);
  color: var(--brand-dark);
}
.chat-bubble.is-mine {
  background: var(--primary);
  color: #fff;
}
.chat-bubble--system {
  align-self: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: #f3f4f6;
  font-size: 12px;
  color: var(--muted);
}
.chat-bubble__meta {
  margin-top: 0.2rem;
  font-size: 11px;
  color: var(--muted);
}
.chat-composer {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  padding: 0.75rem;
  border-top: 1px solid var(--line);
}
.chat-composer .form-textarea {
  flex: 1;
  min-height: 64px;
}

.announce-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.announce-card__head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-start;
}
.announce-card__body {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.announce-card--unread {
  border-left: 3px solid var(--primary);
}

.finance-hero {
  text-align: center;
}
.finance-hero__label {
  margin: 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.finance-hero__value {
  margin: 0.35rem 0;
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--primary);
}
.finance-hero__operator {
  display: inline-block;
  margin-top: 1rem;
  font-size: 12px;
  color: var(--muted);
}
.finance-hero__operator:hover {
  color: var(--text);
  text-decoration: none;
}

.admin-dialog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  min-height: 420px;
}
@media (min-width: 900px) {
  .admin-dialog-grid {
    grid-template-columns: 300px 1fr;
  }
}
.admin-dialog-list {
  padding: 0;
  overflow: hidden;
}
.thread-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 70vh;
  overflow-y: auto;
}
.thread-list__item {
  display: block;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.thread-list__item:hover {
  background: #fafafa;
  text-decoration: none;
}
.thread-list__item.is-active {
  background: rgba(13, 92, 63, 0.08);
}
.request-status-label {
  font-size: 10px;
  line-height: 1.2;
  text-align: center;
  color: var(--muted);
}
.request-status-step.is-current .request-status-label {
  color: var(--primary);
  font-weight: 600;
}
.thread-list__top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
}
.admin-dialog-chat {
  min-height: 420px;
}
.admin-inline-review {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.admin-inline-review .form-input {
  min-width: 120px;
  max-width: 180px;
  padding: 0.35rem 0.5rem;
  font-size: 13px;
}

.login-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1.25rem 1rem;
}
@media (min-height: 760px) {
  .login-wrap {
    align-items: center;
  }
}
.login-card {
  width: 100%;
  max-width: 420px;
  overflow: hidden;
}
.login-card__strip {
  padding: 0.75rem 1rem;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.06em;
}
.login-card__body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  text-align: center;
}
.login-card__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.35rem;
}
.login-email-badge {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 4px;
  background: var(--brand-light);
  border: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}

.form-stack {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  text-align: left;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--brand-dark);
  letter-spacing: 0.01em;
}
.form-input,
.form-textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--form-surface-glass);
  color: var(--text);
  box-shadow: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.form-textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.5;
}
.form-input::placeholder,
.form-textarea::placeholder {
  color: #9ca3af;
}
.form-input:focus,
.form-textarea:focus,
select.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(13, 92, 63, 0.15);
}
select.form-input {
  appearance: none;
  cursor: pointer;
  padding-right: 2.25rem;
  color-scheme: light;
  background-color: var(--form-surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23667079' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 12px;
  color: var(--text);
}
select.form-input option,
select.form-input optgroup {
  background-color: var(--form-option-bg);
  color: var(--brand-dark);
}
select.form-input optgroup {
  font-weight: 600;
  color: var(--muted);
}
select.form-input option[value=""],
select.form-input option:disabled {
  color: #9ca3af;
}
select.form-input option:checked,
select.form-input option:hover {
  background-color: rgba(13, 92, 63, 0.12);
  color: var(--brand-dark);
}
input.form-input[type="date"],
input.form-input[type="datetime-local"],
input.form-input[type="time"],
input.form-input[type="file"] {
  color-scheme: light;
}
.form-check input[type="checkbox"] {
  accent-color: var(--primary);
}
.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 14px;
  color: var(--muted);
}

.steps-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--muted);
  line-height: 1.7;
}

.onboarding-panel__head {
  margin-bottom: 1.25rem;
}
.onboarding-panel__head .panel-title {
  margin-bottom: 0.25rem;
}
.step-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.step-card {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.25rem;
  align-items: flex-start;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.09) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
  border: 1px solid var(--cabinet-glass-border);
  border-radius: 14px;
  backdrop-filter: blur(22px) saturate(1.25);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.step-card__badge {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 92, 63, 0.2);
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
}
.step-card__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1rem;
}
.step-card__text {
  margin: 0.35rem 0 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}
.step-card__cta {
  display: inline-block;
  margin-top: 0.65rem;
  font-size: 13px;
  font-weight: 600;
}

.messages-hub-card {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}
.messages-hub-card__icon {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 92, 63, 0.18);
  color: var(--primary);
  font-size: 1.25rem;
  font-weight: 700;
  border: 1px solid rgba(13, 92, 63, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.messages-hub-card__body {
  flex: 1;
  min-width: 0;
}
.messages-hub-card__body .panel-title {
  margin-bottom: 0.35rem;
}

.toolbar-panel {
  padding: 1rem 1.25rem;
}

.tab-bar--pills .tab-bar__link.is-active {
  border-color: var(--primary);
  background: rgba(13, 92, 63, 0.08);
}
.attachment-item {
  border-bottom: 1px solid var(--line);
}
.attachment-item__ext {
  background: var(--brand-light);
  color: var(--primary, #0d5c3f);
}
.kind-pill {
  background: var(--brand-light);
  color: var(--primary, #0d5c3f);
}
.cabinet-topbar {
  background: #fff;
  border: 1px solid var(--line);
}

@media (min-width: 1200px) {
  .chat-bubble-row {
    max-width: 65%;
  }
}

@media (max-width: 900px) {
  .cabinet-app {
    flex-direction: column;
  }
  .cabinet-sidebar {
    width: 100%;
    height: auto;
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--cabinet-glass-border);
  }
  .cabinet-sidebar__foot {
    width: 100%;
  }
  .skytrust-credit--sidebar {
    justify-content: flex-start;
  }
  .cabinet-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .cabinet-nav__section {
    display: none;
  }
}

/* Request detail: 2-col readable pairs, not a dense 3-col heap */
.field-grid--details {
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 560px) {
  .field-grid--details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 900px) {
  .field-grid--details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.field-grid--details .field-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--cabinet-glass-border);
}
.field-grid--details .field-item--full {
  grid-column: 1 / -1;
}
.field-grid--details .field-item dd {
  margin-top: 0.35rem;
  font-size: 15px;
  line-height: 1.35;
}

/* Escrow nav group */
.cabinet-nav__group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cabinet-nav__parent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--brand-dark);
  font: inherit;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.3;
  cursor: pointer;
  text-align: left;
  box-sizing: border-box;
}
.cabinet-nav__parent:hover {
  color: var(--brand-primary);
  background: var(--brand-light);
}
.cabinet-nav__group.is-open > .cabinet-nav__parent,
.cabinet-nav__group.is-active > .cabinet-nav__parent {
  color: var(--primary);
  background: rgba(13, 92, 63, 0.08);
}
.cabinet-nav__parent.is-disabled {
  display: block;
  cursor: not-allowed;
  opacity: 0.45;
  color: var(--muted);
  font-weight: 500;
}
.cabinet-nav__chevron {
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
  margin-right: 2px;
  flex-shrink: 0;
}
.cabinet-nav__group.is-open .cabinet-nav__chevron {
  transform: rotate(45deg);
}
.cabinet-nav__sub {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 0 2px 0;
}
.cabinet-nav__sub[hidden] {
  display: none;
}
.cabinet-nav__link--sub {
  font-size: 13px;
  font-weight: 500;
  padding: 0.45rem 0.75rem 0.45rem 1.35rem;
}

/* SkyTrust operational environment credit */
.login-card__skytrust {
  margin-top: 0.85rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  width: 100%;
  display: flex;
  justify-content: center;
}
.cabinet-sidebar__foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.skytrust-credit {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.15s ease, opacity 0.15s ease;
}
.skytrust-credit:hover {
  color: var(--text);
  text-decoration: none;
}
.skytrust-credit img {
  display: block;
  flex-shrink: 0;
}
.skytrust-credit__text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  line-height: 1.3;
  min-width: 0;
}
.skytrust-credit__label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.skytrust-credit__by {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}
.skytrust-credit__caption {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.skytrust-credit--login {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  text-align: center;
}
.skytrust-credit--login img {
  width: 168px;
  height: auto;
  max-width: 72%;
}
.skytrust-credit--sidebar {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.25rem 0.15rem;
}
.skytrust-credit--sidebar img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}
.skytrust-credit--sidebar .skytrust-credit__text {
  flex: 1 1 auto;
}
