:root {
  color-scheme: light;
  --canvas: #f5f7f4;
  --paper: #fff;
  --ink: #172a23;
  --muted: #52635b;
  --line: #dce5df;
  --sidebar-width: 232px;
  --accent: #127050;
  --accent-hover: #095940;
  --pale: #e6f4ec;
  --orange: #ff8c29;
  --orange-hover: #ffa24f;
  --orange-ink: #8a400a;
  --danger: #a5343c;
  --radius: 16px;
  --shadow: 0 1px 2px #12281b08, 0 4px 14px #12281b06;
  font: 16px/1.5 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled { opacity: .53; cursor: default; }
a { color: var(--accent); text-underline-offset: .17em; }
:where(button, a, input, textarea, select, [tabindex]):focus-visible { outline: 2px solid #14876a; outline-offset: 3px; }
[hidden] { display: none !important; }
svg { flex: 0 0 auto; vertical-align: middle; }
.skip { position: fixed; top: .5rem; left: .5rem; z-index: 20; padding: .5rem; background: white; transform: translateY(-150%); }
.skip:focus { transform: none; }
.sidebar {
  --sidebar-ink: #f3fbfa;
  --sidebar-muted: #bcc9d5;
  --sidebar-hover: #1b2a39;
  --sidebar-accent: #8bf0cd;
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  gap: 27px;
  padding: 21px 14px;
  overflow-y: auto;
  background: #111b27;
  border-right: 1px solid #253342;
  z-index: 4;
}
.sidebar-header { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 1px 5px 12px 9px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 1.24rem; font-weight: 780; letter-spacing: -.04em; text-decoration: none; white-space: nowrap; }
.sidebar .brand { color: var(--sidebar-ink); }
.brand img { display: block; flex: 0 0 auto; }
.nav-group h2 { margin: 0 10px 8px; color: #9baebe; font-size: .75rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.side-link { display: flex; gap: 10px; align-items: center; padding: 9px 10px; margin-bottom: 3px; min-height: 43px; border: 1px solid transparent; border-radius: 9px; color: var(--sidebar-muted); font-size: .91rem; font-weight: 550; text-decoration: none; }
.side-link:hover, .sidebar .mobile-close:hover { background: var(--sidebar-hover); color: var(--sidebar-ink); }
.side-link[aria-current] { color: var(--sidebar-accent); background: #1b3839; border-color: #2e5050; font-weight: 700; }
.side-count { margin-left: auto; padding: 1px 6px; border-radius: 6px; background: var(--sidebar-hover); color: inherit; font-size: .75rem; font-variant-numeric: tabular-nums; }
.side-link[aria-current] .side-count { background: #2e5050; }
.sidebar .mobile-close { color: var(--sidebar-muted); }
.sidebar :focus-visible { outline-color: var(--sidebar-accent); }
.workspace { margin-left: var(--sidebar-width); min-height: 100dvh; }
.topbar { background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1336px; min-height: 65px; margin: auto; padding: 8px 36px; }
.breadcrumb, .topbar-actions, .topbar-link { display: flex; align-items: center; gap: 9px; }
.breadcrumb { color: var(--muted); font-size: .86rem; }
.breadcrumb strong { color: var(--ink); }
.breadcrumb-divider { color: #647d70; }
.topbar-actions { margin-left: auto; }
.topbar-link { justify-content: center; min-height: 36px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font-size: .86rem; font-weight: 650; text-decoration: none; white-space: nowrap; }
.topbar-link:hover { color: var(--accent-hover); background: var(--pale); border-color: #c1e1d1; }
.topbar-link svg { color: var(--accent); }
button.topbar-link { background: transparent; font: inherit; font-size: .86rem; font-weight: 650; cursor: pointer; }
.balance-link { gap: 5px; font-variant-numeric: tabular-nums; background: #fff7ee; border-color: #f0d7bc; }
.balance-link:hover { color: var(--ink); background: #ffedd9; border-color: #e6b987; }
.balance-link svg { margin-right: 2px; color: var(--orange-ink); }
.balance-unit { color: var(--muted); font-weight: 500; }
.topbar-actions .icon-button { border-color: var(--line); }
.mobile-brand { display: none; }
main { max-width: 1336px; margin: 0 auto; padding: 32px 36px 64px; }
main:focus { outline: none; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 25px; }
.page-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
h1, h2, h3, p { margin: 0; }
h1, .page-title { font-size: clamp(1.9rem, 3.2vw, 2.55rem); letter-spacing: -.045em; line-height: 1.1; font-weight: 780; }
h2 { font-size: 1.3rem; letter-spacing: -.026em; line-height: 1.25; }
h3 { font-size: 1rem; line-height: 1.3; }
.page-heading p, .subtle { color: var(--muted); }
.page-heading p { margin-top: 8px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 14px; border: 1px solid transparent; border-radius: 9px; color: var(--ink); font-size: .89rem; line-height: 1.3; font-weight: 660; text-decoration: none; white-space: nowrap; background: transparent; }
.button-primary { color: white; background: var(--accent); box-shadow: 0 2px 3px #087c5d22; }
.button-primary:hover:not(:disabled) { background: var(--accent-hover); }
.button-outline { background: var(--paper); border-color: var(--line); }
.button-outline:hover:not(:disabled), .button-plain:hover:not(:disabled) { background: #eef4f3; }
.button-danger { color: white; background: var(--danger); }
.button-danger:hover { background: #832631; }
.icon-button { display: inline-grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; padding: 0; color: #526576; border: 1px solid transparent; border-radius: 8px; background: transparent; }
.icon-button:hover { background: #ecf4f1; color: var(--accent); }
.mobile-menu, .mobile-close, .mobile-backdrop { display: none; }
.search-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 34px 34px 72px;
  border-radius: 22px;
  background: radial-gradient(ellipse at 86% 30%, #ff8c2930, transparent 43%),
    linear-gradient(110deg, #102d26 30%, #164836 100%);
  color: #fff;
}
.hero-content { position: relative; max-width: 620px; }
.search-hero h1 { font-size: clamp(2.15rem, 4.1vw, 3.25rem); }
.hero-description { max-width: 46ch; margin-top: 10px; color: #d3e6dc; }
.hero-art {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(52%, 570px);
  z-index: -1;
  background: linear-gradient(#b1ecc516 1px, transparent 1px), linear-gradient(90deg, #b1ecc516 1px, transparent 1px);
  background-size: 23px 23px;
  mask-image: linear-gradient(90deg, transparent, #000 45%);
  pointer-events: none;
}
.hero-art span {
  position: absolute;
  top: 50%;
  right: 12%;
  width: 264px;
  height: 264px;
  transform: translateY(-50%);
  border: 1px solid #a7ecc451;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 37px, #a7ecc435 38px 39px),
    conic-gradient(from 25deg, transparent, #b4f8d140 60deg, transparent 61deg);
}
.hero-art i, .hero-art b {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b0f8cb;
  box-shadow: 0 0 0 5px #75e7a72b, 0 0 24px #b0f8cb;
}
.hero-art i {
  right: calc(12% + 66px);
  top: 23%;
  background: var(--orange);
  box-shadow: 0 0 0 5px #ff8c2930, 0 0 20px var(--orange);
}
.hero-art b { right: calc(12% + 172px); top: 65%; }
.search-panel { position: relative; margin: -42px 18px 0; padding: 20px 21px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: 0 8px 24px #132e2010; }
.search-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(165px, 210px) auto; gap: 12px; align-items: end; }
.search-grid .button { min-height: 48px; padding-inline: 20px; }
.search-grid .button-primary { background: var(--orange); color: #12352c; box-shadow: 0 2px 3px #8a400a24; }
.search-grid .button-primary:hover:not(:disabled) { background: var(--orange-hover); }
.search-grid .button-primary:focus-visible, .balance-link:focus-visible { outline-color: var(--orange-ink); }
.search-input { position: relative; }
.search-input > svg { position: absolute; top: 50%; left: 12px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.field { display: grid; gap: 5px; min-width: 0; color: var(--ink); font-size: .875rem; font-weight: 650; }
.field input, input.control, select, textarea { min-width: 0; width: 100%; padding: 10px 12px; border: 1px solid #cedae1; border-radius: 9px; background: white; color: var(--ink); font-weight: 450; font-size: .92rem; }
.field input, select { height: 46px; }
input::placeholder, textarea::placeholder { color: #627586; }
select { appearance: none; padding-right: 35px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23536373' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 12px center / 14px no-repeat; }
.search-input > :is(input, select) { height: 48px; padding-left: 38px; background-color: #f9fbf9; }
.search-input > :is(input, select):focus { background-color: var(--paper); }
textarea { min-height: 110px; resize: vertical; }
.search-balance { color: var(--muted); font-size: .88rem; }
.search-balance a { color: var(--orange-ink); font-weight: 650; }
.text-button { border: 0; background: transparent; padding: 1px 0; color: var(--accent); font-weight: 650; font-size: inherit; text-align: left; }
.text-button:hover { text-decoration: underline; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.results { margin-top: 29px; }
.results h2 { scroll-margin-block: 18px; }
.results-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 12px; }
.results-header p { color: var(--muted); margin-top: 4px; font-size: .875rem; }
.result-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; font-size: .83rem; }
.result-meta .button { min-height: 32px; padding: 5px 8px; }
.title-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.tag { display: inline-flex; align-items: center; gap: 5px; width: max-content; max-width: 100%; border-radius: 6px; padding: 3px 8px; background: #edf2f6; color: #43596c; font-size: .77rem; font-weight: 650; line-height: 1.4; }
.tag-green { background: var(--pale); color: #086347; }
.tag-amber { background: #fff2d6; color: #79500f; }
.table-toolbar { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 5px 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table-toolbar .filters { margin-right: auto; }
.table-toolbar .button { min-height: 36px; padding-inline: 9px; }
.filters { display: flex; flex-wrap: wrap; gap: 3px; padding: 3px; border-radius: 10px; background: var(--canvas); }
.filter { border: 1px solid transparent; border-radius: 8px; padding: 6px 9px; background: transparent; color: var(--muted); font-size: .84rem; font-weight: 650; }
.filter:hover { background: var(--paper); color: var(--ink); }
.filter[aria-pressed="true"] { background: var(--paper); color: var(--accent-hover); border-color: var(--line); box-shadow: var(--shadow); }
.supplier-panel { container-type: inline-size; }
.table-scroll { overflow-x: auto; }
table { width: 100%; min-width: 500px; border-collapse: collapse; text-align: left; }
th, td { padding: 8px 13px; border-bottom: 1px solid #e8edf0; }
th { background: #f6f9f6; color: #526271; font-size: .875rem; font-weight: 680; white-space: nowrap; }
td { font-size: .88rem; }
th:first-child, td:first-child { padding-left: 17px; width: 42px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8fbfa; }
tbody tr.is-selected { background: #f0faf5; }
.table-check { width: 16px; height: 16px; display: block; margin: 0; accent-color: var(--accent); cursor: pointer; }
.select-all-label span { display: none; }
.company-name { overflow-wrap: anywhere; color: var(--ink); font-weight: 710; text-decoration: none; }
.company-name:hover { color: var(--accent); }
.company-meta { display: block; margin-top: 1px; color: var(--muted); font-size: .81rem; overflow-wrap: anywhere; }
.address-heading { width: 25%; }
.contacts-heading { width: 24%; }
.conditions-heading { width: 17%; }
.supplier-cell { overflow-wrap: anywhere; }
.supplier-cell-label { display: none; }
.supplier-contacts { display: grid; gap: 2px; }
.row-actions { width: 1%; text-align: right; }
.row-actions .icon-button { width: 44px; height: 44px; }
.row-actions .icon-button svg { width: 20px; height: 20px; }
.row-actions .icon-button:is(:hover, [aria-pressed="true"]) { color: var(--orange-ink); background: #ffedd9; }
.row-actions .icon-button[aria-pressed="true"] svg { fill: var(--orange); }
.selection-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 15px; color: var(--muted); border-top: 1px solid var(--line); font-size: .87rem; }
.selection-bar strong { color: var(--ink); }
.selection-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.empty { padding: 37px 20px; text-align: center; }
.empty h3 { margin: 12px 0 5px; font-size: 1.07rem; }
.empty p { max-width: 46ch; margin: 0 auto; color: var(--muted); }
.empty .button { margin-top: 14px; }
.empty-icon { display: inline-grid; place-items: center; width: 50px; height: 50px; color: var(--accent); border-radius: 15px; background: var(--pale); }
.list-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 19px; }
.list-item:not(:last-child) { border-bottom: 1px solid var(--line); }
.list-item h3 { overflow-wrap: anywhere; }
.list-item p { color: var(--muted); font-size: .84rem; margin-top: 4px; }
.list-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.settings-card { padding: 21px; }
.settings-card p { color: var(--muted); margin: 10px 0; }
.settings-card code { display: inline-block; font-size: .84rem; overflow-wrap: anywhere; }
.settings-card .title-row { justify-content: space-between; }
.settings-card ul { margin: 10px 0 0; padding-left: 20px; }
.profile-card { max-width: 720px; }
.profile-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 0; margin: 0; border: 0; min-width: 0; }
.profile-fields .button { justify-self: start; }
.profile-card input[readonly] { background: var(--paper); }
.profile-signout { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.gmail-card { border-color: #cee3db; }
.gmail-heading { display: flex; align-items: flex-start; gap: 12px; }
.gmail-heading .title-row { justify-content: flex-start; }
.gmail-heading p { max-width: 650px; margin: 5px 0 0; }
.gmail-summary { min-width: 0; }
.gmail-icon { display: grid; width: 44px; height: 44px; flex: 0 0 44px; place-items: center; border-radius: 12px; background: var(--pale); color: var(--accent); }
.gmail-card .gmail-address { margin: 14px 0 0; color: var(--ink); overflow-wrap: anywhere; }
.gmail-card:focus { outline: none; }
.gmail-steps { display: grid; gap: 6px; margin: 0; padding-left: 22px; color: var(--muted); }
.gmail-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.gmail-actions .button { white-space: normal; }
.billing-layout { display: grid; max-width: 860px; gap: 25px; }
.wallet-panel { display: flex; align-items: flex-start; gap: 14px; padding: 20px; border-color: #cee3db; }
.wallet-tokens { color: var(--ink); font-size: clamp(1.55rem, 3.8vw, 2.2rem); font-weight: 750; line-height: 1.25; }
.billing-section h2 { margin-bottom: 5px; }
.billing-tariffs { container: tariffs / inline-size; padding: clamp(14px, 2.4vw, 24px); border: 1px solid #c5dbce; border-radius: var(--radius); background: #e0eee6; }
.token-packages { display: grid; gap: 12px; margin-top: 16px; }
.token-pack { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; padding: 20px; border-color: #cdded3; }
.token-pack h3 { font-size: 1.06rem; }
.token-pack-price { font-size: clamp(2rem, 3.6vw, 2.65rem); line-height: 1.1; font-weight: 780; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.token-pack-details { display: grid; gap: 3px; width: 100%; margin: 4px 0 8px; padding-top: 12px; border-top: 1px solid var(--line); font-size: .9rem; }
.token-pack-estimate { color: var(--muted); }
.token-pack .button { width: 100%; margin-top: auto; }
.token-pack[data-package="large"] {
  background: linear-gradient(145deg, #12352c, #1a5943);
  border-color: #1a5943;
  color: #fff;
}
.token-pack[data-package="large"] h3 { color: var(--orange); font-size: 1.375rem; font-weight: 780; }
.token-pack[data-package="large"] .token-pack-price { font-size: clamp(2.35rem, 4.2vw, 3.15rem); }
.token-pack[data-package="large"] .token-pack-details { border-color: #ffffff3d; }
.token-pack[data-package="large"] .token-pack-estimate { color: #d1eadd; }
.token-pack[data-package="large"] .button { background: var(--orange); border-color: var(--orange); color: #12352c; }
.token-pack[data-package="large"] .button:hover:not(:disabled) { background: var(--orange-hover); }
.token-pack[data-package="large"] .button:focus-visible { outline-color: var(--orange); }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .token-pack { transition: transform .18s ease, box-shadow .18s ease; }
  .token-pack:hover { transform: scale(1.025); box-shadow: 0 7px 20px #163a2826; }
}
@container tariffs (min-width: 400px) {
  .token-packages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .token-pack[data-package="large"] { grid-column: 1 / -1; }
}
@container tariffs (min-width: 620px) {
  .token-packages { grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(0, 1.22fr); }
  .token-pack[data-package="large"] { grid-column: auto; }
}
.token-operations { margin-top: 10px; }
.token-credit { color: var(--accent); }
.draft-mail-hint { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 10px; border-radius: 9px; background: var(--pale); font-size: .88rem; }
.draft-mail-hint .button { white-space: normal; }
.draft-mail-hint strong { overflow-wrap: anywhere; }
.draft-export-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.draft-template-link { display: flex; justify-content: flex-end; color: var(--muted); font-size: .875rem; }
.template-status { color: var(--accent); font-size: .875rem; }
.template-status:empty { display: none; }
.template-languages { min-width: 0; margin: 0; padding: 0; border: 0; }
.template-languages legend { margin-bottom: 5px; padding: 0; font-size: .875rem; font-weight: 650; }
.template-language-options { display: flex; flex-wrap: wrap; gap: 6px; }
.template-language { position: relative; display: inline-flex; cursor: pointer; }
.template-language input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: inherit; }
.template-language span { display: grid; min-height: 42px; place-items: center; padding: 7px 13px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); font-size: .89rem; font-weight: 650; }
.template-language:hover span { background: #f3f7f6; }
.template-language input:checked + span { border-color: #9acfb9; background: var(--pale); color: var(--accent-hover); }
.template-language input:focus-visible + span { outline: 2px solid #009a73; outline-offset: 3px; }
.template-language input:disabled { cursor: default; }
.template-language input:disabled + span { opacity: .6; }
.banner { padding: 10px 12px; border: 1px solid #ecd7ad; border-radius: 9px; color: #68460c; background: #fff7e6; font-size: .88rem; }
.banner-error { border-color: #f3d0d1; color: #902a36; background: #fff0f1; }
.search-message:not(:empty) { margin-top: 12px; }
dialog { width: min(680px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); padding: 0; margin: auto; border: 1px solid var(--line); border-radius: 20px; color: var(--ink); box-shadow: 0 20px 70px #112c4140; }
dialog::backdrop { background: #0e261c88; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 22px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { overflow-wrap: anywhere; }
.dialog-body { padding: 18px 22px; }
.dialog-body form, .draft-fields { display: grid; gap: 13px; }
#draft-body { min-height: 190px; }
#template-body { min-height: 210px; }
.dialog-footer { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; padding: 13px 22px; border-top: 1px solid var(--line); }
.spotlight { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; overflow: hidden; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.spotlight::backdrop { background: transparent; }
.spotlight.coach-no-target { background: #101e30cc; }
.coach-ring { position: absolute; border: 2px solid #52dfad; border-radius: 12px; box-shadow: 0 0 0 200vmax #101e30cc; pointer-events: none; }
.coach-card { position: absolute; width: min(335px, calc(100% - 24px)); max-height: calc(100% - 24px); overflow: auto; padding: 14px 17px 17px; border: 1px solid #d5e8e0; border-radius: 13px; background: var(--paper); box-shadow: 0 12px 38px #091a2b50; }
.coach-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: .82rem; font-weight: 650; }
.coach-header .button { min-height: 36px; margin: -4px -6px 0 0; padding-inline: 8px; }
.coach-card h2 { margin: 5px 0 8px; font-size: 1.2rem; }
.coach-card h2:focus { outline: none; }
.coach-card p { color: var(--muted); font-size: .9rem; }
.coach-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.coach-actions .button { min-height: 36px; padding-inline: 10px; }
.floating-hint { position: fixed; z-index: 20; width: max-content; max-width: min(245px, calc(100vw - 16px)); padding: 7px 10px; border-radius: 7px; background: #172d35; color: white; font-size: .8rem; line-height: 1.4; font-weight: 530; box-shadow: 0 3px 12px #112c4135; }
.details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 15px 0; }
.details div { background: #f5f8fa; border-radius: 8px; padding: 10px; overflow-wrap: anywhere; }
.details dt { color: var(--muted); font-size: .82rem; }
.details dd { margin: 2px 0 0; font-size: .92rem; }
.file-list { display: flex; flex-wrap: wrap; gap: 5px; }
.file-chip { display: inline-flex; align-items: center; gap: 5px; padding-left: 8px; border-radius: 8px; background: #edf3f6; font-size: .8rem; overflow-wrap: anywhere; }
.file-chip .icon-button { width: 28px; height: 28px; }
.file-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.draft-body-readonly { white-space: pre-wrap; overflow-wrap: anywhere; padding: 12px; background: #f5f8fa; border-radius: 8px; }
.notices { position: fixed; right: 22px; bottom: 22px; z-index: 10; display: grid; gap: 8px; max-width: min(390px, calc(100vw - 44px)); }
.notice { padding: 11px 14px; border-radius: 9px; background: #172d35; color: white; box-shadow: 0 4px 20px #12253830; font-size: .9rem; }
.notice-error { background: #782f3b; }
.initial-loading { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 1050px) {
  :root { --sidebar-width: 204px; }
  main, .topbar-inner { padding-inline: 24px; }
  .breadcrumb > span { display: none; }
}
@media (max-width: 800px) {
  :root { --sidebar-width: 244px; }
  .sidebar { visibility: hidden; transform: translateX(-100%); transition: transform .18s ease; }
  .sidebar.is-open { visibility: visible; transform: none; }
  .workspace { margin-left: 0; }
  .topbar-inner { justify-content: flex-start; gap: 7px; min-height: 58px; }
  .mobile-brand { display: inline-flex; gap: 7px; font-size: 1.03rem; }
  .breadcrumb { display: none; }
  .mobile-menu, .mobile-close { display: inline-grid; }
  .mobile-backdrop { display: block; position: fixed; inset: 0; z-index: 3; background: #102a2080; border: 0; }
}
@media (max-width: 570px) {
  .topbar-inner { padding-inline: 12px; }
  .topbar-actions { gap: 5px; }
  .topbar-link { padding-inline: 7px; }
  .balance-unit { display: none; }
  main { padding: 19px 14px 40px; }
  .page-heading { flex-wrap: wrap; gap: 10px; margin-bottom: 19px; }
  .search-hero { padding: 24px 18px 57px; border-radius: 17px; }
  .hero-description { max-width: 32ch; }
  .hero-art { opacity: .52; }
  .hero-art span { right: -85px; }
  .hero-art i { right: 22px; }
  .hero-art b { display: none; }
  .search-panel { margin: -34px 8px 0; padding: 15px 13px; }
  .search-grid { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .search-grid > label:first-child { grid-column: 1 / -1; }
  .search-grid .button { padding-inline: 12px; }
  .search-input > :is(input, select), .field input, select, textarea { font-size: 1rem; }
  .results { margin-top: 23px; }
  .results-header { flex-direction: column; gap: 7px; }
  .selection-bar, .list-item { align-items: flex-start; flex-direction: column; }
  .settings-grid { grid-template-columns: 1fr; }
  .profile-fields { grid-template-columns: 1fr; }
  .notices { top: 66px; right: 12px; bottom: auto; max-width: calc(100vw - 24px); }
  .dialog-body, .dialog-header, .dialog-footer { padding-inline: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@container (max-width: 680px) {
  .table-scroll { overflow: visible; }
  table { min-width: 0; display: block; }
  thead { display: block; border-bottom: 1px solid var(--line); background: #f6f9f6; }
  thead tr { display: flex; align-items: center; padding: 7px 13px; }
  thead th { display: none; }
  thead th:first-child { display: flex; align-items: center; gap: 8px; padding: 0; width: auto; border: 0; }
  .select-all-label { display: flex; align-items: center; gap: 8px; min-height: 30px; cursor: pointer; }
  .select-all-label span { display: inline; }
  tbody { display: block; }
  tbody tr { display: grid; grid-template-columns: 19px minmax(0, 1fr) auto; gap: 3px 8px; padding: 8px 13px 10px; border-bottom: 1px solid var(--line); }
  tbody tr:last-child { border-bottom: none; }
  tbody td, tbody td:first-child { display: block; border: 0; padding: 0; width: auto; min-width: 0; align-self: center; }
  tbody .supplier-cell { grid-column: 2 / -1; display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: baseline; gap: 8px; font-size: .81rem; }
  .supplier-cell-label { display: inline; color: var(--muted); }
  .conditions-values { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
  .conditions-values > span { min-width: 0; margin-top: 0; }
  tbody .row-actions { grid-column: 3; grid-row: 1; }
}
@media (max-width: 355px) {
  .topbar-inner { padding-inline: 8px; }
  .search-grid { grid-template-columns: 1fr; }
  .selection-actions .button { white-space: normal; }
  .table-toolbar { padding-inline: 9px; }
}
.selection-bar { position: sticky; bottom: 0; z-index: 1; background: var(--paper); border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 -3px 12px #16392e0d; }
