:root {
  --ink: #1a1630;
  --muted: #6d6578;
  --line: #ded8e8;
  --paper: #f8f7fb;
  --surface: #fff;
  --surface-strong: #f2edf9;
  --blue: #1593c7;
  --purple: #3f2b66;
  --purple-dark: #2e204d;
  --green: #3f6b2f;
  --gold: #ffbc1f;
  --red: #cf5147;
  --radius: 8px;
  --shadow: 0 18px 48px rgba(63, 43, 102, .16);
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

/* Calendar date task creation */
.calendar-navigation .calendar-create-button,
.calendar-day-create {
  color: #fff;
  background: #4e74b8;
  border-color: #4e74b8;
}

.calendar-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  margin-bottom: 4px;
}

.calendar-day-number {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.calendar-day-number:hover {
  background: #eee8f6;
}

.calendar-day-add {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #d4c9df;
  border-radius: 8px;
  background: #f6f1fa;
  color: #3f2b66;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.calendar-day-add:hover {
  color: #fff;
  background: #4e74b8;
  border-color: #4e74b8;
}

.calendar-week-date {
  min-width: 0;
  padding: 7px 5px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-transform: capitalize;
  cursor: pointer;
}

.calendar-week-date:hover {
  background: #f2ecf7;
}

.calendar-day-view > header {
  gap: 12px;
}

.calendar-day-create {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
}

.calendar-linked-order[hidden] {
  display: none;
}

.calendar-linked-order small {
  color: #6f6679;
  font-size: 11px;
}

@media (max-width: 760px) {
  .calendar-shell {
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    overflow-x: hidden;
  }

  .calendar-modes {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .calendar-modes button:not(:last-child) {
    display: block;
  }

  .calendar-content {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
  }

  .calendar-month,
  .calendar-week-grid,
  .calendar-day-view {
    display: block;
  }

  .calendar-month {
    min-width: 680px;
  }

  .calendar-week-grid {
    display: grid;
  }

  .calendar-day-view {
    min-width: 0;
  }

  .calendar-day-view > header {
    align-items: stretch;
    flex-direction: column;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--paper); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { border: 0; }

.login-view { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, .9fr) minmax(360px, 1.1fr); background: linear-gradient(125deg, rgba(63, 43, 102, .97), rgba(21, 147, 199, .88)); }
.login-copy { display: flex; flex-direction: column; justify-content: flex-end; padding: 48px; color: #fff; }
.login-copy h1 { max-width: 760px; margin: 28px 0 10px; font-size: clamp(30px, 4vw, 58px); line-height: 1.05; }
.quote-author { margin: 0; font-size: 20px; font-weight: 800; opacity: .88; }
.login-panel-wrap { display: grid; align-items: center; padding: 36px; background: rgba(248, 248, 251, .96); }
.login-panel { width: min(100%, 520px); margin: auto; padding: 28px; display: grid; gap: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.login-panel h2 { margin: 0; font-size: 26px; }
.login-panel p { margin: 0 0 6px; color: var(--muted); }
.login-panel label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 800; text-transform: uppercase; }
.login-panel input { min-height: 48px; padding: 0 14px; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); text-transform: none; }
.environment-badge, .eyebrow { width: fit-content; padding: 5px 10px; border-radius: 999px; color: var(--purple); background: var(--surface-strong); font-size: 11px; font-weight: 900; letter-spacing: .06em; }

.brand-lockup { display: flex; align-items: center; gap: 16px; min-width: 350px; color: var(--purple); }
.brand-lockup img { width: 92px; height: 92px; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(63, 43, 102, .18)); }
.brand-lockup strong { font-size: clamp(42px, 4vw, 72px); line-height: 1; letter-spacing: .01em; font-weight: 950; }
.brand-lockup-login { width: min(100%, 460px); min-width: 0; padding: 12px 16px; background: rgba(255,255,255,.95); border: 1px solid rgba(255,255,255,.72); border-radius: 20px; box-shadow: 0 18px 42px rgba(26,25,68,.24); }
.brand-lockup .brand-full-logo { width: min(520px, 37.333vw); height: auto; filter: drop-shadow(0 10px 18px rgba(63, 43, 102, .14)); }
.brand-lockup-login .brand-full-logo { width: 100%; max-width: 428px; height: auto; filter: drop-shadow(0 8px 14px rgba(63,43,102,.12)); }

.app-shell { min-height: 100vh; }
.system-banner { position: sticky; z-index: 60; top: 0; min-height: 42px; display: flex; align-items: center; justify-content: center; gap: 18px; padding: 8px 24px; color: #fff; background: #a81931; border-bottom: 3px solid var(--gold); font-size: 14px; letter-spacing: .04em; }
.system-banner strong { font-weight: 950; }
.system-banner .offline { color: #ffe08a; }
.topbar { min-height: 180px; display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 26px 48px; background: linear-gradient(110deg, #fff 0%, #f6f3ff 48%, #eef8ff 100%); border-bottom: 1px solid var(--line); }
.calendar-launch-button { width: 64px; height: 64px; flex: 0 0 64px; display: grid; place-items: center; padding: 12px; color: var(--purple); background: #fff; border: 2px solid #cfc4de; border-radius: 13px; box-shadow: 0 9px 22px rgba(63,43,102,.13); cursor: pointer; transition: .18s ease; }
.calendar-launch-button:hover, .calendar-launch-button.active { color: #fff; background: var(--purple); border-color: var(--purple); box-shadow: 0 12px 25px rgba(63,43,102,.28); transform: translateY(-1px); }
.calendar-launch-button svg { width: 36px; height: 36px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.calendar-launch-button > span { display: none; }
.brand-row { min-width: 0; display: flex; align-items: center; gap: clamp(28px, 4vw, 72px); }
.brand-quote h1 { margin: 0; max-width: 760px; font-size: clamp(28px, 2.4vw, 42px); font-weight: 950; line-height: 1.08; }
.brand-quote p { margin: 6px 0 0; color: var(--purple); font-weight: 850; }
.topbar-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; flex-wrap: wrap; }
.system-status-button { min-height: 42px; padding: 0 18px; color: #fff; background: #97172d; border-radius: 999px; font-weight: 900; cursor: pointer; }
.user-pill { min-height: 38px; display: flex; align-items: center; gap: 9px; padding: 0 14px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; }
.role-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }

.tabs-bar { position: relative; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px; background: #fbfcfc; border-bottom: 1px solid var(--line); }
.app-shell.calendar-mode .tabs-bar { display: none; }
.board-tabs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.tab-button { min-height: 36px; padding: 0 14px; color: var(--muted); background: transparent; border-radius: 6px; cursor: pointer; font-weight: 750; }
.tab-button:hover { color: var(--purple); background: var(--surface-strong); }
.tab-button.active { color: #fff; background: var(--purple); box-shadow: 0 8px 18px rgba(63, 43, 102, .22); }
.tabs-actions { position: relative; display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-left: auto; }
.mobile-menu-toggle { display: none; }
.primary-button, .secondary-button, .ghost-button, .danger-button, .tiny-button { min-height: 38px; padding: 0 14px; border: 1px solid transparent; border-radius: var(--radius); cursor: pointer; font-weight: 750; }
.primary-button { color: #fff; background: var(--purple); }
.primary-button:hover { background: var(--purple-dark); }
.secondary-button { color: var(--purple); background: #fff; border-color: var(--line); }
.secondary-button:hover, .secondary-button.is-active { border-color: var(--purple); background: var(--surface-strong); }
.secondary-button:disabled { cursor: not-allowed; opacity: .55; }
.ghost-button { color: var(--muted); background: transparent; border-color: var(--line); }
.danger-button { color: #fff; background: var(--red); }
.archive-button span { min-width: 24px; min-height: 24px; display: inline-grid; place-items: center; margin-left: 6px; border-radius: 999px; background: var(--surface-strong); }
.trash-button span { min-width: 24px; min-height: 24px; display: inline-grid; place-items: center; margin-left: 6px; border-radius: 999px; background: #f2d8d5; }
.trash-button.is-active { color: #fff; background: #7b2e2e; border-color: #7b2e2e; }
.trash-button.is-active span { color: #7b2e2e; background: #fff; }
.search-control { position: relative; }
.search-panel { position: absolute; z-index: 55; top: calc(100% + 10px); right: 0; width: min(520px, calc(100vw - 32px)); display: grid; grid-template-columns: 1fr 180px auto; gap: 10px; align-items: end; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.search-panel label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 800; }
.search-panel input, .search-panel select { min-height: 40px; width: 100%; padding: 0 10px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }

.workspace-area { display: grid; }
.workspace-board { --board-tint: #f8f7fb; --board-tint-soft: #fff; --board-line: var(--line); --board-title: var(--purple-dark); scroll-margin-top: 56px; padding: 28px 24px 34px; background: linear-gradient(180deg, var(--board-tint), var(--board-tint-soft)); border-top: 1px solid var(--board-line); border-bottom: 1px solid var(--board-line); }
.workspace-board[data-board-code="tasks"] { --board-tint: #fff1f1; --board-tint-soft: #fffafa; --board-line: #f0caca; --board-title: #7e2f34; }
.workspace-board[data-board-code="orders"] { --board-tint: #f3eefb; --board-tint-soft: #fbf8ff; --board-line: #d8caef; --board-title: #3f2b66; }
.workspace-board[data-board-code="supply"] { --board-tint: #edf8fb; --board-tint-soft: #f8fcfe; --board-line: #c7e4ef; --board-title: #0b6f9f; }
.workspace-board[data-board-code="finance"] { --board-tint: #f1f7ea; --board-tint-soft: #fbfdf7; --board-line: #d4e5bf; --board-title: #3f6b2f; }
.board-summary { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.board-summary h2 { margin: 0; color: var(--board-title); font-size: 26px; }
.board-summary p { margin: 4px 0 0; color: #5f596b; font-size: 16px; }
.kanban { display: grid; grid-template-columns: repeat(var(--column-count), minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.kanban-column { min-width: 0; min-height: 280px; display: grid; grid-template-rows: auto 1fr; background: #eef4f5; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.column-header { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px; background: #fff; border-bottom: 1px solid var(--line); }
.column-title-wrap { min-width: 0; }
.column-header h3 { margin: 0; font-size: 15px; }
.column-count { min-width: 28px; min-height: 28px; display: grid; place-items: center; color: var(--purple-dark); background: var(--surface-strong); border-radius: 999px; font-size: 12px; font-weight: 850; }
.column-create-popover { position: absolute; z-index: 10; left: 12px; top: calc(100% - 2px); min-height: 34px; padding: 0 12px; color: #fff; background: var(--purple); border-radius: var(--radius); box-shadow: 0 14px 26px rgba(63, 43, 102, .24); opacity: 0; visibility: hidden; transform: translateY(-4px); cursor: pointer; transition: .16s; }
.column-header:hover .column-create-popover, .column-header:focus-within .column-create-popover { opacity: 1; visibility: visible; transform: none; }
.column-dropzone { position: relative; min-height: 240px; padding: 10px; border-radius: 0 0 var(--radius) var(--radius); transition: background-color .18s ease, box-shadow .18s ease; }
.column-dropzone.is-card-drag-over { background: rgba(73, 169, 214, .08); box-shadow: inset 0 0 0 2px rgba(21, 147, 199, .22); }
.column-dropzone.is-card-drag-over .empty-column { display: none; }
.empty-column { min-height: 90px; display: grid; place-items: center; color: var(--muted); }

.kanban-orders .kanban-column[data-order-stage] { background: var(--stage-tint); border-color: color-mix(in srgb, var(--stage-color) 34%, #d9dce3); box-shadow: 0 10px 26px color-mix(in srgb, var(--stage-color) 8%, transparent); }
.kanban-orders .kanban-column[data-order-stage] .column-header { color: var(--stage-ink); background: var(--stage-color); border-bottom-color: color-mix(in srgb, var(--stage-color) 76%, #000); }
.kanban-orders .kanban-column[data-order-stage] .column-header h3 { color: inherit; font-weight: 900; }
.kanban-orders .kanban-column[data-order-stage] .column-count { color: var(--stage-ink); background: rgba(255,255,255,.34); box-shadow: inset 0 0 0 1px rgba(255,255,255,.42); }
.kanban-orders .kanban-column[data-order-stage] .column-dropzone { background: linear-gradient(180deg, color-mix(in srgb, var(--stage-tint) 78%, #fff), var(--stage-tint)); }

.kanban-card { position: relative; display: grid; gap: 10px; margin-bottom: 10px; padding: 18px 12px 12px; color: var(--ink); background: #fff; border: 1px solid #dbe6e9; border-radius: var(--radius); box-shadow: 0 6px 16px rgba(21, 32, 51, .06); overflow: hidden; cursor: pointer; transition: border-color .18s ease, box-shadow .18s ease, opacity .16s ease, transform .18s cubic-bezier(.2,.8,.2,1); }
.kanban-card[data-card-draggable="true"] { cursor: grab; touch-action: pan-y; }
.kanban-card[data-card-draggable="true"]:active { cursor: grabbing; }
.kanban-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: var(--card-accent, var(--purple)); }
.kanban-card:hover { border-color: #35b7e5; box-shadow: 0 10px 22px rgba(21, 32, 51, .1); }
.kanban-orders .stage-order-card { background: linear-gradient(145deg, var(--stage-card), color-mix(in srgb, var(--stage-card) 72%, #fff)); border-color: color-mix(in srgb, var(--stage-color) 46%, #d7dce3); box-shadow: 0 7px 18px color-mix(in srgb, var(--stage-color) 13%, rgba(21,32,51,.05)); }
.kanban-orders .stage-order-card:hover { border-color: var(--stage-color); box-shadow: 0 12px 25px color-mix(in srgb, var(--stage-color) 22%, rgba(21,32,51,.08)); }
.kanban-orders .stage-order-card .card-customer { color: color-mix(in srgb, var(--ink) 72%, var(--stage-color)); }
.kanban-card.dragging { opacity: .22; transform: scale(.985); box-shadow: 0 4px 12px rgba(21, 32, 51, .05); }
.is-card-dragging .kanban-card:not(.dragging) { transition: border-color .18s ease, box-shadow .18s ease, transform .19s cubic-bezier(.2,.8,.2,1); }
.card-drop-indicator { position: relative; z-index: 3; height: 4px; margin: 1px 4px 11px; flex: 0 0 4px; background: linear-gradient(90deg, #118dc4, #37b7e7); border-radius: 999px; box-shadow: 0 0 0 3px rgba(21,147,199,.13), 0 5px 13px rgba(21,147,199,.25); pointer-events: none; animation: card-drop-line-in .14s ease-out; }
.card-drop-indicator::before, .card-drop-indicator::after { content: ""; position: absolute; top: 50%; width: 9px; height: 9px; background: #1593c7; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 1px 5px rgba(21,78,105,.28); transform: translateY(-50%); }
.card-drop-indicator::before { left: -4px; }
.card-drop-indicator::after { right: -4px; }
.card-drop-indicator span { position: absolute; left: 50%; bottom: 8px; padding: 3px 8px; color: #fff; background: #117fae; border-radius: 999px; box-shadow: 0 4px 12px rgba(17,127,174,.22); transform: translateX(-50%); white-space: nowrap; font-size: 9px; font-weight: 850; letter-spacing: .01em; }
.card-drag-ghost { position: fixed !important; z-index: 9999; top: -10000px; left: -10000px; max-height: 260px; margin: 0 !important; opacity: .94; transform: rotate(1.2deg) scale(1.015); box-shadow: 0 24px 55px rgba(37,25,62,.28) !important; overflow: hidden; pointer-events: none; }
.card-drag-ghost.is-pointer-ghost { transition: none !important; will-change: left, top; }
@keyframes card-drop-line-in { from { opacity: 0; transform: scaleX(.72); } to { opacity: 1; transform: scaleX(1); } }
.kanban-card h4 { margin: 0; font-size: 15px; }
.kanban-card.order-card h4 { font-weight: 950; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.card-title-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.card-customer { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.card-supplier { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 8px; align-items: baseline; margin: 9px 0 0; padding: 8px 10px; color: #355e6b; background: rgba(213,231,235,.68); border: 1px solid #c4dce2; border-radius: 9px; font-size: 12px; }
.card-supplier span { color: #667985; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.card-supplier strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.card-supplier.is-empty { color: #7d8490; background: #f5f7f8; border-style: dashed; }
.card-assignee-badge { min-height: 26px; display: inline-flex; align-items: center; justify-content: center; padding: 2px 10px; border-radius: 999px; font-weight: 900; white-space: nowrap; }
.card-assignee-badge-ilya { color: #2f2200; background: #ffd633; border: 1px solid #e5ad00; box-shadow: 0 5px 12px rgba(229, 173, 0, .22); }
.card-assignee-badge-murysa { color: #fff; background: #7f4fd6; border: 1px solid #6d42b8; }
.tag-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.tag { min-height: 24px; display: inline-flex; align-items: center; padding: 0 8px; color: #16414a; background: #dff3f5; border-radius: 999px; font-size: 12px; font-weight: 750; }
.tag.red { color: #6b211b; background: #ffe1de; }
.tag.gold { color: #5a3900; background: #fff1c9; }
.tag.green { color: #1d472d; background: #dff0e4; }
.linked-tasks-preview { display: grid; gap: 5px; padding: 9px 10px; color: #243f31; background: linear-gradient(135deg, #dff0e4, #f6fff9); border: 1px solid rgba(63, 107, 47, .22); border-left: 5px solid var(--green); border-radius: var(--radius); }
.linked-tasks-preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.linked-tasks-preview-heading > strong { font-size: 12px; text-transform: uppercase; }
.linked-task-preview-list { display: grid; gap: 5px; }
.linked-task-preview-item { display: grid; grid-template-columns: 1fr; gap: 6px; }
.linked-task-preview-row { display: grid; gap: 2px; width: 100%; padding: 6px 7px; color: #243f31; text-align: left; background: rgba(255,255,255,.82); border: 1px solid rgba(63,107,47,.18); border-radius: 7px; cursor: pointer; }
.linked-task-preview-row span { color: #5d7064; font-size: 10px; font-weight: 850; text-transform: uppercase; }
.linked-task-preview-row b { font-size: 12px; }
.card-inline-note-preview { width: 100%; padding: 12px; color: #771f19; background: #ffeeec; border: 2px solid rgba(216,35,35,.82); border-radius: var(--radius); text-align: left; white-space: pre-wrap; font-size: 14px; font-weight: 850; line-height: 1.4; cursor: text; }
.card-inline-note-preview:hover,
.card-inline-note-preview:focus-visible { background: #fff4f2; border-color: #c92222; outline: 3px solid rgba(201,34,34,.14); outline-offset: 1px; }
.card-inline-note-editor { display: grid; gap: 7px; }
.card-inline-note-editor textarea { width: 100%; height: auto; min-height: 0; resize: none; overflow: hidden; padding: 12px; color: #771f19; background: #fff8f7; border: 2px solid rgba(216,35,35,.82); border-radius: var(--radius); font-weight: 700; line-height: 1.4; }
.card-inline-note-actions { display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.create-order-task-button { min-height: 34px; padding: 0 11px; color: #315b49; background: #edf8f1; border: 1px solid #8eb79b; border-radius: 999px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.create-order-task-button:hover { color: #fff; background: #3f6b4d; border-color: #3f6b4d; }
.create-order-task-button:disabled { opacity: .64; cursor: wait; }
.complete-order-task-button,.linked-task-complete-button { min-height: 34px; padding: 0 11px; color: #fff; background: #4e7958; border: 1px solid #4e7958; border-radius: 9px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.linked-task-preview-item > .linked-task-complete-button { justify-self: end; }
.complete-order-task-button:hover,.linked-task-complete-button:hover { background: #365f41; border-color: #365f41; }
.daily-task-card { gap: 8px; padding: 14px 12px 10px; cursor: default; }
.daily-task-display { min-height: 24px; padding: 7px 9px; white-space: pre-wrap; overflow-wrap: anywhere; }
.daily-task-text { width: 100%; min-height: 58px; padding: 9px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 7px; resize: vertical; }
.daily-task-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.daily-task-primary-actions { display: flex; align-items: center; gap: 8px; }
.card-edit-button { width: 38px; min-width: 38px; height: 38px; display: grid; place-items: center; padding: 0; color: var(--purple); background: #fff; border: 1px solid rgba(63,43,102,.25); border-radius: 10px; box-shadow: 0 4px 10px rgba(63,43,102,.08); cursor: pointer; transition: color .16s ease, background-color .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease; }
.card-edit-button:hover { color: #fff; background: var(--purple); border-color: var(--purple); box-shadow: 0 7px 15px rgba(63,43,102,.2); transform: translateY(-1px); }
.card-edit-button:focus-visible { outline: 3px solid rgba(73,169,214,.42); outline-offset: 2px; }
.card-edit-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.quick-delete-button { width: 30px; min-width: 30px; min-height: 30px; padding: 0; display: grid; place-items: center; color: #7b2f2a; background: #ffe1de; border: 1px solid #f4b7b1; border-radius: 50%; }
.daily-task-link-editor { display: grid; gap: 6px; padding: 8px; background: #f8fbff; border: 1px solid rgba(63,43,102,.14); border-left: 5px solid var(--purple); border-radius: var(--radius); }
.daily-task-link-editor > span { color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.daily-task-link-select { min-height: 40px; width: 100%; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.daily-task-link-badge { width: 100%; display: grid; gap: 3px; padding: 9px 10px 9px 13px; color: var(--ink); text-align: left; background: linear-gradient(90deg, var(--purple) 0 5px, #f7fbff 5px); border: 1px solid rgba(63,43,102,.18); border-radius: var(--radius); cursor: pointer; }
.daily-task-link-badge span { color: var(--muted); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.daily-task-link-badge strong { font-size: 12px; }
.daily-task-calendar { width: 100%; display: grid; grid-template-columns: 38px minmax(0,1fr) auto; grid-template-areas: "icon label meta" "icon value meta"; align-items: center; gap: 1px 9px; padding: 9px 10px; color: #34264d; text-align: left; background: linear-gradient(135deg,#f5f0fb,#fff); border: 1px solid #d8cce8; border-radius: 9px; cursor: pointer; }
.daily-task-calendar:hover { border-color: var(--purple); box-shadow: 0 7px 18px rgba(63,43,102,.13); }
.daily-task-calendar.overdue { color: #792820; background: #fff0ee; border-color: #e4a49e; }
.daily-task-calendar-icon { grid-area: icon; width: 38px; height: 38px; display: block; border-radius: 50%; object-fit: contain; filter: drop-shadow(0 3px 5px rgba(89,65,15,.2)); }
.daily-task-calendar-heading { grid-area: label; min-width: 0; display: flex; align-items: center; gap: 8px; }
.daily-task-calendar-copy { color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.daily-task-calendar strong { grid-area: value; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.daily-task-calendar small { grid-area: meta; color: var(--muted); font-size: 9px; white-space: nowrap; }
.daily-task-calendar.has-date .daily-task-calendar-date { color: #c92e25; font-size: 15px; font-weight: 950; text-decoration: underline 2px; text-underline-offset: 3px; text-decoration-color: #c92e25; }
.daily-task-calendar-meta { grid-area: meta; display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.daily-task-overdue-label { padding: 4px 8px; color: #fff; background: #c92e25; border: 1px solid #aa2119; border-radius: 7px; box-shadow: 0 3px 8px rgba(201,46,37,.2); font-size: 11px; font-weight: 950; line-height: 1; white-space: nowrap; }
.daily-task-calendar-reminders { position: relative; grid-area: meta; width: 32px; height: 32px; display: grid; place-items: center; color: #716979; background: #eee9f2; border-radius: 9px; font-size: 16px; line-height: 1; }
.daily-task-calendar-meta .daily-task-calendar-reminders { grid-area: auto; flex: 0 0 32px; }
.daily-task-calendar-reminders:not(.has-reminders) { opacity: .48; filter: grayscale(1); }
.daily-task-reminder-count { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; display: grid; place-items: center; color: #fff; background: #cf5147; border: 2px solid #fff; border-radius: 99px; font-size: 9px; font-weight: 900; }
.daily-task-calendar-compact { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; padding: 1px; background: #fff9df; border: 1px solid #e2bd39; border-radius: 10px; box-shadow: 0 5px 12px rgba(153,111,18,.18); cursor: pointer; }
.daily-task-calendar-compact:hover { background: #fff2b9; border-color: #c99b22; box-shadow: 0 8px 18px rgba(153,111,18,.25); transform: translateY(-1px); }
.daily-task-calendar-compact .daily-task-calendar-icon { width: 36px; height: 36px; }
.project-task-card { background: linear-gradient(135deg, #fff, #f6f9ff); border-color: rgba(63,43,102,.24); }
.project-task-main { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 10px; align-items: center; }
.project-task-icon { position: relative; width: 42px; height: 34px; border-radius: 8px; background: linear-gradient(180deg, rgba(255,255,255,.35), transparent), var(--card-accent); box-shadow: 0 8px 20px rgba(63,43,102,.16); }
.project-task-icon::before { content: ""; position: absolute; left: 4px; top: -5px; width: 18px; height: 8px; border-radius: 6px 6px 0 0; background: inherit; }
.project-task-title { padding: 0; font-weight: 900; }
.project-task-path, .project-task-status { margin: 0; color: var(--muted); font-size: 12px; }
.kanban-column.has-linked-card-highlight { position: relative; z-index: 12; overflow: visible; }
.linked-task-target-highlight {
  z-index: 14;
  overflow: visible;
  border-color: #7500d9 !important;
  outline: 5px solid #fff24a;
  outline-offset: 3px;
  filter: brightness(1.1) saturate(1.2);
  animation: linked-card-spotlight 1.2s cubic-bezier(.2,.8,.2,1) 3;
  will-change: transform, filter, box-shadow;
}
@keyframes linked-card-spotlight {
  0%, 100% {
    transform: translateY(-2px) scale(1.035);
    filter: brightness(1.1) saturate(1.2);
    box-shadow: 0 0 0 9px rgba(117,0,217,.82), 0 0 30px 12px rgba(255,218,43,.52), 0 22px 52px rgba(50,18,79,.38);
  }
  50% {
    transform: translateY(-7px) scale(1.085);
    filter: brightness(1.2) saturate(1.4);
    box-shadow: 0 0 0 11px rgba(255,255,255,.96), 0 0 0 17px rgba(117,0,217,.9), 0 0 45px 20px rgba(255,218,43,.72), 0 30px 66px rgba(50,18,79,.5);
  }
}

.archive-area { min-height: calc(100vh - 260px); padding: 28px 24px; background: #fbf8ff; }
.archive-summary { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.archive-search { display: grid; grid-template-columns: minmax(260px, 1fr) auto auto; gap: 12px; align-items: end; margin: 0 0 18px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(63,43,102,.07); }
.archive-search-field { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 800; }
.archive-search-field input { min-height: 44px; width: 100%; padding: 0 13px; color: var(--ink); background: #fff; border: 1px solid #b8bfd0; border-radius: var(--radius); font-size: 15px; }
.archive-search-field input:focus { outline: 3px solid rgba(78,127,216,.18); border-color: #4e7fd8; }
.archive-search-count { min-width: 118px; padding-bottom: 12px; color: #4e6490; font-size: 14px; text-align: right; }
.archive-search-reset { min-height: 44px; }
.archive-search-results { display: block; }
.archive-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.empty-archive { min-height: 260px; display: grid; place-items: center; color: var(--muted); background: #fff; border: 1px dashed #c6b9de; border-radius: var(--radius); font-size: 18px; font-weight: 800; }
.trash-area { background: #fff8f5; }
.trash-summary { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.trash-total { padding: 8px 12px; color: #7b2e2e; background: #fff; border: 1px solid #e5c7c1; border-radius: 999px; white-space: nowrap; }
.trash-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 16px; }
.trash-card { display: grid; align-content: start; gap: 14px; padding: 18px; background: #fff; border: 1px solid #e5c7c1; border-radius: var(--radius); box-shadow: 0 8px 24px rgba(82,35,31,.08); }
.trash-card-heading { display: grid; gap: 6px; }
.trash-card-heading h3 { margin: 0; color: #332724; font-size: 19px; line-height: 1.25; }
.trash-card-heading p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.35; }
.trash-card-source { width: fit-content; padding: 5px 9px; color: #7b2e2e; background: #fff2ee; border-radius: 999px; font-size: 12px; font-weight: 850; }
.trash-card-meta { display: grid; gap: 7px; }
.trash-meta-item { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 7px; border-bottom: 1px solid #f0dfda; font-size: 13px; }
.trash-meta-item span { color: var(--muted); }
.trash-meta-item strong { color: #332724; text-align: right; }
.trash-order-warning, .trash-hold-warning { margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.4; }
.trash-order-warning { color: #6e4a00; background: #fff4cf; border: 1px solid #e8ca68; }
.trash-hold-warning { color: #6a345f; background: #fbecf8; border: 1px solid #d7acd0; }
.trash-card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }

dialog { border: 0; padding: 0; color: var(--ink); background: transparent; }
dialog::backdrop { background: rgba(22, 16, 35, .72); backdrop-filter: blur(3px); }
.card-dialog { width: min(1280px, calc(100vw - 30px)); max-height: calc(100vh - 30px); }
.dialog-shell { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-height: calc(100vh - 30px); background: #f8f7fb; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 28px 90px rgba(20, 12, 35, .3); overflow: hidden; }
.modal-header { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 22px; background: #fff; border-bottom: 1px solid var(--line); }
.modal-header-copy { min-width: 0; max-width: calc(50% - 92px); }
.modal-header h2 { margin: 0; font-size: 24px; }
.modal-header p { margin: 4px 0 0; color: var(--muted); }
.modal-header-logo { position: absolute; top: 50%; left: 50%; width: 158px; max-height: 54px; object-fit: contain; filter: drop-shadow(0 5px 10px rgba(41,55,83,.12)); transform: translate(-50%,-50%); }
.modal-header-actions { display: flex; align-items: flex-end; gap: 10px; flex: 0 0 auto; }
.modal-header .header-status-field { min-width: 238px; color: inherit; font-size: 10px; font-weight: 850; text-transform: uppercase; }
.header-status-field select { width: 100%; min-height: 40px; padding: 7px 11px; color: var(--ink); background: rgba(255,255,255,.82); border: 1px solid #d5cde2; border-radius: var(--radius); font-size: 16px; font-weight: 650; line-height: 1.25; text-transform: none; }
.header-status-field select:focus { outline: 2px solid rgba(255,188,31,.45); border-color: var(--purple); }
.order-stage-card-dialog .modal-header { color: var(--dialog-stage-ink); background: var(--dialog-stage-color); border-bottom-color: color-mix(in srgb, var(--dialog-stage-color) 72%, #2f2540); }
.order-stage-card-dialog .modal-header p { color: color-mix(in srgb, var(--dialog-stage-ink) 82%, transparent); font-weight: 750; }
.order-stage-card-dialog .header-status-field select { border-color: rgba(255,255,255,.7); }
.order-stage-card-dialog .modal-header .icon-button { color: var(--dialog-stage-ink); background: color-mix(in srgb, var(--dialog-stage-ink) 13%, transparent); border: 1px solid color-mix(in srgb, var(--dialog-stage-ink) 32%, transparent); }
.icon-button { width: 40px; height: 40px; display: grid; place-items: center; color: var(--purple); background: var(--surface-strong); border-radius: 50%; cursor: pointer; font-size: 24px; }
.modal-body { min-height: 0; overflow: auto; padding: 18px; }
.card-mobile-view-switcher { display: none; }
.document-tools-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: stretch; margin-bottom: 14px; }
.document-tools-row-bottom { margin-bottom: 0; }
.order-mail-section { min-height: 680px; margin-top: 4px; }
.order-mail-section .mail-shell { height: 680px; box-shadow: 0 12px 32px rgba(28,35,46,.12); }
.order-mail-loading { min-height: 220px; display: grid; place-items: center; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); font-weight: 750; }
.document-tools-row > * { height: 100%; }
.document-tools-row > :only-child { grid-column: 1 / -1; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.card-form-column { display: grid; gap: 14px; }
.form-section, .documents-section { padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 22px rgba(63,43,102,.05); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.modal-field { display: grid; align-content: start; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.modal-field.full, .extra-info-panel.full { grid-column: 1 / -1; }
.card-form-column .modal-field input, .card-form-column .modal-field select, .card-form-column .modal-field textarea { width: 100%; min-height: 44px; padding: 9px 12px; color: var(--ink); background: #fff; border: 1px solid #d5cde2; border-radius: var(--radius); font-size: 18px; font-weight: 600; line-height: 1.25; text-transform: none; }
.card-form-column .modal-field textarea { min-height: 88px; resize: vertical; }
.card-form-column .delivery-address-field textarea { min-height: 52px; overflow: hidden; resize: none; white-space: pre-wrap; }
.modal-field input:focus, .modal-field select:focus, .modal-field textarea:focus { outline: 2px solid rgba(255,188,31,.36); border-color: var(--purple); }
.inn-lookup-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: stretch; }
.inn-lookup-row .secondary-button { min-height: 44px; }
.inn-lookup-status { min-height: 16px; color: var(--muted); font-size: 11px; font-weight: 650; line-height: 1.35; text-transform: none; }
.inn-lookup-status[data-tone="loading"] { color: #6c5790; }
.inn-lookup-status[data-tone="success"] { color: #2f6f39; }
.inn-lookup-status[data-tone="error"] { color: #a02d2d; }
.extra-info-panel { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.extra-info-panel summary { padding: 10px 12px; color: var(--purple); background: var(--surface-strong); cursor: pointer; font-size: 13px; font-weight: 850; }
.extra-info-grid { padding: 12px; }
.card-form-column > .form-section:first-child { container-type: inline-size; }
.order-card-form-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: start; }
.order-card-form-grid > .order-field-title,
.order-card-form-grid > .order-field-customer { grid-column: span 2; }
.order-card-form-grid > .order-field-address { grid-column: span 3; }
.order-card-form-grid > .order-field-inn { grid-column: span 1; }
.order-card-form-grid > .order-field-contact,
.order-card-form-grid > .order-field-assignee,
.order-card-form-grid > .order-field-phone { grid-column: span 2; }
.order-card-form-grid > .extra-info-panel { grid-column: 1 / -1; }
.order-card-form-grid > .contact-emails-field,
.order-card-form-grid > .order-field-notes,
.order-card-form-grid > .linked-tasks-field { grid-column: span 2; }
.order-card-form-grid > .order-field-notes-full { grid-column: 1 / -1; }
.supplier-section { border-color: #c9dde2; background: linear-gradient(180deg, #f4fafb, #fff); }
.supplier-section .section-title-row small { color: var(--muted); }
.supplier-form-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: start; }
.supplier-form-grid > .supplier-field-name { grid-column: span 3; }
.supplier-form-grid > .supplier-field-inn { grid-column: span 1; }
.supplier-form-grid > .supplier-extra { grid-column: 1 / -1; }

@container (min-width: 1000px) {
  .order-card-form-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .order-card-form-grid > .order-field-title,
  .order-card-form-grid > .order-field-customer { grid-column: span 3; }
  .order-card-form-grid > .order-field-address { grid-column: span 5; }
  .order-card-form-grid > .order-field-inn { grid-column: span 1; }
  .order-card-form-grid > .order-field-contact,
  .order-card-form-grid > .order-field-assignee,
  .order-card-form-grid > .order-field-phone { grid-column: span 3; }
  .order-card-form-grid > .contact-emails-field,
  .order-card-form-grid > .order-field-notes,
  .order-card-form-grid > .linked-tasks-field { grid-column: span 3; }
  .order-card-form-grid > .order-field-notes-full { grid-column: 1 / -1; }
}
.section-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section-title { color: var(--purple-dark); font-weight: 900; }
.linked-tasks-field { min-width: 0; min-height: 118px; padding: 10px; background: #f8fafc; border: 1px solid var(--line); border-radius: var(--radius); }
.linked-task-list { display: grid; gap: 8px; margin-top: 10px; }
.linked-task-dialog-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: center; }
.linked-task-dialog-row > button:first-child { display: grid; gap: 3px; padding: 9px 10px; color: var(--ink); text-align: left; background: #f7fbff; border: 1px solid var(--line); border-left: 5px solid var(--green); border-radius: var(--radius); cursor: pointer; }
.linked-task-dialog-row > .linked-task-complete-button { display: block; border-left-width: 1px; }
.linked-task-empty { margin: 10px 0; color: var(--muted); font-size: 12px; }
.linked-tasks-field > .create-order-task-button { margin-top: 10px; }
.supply-relations { display: grid; gap: 10px; border: 1px solid #d8cce8; border-left: 5px solid #7453a8; background: linear-gradient(135deg,#fbf9ff,#f4f9fc); border-radius: var(--radius); padding: 13px; }
.linked-supply-list { display: grid; gap: 7px; }
.linked-supply-list button { display: grid; gap: 3px; padding: 10px 11px; color: var(--ink); text-align: left; background: #fff; border: 1px solid #d9d0e5; border-left: 5px solid #7453a8; border-radius: 9px; cursor: pointer; }
.linked-supply-list span { color: #776985; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.linked-supply-list strong { font-size: 13px; }
.supply-relation-empty { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.create-linked-supply-button { justify-self: start; }
.linked-task-list span { color: var(--muted); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.color-picker { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.color-picker input { position: absolute; opacity: 0; }
.color-picker span { width: 34px; height: 34px; display: block; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.color-picker input:checked + span { box-shadow: 0 0 0 3px var(--purple); }
.label-picker { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.label-section { position: relative; }
.label-choice { display: inline-flex; align-items: center; gap: 3px; min-height: 32px; padding: 3px 4px; background: color-mix(in srgb, var(--label-color) 11%, #fff); border: 1px solid color-mix(in srgb, var(--label-color) 54%, #dfe3e8); border-radius: 999px; }
.label-color-dot { width: 17px; height: 17px; flex: 0 0 17px; padding: 0; background: var(--label-color); border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px color-mix(in srgb, var(--label-color) 62%, #aeb7c4); cursor: pointer; }
.label-toggle { cursor: pointer; }
.label-toggle input { position: absolute; opacity: 0; }
.label-toggle span { min-height: 26px; display: inline-flex; align-items: center; padding: 0 8px; color: color-mix(in srgb, var(--label-color) 76%, #26313e); border-radius: 999px; }
.label-toggle input:checked + span { color: var(--label-ink); background: var(--label-color); }
.label-delete-button { width: 22px; height: 22px; display: grid; place-items: center; padding: 0; color: #8f514d; background: #fff0ee; border: 1px solid #f3c3bd; border-radius: 50%; font-size: 13px; font-weight: 900; line-height: 1; cursor: pointer; }
.label-delete-button:hover { color: #fff; background: #b33b32; border-color: #b33b32; }
.label-tools { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 12px; }
.label-tools input { min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius); }
.label-color-popover { position: absolute; z-index: 8; right: 14px; bottom: 60px; width: min(330px, calc(100% - 28px)); display: grid; gap: 11px; padding: 13px; background: #fff; border: 1px solid #cbd4df; border-radius: 13px; box-shadow: 0 18px 48px rgba(35,47,66,.2); }
.label-color-popover[hidden] { display: none; }
.label-color-popover > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.label-color-popover > div:first-child strong { overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.label-color-popover > div:first-child button { width: 27px; height: 27px; padding: 0; color: #667080; background: #eef2f6; border: 0; border-radius: 50%; font-size: 18px; cursor: pointer; }
.label-color-palette { display: grid; grid-template-columns: repeat(8, 1fr); gap: 7px; }
.label-color-palette button { aspect-ratio: 1; min-width: 0; padding: 3px; background: #fff; border: 2px solid transparent; border-radius: 10px; cursor: pointer; }
.label-color-palette button span { width: 100%; height: 100%; display: block; background: var(--label-color); border-radius: 7px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.label-color-palette button:hover,.label-color-palette button[aria-pressed="true"] { border-color: var(--label-color); }
.label-color-popover small { color: var(--muted); font-size: 10px; }
.documents-launch { min-height: 92px; width: 100%; display: grid; grid-template-columns: 54px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 16px; color: var(--ink); text-align: left; background: linear-gradient(135deg, #fff 0%, #f7f4ff 55%, #edf9ff 100%); border: 1px solid #cfc3e3; border-radius: 12px; box-shadow: 0 12px 28px rgba(63,43,102,.09); cursor: pointer; }
.documents-launch:hover { border-color: var(--purple); box-shadow: 0 16px 34px rgba(63,43,102,.15); transform: translateY(-1px); }
.documents-launch-icon { position: relative; width: 58px; height: 46px; display: block; border-radius: 10px; background: linear-gradient(145deg,#6fa5ed,#3975c6); box-shadow: inset 0 -9px 15px rgba(31,74,135,.18),0 7px 15px rgba(50,91,151,.16); }
.documents-launch-icon::before { content: ""; position: absolute; top: -6px; left: 6px; width: 24px; height: 11px; background: #75aaf0; border-radius: 7px 7px 0 0; }
.documents-launch-icon::after { content: ""; position: absolute; inset: 8px 9px 7px; background: rgba(255,255,255,.9); border-radius: 4px; box-shadow: inset 0 -8px 0 #e9f0f8; }
.documents-launch-icon > span { position: absolute; z-index: 1; right: 7px; bottom: 6px; width: 16px; height: 16px; background: #ffcc00; border: 3px solid #fff; border-radius: 50%; }
.documents-launch > span:nth-child(2) { min-width: 0; display: grid; gap: 4px; }
.documents-launch strong { color: var(--purple-dark); font-size: 20px; }
.documents-launch small { color: var(--muted); font-size: 13px; }
.documents-launch b { color: var(--purple); font-size: 28px; font-weight: 500; }
.modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; background: #fff; border-top: 1px solid var(--line); }
.modal-footer > div { display: flex; gap: 9px; }
.card-save-actions { flex-wrap: wrap; justify-content: flex-end; }
.archive-card-button { min-height: 38px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; color: #3f2b66; background: #fff3c9; border: 1px solid #d99f00; border-radius: var(--radius); cursor: pointer; font-weight: 850; box-shadow: 0 5px 14px rgba(217,159,0,.14); }
.archive-card-button span { width: 22px; height: 22px; display: inline-grid; place-items: center; color: #fff; background: #a66f00; border-radius: 50%; font-size: 14px; font-weight: 950; }
.archive-card-button:hover { color: #2d1c4f; background: #ffe59a; border-color: #a66f00; }

.documents-section { min-height: 280px; }
.documents-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.documents-header p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.documents-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.file-input-button { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.file-input-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-folders { display: grid; gap: 12px; margin-top: 14px; }
.file-folder { overflow: hidden; background: #f9fafb; border: 1px solid var(--line); border-radius: var(--radius); }
.file-folder > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px; background: #fff; border-bottom: 1px solid var(--line); }
.file-folder > header > div { display: flex; align-items: center; gap: 8px; }
.file-folder > header span { min-width: 24px; height: 24px; display: grid; place-items: center; color: var(--purple); background: var(--surface-strong); border-radius: 50%; font-size: 11px; font-weight: 900; }
.file-folder .document-list { padding: 9px; }
.send-folder-note { margin: 0; padding: 8px 10px; color: #725c24; background: #fff8dc; border-bottom: 1px solid #eadca8; font-size: 11px; }
.document-list { display: grid; gap: 8px; }
.document-row { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.document-icon { width: 42px; height: 42px; display: grid; place-items: center; color: #fff; background: var(--purple); border-radius: 9px; font-size: 10px; font-weight: 950; }
.document-image .document-icon { background: var(--blue); }
.document-pdf .document-icon { background: var(--red); }
.document-other .document-icon { background: #68727c; }
.document-copy { min-width: 0; display: grid; gap: 3px; }
.document-copy strong { overflow-wrap: anywhere; }
.document-copy > span { color: var(--muted); font-size: 11px; }
.document-row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.document-row-actions button, .document-action { min-height: 30px; padding: 0 8px; display: inline-flex; align-items: center; color: var(--purple); background: #fff; border: 1px solid var(--line); border-radius: 7px; cursor: pointer; font-size: 11px; font-weight: 750; }
.document-row-actions .danger-link { color: var(--red); border-color: #efc2bd; }
.documents-loading, .documents-empty { min-height: 120px; display: grid; place-items: center; color: var(--muted); text-align: center; }
.legacy-import-note { display: grid; gap: 3px; margin-top: 12px; padding: 9px 10px; color: #594f68; background: #f7f3fb; border: 1px dashed #c6b9de; border-radius: var(--radius); font-size: 11px; }
.upload-queue { display: grid; gap: 7px; margin-top: 12px; }
.upload-queue > div { display: grid; grid-template-columns: minmax(100px,1fr) 120px auto; gap: 8px; align-items: center; font-size: 11px; }
.upload-queue progress { width: 100%; }
.decision-queue, .upload-report { display: flex; flex-wrap: wrap; gap: 7px 12px; margin-top: 12px; padding: 9px 10px; border-radius: var(--radius); font-size: 11px; }
.decision-queue { display: grid; color: #7b3816; background: #fff4e9; border: 1px solid #f0bf8e; }
.upload-report { color: #31592c; background: #f1f8ee; border: 1px solid #bad7b5; }
.upload-report strong { flex: 1 0 100%; }

html.file-manager-open { overflow: hidden; overscroll-behavior: none; }
.file-manager-dialog { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; overflow: hidden; overscroll-behavior: none; background: #f5f5f7; }
.file-manager-dialog::backdrop { background: rgba(25,20,34,.82); backdrop-filter: blur(7px); }
.fm-shell { height: 100dvh; min-height: 540px; display: grid; grid-template-rows: 52px auto minmax(0,1fr); color: #252229; background: #f5f5f7; overflow: hidden; }
.fm-titlebar { display: grid; grid-template-columns: 150px minmax(0,1fr) 150px; align-items: center; gap: 12px; padding: 0 16px; background: linear-gradient(#fbfbfc,#ececef); border-bottom: 1px solid #c8c8cb; box-shadow: 0 1px 0 rgba(255,255,255,.8) inset; user-select: none; }
.fm-traffic { display: flex; gap: 8px; }
.fm-traffic i { width: 13px; height: 13px; border-radius: 50%; border: 1px solid rgba(0,0,0,.14); background: #ff5f57; }
.fm-traffic i:nth-child(2) { background: #febc2e; }
.fm-traffic i:nth-child(3) { background: #28c840; }
.fm-title { min-width: 0; display: flex; align-items: baseline; justify-content: center; gap: 9px; overflow: hidden; }
.fm-title strong { font-size: 14px; }
.fm-title span { min-width: 0; color: #77737a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.fm-close { justify-self: end; min-height: 30px; padding: 0 14px; color: #fff; background: var(--purple); border-radius: 7px; cursor: pointer; font-size: 12px; font-weight: 750; }
.fm-toolbar { min-height: 56px; display: flex; align-items: center; gap: 7px; padding: 8px 12px; background: #f4f4f6; border-bottom: 1px solid #c9c9cd; box-shadow: 0 1px 0 rgba(255,255,255,.8) inset; overflow-x: auto; }
.fm-toolbar button, .fm-toolbar-button, .fm-toolbar select { min-height: 34px; display: inline-flex; align-items: center; justify-content: center; padding: 0 11px; color: #35313a; background: linear-gradient(#fff,#e9e9ec); border: 1px solid #c7c7cc; border-radius: 7px; box-shadow: 0 1px 0 rgba(255,255,255,.8) inset; white-space: nowrap; cursor: pointer; font-size: 12px; font-weight: 650; }
.fm-toolbar button:hover, .fm-toolbar-button:hover { background: #fff; border-color: #a9a5af; }
.fm-toolbar button:disabled, .fm-toolbar select:disabled { opacity: .42; cursor: default; }
.fm-toolbar-button { position: relative; }
.fm-toolbar-button input, .fm-row-action input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.fm-toolbar .fm-delete { color: #b4231e; }
.fm-toolbar select[data-fm-move-target] { max-width: 210px; }
.fm-view-switch { display: inline-flex; align-items: center; }
.fm-toolbar .fm-view-switch button { min-width: 38px; padding: 0 8px; border-radius: 0; }
.fm-toolbar .fm-view-switch button:first-child { border-radius: 7px 0 0 7px; }
.fm-toolbar .fm-view-switch button:last-child { margin-left: -1px; border-radius: 0 7px 7px 0; }
.fm-toolbar .fm-view-switch button[aria-pressed="true"] { color: #fff; background: #6f55a0; border-color: #5c438b; box-shadow: none; }
.fm-toolbar-separator { width: 1px; height: 27px; flex: 0 0 1px; margin: 0 3px; background: #cac8ce; }
.fm-toolbar-spacer { flex: 1 0 20px; }
.fm-layout { min-height: 0; display: grid; grid-template-columns: 238px minmax(0,1fr); }
.fm-sidebar { min-height: 0; padding: 16px 10px; background: rgba(226,225,231,.92); border-right: 1px solid #c9c8ce; overflow: auto; overscroll-behavior: contain; }
.fm-sidebar-label { margin: 0 10px 7px; color: #7a747d; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.fm-sidebar-folder { width: 100%; min-height: 32px; display: flex; align-items: center; gap: 8px; padding: 0 10px 0 calc(10px + var(--depth) * 15px); color: #36313b; text-align: left; background: transparent; border-radius: 6px; cursor: pointer; }
.fm-sidebar-folder:hover { background: rgba(255,255,255,.55); }
.fm-sidebar-folder.active { color: #fff; background: #7054a1; }
.fm-sidebar-folder span { width: 18px; color: #74658a; text-align: center; }
.fm-sidebar-folder.active span { color: #fff; }
.fm-sidebar-folder b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.fm-sidebar-folder.is-drag-over { outline: 2px solid #2c80e8; background: rgba(44,128,232,.18); }
.fm-storage-note { display: grid; grid-template-columns: 26px minmax(0,1fr); gap: 8px; align-items: center; margin: 20px 7px 0; padding: 10px; color: #554b61; background: rgba(255,255,255,.52); border: 1px solid rgba(90,80,105,.15); border-radius: 8px; }
.fm-storage-note > span { font-size: 20px; }
.fm-storage-note div { min-width: 0; display: grid; }
.fm-storage-note strong { font-size: 11px; }
.fm-storage-note small { color: #7b7482; font-size: 9px; }
.fm-main { min-width: 0; min-height: 0; display: grid; grid-template-rows: 44px minmax(0,1fr) auto 28px; background: #fff; }
.fm-pathbar { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 12px; background: #fafafa; border-bottom: 1px solid #dedde1; }
.fm-location { min-width: 0; display: flex; align-items: baseline; gap: 12px; }
.fm-location > strong { flex: 0 0 auto; font-size: 13px; }
.fm-pathbar nav { min-width: 0; display: flex; align-items: center; overflow-x: auto; }
.fm-pathbar nav button { flex: 0 0 auto; padding: 3px 6px; color: #4a4550; background: transparent; border-radius: 5px; cursor: pointer; font-size: 12px; }
.fm-pathbar nav button:hover { background: #ece9f2; }
.fm-pathbar select { min-height: 30px; padding: 0 8px; color: #403b45; background: #fff; border: 1px solid #d0cdd4; border-radius: 6px; font-size: 11px; }
.fm-content { min-height: 0; overflow: auto; overscroll-behavior: contain; outline: none; }
.fm-content:focus-visible { outline: 3px solid rgba(52,120,212,.22); outline-offset: -3px; }
.fm-content.is-drag-over { background: #edf6ff; outline: 3px solid rgba(44,128,232,.28) inset; }
.fm-list-table { min-width: 860px; }
.fm-list-head, .fm-node-row { min-width: 860px; display: grid; grid-template-columns: 34px minmax(270px,1fr) 140px 145px 86px 155px; align-items: center; }
.fm-list-head { position: sticky; z-index: 2; top: 0; min-height: 31px; color: #77717d; background: #f7f7f8; border-bottom: 1px solid #d8d7db; font-size: 10px; font-weight: 750; }
.fm-list-head > * { min-width: 0; padding: 0 9px; border-right: 1px solid #dedde1; }
.fm-node-row { min-height: 40px; border-bottom: 1px solid #efeff1; cursor: default; user-select: none; }
.fm-node-row:nth-child(odd) { background: #fbfbfc; }
.fm-node-row:hover { background: #eef5ff; }
.fm-node-row.selected { color: #fff; background: #3478d4; }
.fm-node-row.is-drag-over { outline: 2px solid #2c80e8; outline-offset: -3px; background: #dcecff; color: #24202a; }
.fm-node-row > span { min-width: 0; padding: 0 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #77717d; font-size: 11px; }
.fm-node-row.selected > span { color: rgba(255,255,255,.86); }
.fm-node-check { display: grid; place-items: center; }
.fm-node-check input, .fm-list-head input { accent-color: #7054a1; }
.fm-node-name { min-width: 0; display: flex; align-items: center; gap: 10px; padding: 4px 9px; color: inherit; text-align: left; background: transparent; cursor: default; }
.fm-node-name strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; }
.fm-file-icon { width: 28px; height: 25px; flex: 0 0 28px; display: grid; place-items: center; color: #fff; background: #6e7280; border-radius: 5px; font-size: 8px; font-weight: 900; }
.fm-file-icon.folder { color: transparent; background: linear-gradient(#ffd66b,#f9b921); border-radius: 4px 4px 6px 6px; box-shadow: inset 0 -8px 10px rgba(211,139,0,.12); }
.fm-file-icon.office { background: #2471b3; }
.fm-file-icon.pdf { background: #d5483f; }
.fm-file-icon.image { background: #2799a7; }
.fm-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; padding: 0 8px; }
.fm-row-actions button, .fm-row-action { position: relative; min-height: 25px; display: inline-flex; align-items: center; padding: 0 7px; color: #433652; background: rgba(255,255,255,.88); border: 1px solid #d2cbd9; border-radius: 5px; cursor: pointer; font-size: 9px; font-weight: 700; }
.fm-icon-grid { --fm-tile-width: 156px; --fm-art-width: 116px; --fm-art-height: 88px; display: grid; grid-template-columns: repeat(auto-fill,minmax(var(--fm-tile-width),1fr)); gap: 12px 8px; align-content: start; padding: 18px; }
.fm-icon-grid.fm-icon-size-small { --fm-tile-width: 116px; --fm-art-width: 82px; --fm-art-height: 62px; gap: 9px 5px; padding: 14px; }
.fm-icon-grid.fm-icon-size-large { --fm-tile-width: 210px; --fm-art-width: 168px; --fm-art-height: 126px; gap: 18px 12px; padding: 22px; }
.fm-icon-tile { min-width: 0; min-height: calc(var(--fm-art-height) + 72px); display: grid; grid-template-rows: var(--fm-art-height) auto auto auto; place-items: center; align-content: start; gap: 4px; padding: 9px 7px 8px; color: #29252d; background: transparent; border: 2px solid transparent; border-radius: 11px; cursor: default; user-select: none; }
.fm-icon-tile:hover { background: rgba(73,129,196,.08); }
.fm-icon-tile.selected { color: #fff; background: #3478d4; border-color: #2468bd; box-shadow: 0 3px 12px rgba(30,93,170,.2); }
.fm-icon-tile:focus-visible { outline: 3px solid rgba(52,120,212,.28); outline-offset: 1px; }
.fm-icon-tile.selected:focus-visible { outline-color: rgba(38,92,161,.42); }
.fm-icon-tile.is-drag-over { color: #29252d; background: #dcecff; border-color: #2c80e8; }
.fm-icon-name { max-width: 100%; display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; text-align: center; font-size: 12px; font-weight: 650; line-height: 1.28; overflow-wrap: anywhere; }
.fm-icon-meta, .fm-icon-date { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #77717d; font-size: 9px; }
.fm-icon-tile.selected .fm-icon-meta, .fm-icon-tile.selected .fm-icon-date { color: rgba(255,255,255,.82); }
.fm-folder-visual, .fm-file-visual { position: relative; width: var(--fm-art-width,32px); height: var(--fm-art-height,28px); display: grid; place-items: center; overflow: visible; }
.fm-visual-list { --fm-art-width: 31px; --fm-art-height: 27px; flex: 0 0 31px; }
.fm-folder-tab { position: absolute; z-index: 1; top: 10%; left: 8%; width: 42%; height: 28%; background: #f3ad16; border-radius: 8px 8px 2px 2px; }
.fm-folder-body { position: absolute; z-index: 2; inset: 20% 3% 4%; background: linear-gradient(155deg,#ffd966,#f4ad12); border: 1px solid rgba(190,125,2,.28); border-radius: 9px 9px 13px 13px; box-shadow: 0 8px 18px rgba(167,111,0,.16), inset 0 1px 0 rgba(255,255,255,.55); }
.fm-folder-mosaic { position: absolute; z-index: 3; left: 13%; right: 13%; top: 29%; bottom: 12%; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: repeat(2,minmax(0,1fr)); gap: 3px; padding: 4px; background: rgba(255,255,255,.78); border-radius: 6px; box-shadow: 0 2px 7px rgba(104,67,0,.2); overflow: hidden; }
.fm-mosaic-cell { min-width: 0; min-height: 0; display: grid; place-items: center; color: #fff; background: #71697b; border-radius: 3px; overflow: hidden; font-size: clamp(5px, .55vw, 8px); }
.fm-mosaic-cell.office.word { background: #2c73b8; }
.fm-mosaic-cell.office.excel { background: #25835b; }
.fm-mosaic-cell.pdf { background: #d84b43; }
.fm-mosaic-cell.image { background: #3197a6; }
.fm-mosaic-cell img { width: 100%; height: 100%; display: block; object-fit: cover; opacity: 0; }
.fm-mosaic-cell.has-thumbnail img { opacity: 1; }
.fm-file-sheet { position: absolute; inset: 3% 12% 4%; background: linear-gradient(#fff,#e9e9ed); border: 1px solid #c9c6cd; border-radius: 7px; box-shadow: 0 8px 19px rgba(54,46,60,.17); }
.fm-file-fold { position: absolute; z-index: 2; top: 3%; right: 12%; width: 26%; height: 24%; background: linear-gradient(225deg,#d8d6dc 49%,#fff 51%); border-radius: 0 6px 0 3px; }
.fm-file-type { position: relative; z-index: 3; max-width: 70%; padding: 5px 7px; color: #fff; background: #71697b; border-radius: 6px; font-size: clamp(7px, .72vw, 12px); font-weight: 900; letter-spacing: .02em; }
.fm-file-visual.office.word .fm-file-type { background: #2c73b8; }
.fm-file-visual.office.excel .fm-file-type { background: #25835b; }
.fm-file-visual.pdf .fm-file-type { background: #d84b43; }
.fm-file-visual.image .fm-file-type { background: #3197a6; }
.fm-file-visual.other.archive .fm-file-type { background: #8b6b43; }
.fm-file-visual.other.cad .fm-file-type { background: #75589a; }
.fm-file-visual.other.video .fm-file-type { background: #111827; }
.fm-file-visual.fm-external-file .fm-file-sheet { border-color: #f2c230; box-shadow: 0 8px 19px rgba(240,190,28,.2); }
.fm-external-badge { position: absolute; z-index: 6; right: 1%; bottom: 0; display: grid; place-items: center; width: 25%; min-width: 14px; aspect-ratio: 1; color: #111; background: #ffd633; border: 1px solid #e7b900; border-radius: 50%; font-size: clamp(7px,.72vw,11px); font-weight: 900; box-shadow: 0 2px 5px rgba(38,31,5,.22); }
.fm-yandex-mark { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 4px; color: #111; background: #ffd633; border-radius: 50%; font-weight: 900; }
.fm-external-preview > span { color: #111 !important; background: #ffd633 !important; border-color: #e7b900 !important; }
.fm-file-visual > img { position: absolute; z-index: 4; inset: 5% 12%; width: 76%; height: 90%; display: block; object-fit: contain; background: #f7f7f9; border-radius: 5px; opacity: 0; transition: opacity .16s ease; }
.fm-file-visual.has-thumbnail > img { opacity: 1; }
.fm-file-visual.has-thumbnail .fm-file-type { display: none; }
.fm-file-visual.fm-visual-list > img { inset: 4%; width: 92%; height: 92%; }
.fm-file-visual.fm-visual-list .fm-file-type { padding: 3px; border-radius: 4px; font-size: 6px; }
.fm-empty-folder { position: relative; width: 68px; height: 52px; display: block; background: linear-gradient(#ffd55d,#f4ad12); border-radius: 8px 8px 12px 12px; box-shadow: 0 8px 18px rgba(167,111,0,.15); }
.fm-empty-folder::before { content: ""; position: absolute; top: -8px; left: 6px; width: 29px; height: 13px; background: #f3ad16; border-radius: 6px 6px 0 0; }
.fm-context-menu { position: fixed; z-index: 30; width: 220px; display: grid; gap: 2px; padding: 6px; background: rgba(250,250,252,.97); border: 1px solid rgba(85,77,91,.22); border-radius: 10px; box-shadow: 0 18px 45px rgba(26,20,31,.3); backdrop-filter: blur(16px); }
.fm-context-menu button { min-height: 30px; padding: 0 10px; color: #332e38; text-align: left; background: transparent; border-radius: 6px; cursor: pointer; font-size: 11px; }
.fm-context-menu button:hover { color: #fff; background: #3478d4; }
.fm-context-menu button.danger { color: #a62b25; }
.fm-context-menu button:disabled { opacity: .4; }
.fm-context-menu hr { width: 100%; height: 1px; margin: 3px 0; background: #ddd9e1; border: 0; }
.fm-loading, .fm-empty { min-height: 230px; display: grid; place-items: center; align-content: center; gap: 8px; color: #77717d; }
.fm-loading span, .fm-preview-spinner { width: 24px; height: 24px; border: 3px solid #ddd6e6; border-top-color: #7054a1; border-radius: 50%; animation: fm-spin .8s linear infinite; }
.fm-empty > span { font-size: 48px; filter: saturate(.85); }
.fm-empty strong { color: #4b4650; }
.fm-empty small { font-size: 11px; }
@keyframes fm-spin { to { transform: rotate(360deg); } }
.fm-activity { max-height: 170px; display: grid; gap: 5px; padding: 7px 12px; background: #f7f7f9; border-top: 1px solid #d8d7dc; overflow: auto; }
.fm-progress { display: grid; grid-template-columns: minmax(140px,1fr) minmax(120px,240px) minmax(120px,auto); gap: 10px; align-items: center; font-size: 10px; }
.fm-progress progress { width: 100%; height: 8px; accent-color: #3478d4; }
.fm-progress b { color: #655d69; }
.fm-warning, .fm-error, .fm-report { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 7px 9px; border-radius: 6px; font-size: 10px; }
.fm-warning { color: #76400e; background: #fff0d9; border: 1px solid #eac28f; }
.fm-error { color: #852824; background: #ffe9e7; border: 1px solid #efbab6; }
.fm-report { color: #355c30; background: #eaf5e7; border: 1px solid #b9d5b3; }
.fm-statusbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 12px; color: #77717d; background: #f5f5f7; border-top: 1px solid #d3d2d6; font-size: 9px; }
.fm-preview-backdrop { position: absolute; z-index: 10; inset: 0; display: grid; place-items: center; padding: 40px; background: rgba(22,20,27,.58); backdrop-filter: blur(5px); }
.fm-preview { width: min(980px,92vw); height: min(760px,86vh); display: grid; grid-template-rows: auto minmax(0,1fr) auto; background: #f8f8fa; border: 1px solid rgba(255,255,255,.5); border-radius: 13px; box-shadow: 0 32px 100px rgba(0,0,0,.48); overflow: hidden; }
.fm-preview header, .fm-preview footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; background: #fff; border-bottom: 1px solid #d9d7dc; }
.fm-preview header > div { min-width: 0; display: grid; }
.fm-preview header strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-preview header span { color: #77717d; font-size: 10px; }
.fm-preview header button { width: 30px; height: 30px; display: grid; place-items: center; color: #4d4654; background: #eceaf0; border-radius: 50%; cursor: pointer; font-size: 20px; }
.fm-preview-content { position: relative; min-height: 0; display: grid; place-items: center; padding: 18px; background: #29262d; overflow: auto; }
.fm-preview-content img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 10px 35px rgba(0,0,0,.4); }
.fm-preview-content iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.fm-preview-content pre { width: 100%; height: 100%; margin: 0; padding: 18px; color: #27232b; background: #fff; overflow: auto; white-space: pre-wrap; }
.fm-preview-placeholder { display: grid; place-items: center; gap: 10px; color: #ddd7e4; text-align: center; }
.fm-preview-placeholder > span:not(.fm-preview-spinner) { width: 76px; height: 76px; display: grid; place-items: center; color: #fff; background: #61586d; border-radius: 14px; font-weight: 850; }
.fm-preview-placeholder small { color: #a9a2ae; }
.fm-preview-nav { position: absolute; z-index: 4; top: 50%; width: 42px; height: 54px; display: grid; place-items: center; color: #fff; background: rgba(32,28,36,.58); border-radius: 10px; transform: translateY(-50%); cursor: pointer; font-size: 34px; backdrop-filter: blur(8px); }
.fm-preview-nav.previous { left: 13px; }
.fm-preview-nav.next { right: 13px; }
.fm-preview-nav:disabled { opacity: 0; pointer-events: none; }
.fm-preview footer { justify-content: flex-end; border-top: 1px solid #d9d7dc; border-bottom: 0; }
.fm-preview footer > span { margin-right: auto; color: #77717d; font-size: 10px; }
.fm-preview footer button { min-height: 34px; padding: 0 12px; border: 1px solid #cbc6d0; border-radius: 7px; cursor: pointer; }
.fm-editor-backdrop { position: absolute; z-index: 12; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(28,25,32,.36); backdrop-filter: blur(3px); }
.fm-editor { width: min(440px,calc(100vw - 28px)); display: grid; gap: 16px; padding: 18px; background: #fbfbfc; border: 1px solid rgba(255,255,255,.75); border-radius: 13px; box-shadow: 0 24px 80px rgba(0,0,0,.35); }
.fm-editor header { display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 12px; align-items: center; }
.fm-editor-icon { width: 48px; height: 40px; display: grid; place-items: center; background: #ffca45; border-radius: 8px; font-size: 23px; }
.fm-editor header div { display: grid; gap: 2px; }
.fm-editor header small { color: #77717d; }
.fm-editor label { display: grid; gap: 6px; color: #6e6872; font-size: 10px; font-weight: 750; text-transform: uppercase; }
.fm-editor input { width: 100%; min-height: 40px; padding: 0 11px; color: #26222a; background: #fff; border: 1px solid #bbb6c1; border-radius: 7px; text-transform: none; }
.fm-editor input:focus { outline: 3px solid rgba(52,120,212,.2); border-color: #3478d4; }
.fm-editor footer { display: flex; justify-content: flex-end; gap: 8px; }
.fm-editor footer button { min-height: 34px; padding: 0 13px; border: 1px solid #cbc6d0; border-radius: 7px; cursor: pointer; }

.status-dialog { width: min(720px, calc(100vw - 28px)); }
.order-task-dialog { width: min(590px, calc(100vw - 28px)); padding: 0; border: 0; border-radius: 18px; box-shadow: 0 28px 80px rgba(31,21,46,.34); }
.order-task-dialog::backdrop { background: rgba(26,18,39,.72); backdrop-filter: blur(3px); }
.order-task-dialog-shell { display: grid; max-height: min(760px,calc(100svh - 30px)); background: #fff; }
.order-task-dialog-shell > header,.order-task-dialog-shell > footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 19px; }
.order-task-dialog-shell > header { color: #fff; background: linear-gradient(135deg,#315b49,#527b5d); }
.order-task-dialog-shell > header h2 { margin: 3px 0 0; font-size: 23px; }
.order-task-dialog-shell > header p { max-width: 430px; margin: 4px 0 0; overflow: hidden; color: #e1eee5; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.order-task-dialog-shell > header .eyebrow { color: #d9e9dd; }
.order-task-dialog-shell > header .icon-button { color: #315b49; background: #fff; }
.order-task-dialog-shell > footer { justify-content: flex-end; border-top: 1px solid var(--line); }
.order-task-dialog-body { display: grid; align-content: start; gap: 15px; overflow: auto; padding: 20px; }
.order-task-dialog-body > label { display: grid; gap: 7px; color: #403647; font-size: 12px; font-weight: 850; }
.order-task-dialog-body textarea { width: 100%; min-height: 118px; padding: 12px; color: var(--ink); background: #fff; border: 1px solid #b8cabe; border-radius: 11px; resize: vertical; font: inherit; font-size: 16px; line-height: 1.45; }
.order-task-dialog-body textarea:focus { outline: 3px solid rgba(78,121,88,.18); border-color: #4e7958; }
.order-task-inheritance { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; padding: 12px; background: #f1f7f3; border: 1px solid #cbdccf; border-radius: 11px; }
.order-task-inheritance span { color: var(--muted); font-size: 11px; }
.order-task-inheritance strong { color: #315b49; }
.order-task-inheritance small { grid-column: 1/-1; color: var(--muted); line-height: 1.4; }
.order-task-dialog-hint { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.order-task-success { display: grid; gap: 10px; justify-items: center; padding: 34px 24px 26px; text-align: center; background: #fff; }
.order-task-success-icon { width: 52px; height: 52px; display: grid; place-items: center; color: #fff; background: #4e7958; border-radius: 50%; font-size: 30px; }
.order-task-success h2,.order-task-success p { margin: 0; }
.order-task-success p { max-width: 480px; white-space: pre-wrap; overflow-wrap: anywhere; }
.order-task-success small { color: var(--muted); }
.order-task-success > div { display: flex; gap: 9px; margin-top: 10px; }
.supply-workflow-dialog { width: min(660px, calc(100vw - 28px)); padding: 0; border: 0; border-radius: 18px; box-shadow: 0 28px 80px rgba(31,21,46,.34); }
.supply-workflow-dialog::backdrop { background: rgba(26,18,39,.72); backdrop-filter: blur(3px); }
.supply-workflow-shell { display: grid; max-height: min(820px,calc(100svh - 30px)); background: #fff; }
.supply-workflow-shell > header, .supply-workflow-shell > footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 19px; }
.supply-workflow-shell > header { color: #fff; background: linear-gradient(135deg,#3f2b66,#7453a8); }
.supply-workflow-shell > header h2 { margin: 3px 0 0; font-size: 21px; }
.supply-workflow-shell > header .eyebrow { color: #e9ddf8; }
.supply-workflow-shell > header .icon-button { color: #3f2b66; background: #fff; }
.supply-workflow-shell > footer { justify-content: flex-end; border-top: 1px solid var(--line); }
.supply-workflow-body { display: grid; gap: 15px; overflow: auto; padding: 20px; }
.supply-workflow-body > p { margin: 0; color: #625a6b; line-height: 1.5; }
.supply-workflow-body > label { display: grid; gap: 6px; color: #403647; font-size: 12px; font-weight: 850; }
.supply-workflow-body select, .supply-workflow-body input { width: 100%; min-height: 44px; padding: 9px 11px; color: var(--ink); background: #fff; border: 1px solid #cfc6dc; border-radius: 9px; font: inherit; }
.supply-workflow-body select:disabled { color: #453b52; background: #f1edf6; opacity: 1; }
.transfer-warning, .copy-summary { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 5px 12px; padding: 14px; color: #43394b; background: #f4f7f8; border: 1px solid #d9e1e4; border-radius: 11px; }
.transfer-warning strong, .copy-summary strong { color: #3f2b66; }
.transfer-warning small { grid-column: 1/-1; color: #6a6172; line-height: 1.45; }
.transfer-warning.is-cross-board { color: #6b3b09; background: #fff7e8; border-color: #e7bd70; }
.transfer-warning.is-cross-board strong { color: #9b4e08; }
.move-card-button:disabled, .danger-button:disabled { cursor: not-allowed; opacity: .45; }
.status-dialog .dialog-shell { max-height: none; }
.status-dialog header, .status-dialog footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px; background: #fff; }
.status-dialog header { border-bottom: 1px solid var(--line); }
.status-dialog footer { border-top: 1px solid var(--line); justify-content: flex-end; }
.status-dialog h2 { margin: 4px 0 0; }
.status-content { padding: 18px; }
.status-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.status-grid > div { display: grid; gap: 3px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.status-grid span { color: var(--muted); font-size: 11px; text-transform: uppercase; }
#toast, .dialog-toast { position: fixed; z-index: 100; left: 20px; right: auto; bottom: 20px; max-width: 440px; padding: 12px 16px; color: #fff; background: var(--purple-dark); border-radius: var(--radius); box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s; }
#toast.show, .dialog-toast.show { opacity: 1; transform: none; }
.dialog-toast { z-index: 1000; left: 20px; right: auto; bottom: 88px; }

@media (prefers-reduced-motion: reduce) {
  .kanban-card, .column-dropzone, .card-drop-indicator { animation: none !important; transition-duration: .01ms !important; }
}

@media (max-width: 1180px) {
  .topbar { padding: 24px; }
  .brand-row { gap: 30px; }
  .brand-lockup { min-width: 280px; }
  .brand-lockup img { width: 72px; height: 72px; }
  .brand-lockup .brand-full-logo { width: 400px; height: auto; }
  .brand-lockup strong { font-size: 46px; }
  .brand-quote h1 { font-size: 28px; }
  .kanban { grid-template-columns: repeat(var(--column-count), minmax(270px, 1fr)); overflow-x: auto; }
  .kanban-column { min-width: 270px; }
  .fm-layout { grid-template-columns: 190px minmax(0,1fr); }
  .fm-toolbar { align-items: stretch; }
  .fm-icon-grid { --fm-tile-width: 142px; }
}

@media (max-width: 760px) {
  .login-view { grid-template-columns: 1fr; }
  .login-copy { min-height: 42vh; padding: 26px 18px; }
  .login-copy h1 { margin-top: 16px; font-size: 32px; }
  .login-panel-wrap { padding: 18px; align-items: start; }
  .brand-lockup-login { width: min(100%, 420px); padding: 10px 12px; border-radius: 15px; }
  .system-banner { position: sticky; min-height: 48px; align-items: flex-start; flex-direction: column; gap: 0; padding: 7px 14px; font-size: 11px; }
  .topbar { position: relative; min-height: 0; align-items: stretch; flex-direction: column; padding: 16px 14px; }
  .brand-row { align-items: flex-start; flex-direction: column; gap: 10px; }
  .brand-lockup { min-width: 0; gap: 10px; }
  .brand-lockup img { width: 58px; height: 58px; }
  .brand-lockup .brand-full-logo { width: min(400px, 92vw); height: auto; }
  .brand-lockup strong { font-size: 38px; }
  .brand-quote h1 { font-size: 28px; }
  .brand-quote p { font-size: 13px; }
  .topbar-actions { position: absolute; top: 16px; right: 14px; display: flex; }
  .topbar-actions > :not(.notification-bell) { display: none; }
  .notification-bell { width: 48px; height: 48px; padding: 0; font-size: 20px; }
  .tabs-bar { align-items: stretch; flex-direction: column; padding: 12px 14px; }
  .mobile-menu-toggle { min-height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; color: #fff; background: var(--purple); border-radius: var(--radius); cursor: pointer; }
  .mobile-menu-toggle span { font-size: 11px; text-transform: uppercase; }
  .app-shell:not(.is-mobile-menu-open) .board-tabs, .app-shell:not(.is-mobile-menu-open) .tabs-actions { display: none; }
  .board-tabs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .tab-button { white-space: normal; }
  .tabs-actions { width: 100%; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin: 0; }
  .search-control { min-width: 0; }
  .search-control > button, .archive-button, .trash-button { width: 100%; }
  .trash-summary { align-items: start; flex-direction: column; }
  .trash-card-grid { grid-template-columns: 1fr; }
  .search-panel { position: fixed; top: 12px; left: 14px; right: 14px; width: auto; grid-template-columns: 1fr; }
  .archive-search { grid-template-columns: 1fr; align-items: stretch; }
  .archive-search-count { min-width: 0; padding: 0; text-align: left; }
  .workspace-board { scroll-margin-top: 54px; padding: 20px 14px 24px; }
  .board-summary h2 { font-size: 24px; }
  .board-summary p { font-size: 14px; }
  .kanban { grid-template-columns: 1fr; overflow: visible; }
  .kanban-column { min-width: 0; min-height: 150px; }
  .column-create-popover { position: static; min-height: 32px; margin-top: 7px; opacity: 1; visibility: visible; transform: none; }
  .column-dropzone { min-height: 100px; }
  .card-dialog { position: fixed; inset: 0; width: 100vw; max-width: 100vw; height: 100svh; height: 100dvh; max-height: 100svh; max-height: 100dvh; margin: 0; overflow: hidden; }
  .order-task-dialog { position: fixed; inset: 0; width: 100vw; max-width: 100vw; height: 100svh; height: 100dvh; max-height: 100svh; max-height: 100dvh; margin: 0; overflow: hidden; border-radius: 0; }
  .order-task-dialog-shell { min-height: 100svh; min-height: 100dvh; max-height: 100svh; max-height: 100dvh; grid-template-rows: auto 1fr auto; }
  .order-task-dialog-shell > footer { display: grid; grid-template-columns: 1fr 1fr; padding-bottom: max(17px,env(safe-area-inset-bottom)); }
  .order-task-dialog-shell > footer button { width: 100%; min-height: 48px; }
  .order-task-success { min-height: 100svh; align-content: center; padding-bottom: max(26px,env(safe-area-inset-bottom)); }
  .order-task-success > div { width: 100%; display: grid; grid-template-columns: 1fr; }
  .order-task-success button { width: 100%; min-height: 48px; }
  .supply-workflow-dialog { width: 100vw; max-width: 100vw; max-height: 100svh; border-radius: 0; }
  .supply-workflow-shell { min-height: 100svh; max-height: 100svh; grid-template-rows: auto 1fr auto; }
  .supply-workflow-shell > footer { display: grid; grid-template-columns: 1fr 1fr; padding-bottom: max(17px,env(safe-area-inset-bottom)); }
  .supply-workflow-shell > footer button { width: 100%; }
  .copy-summary, .transfer-warning { grid-template-columns: 1fr; }
  .card-dialog .dialog-shell { width: 100%; height: 100svh; height: 100dvh; max-height: 100svh; max-height: 100dvh; min-height: 100svh; min-height: 100dvh; border-radius: 0; overscroll-behavior: contain; }
  .card-dialog .card-dialog-shell.has-mobile-mail { grid-template-rows: auto auto minmax(0, 1fr) auto; }
  .document-tools-row { grid-template-columns: 1fr; }
  .modal-body, .detail-grid, .card-form-column, .form-section, .documents-section, .document-tools-row, .order-mail-section { min-width: 0; max-width: 100%; }
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .modal-field.full, .extra-info-panel.full { grid-column: auto; }
  .order-card-form-grid > .modal-field,
  .order-card-form-grid > .extra-info-panel,
  .order-card-form-grid > .contact-emails-field,
  .order-card-form-grid > .linked-tasks-field { grid-column: 1; }
  .supplier-form-grid > .modal-field,
  .supplier-form-grid > .supplier-extra { grid-column: 1; }
  .modal-header { display: grid; grid-template-columns: minmax(0, 1fr) 40px; padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 10px; }
  .modal-header-logo { display: none; }
  .modal-header-copy { max-width: none; grid-column: 1; grid-row: 1; align-self: center; }
  .modal-header-actions { display: contents; }
  .header-status-field { min-width: 0; grid-column: 1 / -1; grid-row: 2; margin-top: 4px; }
  .modal-header-actions > .icon-button { grid-column: 2; grid-row: 1; }
  .modal-header h2 { overflow: hidden; font-size: 18px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
  .modal-header p { overflow: hidden; margin-top: 2px; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
  .header-status-field select { min-height: 42px; font-size: 16px; }
  .card-mobile-view-switcher { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 6px 10px; background: #fff; border-bottom: 1px solid var(--line); }
  .card-mobile-view-switcher button { min-width: 0; min-height: 42px; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 0 12px; color: var(--muted); background: #f2f4f7; border: 1px solid transparent; border-radius: 10px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 850; }
  .card-mobile-view-switcher button span { font-size: 17px; }
  .card-mobile-view-switcher button.is-active { color: #2f1853; background: #f1e9fb; border-color: #d4c0eb; box-shadow: inset 0 0 0 1px rgba(117,0,217,.05); }
  .modal-body { overflow-x: hidden; padding: 12px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  .form-section { padding: 12px; }
  .card-dialog-shell[data-card-mobile-view="details"] .order-mail-section { display: none; }
  .card-dialog-shell[data-card-mobile-view="mail"] .modal-body { overflow: hidden; padding: 0; }
  .card-dialog-shell[data-card-mobile-view="mail"] .detail-grid,
  .card-dialog-shell[data-card-mobile-view="mail"] .card-form-column { height: 100%; min-height: 0; align-items: stretch; gap: 0; }
  .card-dialog-shell[data-card-mobile-view="mail"] .card-form-column > :not(.order-mail-section) { display: none; }
  .card-dialog-shell[data-card-mobile-view="mail"] .order-mail-section { height: 100%; min-height: 0; margin: 0; border-radius: 0; }
  .card-dialog-shell[data-card-mobile-view="mail"] .order-mail-section .mail-shell { height: 100%; border: 0; border-radius: 0; box-shadow: none; }
  .card-dialog-shell[data-card-mobile-view="mail"] .modal-footer { display: none; }
  .modal-footer { align-items: stretch; flex-direction: column-reverse; padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .modal-footer > div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .modal-footer button { min-height: 44px; }
  .modal-footer .card-save-actions { grid-template-columns: 1fr; }
  .card-inline-note-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .card-inline-note-actions button { min-height: 44px; }
  .linked-task-preview-item,.linked-task-dialog-row { grid-template-columns: 1fr; }
  .linked-task-complete-button { min-height: 44px; }
  .documents-launch { min-height: 82px; grid-template-columns: 48px minmax(0,1fr) 24px; gap: 10px; padding: 13px; }
  .documents-launch-icon { width: 48px; height: 40px; }
  .documents-launch strong { font-size: 16px; }
  .documents-launch small { font-size: 11px; line-height: 1.35; }
  .documents-launch b { font-size: 23px; }
  .document-row { grid-template-columns: 38px minmax(0,1fr); align-items: start; }
  .document-row-actions { grid-column: 1 / -1; justify-content: stretch; }
  .document-row-actions button { flex: 1 1 120px; min-height: 44px; }
  .documents-header { align-items: stretch; flex-direction: column; }
  .documents-actions { justify-content: stretch; }
  .documents-actions > * { flex: 1 1 140px; justify-content: center; }
  .file-manager-dialog { width: 100vw; height: 100dvh; }
  .fm-shell { min-height: 0; grid-template-rows: 48px auto minmax(0,1fr); }
  .fm-titlebar { grid-template-columns: 70px minmax(0,1fr) 70px; padding: 0 10px; }
  .fm-traffic i { width: 10px; height: 10px; }
  .fm-title span { display: none; }
  .fm-close { padding: 0 9px; }
  .fm-toolbar { min-height: 52px; display: flex; gap: 5px; padding: 7px; overflow-x: auto; }
  .fm-toolbar-spacer, .fm-toolbar-separator { display: none; }
  .fm-toolbar button, .fm-toolbar-button, .fm-toolbar select { min-width: 88px; }
  .fm-layout { grid-template-columns: 1fr; }
  .fm-sidebar { display: none; }
  .fm-pathbar { padding: 5px 8px; }
  .fm-location > strong { display: none; }
  .fm-pathbar select { max-width: 124px; }
  .fm-icon-grid, .fm-icon-grid.fm-icon-size-small, .fm-icon-grid.fm-icon-size-large { --fm-tile-width: min(42vw,154px); --fm-art-width: min(31vw,112px); --fm-art-height: min(24vw,84px); grid-template-columns: repeat(auto-fill,minmax(var(--fm-tile-width),1fr)); gap: 10px 5px; padding: 10px 7px 18px; }
  .fm-icon-tile { min-height: calc(var(--fm-art-height) + 78px); padding-inline: 4px; }
  .fm-icon-name { font-size: 11px; }
  .fm-list-head, .fm-node-row { min-width: 670px; grid-template-columns: 32px minmax(230px,1fr) 100px 110px 76px 110px; }
  .fm-list-table { min-width: 670px; }
  .fm-statusbar span:last-child { display: none; }
  .fm-preview-backdrop { padding: 10px; }
  .fm-preview { width: calc(100vw - 20px); height: calc(100dvh - 20px); }
  .fm-progress { grid-template-columns: 1fr 100px; }
  .fm-progress b { grid-column: 1 / -1; }
  .status-grid { grid-template-columns: 1fr; }
  .contact-email-row { grid-template-columns: minmax(0, 1fr) 44px; gap: 7px; }
  .contact-email-row > span { grid-column: 1 / -1; }
  .contact-email-row > input { min-height: 44px; font-size: 16px; }
  .contact-email-row > button { width: 44px; height: 44px; }
  .label-tools { grid-template-columns: minmax(0, 1fr) auto; }
  .label-tools input { min-width: 0; font-size: 16px; }
  #toast, .dialog-toast { left: 12px; right: auto; bottom: 12px; width: calc(50vw - 24px); max-width: 440px; }
}
.local-sync-card{border:1px solid #ddd5e8;border-radius:14px;background:#faf8fd;padding:14px;display:grid;gap:8px}.local-sync-heading{display:flex;align-items:center;justify-content:space-between}.local-sync-heading [data-local-sync-dot]{width:10px;height:10px;border-radius:50%;background:#8b8397}.local-sync-card[data-sync-state="Синхронизировано"] [data-local-sync-dot],.local-sync-card[data-sync-state="ready"] [data-local-sync-dot]{background:#3f7c35}.local-sync-card[data-sync-state="Синхронизация"] [data-local-sync-dot]{background:#1593c7}.local-sync-card[data-sync-state="Ожидает интернета"] [data-local-sync-dot]{background:#ef9f1b}.local-sync-card[data-sync-state="Конфликт"] [data-local-sync-dot],.local-sync-card[data-sync-state="Ошибка"] [data-local-sync-dot],.local-sync-card[data-sync-state="unavailable"] [data-local-sync-dot]{background:#c94b42}.local-sync-card p,.local-sync-card small{margin:0}.local-sync-card small{color:#6f687d}.local-sync-actions{display:flex;gap:8px;flex-wrap:wrap}.local-sync-actions button{flex:1 1 auto}

/* Stage 19: operational calendar */
.notification-bell{position:relative;min-height:40px;padding:0 12px;border:1px solid rgba(63,43,102,.24);border-radius:12px;background:#fff;cursor:pointer}.notification-bell span{position:absolute;right:-6px;top:-7px;min-width:21px;height:21px;padding:0 5px;display:grid;place-items:center;color:#fff;background:#cf5147;border:2px solid #fff;border-radius:99px;font-size:10px;font-weight:800}.notification-bell.has-unread{box-shadow:0 0 0 3px rgba(207,81,71,.12)}
.notification-center{position:fixed;z-index:90;right:22px;top:92px;width:min(420px,calc(100vw - 28px));max-height:70vh;overflow:auto;background:#fff;border:1px solid #dcd5e7;border-radius:18px;box-shadow:0 24px 70px rgba(34,24,48,.25)}.notification-center>header{position:sticky;z-index:1;top:0;display:flex;align-items:center;justify-content:space-between;padding:12px 14px 12px 16px;background:#fff;border-bottom:1px solid #eee9f2}.notification-center h2{margin:0;font-size:18px}.notification-center header button{border:0;background:none;color:#3f2b66;font-weight:700;cursor:pointer}.notification-actions{display:flex;align-items:center;gap:8px}.notification-center .notification-close-button{width:36px;height:36px;display:grid;place-items:center;border-radius:10px;background:#eee9f2;font-size:23px;line-height:1}.notification-center .notification-close-button:hover{background:#e4dced}.notification-center>div{display:grid}.notification-item{display:grid;gap:4px;padding:14px 16px;text-align:left;border:0;border-bottom:1px solid #eee9f2;background:#fff;cursor:pointer}.notification-item.unread{background:#f5effc;border-left:4px solid #d64a8a}.notification-item span,.notification-item time{color:#746d7c;font-size:12px}.notification-center>div>p{padding:18px;color:#746d7c}
.notification-task-due{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:7px;padding-top:9px;border-top:1px solid #e4dce9}.notification-item .notification-task-due small{padding:4px 7px;border-radius:7px;color:#fff;background:#6b4a8c;font-size:9px;font-weight:950;line-height:1;text-transform:uppercase}.notification-item .notification-task-due.overdue small{background:#c92e25}.notification-item .notification-task-due b{color:#c92e25;font-size:17px;font-weight:950;line-height:1.2;text-decoration:underline 2px;text-decoration-color:#c92e25;text-underline-offset:3px}.notification-item:hover .notification-task-due b{color:#a81f18}
.notification-alert-stack{position:fixed;z-index:125;right:20px;bottom:20px;width:min(390px,calc(100vw - 28px));max-height:calc(100dvh - 40px);display:flex;flex-direction:column-reverse;gap:10px;overflow:auto;overscroll-behavior:contain;pointer-events:none}.notification-alert-stack:empty{display:none}.notification-alert{position:relative;flex:0 0 auto;display:grid;overflow:hidden;border:2px solid #6f4a91;border-radius:16px;background:linear-gradient(135deg,#fff,#f7f1fb);box-shadow:0 20px 50px rgba(31,20,47,.32),0 0 0 4px rgba(255,255,255,.72);pointer-events:auto}.notification-alert.arrived{animation:notification-alert-enter .28s ease-out}.notification-alert-main{display:grid;gap:4px;width:100%;padding:15px 48px 15px 16px;text-align:left;background:transparent;color:#20162f;cursor:pointer}.notification-alert-main:hover{background:rgba(79,48,111,.06)}.notification-alert-main strong{font-size:15px;line-height:1.3}.notification-alert-main>span:not(.notification-alert-label){color:#62586c;font-size:12px;line-height:1.4}.notification-alert-main small{margin-top:4px;color:#68458a;font-size:10px;font-weight:850}.notification-alert-label{color:#9e2735;font-size:10px;font-weight:950;letter-spacing:.06em;text-transform:uppercase}.notification-alert-close{position:absolute;z-index:1;top:10px;right:10px;width:32px;height:32px;display:grid;place-items:center;padding:0;border:1px solid #d8cce3;border-radius:10px;background:#fff;color:#3f2b66;font-size:23px;line-height:1;cursor:pointer}.notification-alert-close:hover{color:#fff;background:#9e2735;border-color:#9e2735}@keyframes notification-alert-enter{from{opacity:0;transform:translateX(28px) scale(.97)}to{opacity:1;transform:none}}
.communication-alert-stack{position:fixed;z-index:130;left:20px;bottom:20px;width:min(410px,calc(100vw - 28px));max-height:calc(100dvh - 40px);display:flex;flex-direction:column-reverse;gap:10px;overflow:auto;overscroll-behavior:contain;pointer-events:none}.communication-alert-stack:empty{display:none}.communication-alert{position:relative;flex:0 0 auto;display:grid;overflow:hidden;border:1px solid #b8c9dd;border-radius:15px;background:linear-gradient(135deg,#fff,#f3f8fd);box-shadow:0 18px 46px rgba(37,58,86,.28),0 0 0 3px rgba(255,255,255,.78);pointer-events:auto}.communication-alert.arrived{animation:communication-alert-enter .3s ease-out}.communication-alert-main{display:grid;gap:3px;width:100%;padding:14px 48px 14px 15px;border:0;background:transparent;color:#243142;text-align:left;cursor:pointer}.communication-alert-main:hover{background:rgba(64,104,153,.07)}.communication-alert-main strong{overflow:hidden;font-size:15px;line-height:1.3;text-overflow:ellipsis;white-space:nowrap}.communication-alert-label{display:flex;align-items:center;gap:7px;color:#35699f;font-size:10px;font-weight:950;letter-spacing:.07em;text-transform:uppercase}.communication-alert-label b{width:21px;height:21px;display:grid;place-items:center;border-radius:7px;background:#dceaf7;color:#2e649a;font-size:12px}.communication-alert-sender{overflow:hidden;color:#34465b;font-size:12px;font-weight:800;text-overflow:ellipsis;white-space:nowrap}.communication-alert-subject{overflow:hidden;color:#68788a;font-size:11px;text-overflow:ellipsis;white-space:nowrap}.communication-alert-main small{margin-top:4px;color:#35699f;font-size:10px;font-weight:850}.communication-alert-close{position:absolute;z-index:1;top:9px;right:9px;width:31px;height:31px;display:grid;place-items:center;padding:0;border:1px solid #cbd7e4;border-radius:9px;background:#fff;color:#50667f;font-size:22px;line-height:1;cursor:pointer}.communication-alert-close:hover{border-color:#a74f4f;background:#a74f4f;color:#fff}@keyframes communication-alert-enter{from{opacity:0;transform:translateY(20px) scale(.97)}to{opacity:1;transform:none}}
@keyframes notification-ring{0%,100%{transform:rotate(0) scale(1)}15%{transform:rotate(-12deg) scale(1.08)}30%{transform:rotate(12deg) scale(1.08)}45%{transform:rotate(-9deg) scale(1.08)}60%{transform:rotate(9deg) scale(1.08)}75%{transform:rotate(-5deg) scale(1.04)}}.notification-bell.notification-arrived{animation:notification-ring .9s ease-in-out 2;box-shadow:0 0 0 5px rgba(207,81,71,.18)}
.calendar-shell{min-height:70vh;padding:26px clamp(14px,3vw,44px) 48px;background:#f7f5f9}.calendar-header{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:18px}.calendar-heading{display:flex;align-items:center;gap:14px}.calendar-close-button{width:46px;height:46px;display:grid;place-items:center;flex:0 0 46px;color:#fff;background:#3f2b66;border-radius:12px;font-size:26px;cursor:pointer}.calendar-period-switcher{display:flex;gap:6px;flex:0 0 auto}.calendar-period-switcher button{width:42px;height:42px;display:grid;place-items:center;padding:0;border:1px solid #cfc6d9;border-radius:11px;background:#fff;color:#3f2b66;font-size:25px;font-weight:800;cursor:pointer}.calendar-period-switcher button:hover{border-color:#8b74a6;background:#f2ecf7}.calendar-header h2{margin:3px 0 2px;font-size:34px;color:#2d213e}.calendar-header p{margin:0;color:#77717d;text-transform:capitalize}.calendar-navigation,.calendar-modes{display:flex;gap:7px;flex-wrap:wrap}.calendar-navigation button,.calendar-modes button,.calendar-filters>button{min-height:38px;padding:0 13px;border:1px solid #d7d0df;border-radius:10px;background:#fff;color:#3f2b66;font-weight:700;cursor:pointer}.calendar-navigation .primary-button{color:#fff;background:#3f2b66}.calendar-modes button.active{color:#fff;background:#3f2b66;border-color:#3f2b66}.calendar-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:14px}.calendar-metrics>div{display:flex;align-items:center;justify-content:space-between;padding:13px 15px;background:#fff;border:1px solid #e2dce8;border-radius:14px}.calendar-metrics span{color:#716979;font-size:12px}.calendar-metrics strong{font-size:25px;color:#3f2b66}.calendar-metrics .danger strong{color:#c53c35}.calendar-metrics .warning strong{color:#d96c1c}.calendar-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;margin-bottom:14px}.calendar-filters{display:flex;align-items:flex-end;justify-content:flex-end;gap:7px;flex-wrap:wrap}.calendar-filters label{display:grid;gap:3px}.calendar-filters label>span{color:#77717d;font-size:9px;font-weight:800;text-transform:uppercase}.calendar-filters select{min-height:38px;max-width:170px;padding:0 28px 0 9px;border:1px solid #d7d0df;border-radius:9px;background:#fff}.calendar-content{background:#fff;border:1px solid #ded8e5;border-radius:18px;box-shadow:0 10px 35px rgba(54,39,75,.07);overflow:hidden}.calendar-weekdays{display:grid;grid-template-columns:repeat(7,1fr);border-bottom:1px solid #e9e4ed}.calendar-weekdays b{padding:10px;text-align:center;color:#77717d;font-size:11px;text-transform:uppercase}.calendar-month-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.calendar-day{min-height:130px;padding:7px;border-right:1px solid #eee9f1;border-bottom:1px solid #eee9f1;background:#fff}.calendar-day.outside{background:#faf9fb;color:#aaa}.calendar-day.today{background:#fffbed;box-shadow:inset 0 0 0 2px #ffbc1f}.calendar-day-number{width:30px;height:30px;display:grid;place-items:center;border-radius:50%;font-weight:800}.calendar-day.today .calendar-day-number{background:#ffbc1f}.calendar-day>div{display:grid;gap:3px}.calendar-event{min-width:0;display:grid;grid-template-columns:auto minmax(0,1fr);gap:5px;padding:5px 6px;text-align:left;border:0;border-left:4px solid #3f2b66;border-radius:5px;background:#eee8f6;cursor:pointer}.calendar-event time{font-size:9px;font-weight:800}.calendar-event span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px}.calendar-event.done{text-decoration:line-through;opacity:.58}.calendar-week-grid{display:grid;grid-template-columns:repeat(7,minmax(150px,1fr));min-height:560px;overflow-x:auto}.calendar-week-grid>section{border-right:1px solid #eee9f1}.calendar-week-grid>section>header{position:sticky;top:0;padding:12px;text-align:center;border-bottom:1px solid #eee9f1;background:#fff;font-weight:800}.calendar-week-events{display:grid;gap:8px;padding:8px}.calendar-detailed-event{width:100%;display:grid;grid-template-columns:8px minmax(0,1fr);gap:8px;padding:10px;text-align:left;border:1px solid #e2dbe9;border-radius:11px;background:#fff;cursor:pointer}.calendar-type-dot{width:7px;height:100%;min-height:48px;background:#3f2b66;border-radius:99px}.calendar-detailed-event>span:last-child{display:grid;gap:3px}.calendar-detailed-event small,.calendar-detailed-event em{color:#77717d;font-size:10px;font-style:normal}.calendar-detailed-event.done{opacity:.55}.calendar-empty-slot{min-height:80px;display:grid;place-items:center;border:1px dashed #d7d0df;border-radius:10px;background:#faf9fb;color:#8a8291}.calendar-day-view{min-height:550px;padding:18px}.calendar-day-view>header{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.calendar-day-view>header h3{text-transform:capitalize}.calendar-day-view>.calendar-detailed-event{margin-bottom:9px}.calendar-empty{padding:60px;text-align:center;color:#8a8291}.calendar-list{display:grid;gap:0}.calendar-list>section>header{display:flex;align-items:center;justify-content:space-between;padding:13px 17px;background:#f5f1f8;border-top:1px solid #e5dfe9}.calendar-list>section:first-child>header{border-top:0}.calendar-list h3{margin:0;font-size:14px}.calendar-list>section>p{margin:0;padding:14px 18px;color:#999}.calendar-list-task{width:100%;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:13px 17px;text-align:left;border:0;border-top:1px solid #eee9f1;border-left:5px solid #8a8291;background:#fff;cursor:pointer}.calendar-list-task.priority-high{border-left-color:#ef9f1b}.calendar-list-task.priority-urgent{border-left-color:#cf5147}.calendar-list-task>span{display:grid;gap:3px}.calendar-list-task>span:last-child{text-align:right}.calendar-list-task small,.calendar-list-task time{color:#77717d;font-size:11px}.calendar-list-task b{font-size:11px}.calendar-task-dialog{width:min(680px,calc(100vw - 24px));max-height:92vh;padding:0;border:0;border-radius:20px;box-shadow:0 30px 90px rgba(30,20,45,.35)}.calendar-task-dialog::backdrop{background:rgba(27,20,37,.48)}.calendar-task-form{display:grid;grid-template-rows:auto minmax(0,1fr) auto;max-height:92vh}.calendar-task-form>header,.calendar-task-form>footer{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:16px 20px;background:#fff}.calendar-task-form>header{border-bottom:1px solid #e5dfe9}.calendar-task-form>header h2{margin:4px 0 0}.calendar-task-form>header button{width:38px;height:38px;border:0;border-radius:50%;background:#eee9f2;font-size:22px;cursor:pointer}.calendar-task-form>footer{border-top:1px solid #e5dfe9}.calendar-task-form>footer>div{display:flex;gap:8px}.calendar-task-form>footer button{min-height:40px;padding:0 14px;border-radius:10px}.calendar-task-body{min-height:0;overflow:auto}.calendar-task-body-simple{display:block}.calendar-task-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:20px}.calendar-task-fields>label,.calendar-task-fields fieldset{display:grid;gap:5px}.calendar-task-fields label>span,.calendar-reminders legend,.calendar-task-name>span{color:#716979;font-size:10px;font-weight:800;text-transform:uppercase}.calendar-task-fields input,.calendar-task-fields select{width:100%;min-height:42px;padding:9px 11px;border:1px solid #cdc6d4;border-radius:9px;background:#fff}.calendar-task-fields .full,.calendar-reminders{grid-column:1/-1}.calendar-task-fields .calendar-checkbox{display:flex;align-items:center;grid-template-columns:auto 1fr}.calendar-task-fields .calendar-checkbox input{width:auto;min-height:0}.calendar-task-name{display:grid;gap:5px;padding:13px;background:#f7f4fa;border-radius:10px}.calendar-task-name strong{font-size:16px}.calendar-reminders{grid-template-columns:repeat(2,1fr);padding:12px;border:1px solid #ddd6e3;border-radius:10px}.calendar-reminders legend{padding:0 5px}.calendar-reminders label{font-size:12px}.calendar-reminder-help{margin:0;color:#77717d;font-size:11px}
.calendar-header p{color:#5f5866;font-size:22px;font-weight:700;line-height:1.25}
.calendar-task-dialog{width:min(760px,calc(100vw - 24px));max-height:calc(100dvh - 16px);border:1px solid rgba(255,255,255,.78);border-radius:22px;background:rgba(248,245,252,.96);box-shadow:0 30px 90px rgba(30,20,45,.42);overflow:hidden;-webkit-backdrop-filter:blur(24px) saturate(135%);backdrop-filter:blur(24px) saturate(135%)}
.calendar-task-dialog::backdrop{background:linear-gradient(135deg,rgba(30,21,44,.62),rgba(63,43,102,.48));-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}
.calendar-task-form{grid-template-rows:auto minmax(0,1fr) auto auto;max-height:calc(100dvh - 16px);background:linear-gradient(145deg,rgba(255,255,255,.94),rgba(239,232,247,.9))}
.calendar-task-form>header,.calendar-task-form>footer{background:rgba(255,255,255,.8);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}
.calendar-task-body{background:linear-gradient(180deg,rgba(251,249,253,.72),rgba(241,235,248,.84))}
.calendar-task-fields input,.calendar-task-fields select{border-color:rgba(63,43,102,.22);border-radius:10px;background:rgba(255,255,255,.92);box-shadow:inset 0 1px 0 rgba(255,255,255,.85)}
.calendar-task-fields input:focus,.calendar-task-fields select:focus{outline:2px solid rgba(255,188,31,.55);border-color:#8a6dac}
.calendar-task-name{background:rgba(255,255,255,.78);border:1px solid rgba(63,43,102,.1);border-radius:11px;box-shadow:0 8px 22px rgba(63,43,102,.06)}
.calendar-reminders{border-color:rgba(63,43,102,.18);border-radius:11px;background:rgba(255,255,255,.58)}
.calendar-task-fields input[type="checkbox"]{appearance:none;-webkit-appearance:none;width:26px;height:26px;min-width:26px;min-height:26px;margin:0;padding:0;display:grid;place-content:center;flex:0 0 26px;border:2px solid #77668b;border-radius:5px;background:#fff;box-shadow:0 2px 6px rgba(63,43,102,.1);cursor:pointer}
.calendar-task-fields input[type="checkbox"]::before{content:"";width:12px;height:7px;border-left:3px solid #fff;border-bottom:3px solid #fff;transform:translateY(-1px) rotate(-45deg) scale(0);transition:transform .12s ease}
.calendar-task-fields input[type="checkbox"]:checked{border-color:#3f2b66;background:#3f2b66}
.calendar-task-fields input[type="checkbox"]:checked::before{transform:translateY(-1px) rotate(-45deg) scale(1)}
.calendar-task-fields input[type="checkbox"]:focus-visible{outline:3px solid rgba(255,188,31,.55);outline-offset:2px}
.calendar-task-fields .calendar-checkbox{min-height:52px;gap:11px;padding:9px 12px;border:1px solid rgba(63,43,102,.18);border-radius:10px;background:rgba(255,255,255,.58);font-size:14px;font-weight:700;line-height:1.25}
.calendar-reminders{column-gap:14px;row-gap:3px;padding:14px 12px 12px}
.calendar-reminders legend{padding:0 8px;color:#3f2b66;font-size:14px;font-weight:900;letter-spacing:.045em}
.calendar-reminders label{min-height:48px;display:flex;align-items:center;gap:11px;padding:7px 9px;border-radius:9px;color:#2c223d;font-size:13px;font-weight:750;line-height:1.2;cursor:pointer}
.calendar-reminders label:hover{background:rgba(63,43,102,.055)}
.calendar-task-brand{display:flex;align-items:center;justify-content:center;gap:10px;min-height:54px;padding:8px 20px;color:#fff;background:linear-gradient(110deg,rgba(63,43,102,.97),rgba(103,72,145,.94));font-size:13px;font-weight:800;letter-spacing:.01em}
.calendar-task-brand img{width:92px;height:30px;padding:3px 5px;border-radius:7px;background:rgba(255,255,255,.94);object-fit:contain;filter:drop-shadow(0 3px 5px rgba(0,0,0,.2))}
.calendar-task-brand span{line-height:1.25;text-align:center}
.calendar-week-grid>section>header{z-index:1;min-height:52px;display:flex;align-items:center;justify-content:space-between;gap:7px;padding:8px 9px 8px 12px;text-align:left}
.calendar-week-add{width:34px;height:34px;display:grid;place-items:center;flex:0 0 34px;padding:0;border:1px solid #cfbfdd;border-radius:10px;background:#f3edf8;color:#3f2b66;font-size:24px;font-weight:800;line-height:1;cursor:pointer}.calendar-week-add:hover{border-color:#3f2b66;background:#3f2b66;color:#fff;transform:translateY(-1px)}
.calendar-create-title input{font-size:16px;font-weight:800}.calendar-create-result{grid-column:1/-1;display:grid;gap:3px;padding:11px 13px;border:1px solid #cfc1dd;border-radius:11px;background:#f7f2fb}.calendar-create-result strong{color:#3f2b66;font-size:13px}.calendar-create-result span{color:#6f6679;font-size:11px;line-height:1.4}
.calendar-datetime-field{position:relative;display:grid;gap:11px;padding:15px;border:1px solid rgba(92,65,126,.22);border-radius:18px;background:radial-gradient(circle at 10% 0,rgba(255,205,73,.14),transparent 34%),linear-gradient(145deg,rgba(255,255,255,.98),rgba(240,233,248,.92));box-shadow:0 14px 34px rgba(50,34,72,.11),inset 0 1px 0 #fff;overflow:hidden}
.calendar-datetime-label{color:#3f2b66;font-size:13px;font-weight:950;letter-spacing:.055em;text-transform:uppercase}
.calendar-datetime-summary{min-height:64px;display:flex;align-items:center;gap:12px;padding:9px 13px;border:1px solid rgba(63,43,102,.14);border-radius:14px;background:rgba(255,255,255,.84);box-shadow:0 7px 18px rgba(63,43,102,.07)}
.calendar-datetime-icon{width:44px;height:44px;display:grid;place-items:center;flex:0 0 44px;border:1px solid #e5b426;border-radius:12px;background:linear-gradient(145deg,#fff9d9,#ffdf72);box-shadow:0 7px 16px rgba(211,155,16,.2)}
.calendar-datetime-icon img{width:30px;height:30px;object-fit:contain}.calendar-datetime-summary>span:last-child{display:grid;gap:2px}.calendar-datetime-summary strong{color:#2b1d3d;font-size:20px;line-height:1.15;text-transform:capitalize}.calendar-datetime-summary small{color:#716579;font-size:12px;font-weight:750}
.calendar-datetime-field.is-empty .calendar-datetime-summary{border-style:dashed}.calendar-datetime-field.is-empty .calendar-datetime-summary strong{color:#776e80}
.calendar-datetime-quick{display:flex;align-items:end;gap:7px;flex-wrap:wrap}.calendar-datetime-quick>button{min-height:35px;padding:0 11px;border:1px solid #cabbd8;border-radius:10px;background:#fff;color:#3f2b66;font-size:12px;font-weight:850;cursor:pointer;box-shadow:0 4px 10px rgba(63,43,102,.06)}.calendar-datetime-quick>button:hover{border-color:#3f2b66;background:#3f2b66;color:#fff;transform:translateY(-1px)}
.calendar-datetime-quick>label{min-width:158px;display:grid;gap:3px;margin-left:auto}.calendar-datetime-quick>label span{color:#766c7f;font-size:9px;font-weight:850;letter-spacing:.045em;text-transform:uppercase}.calendar-datetime-quick input[type="date"]{min-height:35px;padding:6px 9px;border:1px solid #cabbd8;border-radius:10px;background:#fff;color:#342342;font-size:12px;font-weight:800}
.calendar-datetime-wheels{display:grid;grid-template-columns:minmax(230px,2.1fr) minmax(92px,1fr) minmax(92px,1fr);gap:8px;padding:9px;border:1px solid rgba(255,255,255,.16);border-radius:17px;background:linear-gradient(145deg,#261837,#4d3270 62%,#36224e);box-shadow:0 16px 34px rgba(38,24,55,.24),inset 0 1px 0 rgba(255,255,255,.14)}
.calendar-wheel{min-width:0;display:grid;grid-template-rows:24px 27px 148px 27px;gap:3px}.calendar-wheel header{display:grid;place-items:center;color:#e9dff3;font-size:10px;font-weight:900;letter-spacing:.09em;text-transform:uppercase}
.calendar-wheel-arrow{width:100%;height:27px;display:grid;place-items:center;padding:0;border:1px solid rgba(255,255,255,.13);border-radius:8px;background:rgba(255,255,255,.07);color:#f5ecff;font-size:18px;font-weight:900;line-height:1;cursor:pointer}.calendar-wheel-arrow:hover{border-color:rgba(255,210,82,.7);background:rgba(255,210,82,.14);color:#ffdf76}
.calendar-wheel-viewport{position:relative;height:148px;border:1px solid rgba(255,255,255,.12);border-radius:13px;background:rgba(20,12,29,.36);overflow:hidden}
.calendar-wheel-viewport::before{content:"";position:absolute;z-index:3;top:48px;right:5px;left:5px;height:52px;pointer-events:none;border:1px solid rgba(255,213,83,.82);border-radius:11px;background:linear-gradient(90deg,rgba(255,199,41,.14),rgba(255,255,255,.09),rgba(255,199,41,.14));box-shadow:0 0 0 1px rgba(255,255,255,.06),0 0 24px rgba(255,190,31,.16)}
.calendar-wheel-viewport::after{content:"";position:absolute;z-index:4;inset:0;pointer-events:none;background:linear-gradient(180deg,rgba(25,15,36,.97) 0,rgba(25,15,36,.18) 32%,transparent 42%,transparent 58%,rgba(25,15,36,.18) 68%,rgba(25,15,36,.97) 100%)}
.calendar-wheel-scroll{height:148px;padding:48px 0;overflow-x:hidden;overflow-y:auto;scroll-snap-type:y mandatory;overscroll-behavior:contain;scrollbar-color:#9e7fbd rgba(255,255,255,.06);scrollbar-width:thin}
.calendar-wheel-scroll::-webkit-scrollbar{width:7px}.calendar-wheel-scroll::-webkit-scrollbar-track{background:rgba(255,255,255,.05)}.calendar-wheel-scroll::-webkit-scrollbar-thumb{border:2px solid transparent;border-radius:99px;background:#9e7fbd;background-clip:padding-box}
.calendar-wheel-option{position:relative;z-index:1;width:100%;height:52px;display:flex;align-items:center;justify-content:center;gap:6px;padding:0 8px;border:0;background:transparent;color:#b7a9c5;scroll-snap-align:center;cursor:pointer;opacity:.5;transform:scale(.88);transition:color .14s ease,opacity .14s ease,transform .14s ease;text-align:center}.calendar-wheel-option strong{overflow:hidden;font-size:15px;font-weight:850;text-overflow:ellipsis;white-space:nowrap}.calendar-wheel-option small{color:#ab9ab9;font-size:9px;font-weight:750;white-space:nowrap}.calendar-wheel-option.active{z-index:2;color:#fff;opacity:1;transform:scale(1)}.calendar-wheel-option.active strong{font-size:18px;text-shadow:0 2px 10px rgba(0,0,0,.28)}.calendar-wheel-option.active small{color:#ffe189}.calendar-wheel-hour .calendar-wheel-option strong,.calendar-wheel-minute .calendar-wheel-option strong{font-size:22px;font-variant-numeric:tabular-nums}.calendar-wheel-hour .calendar-wheel-option.active strong,.calendar-wheel-minute .calendar-wheel-option.active strong{color:#ffe17b;font-size:27px}
.calendar-datetime-hint{display:flex;align-items:center;justify-content:center;gap:7px;margin:0;color:#6f6479;font-size:10px;font-weight:700;line-height:1.35;text-align:center}.calendar-datetime-hint span{width:22px;height:22px;display:grid;place-items:center;flex:0 0 22px;border-radius:7px;background:#eee5f6;color:#3f2b66;font-size:15px}
.calendar-datetime-field.is-all-day .calendar-wheel-hour,.calendar-datetime-field.is-all-day .calendar-wheel-minute{pointer-events:none;opacity:.32;filter:saturate(.2)}
@media(max-width:900px){.calendar-header,.calendar-toolbar{align-items:stretch;flex-direction:column}.calendar-metrics{grid-template-columns:repeat(2,1fr)}.calendar-week-grid{grid-template-columns:repeat(7,minmax(180px,1fr))}.calendar-task-body{grid-template-columns:1fr}.calendar-task-context{border-top:1px solid #e5dfe9;border-left:0}}
@media(max-width:760px){.notification-center{top:12px;right:14px;max-height:calc(100vh - 24px)}.calendar-shell{width:100%;max-width:100vw;min-width:0;padding:16px 12px 30px;overflow-x:hidden}.calendar-header h2{font-size:28px}.calendar-navigation{display:grid;grid-template-columns:repeat(3,1fr)}.calendar-navigation .primary-button{grid-column:1/-1}.calendar-metrics{grid-template-columns:repeat(2,1fr)}.calendar-toolbar{margin-bottom:9px}.calendar-modes{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}.calendar-modes button:not(:last-child){display:block}.calendar-filters{display:grid;grid-template-columns:repeat(2,1fr)}.calendar-filters label,.calendar-filters select{max-width:none;width:100%}.calendar-content{width:100%;max-width:100%;min-width:0;border-radius:13px;overflow-x:auto}.calendar-month{display:block;min-width:680px}.calendar-week-grid{display:grid}.calendar-day-view{display:block;min-width:0}.calendar-list-task{align-items:flex-start}.calendar-list-task>span:last-child{min-width:95px}.calendar-task-dialog{width:100vw;max-height:100dvh;border-radius:0}.calendar-task-form{max-height:100dvh}.calendar-task-fields{grid-template-columns:1fr;padding:14px}.calendar-task-fields .full,.calendar-reminders{grid-column:auto}.calendar-reminders{grid-template-columns:1fr 1fr}.calendar-task-form>footer{align-items:stretch}.calendar-task-form>footer>div{flex:1}.calendar-task-form>footer button{flex:1}.calendar-record-actions{flex-direction:column}.calendar-datetime-field{padding:12px}.calendar-datetime-quick>label{width:100%;margin-left:0}.calendar-datetime-wheels{grid-template-columns:1fr 1fr}.calendar-wheel-date{grid-column:1/-1}.calendar-wheel{grid-template-rows:22px 25px 148px 25px}.calendar-wheel-viewport,.calendar-wheel-scroll{height:148px}.calendar-wheel-scroll{padding:48px 0}.calendar-wheel-viewport::before{top:48px}.calendar-datetime-summary strong{font-size:18px}}
.communications-card{border:2px solid #e0aa00;border-radius:14px;background:#fff9df;padding:14px;display:grid;gap:10px}.communications-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.communications-heading span{padding:4px 7px;border-radius:999px;background:#3f2b66;color:#fff;font-size:10px;font-weight:900;letter-spacing:.05em}.communications-boundary,.communications-list>p{margin:0;color:#625b4d;font-size:12px}.communications-list{display:grid;gap:8px;max-height:280px;overflow:auto}.communication-message{display:grid;gap:4px;padding:10px;border:1px solid #e6dfca;border-radius:10px;background:#fff}.communication-message.outgoing{border-left:4px solid #1593c7}.communication-message.incoming{border-left:4px solid #3f7c35}.communication-message>div{display:flex;justify-content:space-between;gap:8px;font-size:11px}.communication-message p{margin:2px 0;white-space:pre-wrap;font-size:12px}.communication-message small,.communication-message time,.communication-message em{color:#726b7c;font-size:10px}.communication-message em{font-style:normal}.mock-mail-form{display:grid;gap:8px;padding-top:8px;border-top:1px solid #e0d5af}.mock-mail-form label{display:grid;gap:4px;font-size:11px;font-weight:800}.mock-mail-form input,.mock-mail-form textarea{width:100%;border:1px solid #cfc4a2;border-radius:8px;background:#fff;padding:8px;font:inherit}.communications-error{color:#a7322a!important}
.mail-send-status{color:#765d23;font-size:11px;font-weight:750;line-height:1.35}
.mail-open-button{min-height:46px}

.mail-dialog{width:min(1500px,calc(100vw - 24px));height:min(920px,calc(100vh - 24px));max-width:none;max-height:none}
.mail-shell{height:100%;display:grid;grid-template-rows:auto minmax(0,1fr);background:#f5f6f8;border:1px solid #d9dce2;border-radius:16px;box-shadow:0 30px 100px rgba(14,20,34,.38);overflow:hidden}
.mail-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:14px 18px;background:#fff;border-bottom:1px solid #dfe2e8}
.mail-toolbar h2{margin:2px 0 0;font-size:22px}.mail-toolbar-actions{display:flex;align-items:center;gap:10px}
.mail-brand{display:flex;align-items:center;gap:12px;min-width:250px}.mail-brand-mark{width:38px;height:38px;display:grid;place-items:center;border-radius:11px;background:#ffcc00;color:#111;font-size:22px;font-weight:900}.mail-search{height:42px;display:flex;align-items:center;gap:9px;flex:1;max-width:660px;padding:0 14px;border:1px solid #dfe2e8;border-radius:12px;background:#f3f4f6;color:#747b85}.mail-search input{width:100%;border:0;outline:0;background:transparent;font:inherit}
.mail-layout{min-height:0;display:grid;grid-template-columns:210px minmax(300px,390px) minmax(420px,1fr)}
.mail-layout.is-composing .mail-message-list{display:none}.mail-layout.is-composing .mail-reader{grid-column:2/4}
.mail-sidebar{display:flex;flex-direction:column;gap:6px;padding:16px 12px;background:#f0f2f5;border-right:1px solid #dfe2e8}
.mail-compose-button{min-height:48px;margin-bottom:10px;border-radius:14px;background:#ffcc00!important;border-color:#ffcc00!important;color:#171717!important}.mail-compose-button span{font-size:18px}
.mail-folder-button{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:42px;padding:0 12px;color:#3c4350;background:transparent;border:0;border-radius:10px;cursor:pointer;font:inherit;font-weight:750;text-align:left}
.mail-folder-button:hover,.mail-folder-button.is-active{color:#241545;background:#e4dcf4}.mail-folder-button b{min-width:24px;color:#756c82;font-size:12px;text-align:right}
.mail-folder-static{display:flex;align-items:center;justify-content:space-between;min-height:42px;padding:0 12px;color:#59616e;font-size:13px;font-weight:650}.mail-folder-static b{color:#7f8792;font-size:12px}
.mail-account-card{display:grid;justify-items:center;gap:5px;margin-top:auto;padding:10px 8px;background:#fff;border:1px solid #dfe2e8;border-radius:12px}.mail-account-card>img{width:126px;max-width:100%;height:auto;display:block}.mail-account-card strong{width:100%;overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap;font-size:11.5px;letter-spacing:-.02em}.mail-account-card>div{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;white-space:nowrap}.mail-account-card span{color:#2f7439;font-size:10px;font-weight:800}.mail-account-card small{color:#8a641b;font-size:9px}
.mail-message-list{min-height:0;overflow:auto;background:#fff;border-right:1px solid #dfe2e8}
.mail-list-heading{position:sticky;z-index:2;top:0;display:flex;align-items:center;justify-content:space-between;min-height:52px;padding:0 16px;background:rgba(255,255,255,.96);border-bottom:1px solid #e5e7eb;backdrop-filter:blur(8px)}.mail-list-heading span{color:#7a808b;font-size:12px}
.mail-list-item{width:100%;display:grid;gap:5px;padding:13px 15px;color:#222b38;background:#fff;border:0;border-bottom:1px solid #eceef2;cursor:pointer;text-align:left;font:inherit}.mail-list-item:hover{background:#f7f5fb}.mail-list-item.is-selected{background:#eee8f8;box-shadow:inset 4px 0 #5a347f}.mail-list-item>div{display:flex;align-items:center;justify-content:space-between;gap:10px}.mail-list-item strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mail-list-item time{flex:none;color:#7b818b;font-size:10px}.mail-list-item>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:750}.mail-list-item small{overflow:hidden;color:#737984;text-overflow:ellipsis;white-space:nowrap}.mail-list-item em{color:#745c88;font-size:10px;font-style:normal;font-weight:800;text-transform:uppercase}.mail-empty{margin:0;padding:24px;color:#777d88;text-align:center}
.mail-reader{min-width:0;min-height:0;overflow:auto;background:#fff}.mail-reader-empty{height:100%;display:grid;place-content:center;gap:8px;color:#858b95;text-align:center}.mail-reader-empty strong{color:#4a505a;font-size:20px}
.mail-letter{min-height:100%;padding:28px 34px}.mail-letter>header{display:grid;grid-template-columns:1fr auto;gap:8px 16px;padding-bottom:18px;border-bottom:1px solid #e6e8ed}.mail-letter>header h3{grid-column:1/-1;margin:0;color:#252b34;font-size:25px;line-height:1.25}.mail-letter>header time{grid-column:2;grid-row:1;color:#7a808a;font-size:12px}.mail-letter-actions{grid-column:1/-1;display:flex;gap:8px;margin-top:5px}.mail-direction{width:max-content;padding:4px 8px;border-radius:999px;font-size:10px;font-weight:900;text-transform:uppercase}.mail-direction.incoming{color:#255d2d;background:#dff2e2}.mail-direction.outgoing{color:#185b75;background:#dff2fa}
.mail-letter dl{display:grid;gap:6px;margin:16px 0}.mail-letter dl div{display:grid;grid-template-columns:54px 1fr;gap:8px}.mail-letter dt{color:#7a808a}.mail-letter dd{margin:0;color:#303741;font-weight:650;word-break:break-word}
.mail-attachments{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:10px;margin:18px 0}.mail-attachment-item{min-width:0;display:grid;grid-template-columns:112px minmax(0,1fr);align-items:center;gap:8px 11px;padding:10px;background:#f5f2f9;border:1px solid #ded6e8;border-radius:12px}.mail-attachment-meta{min-width:0;display:grid;gap:4px}.mail-attachments strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.mail-attachments small{color:#77707f;font-size:10px}.mail-attachment-actions{grid-column:1/-1;display:flex;gap:6px}.mail-attachment-actions button{padding:5px 9px;border:1px solid #ccd5df;border-radius:7px;background:#fff;color:#3c526d;cursor:pointer;font:inherit;font-size:10px;font-weight:750}.mail-attachment-actions button:hover{border-color:#7893b5;background:#edf3fa}.mail-attachment-preview{position:relative;width:112px;height:78px;display:grid;place-items:center;overflow:hidden;padding:0;border:1px solid #d6dde7;border-radius:9px;background:linear-gradient(145deg,#f8fafc,#e6ecf3);color:#54739f;cursor:pointer}.mail-attachment-preview>b{position:relative;z-index:1;max-width:88px;padding:6px 9px;border-radius:7px;background:#6f7f94;color:#fff;overflow:hidden;text-overflow:ellipsis;font-size:10px;font-weight:900}.mail-attachment-preview.office.word>b{background:#2c73b8}.mail-attachment-preview.office.excel>b{background:#25835b}.mail-attachment-preview.pdf>b{background:#d84b43}.mail-attachment-preview.image>b{background:#3197a6}.mail-attachment-preview>img{position:absolute;z-index:2;inset:0;width:100%;height:100%;display:block;object-fit:cover;background:#fff;opacity:0;transition:opacity .16s ease}.mail-attachment-preview.pdf>img,.mail-attachment-preview.office>img{object-fit:contain}.mail-attachment-preview.has-thumbnail>img{opacity:1}.mail-attachment-preview.has-thumbnail>b{visibility:hidden}.mail-attachment-preview:hover{border-color:#7893b5;box-shadow:0 4px 13px rgba(60,82,109,.14)}
.mail-body{padding:18px 0;color:#2d333b;font-size:15px;line-height:1.62;word-break:break-word}.mail-text-body{white-space:pre-wrap}.mail-html-body{white-space:normal}.mail-html-body img{max-width:100%;height:auto}.mail-html-body a{color:#315b9d;text-decoration:underline}.mail-quoted-history{margin:20px 0 0;border:1px solid #e1e5ea;border-radius:10px;background:#f7f8fa;color:#667080;white-space:normal}.mail-quoted-history>summary{padding:10px 12px;color:#536276;font-size:12px;font-weight:750;cursor:pointer;list-style:none}.mail-quoted-history>summary::before{content:"›";display:inline-block;margin-right:8px;font-size:18px;line-height:10px;transition:transform .15s ease}.mail-quoted-history[open]>summary::before{transform:rotate(90deg)}.mail-quoted-history>div,.mail-quoted-history>blockquote{margin:0;padding:12px;border-top:1px solid #e1e5ea;white-space:pre-wrap}.mail-letter-footer{display:flex;padding:22px 0;border-top:1px solid #e7eaee}.mail-reply-button{min-height:38px;padding:0 15px;border:1px solid #cfd6df;border-radius:10px;background:#fff;color:#35455b;font:inherit;font-weight:750;cursor:pointer}.mail-reply-button:hover{border-color:#6d8db8;background:#edf3fa;color:#315b9d}
.mail-composer{height:100%;display:flex;flex-direction:column;gap:0;overflow:auto}.mail-composer>label{display:grid;grid-template-columns:72px 1fr;align-items:center;gap:8px;flex:none;padding:0 20px;border-bottom:1px solid #e6e8ed;color:#717781;font-size:12px;font-weight:800}.mail-composer input,.mail-composer textarea{width:100%;border:0;outline:0;background:#fff;padding:15px 0;font:inherit}.mail-from-row{display:grid;grid-template-columns:92px 1fr;align-items:center;min-height:50px;flex:none;padding:0 20px;border-bottom:1px solid #e6e8ed;color:#717781;font-size:12px}.mail-from-row strong{color:#2b313a;font-size:13px}.mail-recipient-field{display:grid;grid-template-columns:72px 1fr auto;align-items:center;gap:8px;flex:none;margin:0;padding:10px 20px;border:0;border-bottom:1px solid #e6e8ed}.mail-recipient-field legend{display:contents}.mail-recipient-field>div{display:flex;gap:7px;flex-wrap:wrap}.mail-recipient-field label{display:flex;align-items:center;gap:5px;padding:6px 9px;border:1px solid #d7dbe1;border-radius:999px;background:#f5f6f8;color:#303741;font-size:12px;cursor:pointer}.mail-recipient-field input{width:auto;margin:0;padding:0;accent-color:#ffcc00}.mail-recipient-field small,.mail-recipient-empty{color:#777f8a;font-size:11px}.mail-reply-context{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;padding:10px 20px;background:#f5f7fa;border-bottom:1px solid #e3e7ec;color:#5b6776;font-size:11px}.mail-reply-context strong{overflow:hidden;color:#2f3946;text-overflow:ellipsis;white-space:nowrap}.mail-composer-body{display:flex;flex:1;min-height:270px;flex-direction:column;background:#fff}.mail-format-toolbar{position:sticky;z-index:2;top:0;display:flex;align-items:center;gap:4px;padding:8px 20px;background:#fafbfc;border-bottom:1px solid #e5e8ec}.mail-format-toolbar button{min-height:31px;padding:0 9px;border:1px solid transparent;border-radius:7px;background:transparent;color:#394555;font:inherit;font-size:12px;cursor:pointer}.mail-format-toolbar button:hover{border-color:#d2d9e2;background:#fff}.mail-rich-editor{min-height:180px;padding:18px 20px;outline:0;color:#252d38;font-size:15px;line-height:1.6}.mail-rich-editor:empty::before{content:attr(data-placeholder);color:#9aa1aa;pointer-events:none}.mail-signature-preview{display:grid;justify-items:start;gap:5px;margin:0 20px 18px;padding-top:14px;border-top:1px dashed #d8dde4;color:#3e4651}.mail-signature-preview small{padding:4px 8px;border-radius:99px;background:#eef2f6;color:#718095;font-size:10px}.mail-signature-preview img{width:min(465px,100%);height:auto}.mail-signature-preview a{color:#315b9d;font-size:13px}.mail-composer-actions{display:flex;align-items:center;gap:10px;flex:none;padding:14px 20px;background:#fafafa;border-top:1px solid #e6e8ed}.mail-composer-actions small{color:#7a6b55}.mail-send-button{min-width:118px;height:42px;border:1px solid #e5b900;border-radius:10px;background:#ffcc00;color:#111;font:inherit;font-weight:800;cursor:pointer}.mail-send-button:disabled{cursor:not-allowed;opacity:.45}.mail-attach-button{width:42px;height:42px;border:0;border-radius:9px;background:transparent;font-size:20px}
.mail-format-toolbar button.is-active,.mail-format-toolbar button[aria-pressed="true"]{border-color:#8ba6cb;background:#dfe9f7;color:#244f88;box-shadow:inset 0 0 0 1px rgba(78,116,184,.12)}.mail-rich-editor:focus{box-shadow:inset 0 0 0 2px rgba(78,116,184,.16)}.mail-composer-actions small{flex:1;color:#647286}.mail-discard-draft{border:0;background:transparent;color:#9a5555;cursor:pointer;font:inherit;font-size:11px}.mail-discard-draft:hover{text-decoration:underline}
.mail-attachment-picker{display:grid;gap:10px;padding:14px 20px;background:#f8fafc;border-top:1px solid #e6e8ed;border-bottom:1px solid #e6e8ed}.mail-attachment-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.mail-attachment-heading>div{display:grid;gap:2px}.mail-attachment-heading small,.mail-attachment-heading>span,.mail-no-order-files{color:#747d88;font-size:11px}.mail-dropzone{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;padding:12px;border:1.5px dashed #aebbc9;border-radius:12px;background:#fff;transition:.15s ease}.mail-dropzone.is-dragover{border-color:#4e74b8;background:#eaf1fa;transform:translateY(-1px)}.mail-dropzone-icon{width:34px;height:34px;display:grid;place-items:center;border-radius:10px;background:#e5edf8;color:#41679f;font-size:22px;font-weight:900}.mail-dropzone>div{display:grid;gap:3px}.mail-dropzone small{color:#747d88;font-size:10px}.mail-order-file-browser{overflow:hidden;border:1px solid #d5dde7;border-radius:14px;background:#fff;box-shadow:0 8px 24px rgba(51,65,85,.06)}.mail-order-file-browser-header{display:grid;grid-template-columns:minmax(0,1fr) minmax(210px,300px);align-items:center;gap:14px;padding:13px 14px;border-bottom:1px solid #e6eaf0;background:linear-gradient(135deg,#f7f9fc,#eef3f9)}.mail-order-file-browser-header>div{display:grid;gap:2px}.mail-order-file-browser-header .eyebrow{color:#5b78a2;font-size:9px;font-weight:900;letter-spacing:.1em;text-transform:uppercase}.mail-order-file-browser-header strong{font-size:13px}.mail-order-file-browser-header small{color:#77818f;font-size:10px}.mail-order-file-search{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:7px;padding:7px 9px;border:1px solid #d4dce7;border-radius:10px;background:#fff;color:#7c8795}.mail-order-file-search input{min-width:0;padding:0;border:0;background:transparent;font:inherit;font-size:11px;outline:0}.mail-order-file-toolbar{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:8px;padding:8px 10px;border-bottom:1px solid #edf0f4;background:#fff}.mail-order-file-toolbar>button{width:28px;height:28px;border:1px solid #d5dde7;border-radius:8px;background:#f8fafc;color:#4f6075;font-size:18px}.mail-order-file-toolbar>button:disabled{opacity:.4}.mail-order-file-toolbar nav{display:flex;align-items:center;gap:5px;min-width:0;overflow:auto;white-space:nowrap}.mail-order-file-toolbar nav button{padding:4px 6px;border:0;border-radius:6px;background:transparent;color:#4e6f9d;font-size:10px}.mail-order-file-toolbar nav button[aria-current="page"]{background:#eaf1fa;color:#304f7b;font-weight:800}.mail-order-file-toolbar nav span,.mail-order-file-toolbar>span{color:#8993a0;font-size:9px}.mail-order-file-contents{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;gap:8px;min-height:270px;max-height:420px;padding:11px;overflow:auto;background:#fbfcfe}.mail-order-folder,.mail-order-file{min-width:0;display:grid;grid-template-columns:36px minmax(0,1fr) auto;align-items:center;gap:9px;padding:10px;border:1px solid #dbe2eb;border-radius:11px;background:#fff;color:#303741;cursor:pointer;text-align:left;transition:.15s ease}.mail-order-folder:hover,.mail-order-file:hover{border-color:#9fb2ca;box-shadow:0 4px 12px rgba(67,86,112,.08);transform:translateY(-1px)}.mail-order-folder-icon,.mail-order-file-type{width:34px;height:34px;display:grid;place-items:center;border-radius:9px;background:#edf2f8;color:#54739f;font-size:11px;font-weight:900}.mail-order-folder-icon{background:#fff1bd;font-size:20px}.mail-order-folder>div,.mail-order-file>div{min-width:0;display:grid;gap:3px}.mail-order-folder strong,.mail-order-file strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}.mail-order-folder small,.mail-order-file small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#79818b;font-size:9px}.mail-order-folder-arrow{color:#8290a1;font-size:20px}.mail-order-file-choice{min-width:27px;height:27px;display:grid;place-items:center;border-radius:8px;background:#edf2f7;color:#55729a;font-size:13px;font-weight:900}.mail-order-file.is-selected{border-color:#6b8dbd;background:#edf3fb}.mail-order-file.is-selected .mail-order-file-type{color:#fff;background:#4e74b8}.mail-order-file.is-selected .mail-order-file-choice{width:auto;padding:0 7px;background:#d8e5f6;color:#355b8f;font-size:9px}.mail-order-files-empty{grid-column:1/-1;min-height:220px;display:grid;place-content:center;justify-items:center;gap:5px;color:#747f8c;text-align:center}.mail-order-files-empty>span{font-size:32px}.mail-order-files-empty strong{font-size:12px}.mail-order-files-empty small{font-size:10px}.mail-selected-files{display:grid;gap:8px;padding:10px 12px;border-top:1px solid #dde5ee;background:#f2f6fb}.mail-selected-files>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:10px}.mail-selected-files>div:first-child strong{font-size:10px}.mail-selected-files>div:first-child small{color:#6f7c8d;font-size:9px}.mail-selected-files>div:last-child{display:flex;gap:6px;overflow:auto}.mail-selected-files button{flex:0 0 auto;max-width:240px;padding:5px 8px;border:1px solid #b8c8dc;border-radius:999px;background:#fff;color:#3d5f8d;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px}.mail-selected-files button span{margin-left:5px;font-weight:900}.mail-uploading{display:grid;gap:4px}.mail-uploading>div{display:flex;justify-content:space-between;gap:10px;color:#657080;font-size:10px}.mail-uploading strong{color:#41679f}.mail-no-order-files{margin:0}
.mail-order-file{grid-template-columns:66px minmax(0,1fr) auto;min-height:74px}.mail-order-file-preview{position:relative;width:64px;height:52px;display:grid;place-items:center;overflow:hidden;border:1px solid #d9e1eb;border-radius:9px;background:linear-gradient(145deg,#f7f9fc,#e8eef5);color:#54739f}.mail-order-file-preview>b{position:relative;z-index:1;max-width:54px;padding:5px 7px;border-radius:6px;background:#6f7f94;color:#fff;overflow:hidden;text-overflow:ellipsis;font-size:9px;font-weight:900}.mail-order-file-preview.office.word>b{background:#2c73b8}.mail-order-file-preview.office.excel>b{background:#25835b}.mail-order-file-preview.pdf>b{background:#d84b43}.mail-order-file-preview.image>b{background:#3197a6}.mail-order-file-preview>img{position:absolute;z-index:2;inset:0;width:100%;height:100%;display:block;object-fit:cover;background:#fff;opacity:0;transition:opacity .16s ease}.mail-order-file-preview.pdf>img{object-fit:contain}.mail-order-file-preview.has-thumbnail>img{opacity:1}.mail-order-file-preview.has-thumbnail>b{visibility:hidden}.mail-order-file-preview>i{position:absolute;z-index:3;right:4px;bottom:4px;width:20px;height:20px;display:grid;place-items:center;border:2px solid #fff;border-radius:50%;background:#4e74b8;color:#fff;box-shadow:0 2px 7px rgba(33,65,108,.3);font-size:10px;font-style:normal;font-weight:900}
.mail-connect-panel{width:min(480px,calc(100% - 40px));display:grid;gap:12px;margin:52px auto;padding:28px;background:#fff;border:1px solid #dfe3e8;border-radius:16px;box-shadow:0 14px 34px rgba(28,35,46,.09)}.mail-connect-panel .mail-brand-mark{margin-bottom:4px}.mail-connect-panel h3,.mail-connect-panel p{margin:0}.mail-connect-panel p{color:#687383;line-height:1.45}.mail-connect-panel label{display:grid;gap:5px;color:#5d6672;font-size:12px;font-weight:750}.mail-connect-panel input{width:100%;padding:11px 12px;border:1px solid #d5dce5;border-radius:9px;font:inherit}.mail-account-card button{margin-top:5px;padding:5px;border:0;background:transparent;color:#8b5b58;cursor:pointer;font:inherit;font-size:10px;text-align:left}
.mail-attachment-library{min-height:100%;padding:28px 30px;background:#fff}.mail-attachment-library>header{display:flex;align-items:end;justify-content:space-between;gap:18px;padding-bottom:18px;border-bottom:1px solid #e3e7ec}.mail-attachment-library h3{margin:3px 0 0;font-size:25px}.mail-attachment-library>header>strong{color:#627084;font-size:12px}.mail-attachment-library-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:12px;padding:20px 0}.mail-attachment-library-item{min-width:0;display:grid;grid-template-columns:1fr;gap:6px;padding:12px;border:1px solid #dce3eb;border-radius:12px;background:#f8fafc}.mail-attachment-preview.is-library{width:100%;height:138px;margin-bottom:4px}.mail-attachment-library-item>div>strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.mail-attachment-library-item>div>small,.mail-attachment-library-item time{color:#768293;font-size:10px}.mail-attachment-library-item p{overflow:hidden;margin:4px 0 0;color:#465467;text-overflow:ellipsis;white-space:nowrap;font-size:11px}.mail-attachment-library-item .mail-attachment-actions{grid-column:auto}

.contact-emails-field{display:grid;gap:8px}.contact-emails-field>div:first-child{display:flex;align-items:end;justify-content:space-between;gap:8px}.contact-emails-field>div:first-child>span{font-size:12px;font-weight:800}.contact-emails-field>div:first-child>small{color:#7b7282;font-size:10px}.contact-email-list{display:grid;gap:7px}.contact-email-row{display:grid;grid-template-columns:70px minmax(0,1fr) 32px;align-items:center;gap:7px}.contact-email-row>span{color:#746b7b;font-size:10px;font-weight:750}.contact-email-row>input{width:100%;min-width:0;border:1px solid #d5ceda;border-radius:9px;padding:9px 10px;font:inherit}.contact-email-row>button{height:32px;border:0;border-radius:8px;background:#f2eef4;color:#7b657e;font-size:18px;cursor:pointer}.contact-email-row>button:disabled{visibility:hidden}.contact-email-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.contact-email-add{padding-left:0}.contact-email-save{min-height:36px}.contact-email-save-hint{color:#746b7b;font-size:10px}

@media(max-width:980px){.mail-dialog{width:100vw;height:100svh;height:100dvh}.mail-shell{border-radius:0}.mail-layout{grid-template-columns:150px minmax(260px,340px) minmax(360px,1fr)}.mail-letter{padding:22px}.mail-sidebar{padding:12px 8px}.order-mail-section{min-height:620px}.order-mail-section .mail-shell{height:620px}}
@media(max-width:760px){
  .mail-dialog{position:fixed;inset:0;width:100vw;max-width:100vw;height:100svh;height:100dvh;max-height:100svh;max-height:100dvh;margin:0;overflow:hidden}
  .mail-shell{min-width:0;max-width:100%;border-radius:0;overscroll-behavior:contain}
  .mail-toolbar{min-width:0;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:calc(9px + env(safe-area-inset-top,0px)) 10px 9px}
  .mail-brand{min-width:0;gap:8px}.mail-brand-mark{width:34px;height:34px;flex:0 0 34px;font-size:19px}.mail-toolbar h2{overflow:hidden;margin:0;font-size:16px;text-overflow:ellipsis;white-space:nowrap}.mail-brand .eyebrow,.mail-search{display:none}
  .mail-toolbar-actions{min-width:0;gap:6px}.mail-toolbar-actions .secondary-button{min-height:40px;padding:0 10px}.mail-toolbar-actions .icon-button{width:40px;height:40px}
  .mail-layout{min-width:0;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(120px,32%) minmax(0,1fr);overflow:hidden}
  .mail-sidebar{min-width:0;display:flex;flex-direction:row;gap:6px;padding:7px 8px;overflow-x:auto;overflow-y:hidden;border-right:0;border-bottom:1px solid #dfe2e8;-webkit-overflow-scrolling:touch;scrollbar-width:none}.mail-sidebar::-webkit-scrollbar{display:none}
  .mail-compose-button,.mail-folder-button,.mail-folder-static{min-height:40px;flex:0 0 auto;margin:0;padding:0 10px;white-space:nowrap}.mail-compose-button span{font-size:16px}.mail-folder-button span{font-size:11px}.mail-folder-button b{min-width:auto;margin-left:4px}.mail-account-card{display:none}
  .mail-message-list{min-width:0;max-width:100%;overflow:auto;border-right:0;border-bottom:1px solid #dfe2e8;-webkit-overflow-scrolling:touch}
  .mail-reader{position:static;inset:auto;z-index:auto;min-width:0;max-width:100%;overflow:auto;-webkit-overflow-scrolling:touch}
  .mail-reader-empty{display:grid;min-height:0}
  .mail-layout.is-composing{grid-template-rows:auto minmax(0,1fr)}.mail-layout.is-composing .mail-reader{grid-column:1;grid-row:2}
  .order-mail-section{min-height:0;overflow:hidden;border-radius:14px}.order-mail-section .mail-shell{width:100%;height:700px;min-height:0}
  .card-dialog-shell[data-card-mobile-view="mail"] .mail-toolbar{padding:9px 10px}
  .card-dialog-shell[data-card-mobile-view="mail"] .order-mail-section .mail-shell{height:100%}
  .mail-letter{min-width:0;padding:18px 14px}.mail-letter>header{grid-template-columns:minmax(0,1fr)}.mail-letter>header h3{font-size:20px}.mail-letter>header time{grid-column:1;grid-row:auto}.mail-letter dl div{grid-template-columns:48px minmax(0,1fr)}
  .mail-attachment-item{width:100%;min-width:0;max-width:100%}.mail-letter-actions,.mail-attachment-actions{flex-wrap:wrap}
  .mail-composer>label{grid-template-columns:56px minmax(0,1fr);padding:0 12px}.mail-from-row{grid-template-columns:72px minmax(0,1fr);padding:0 12px}.mail-recipient-field{grid-template-columns:1fr;padding:10px 12px}.mail-recipient-field>div{min-width:0}.mail-reply-context{grid-template-columns:minmax(0,1fr) auto;padding:10px 12px}.mail-reply-context>span:first-child{display:none}
  .mail-format-toolbar{padding:8px 12px;overflow-x:auto}.mail-format-toolbar button{flex:0 0 auto}.mail-rich-editor{padding:16px 14px}.mail-signature-preview{margin:0 14px 16px}.mail-composer-actions{flex-wrap:wrap;padding:12px 14px calc(12px + env(safe-area-inset-bottom,0px))}.mail-composer-actions small{flex:1 0 100%;order:3}.mail-send-button{min-height:44px}.mail-connect-panel{width:calc(100% - 24px);margin:20px auto;padding:18px}
}
@media(max-width:760px){.mail-attachment-picker{padding:12px}.mail-dropzone{grid-template-columns:auto minmax(0,1fr)}.mail-dropzone .secondary-button{grid-column:1/-1}.mail-order-file-browser-header{grid-template-columns:1fr}.mail-order-file-contents{grid-template-columns:1fr;min-height:230px;max-height:360px}.mail-order-file-toolbar>span{display:none}}
@media(max-width:760px){.notification-alert-stack{left:auto;right:12px;bottom:12px;width:calc(50vw - 24px);max-height:68dvh}.notification-alert-main{min-height:94px;padding:14px 48px 14px 14px}}
@media(max-width:760px){.communication-alert-stack{left:12px;bottom:12px;width:calc(100vw - 24px);max-height:48dvh}.communication-alert-main{min-height:112px;padding:14px 46px 14px 14px}}
@media(prefers-reduced-motion:reduce){.notification-alert{animation:none}}

/*
 * Delfin CRM visual theme
 * Direction: restrained Yandex Cloud / Gravity-style enterprise interface.
 * Scope contract: colors, shadows and typography only. Layout and behavior stay
 * in the original rules above.
 */
:root {
  --ink: #20252d;
  --muted: #667080;
  --line: #dfe3e8;
  --paper: #f4f6f8;
  --surface: #ffffff;
  --surface-strong: #eef2f6;
  --blue: #4e7fd8;
  --purple: #4e74b8;
  --purple-dark: #315b9d;
  --green: #64896c;
  --gold: #b58a42;
  --red: #b76360;
  --shadow: 0 18px 48px rgba(38, 49, 66, .12);
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, Arial, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body,
button,
input,
select,
textarea {
  font-family: Inter, Arial, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline-color: #4e7fd8 !important;
}

body {
  color: var(--ink);
  background: var(--paper);
}

.login-view {
  background: linear-gradient(125deg, #3f67a5, #6c91c5);
}

.login-panel-wrap {
  background: rgba(244, 247, 250, .97);
}

.login-panel,
.login-panel input {
  background: #fff;
  border-color: var(--line);
}

.login-panel {
  box-shadow: 0 18px 48px rgba(38, 49, 66, .14);
}

.login-copy h1,
.login-panel h2 {
  font-weight: 650;
}

.quote-author,
.login-panel label,
.environment-badge,
.eyebrow {
  font-weight: 600;
}

.environment-badge,
.eyebrow {
  color: #3f649d;
  background: #e8eef7;
}

.brand-lockup {
  color: #315b9d;
}

.brand-lockup img,
.brand-lockup .brand-full-logo {
  filter: drop-shadow(0 10px 18px rgba(48, 76, 116, .12));
}

.brand-lockup-login .brand-full-logo {
  filter: drop-shadow(0 8px 14px rgba(48, 76, 116, .10));
}

.brand-lockup strong,
.brand-quote h1 {
  font-weight: 700;
}

.brand-lockup-login {
  background: rgba(255, 255, 255, .96);
  border-color: rgba(255, 255, 255, .8);
  box-shadow: 0 18px 42px rgba(38, 49, 66, .18);
}

.system-banner {
  color: #fff;
  background: #9d5557;
  border-bottom-color: #c6a462;
}

.system-banner strong,
.system-status-button {
  font-weight: 650;
}

.system-banner .offline {
  color: #f4e6bd;
}

.topbar {
  background: linear-gradient(110deg, #fff 0%, #f5f7fa 54%, #eef3f8 100%);
  border-bottom-color: var(--line);
}

.calendar-launch-button {
  color: #416ba8;
  background: #fff;
  border-color: #cfd7e2;
  box-shadow: 0 9px 22px rgba(48, 76, 116, .11);
}

.calendar-launch-button:hover,
.calendar-launch-button.active {
  color: #fff;
  background: #4e74b8;
  border-color: #4e74b8;
  box-shadow: 0 12px 25px rgba(48, 76, 116, .21);
}

.brand-quote p {
  color: #506b91;
  font-weight: 600;
}

.system-status-button {
  color: #fff;
  background: #985255;
}

.user-pill,
.notification-bell {
  color: #5f6876;
  background: #fff;
  border-color: var(--line);
}

.role-dot {
  background: #6f9877;
}

.tabs-bar {
  background: #f8f9fb;
  border-bottom-color: var(--line);
}

.board-tabs {
  background: #fff;
  border-color: var(--line);
}

.tab-button,
.primary-button,
.secondary-button,
.ghost-button,
.danger-button,
.tiny-button {
  font-weight: 600;
}

.tab-button {
  color: #606a79;
  background: transparent;
}

.tab-button:hover {
  color: #315b9d;
  background: #edf2f8;
}

.tab-button.active,
.primary-button,
.mobile-menu-toggle {
  color: #fff;
  background: #4e74b8;
  box-shadow: 0 8px 18px rgba(48, 76, 116, .18);
}

.primary-button:hover {
  background: #3c639f;
}

.secondary-button {
  color: #3f649d;
  background: #fff;
  border-color: var(--line);
}

.secondary-button:hover,
.secondary-button.is-active {
  color: #315b9d;
  background: #edf2f8;
  border-color: #8da9d0;
}

.ghost-button {
  color: #667080;
  background: transparent;
  border-color: var(--line);
}

.danger-button {
  color: #fff;
  background: #b76360;
}

.archive-button span {
  background: #edf1f6;
}

.search-panel,
.search-panel input,
.search-panel select {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
}

.search-panel {
  box-shadow: 0 18px 48px rgba(38, 49, 66, .12);
}

.search-panel label {
  color: var(--muted);
  font-weight: 600;
}

.workspace-board {
  --board-tint: #f4f6f8;
  --board-tint-soft: #fafbfc;
  --board-line: #dfe3e8;
  --board-title: #354052;
  background: linear-gradient(180deg, var(--board-tint), var(--board-tint-soft));
  border-top-color: var(--board-line);
  border-bottom-color: var(--board-line);
}

.workspace-board[data-board-code="tasks"] {
  --board-tint: #f8f3f3;
  --board-tint-soft: #fcfafa;
  --board-line: #eadadb;
  --board-title: #76585b;
}

.workspace-board[data-board-code="orders"] {
  --board-tint: #f3f5f9;
  --board-tint-soft: #fafbfc;
  --board-line: #dbe1ea;
  --board-title: #4c6084;
}

.workspace-board[data-board-code="supply"] {
  --board-tint: #f1f6f7;
  --board-tint-soft: #f9fbfc;
  --board-line: #d5e2e5;
  --board-title: #52717b;
}

.workspace-board[data-board-code="projects"] {
  --board-tint: #f4f6f9;
  --board-tint-soft: #fafbfc;
  --board-line: #dce2e9;
  --board-title: #4d607d;
}

.workspace-board[data-board-code="finance"] {
  --board-tint: #f2f6f3;
  --board-tint-soft: #fafcfb;
  --board-line: #d7e2d9;
  --board-title: #55715c;
}

.board-summary h2 {
  color: var(--board-title);
  font-weight: 650;
}

.board-summary p {
  color: #667080;
}

.kanban-column {
  background: #f0f3f6;
  border-color: var(--line);
}

.column-header {
  color: #343c48;
  background: #fff;
  border-bottom-color: var(--line);
}

.column-header h3 {
  font-weight: 650;
}

.column-count {
  color: #526071;
  background: #edf1f5;
  font-weight: 650;
}

.column-create-popover {
  color: #fff;
  background: #4e74b8;
  box-shadow: 0 14px 26px rgba(48, 76, 116, .20);
}

.column-dropzone.is-card-drag-over {
  background: rgba(78, 127, 216, .07);
  box-shadow: inset 0 0 0 2px rgba(78, 127, 216, .20);
}

.kanban-orders .kanban-column[data-order-stage="1"] {
  --stage-color: #e8ddb8 !important;
  --stage-ink: #5d5337 !important;
  --stage-tint: #f8f5eb !important;
  --stage-card: #fdfbf5 !important;
}

.kanban-orders .kanban-column[data-order-stage="2"] {
  --stage-color: #cadcf3 !important;
  --stage-ink: #3d5f88 !important;
  --stage-tint: #f2f6fb !important;
  --stage-card: #fafcff !important;
}

.kanban-orders .kanban-column[data-order-stage="3"] {
  --stage-color: #d8d4e5 !important;
  --stage-ink: #58516d !important;
  --stage-tint: #f5f4f8 !important;
  --stage-card: #fbfafd !important;
}

.kanban-orders .kanban-column[data-order-stage="4"] {
  --stage-color: #cee3d3 !important;
  --stage-ink: #45634d !important;
  --stage-tint: #f1f7f2 !important;
  --stage-card: #f9fcfa !important;
}

.kanban-orders .kanban-column[data-order-stage] {
  background: var(--stage-tint);
  border-color: color-mix(in srgb, var(--stage-color) 58%, #d9dfe6);
  box-shadow: 0 10px 26px color-mix(in srgb, var(--stage-color) 10%, transparent);
}

.kanban-orders .kanban-column[data-order-stage] .column-header {
  color: var(--stage-ink);
  background: var(--stage-color);
  border-bottom-color: color-mix(in srgb, var(--stage-color) 72%, #aeb6c1);
}

.kanban-orders .kanban-column[data-order-stage] .column-header h3 {
  font-weight: 650;
}

.kanban-orders .kanban-column[data-order-stage] .column-count {
  color: var(--stage-ink);
  background: rgba(255, 255, 255, .48);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .58);
}

.kanban-orders .kanban-column[data-order-stage] .column-dropzone {
  background: linear-gradient(180deg, color-mix(in srgb, var(--stage-tint) 76%, #fff), var(--stage-tint));
}

.kanban-card {
  color: var(--ink);
  background: #fff;
  border-color: #dde3e8;
  box-shadow: 0 6px 16px rgba(38, 49, 66, .055);
}

.kanban-card::before {
  background: color-mix(in srgb, var(--card-accent, var(--purple)) 58%, #fff);
}

.kanban-orders .stage-order-card::before {
  background: color-mix(in srgb, var(--stage-color) 68%, #fff);
}

.kanban-card:hover {
  border-color: #8da9d0;
  box-shadow: 0 10px 22px rgba(38, 49, 66, .09);
}

.kanban-orders .stage-order-card {
  background: linear-gradient(145deg, var(--stage-card), color-mix(in srgb, var(--stage-card) 74%, #fff));
  border-color: color-mix(in srgb, var(--stage-color) 48%, #d8dfe6);
  box-shadow: 0 7px 18px rgba(38, 49, 66, .055);
}

.kanban-orders .stage-order-card:hover {
  border-color: color-mix(in srgb, var(--stage-color) 72%, #8296af);
  box-shadow: 0 12px 25px rgba(38, 49, 66, .09);
}

.kanban-orders .stage-order-card .card-customer {
  color: color-mix(in srgb, var(--ink) 72%, var(--stage-ink));
}

.kanban-card h4,
.kanban-card.order-card h4 {
  font-weight: 650;
}

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

.card-assignee-badge {
  font-weight: 600;
}

.card-assignee-badge-ilya {
  color: #625522;
  background: #eee3b7;
  border-color: #d6c88d;
  box-shadow: 0 5px 12px rgba(151, 131, 51, .12);
}

.card-assignee-badge-murysa {
  color: #4f5571;
  background: #e0e2ef;
  border-color: #c9ccdf;
}

.tag {
  color: var(--tag-ink, #fff);
  background: var(--tag-color, #4e7fd8);
  font-weight: 600;
}

.tag.red {
  color: #78504e;
  background: #f3e3e2;
}

.tag.gold {
  color: #6f5d38;
  background: #f2ead7;
}

.tag.green {
  color: #4f6955;
  background: #e3eee5;
}

.linked-tasks-preview {
  color: #3e5845;
  background: linear-gradient(135deg, #e6efe8, #f8fbf9);
  border-color: #cbdccf;
  border-left-color: #77987e;
}

.linked-task-preview-row {
  color: #3e5845;
  background: rgba(255, 255, 255, .88);
  border-color: #d7e3d9;
}

.linked-task-preview-row span {
  color: #6b786e;
  font-weight: 600;
}

.card-inline-note-preview {
  color: #75504d;
  background: #f8eeee;
  border-color: #d5aaa7;
  font-weight: 600;
}

.card-inline-note-editor textarea {
  color: #75504d;
  background: #fffafa;
  border-color: #d5aaa7;
  font-weight: 550;
}

.daily-task-text,
.daily-task-link-select {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
}

.quick-delete-button {
  color: #825653;
  background: #f3e4e3;
  border-color: #dfbfbd;
}

.daily-task-link-editor {
  background: #f5f8fb;
  border-color: #d8e0e9;
  border-left-color: #6d8cbd;
}

.daily-task-link-editor > span,
.daily-task-link-badge span,
.daily-task-calendar-copy {
  color: var(--muted);
  font-weight: 600;
}

.daily-task-link-badge {
  color: var(--ink);
  background: linear-gradient(90deg, #6d8cbd 0 5px, #f7f9fb 5px);
  border-color: #d5dee9;
}

.daily-task-calendar {
  color: #4c596c;
  background: linear-gradient(135deg, #f4f7fa, #fff);
  border-color: #d6dde6;
}

.daily-task-calendar:hover {
  border-color: #8da9d0;
  box-shadow: 0 7px 18px rgba(48, 76, 116, .11);
}

.daily-task-calendar.overdue {
  color: #7a5552;
  background: #f8eeee;
  border-color: #dcb9b6;
}

.daily-task-calendar.has-date .daily-task-calendar-date,
.notification-item .notification-task-due b {
  color: #a85653;
  text-decoration-color: #a85653;
  font-weight: 650;
}

.daily-task-overdue-label,
.notification-item .notification-task-due.overdue small {
  color: #fff;
  background: #ad5d59;
  border-color: #99504d;
  box-shadow: 0 3px 8px rgba(153, 80, 77, .16);
  font-weight: 650;
}

.daily-task-calendar-reminders {
  color: #667080;
  background: #edf1f5;
}

.daily-task-reminder-count {
  color: #fff;
  background: #b76360;
  border-color: #fff;
  font-weight: 650;
}

.daily-task-calendar-compact {
  background: #f7f1df;
  border-color: #d9c38a;
  box-shadow: 0 5px 12px rgba(132, 108, 48, .13);
}

.daily-task-calendar-compact:hover {
  background: #f3e8c9;
  border-color: #c7ac68;
  box-shadow: 0 8px 18px rgba(132, 108, 48, .18);
}

.project-task-card {
  background: linear-gradient(135deg, #fff, #f5f7fa);
  border-color: #d7dee8;
}

.project-task-icon {
  background: linear-gradient(180deg, rgba(255, 255, 255, .42), transparent), color-mix(in srgb, var(--card-accent) 58%, #fff);
  box-shadow: 0 8px 20px rgba(48, 76, 116, .11);
}

.project-task-title {
  font-weight: 650;
}

.archive-area {
  background: #f5f7fa;
}

.empty-archive {
  color: #4e6490;
  background: #fff;
  border-color: var(--line);
  font-weight: 600;
}

dialog {
  color: var(--ink);
  background: transparent;
}

dialog::backdrop {
  background: rgba(28, 35, 46, .62);
}

.dialog-shell {
  background: #f4f6f8;
  border-color: var(--line);
  box-shadow: 0 28px 90px rgba(28, 35, 46, .25);
}

.modal-header,
.modal-footer,
.form-section,
.documents-section {
  background: #fff;
  border-color: var(--line);
}

.modal-header h2,
.section-title {
  color: #354052;
  font-weight: 650;
}

.modal-field {
  color: var(--muted);
  font-weight: 600;
}

.card-form-column .modal-field input,
.card-form-column .modal-field select,
.card-form-column .modal-field textarea,
.label-tools input {
  color: var(--ink);
  background: #fff;
  border-color: #d8dee6;
  font-weight: 500;
}

.modal-field input:focus,
.modal-field select:focus,
.modal-field textarea:focus,
.calendar-task-fields input:focus,
.calendar-task-fields select:focus {
  outline-color: rgba(78, 127, 216, .28);
  border-color: #6f93ca;
}

.inn-lookup-status[data-tone="loading"] {
  color: #62769a;
}

.inn-lookup-status[data-tone="success"] {
  color: #5c8064;
}

.inn-lookup-status[data-tone="error"] {
  color: #a65b58;
}

.extra-info-panel {
  border-color: var(--line);
}

.extra-info-panel summary {
  color: #41679f;
  background: #edf2f8;
  font-weight: 600;
}

.linked-task-list button {
  color: var(--ink);
  background: #f7f9fb;
  border-color: var(--line);
  border-left-color: #77987e;
}

.linked-task-list .linked-task-complete-button {
  color: #fff;
  background: #4e7958;
  border-color: #4e7958;
}

.label-choice {
  background: color-mix(in srgb, var(--label-color) 11%, #fff);
  border-color: color-mix(in srgb, var(--label-color) 54%, #dfe3e8);
}

.label-toggle input:checked + span {
  color: var(--label-ink);
  background: var(--label-color);
}

.label-delete-button {
  color: #825653;
  background: #f7eeee;
  border-color: #e3c7c5;
}

.label-delete-button:hover {
  color: #fff;
  background: #a85a57;
  border-color: #a85a57;
}

.documents-launch {
  color: var(--ink);
  background: linear-gradient(135deg, #fff 0%, #f5f7fa 55%, #eff4f8 100%);
  border-color: #d5dce6;
  box-shadow: 0 12px 28px rgba(38, 49, 66, .08);
}

.documents-launch:hover {
  border-color: #8da9d0;
  box-shadow: 0 16px 34px rgba(38, 49, 66, .12);
}

.documents-launch-icon {
  background: linear-gradient(145deg,#6fa5ed,#3975c6);
  box-shadow: inset 0 -9px 15px rgba(31,74,135,.18),0 7px 15px rgba(50,91,151,.16);
}

.documents-launch strong,
.documents-launch b {
  color: #3f649d;
}

.archive-card-button {
  color: #5f563d;
  background: #f5ecd2;
  border-color: #d8c48a;
  box-shadow: 0 5px 14px rgba(138, 113, 46, .11);
  font-weight: 600;
}

.archive-card-button span {
  color: #fff;
  background: #927d45;
  font-weight: 650;
}

.archive-card-button:hover {
  color: #554a2e;
  background: #f0e2b9;
  border-color: #bca35d;
}

.file-folder,
.document-row {
  background: #fff;
  border-color: var(--line);
}

.file-folder > header {
  background: #fff;
  border-bottom-color: var(--line);
}

.document-icon {
  color: #fff;
  background: #5c79a8;
  font-weight: 650;
}

.document-image .document-icon {
  background: #5f8f9b;
}

.document-pdf .document-icon {
  background: #b76360;
}

.document-other .document-icon {
  background: #717b88;
}

.document-row-actions button,
.document-action {
  color: #41679f;
  background: #fff;
  border-color: var(--line);
  font-weight: 600;
}

.document-row-actions .danger-link {
  color: #a85a57;
  border-color: #e3c7c5;
}

.legacy-import-note {
  color: #626b78;
  background: #f4f6f8;
  border-color: #cfd6df;
}

.decision-queue {
  color: #765f42;
  background: #f8f2e8;
  border-color: #dfceb4;
}

.upload-report {
  color: #526d58;
  background: #f0f6f1;
  border-color: #cdddcf;
}

.order-stage-card-dialog[data-order-stage="1"] {
  --dialog-stage-color: #e8ddb8 !important;
  --dialog-stage-ink: #5d5337 !important;
}

.order-stage-card-dialog[data-order-stage="2"] {
  --dialog-stage-color: #cadcf3 !important;
  --dialog-stage-ink: #3d5f88 !important;
}

.order-stage-card-dialog[data-order-stage="3"] {
  --dialog-stage-color: #d8d4e5 !important;
  --dialog-stage-ink: #58516d !important;
}

.order-stage-card-dialog[data-order-stage="4"] {
  --dialog-stage-color: #cee3d3 !important;
  --dialog-stage-ink: #45634d !important;
}

.order-stage-card-dialog .modal-header {
  color: var(--dialog-stage-ink);
  background: var(--dialog-stage-color);
  border-bottom-color: color-mix(in srgb, var(--dialog-stage-color) 72%, #aeb6c1);
}

.order-stage-card-dialog .modal-header p {
  color: color-mix(in srgb, var(--dialog-stage-ink) 80%, transparent);
  font-weight: 550;
}

.order-stage-card-dialog .modal-header .icon-button {
  color: var(--dialog-stage-ink);
  background: rgba(255, 255, 255, .38);
  border-color: rgba(255, 255, 255, .55);
}

.status-grid > div,
.status-dialog header,
.status-dialog footer {
  background: #fff;
  border-color: var(--line);
}

.local-sync-card {
  background: #f7f8fa;
  border-color: #dce1e7;
}

.local-sync-heading [data-local-sync-dot] {
  background: #87909d;
}

.local-sync-card[data-sync-state="Синхронизировано"] [data-local-sync-dot],
.local-sync-card[data-sync-state="ready"] [data-local-sync-dot] {
  background: #64896c;
}

.local-sync-card[data-sync-state="Синхронизация"] [data-local-sync-dot] {
  background: #5d86c5;
}

.local-sync-card[data-sync-state="Ожидает интернета"] [data-local-sync-dot] {
  background: #b9904c;
}

.local-sync-card[data-sync-state="Конфликт"] [data-local-sync-dot],
.local-sync-card[data-sync-state="Ошибка"] [data-local-sync-dot],
.local-sync-card[data-sync-state="unavailable"] [data-local-sync-dot] {
  background: #b76360;
}

.notification-bell span {
  color: #fff;
  background: #b76360;
  border-color: #fff;
  font-weight: 650;
}

.notification-bell.has-unread {
  box-shadow: 0 0 0 3px rgba(183, 99, 96, .11);
}

.notification-bell.notification-arrived {
  box-shadow: 0 0 0 5px rgba(183, 99, 96, .14);
}

.notification-center {
  background: #fff;
  border-color: #dfe3e8;
  box-shadow: 0 24px 70px rgba(38, 49, 66, .19);
}

.notification-center > header,
.notification-item {
  background: #fff;
  border-bottom-color: #e7eaee;
}

.notification-center header button {
  color: #41679f;
}

.notification-center .notification-close-button {
  color: #536071;
  background: #edf1f5;
}

.notification-center .notification-close-button:hover {
  background: #e2e7ed;
}

.notification-item.unread {
  background: #f1f5fa;
  border-left-color: #7899c8;
}

.notification-item span,
.notification-item time,
.notification-center > div > p {
  color: #697381;
}

.notification-alert {
  border-color: #8da9d0;
  background: linear-gradient(135deg, #fff, #f4f7fa);
  box-shadow: 0 20px 50px rgba(38, 49, 66, .22), 0 0 0 4px rgba(255, 255, 255, .76);
}

.notification-alert-main {
  color: #2c333d;
  background: transparent;
}

.notification-alert-main:hover {
  background: rgba(78, 116, 184, .05);
}

.notification-alert-main > span:not(.notification-alert-label) {
  color: #667080;
}

.notification-alert-main small {
  color: #5576a8;
  font-weight: 600;
}

.notification-alert-label {
  color: #9a5957;
  font-weight: 650;
}

.notification-alert-close {
  color: #4e6490;
  background: #fff;
  border-color: #d5dde7;
}

.notification-alert-close:hover {
  color: #fff;
  background: #a85a57;
  border-color: #a85a57;
}

.calendar-shell {
  background: #f4f6f8;
}

.calendar-close-button,
.calendar-navigation .primary-button,
.calendar-modes button.active {
  color: #fff;
  background: #4e74b8;
  border-color: #4e74b8;
}

.calendar-period-switcher button,
.calendar-navigation button,
.calendar-modes button,
.calendar-filters > button,
.calendar-filters select {
  color: #41679f;
  background: #fff;
  border-color: #d8dee6;
  font-weight: 600;
}

.calendar-period-switcher button:hover {
  background: #edf2f8;
  border-color: #8da9d0;
}

.calendar-header h2,
.calendar-metrics strong {
  color: #354052;
  font-weight: 650;
}

.calendar-header p,
.calendar-metrics span,
.calendar-filters label > span,
.calendar-weekdays b,
.calendar-detailed-event small,
.calendar-detailed-event em,
.calendar-list-task small,
.calendar-list-task time {
  color: #697381;
}

.calendar-metrics > div,
.calendar-content,
.calendar-day,
.calendar-week-grid > section > header,
.calendar-detailed-event,
.calendar-list-task {
  background: #fff;
  border-color: #dfe3e8;
}

.calendar-content {
  box-shadow: 0 10px 35px rgba(38, 49, 66, .065);
}

.calendar-metrics .danger strong {
  color: #a85a57;
}

.calendar-metrics .warning strong {
  color: #a77d40;
}

.calendar-day.outside,
.calendar-empty-slot {
  color: #9098a3;
  background: #f8f9fa;
}

.calendar-day.today {
  background: #f5f7ec;
  box-shadow: inset 0 0 0 2px #a9a96b;
}

.calendar-day.today .calendar-day-number {
  color: #4f5236;
  background: #dfe2b7;
}

.calendar-event {
  background: #e8eef7;
  border-left-color: #6d8cbd;
}

.calendar-type-dot {
  background: #6d8cbd;
}

.calendar-list > section > header {
  background: #edf1f5;
  border-top-color: #dfe3e8;
}

.calendar-list-task.priority-high {
  border-left-color: #b9904c;
}

.calendar-list-task.priority-urgent {
  border-left-color: #b76360;
}

.calendar-task-dialog {
  background: rgba(244, 247, 250, .97);
  border-color: rgba(255, 255, 255, .82);
  box-shadow: 0 30px 90px rgba(28, 35, 46, .32);
}

.calendar-task-dialog::backdrop {
  background: linear-gradient(135deg, rgba(28, 35, 46, .58), rgba(51, 76, 111, .42));
}

.calendar-task-form {
  background: linear-gradient(145deg, rgba(255, 255, 255, .95), rgba(236, 241, 247, .92));
}

.calendar-task-form > header,
.calendar-task-form > footer {
  background: rgba(255, 255, 255, .86);
}

.calendar-task-body {
  background: linear-gradient(180deg, rgba(249, 250, 252, .78), rgba(238, 242, 247, .88));
}

.calendar-task-fields input,
.calendar-task-fields select {
  background: rgba(255, 255, 255, .94);
  border-color: #d5dce5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .88);
}

.calendar-task-name,
.calendar-reminders,
.calendar-task-fields .calendar-checkbox {
  background: rgba(255, 255, 255, .72);
  border-color: #d9e0e8;
}

.calendar-task-name {
  box-shadow: 0 8px 22px rgba(38, 49, 66, .045);
}

.calendar-task-fields input[type="checkbox"] {
  background: #fff;
  border-color: #7d8b9e;
  box-shadow: 0 2px 6px rgba(38, 49, 66, .08);
}

.calendar-task-fields input[type="checkbox"]:checked {
  background: #4e74b8;
  border-color: #4e74b8;
}

.calendar-task-fields input[type="checkbox"]:focus-visible {
  outline-color: rgba(78, 127, 216, .32);
}

.calendar-task-fields label > span,
.calendar-reminders legend,
.calendar-task-name > span {
  color: #667080;
  font-weight: 600;
}

.calendar-reminders legend {
  color: #41679f;
  font-weight: 650;
}

.calendar-reminders label {
  color: #354052;
  font-weight: 550;
}

.calendar-reminders label:hover {
  background: rgba(78, 116, 184, .05);
}

.calendar-task-brand {
  color: #fff;
  background: linear-gradient(110deg, #41699f, #6687b5);
  font-weight: 600;
}

.calendar-create-result,
.calendar-datetime-field,
.calendar-datetime-summary {
  background: linear-gradient(145deg, #fff, #f2f5f8);
  border-color: #d6dee7;
}

.calendar-create-result strong,
.calendar-datetime-label,
.calendar-datetime-summary strong {
  color: #3d5f88;
  font-weight: 650;
}

.calendar-create-result span,
.calendar-datetime-summary small,
.calendar-datetime-quick > label span,
.calendar-datetime-hint {
  color: #667080;
  font-weight: 550;
}

.calendar-create-column {
  padding: 13px;
  border: 2px solid #8ca7ca;
  border-radius: 12px;
  background: #f3f7fc;
}

.calendar-create-column > span {
  color: #315b8f !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-transform: none !important;
}

.calendar-create-column select {
  min-height: 48px;
  color: #273b56;
  font-size: 15px;
  font-weight: 700;
}

.calendar-create-column small,
.calendar-linked-order small {
  color: #667080;
  font-size: 11px;
  line-height: 1.4;
}

.calendar-linked-order {
  display: grid;
  gap: 7px;
  padding: 13px;
  border: 1px solid #cfd9e6;
  border-radius: 14px;
  background: linear-gradient(145deg, #fff, #f2f6fb);
  box-shadow: 0 10px 24px rgba(47, 66, 91, .07);
}

.calendar-linked-order-label {
  color: #315b8f !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-transform: none !important;
}

.calendar-order-picker {
  position: relative;
  display: grid;
  gap: 7px;
}

.calendar-order-picker-trigger {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 13px;
  color: #273b56;
  text-align: left;
  border: 1px solid #bfcddd;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(47, 66, 91, .06);
  cursor: pointer;
}

.calendar-order-picker-trigger > span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.calendar-order-picker-trigger small {
  color: #758195;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.calendar-order-picker-trigger strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-order-picker-trigger > b {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  color: #41699f;
  border-radius: 9px;
  background: #e7eef7;
  font-size: 18px;
  transition: transform .16s ease;
}

.calendar-order-picker-trigger[aria-expanded="true"] {
  border-color: #6f91bd;
  box-shadow: 0 0 0 3px rgba(78, 116, 184, .13);
}

.calendar-order-picker-trigger[aria-expanded="true"] > b {
  transform: rotate(180deg);
}

.calendar-order-picker-menu {
  max-height: 330px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #cdd8e5;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(35, 50, 70, .16);
}

.calendar-order-picker-menu[hidden] {
  display: none;
}

.calendar-order-picker-group + .calendar-order-picker-group {
  border-top: 1px solid #e4e9ef;
}

.calendar-order-picker-group > header {
  position: sticky;
  z-index: 1;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  color: #354052;
  background: linear-gradient(90deg, #edf3f9, #f7f9fc);
  border-bottom: 1px solid #dce4ed;
}

.calendar-order-picker-group > header span {
  color: #66809f;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.calendar-order-picker-group > header strong {
  font-size: 12px;
}

.calendar-order-picker-group > div {
  display: grid;
}

.calendar-order-picker-group button {
  width: 100%;
  min-height: 46px;
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  color: #2f3b4c;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #edf0f4;
  background: #fff;
  cursor: pointer;
}

.calendar-order-picker-group button:last-child {
  border-bottom: 0;
}

.calendar-order-picker-group button:hover,
.calendar-order-picker-group button:focus-visible {
  outline: 0;
  background: #edf4fb;
}

.calendar-order-picker-group button[aria-selected="true"] {
  color: #274d7d;
  background: #e3edf8;
}

.calendar-order-picker-group button strong {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.calendar-order-picker-group button small {
  color: #6f85a0;
  font-size: 9px;
  font-weight: 700;
}

.calendar-order-picker-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7d9cc2;
  box-shadow: 0 0 0 3px #e5edf7;
}

.calendar-order-picker-empty {
  margin: 0;
  padding: 18px;
  color: #667080;
  text-align: center;
}

.calendar-task-placement {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #d5dce5;
  border-left: 5px solid #6d8cbd;
  border-radius: 11px;
  background: #fff;
}

.calendar-task-placement > span {
  color: #667080;
  font-size: 10px;
  font-weight: 650;
  text-transform: uppercase;
}

.calendar-task-placement strong {
  color: #354052;
  font-size: 16px;
}

.calendar-task-placement small {
  color: #667080;
  font-size: 11px;
  line-height: 1.4;
}

.calendar-task-delete {
  flex: 0 0 auto;
}

@media (max-width: 760px) {
  .calendar-task-form > footer.calendar-task-footer-delete {
    display: grid;
    grid-template-columns: 1fr;
  }

  .calendar-task-form > footer.calendar-task-footer-delete > div {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .calendar-task-form > footer.calendar-task-footer-delete button {
    min-width: 0;
    padding: 0 8px;
  }
}

.calendar-datetime-field {
  box-shadow: 0 14px 34px rgba(38, 49, 66, .085), inset 0 1px 0 #fff;
}

.calendar-datetime-summary {
  box-shadow: 0 7px 18px rgba(38, 49, 66, .055);
}

.calendar-datetime-icon {
  background: linear-gradient(145deg, #f7f2df, #e9ddb1);
  border-color: #d2c184;
  box-shadow: 0 7px 16px rgba(132, 108, 48, .13);
}

.calendar-datetime-quick > button,
.calendar-datetime-quick input[type="date"] {
  color: #41679f;
  background: #fff;
  border-color: #d5dde7;
  box-shadow: 0 4px 10px rgba(38, 49, 66, .045);
  font-weight: 600;
}

.calendar-datetime-quick > button:hover,
.calendar-week-add:hover {
  color: #fff;
  background: #4e74b8;
  border-color: #4e74b8;
}

.calendar-week-add {
  color: #41679f;
  background: #edf2f8;
  border-color: #cfd9e6;
}

.calendar-datetime-wheels {
  background: linear-gradient(145deg, #2f3c4d, #465a73 62%, #34465b);
  border-color: rgba(255, 255, 255, .17);
  box-shadow: 0 16px 34px rgba(28, 35, 46, .22), inset 0 1px 0 rgba(255, 255, 255, .13);
}

.calendar-wheel header {
  color: #dce4ee;
  font-weight: 650;
}

.calendar-wheel-arrow {
  color: #eef3f8;
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .14);
}

.calendar-wheel-arrow:hover {
  color: #f3e7bd;
  background: rgba(224, 205, 143, .13);
  border-color: rgba(224, 205, 143, .58);
}

.calendar-wheel-viewport {
  background: rgba(21, 28, 37, .34);
  border-color: rgba(255, 255, 255, .13);
}

.calendar-wheel-viewport::before {
  background: linear-gradient(90deg, rgba(196, 213, 235, .13), rgba(255, 255, 255, .09), rgba(196, 213, 235, .13));
  border-color: rgba(196, 213, 235, .68);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 0 24px rgba(136, 171, 216, .13);
}

.calendar-wheel-viewport::after {
  background: linear-gradient(180deg, rgba(27, 35, 46, .97) 0, rgba(27, 35, 46, .18) 32%, transparent 42%, transparent 58%, rgba(27, 35, 46, .18) 68%, rgba(27, 35, 46, .97) 100%);
}

.calendar-wheel-scroll {
  scrollbar-color: #8297b1 rgba(255, 255, 255, .06);
}

.calendar-wheel-scroll::-webkit-scrollbar-thumb {
  background: #8297b1;
  border-color: transparent;
}

.calendar-wheel-option {
  color: #b9c4d1;
}

.calendar-wheel-option strong {
  font-weight: 600;
}

.calendar-wheel-option small {
  color: #aeb9c7;
  font-weight: 550;
}

.calendar-wheel-option.active {
  color: #fff;
}

.calendar-wheel-option.active small,
.calendar-wheel-hour .calendar-wheel-option.active strong,
.calendar-wheel-minute .calendar-wheel-option.active strong {
  color: #e9ddb1;
}

.calendar-datetime-hint span {
  color: #41679f;
  background: #e8eef7;
}

.communications-card {
  background: #f7f3e7;
  border-color: #d7c58d;
}

.communications-heading span {
  color: #fff;
  background: #4e74b8;
  font-weight: 650;
}

.communications-boundary,
.communications-list > p,
.mail-send-status {
  color: #6d6553;
}

.communication-message {
  background: #fff;
  border-color: #e3ded0;
}

.communication-message.outgoing {
  border-left-color: #5d86c5;
}

.communication-message.incoming {
  border-left-color: #64896c;
}

.mock-mail-form {
  border-top-color: #ddd3b4;
}

.mock-mail-form label {
  font-weight: 600;
}

.mock-mail-form input,
.mock-mail-form textarea {
  background: #fff;
  border-color: #d3c9aa;
}

.communications-error {
  color: #a85a57 !important;
}

.mail-shell {
  background: #f4f6f8;
  border-color: #dfe3e8;
  box-shadow: 0 30px 100px rgba(28, 35, 46, .32);
}

.mail-toolbar,
.mail-message-list,
.mail-reader,
.mail-list-item,
.mail-account-card {
  background: #fff;
  border-color: #dfe3e8;
}

.mail-sidebar {
  background: #eef2f5;
  border-right-color: #dfe3e8;
}

.mail-folder-button {
  color: #46515f;
  background: transparent;
  font-weight: 600;
}

.mail-folder-button:hover,
.mail-folder-button.is-active {
  color: #315b9d;
  background: #dfe8f4;
}

.mail-account-card span {
  color: #5c8064;
}

.mail-account-card small {
  color: #8a6f3e;
}

.mail-list-heading,
.mail-composer-actions {
  background: rgba(255, 255, 255, .96);
  border-color: #e5e8ec;
}

.mail-list-item {
  color: #28313d;
  border-bottom-color: #eaedf0;
}

.mail-list-item:hover {
  background: #f6f8fa;
}

.mail-list-item.is-selected {
  background: #e8eef7;
  box-shadow: inset 4px 0 #5f82b7;
}

.mail-list-item span {
  font-weight: 600;
}

.mail-list-item em {
  color: #5a759d;
  font-weight: 600;
}

.mail-direction.incoming {
  color: #4f6955;
  background: #e3eee5;
}

.mail-direction.outgoing {
  color: #466775;
  background: #e4f0f3;
}

.mail-attachments > .mail-attachment-item {
  background: #f3f6f9;
  border-color: #dce2e8;
}

.mail-composer input,
.mail-composer textarea {
  background: #fff;
}

.file-manager-dialog,
.fm-shell {
  color: #29313b;
  background: #f4f6f8;
}

.fm-titlebar {
  background: linear-gradient(#fafbfc, #edf0f3);
  border-bottom-color: #cfd5dc;
}

.fm-close,
.fm-toolbar .fm-view-switch button[aria-pressed="true"],
.fm-sidebar-folder.active {
  color: #fff;
  background: #4e74b8;
  border-color: #41679f;
}

.fm-toolbar {
  background: #f1f3f6;
  border-bottom-color: #d1d6dd;
}

.fm-toolbar button,
.fm-toolbar-button,
.fm-toolbar select {
  color: #3c4653;
  background: linear-gradient(#fff, #eef1f4);
  border-color: #cfd5dc;
}

.fm-toolbar button:hover,
.fm-toolbar-button:hover {
  background: #fff;
  border-color: #aeb8c4;
}

.fm-toolbar .fm-delete {
  color: #a85a57;
}

.fm-sidebar {
  background: rgba(229, 233, 238, .94);
  border-right-color: #cfd5dc;
}

.fm-sidebar-folder {
  color: #3d4652;
  background: transparent;
}

.fm-sidebar-folder:hover {
  background: rgba(255, 255, 255, .62);
}

.fm-sidebar-folder span {
  color: #667b99;
}

.fm-storage-note {
  color: #566171;
  background: rgba(255, 255, 255, .56);
  border-color: rgba(91, 105, 123, .14);
}

.fm-main,
.fm-pathbar {
  background: #fff;
}

.fm-pathbar {
  border-bottom-color: #dfe3e8;
}

.fm-pathbar nav button {
  color: #4e5866;
  background: transparent;
}

.fm-pathbar nav button:hover {
  background: #edf2f8;
}

.fm-pathbar select {
  color: #414a56;
  background: #fff;
  border-color: #d1d7df;
}

.fm-content:focus-visible {
  outline-color: rgba(78, 127, 216, .22);
}

.fm-content.is-drag-over {
  background: #edf4fc;
  outline-color: rgba(78, 127, 216, .27);
}

.fm-list-head {
  color: #6d7683;
  background: #f6f8fa;
  border-bottom-color: #d8dde3;
}

.fm-node-row {
  border-bottom-color: #eceff2;
}

.fm-node-row:nth-child(odd) {
  background: #fafbfc;
}

.fm-node-row:hover {
  background: #edf3fa;
}

.fm-node-row.selected {
  color: #fff;
  background: #5680bc;
}

.fm-node-row.is-drag-over {
  color: #29313b;
  background: #dfeafa;
  outline-color: #5d86c5;
}

.fm-node-check input,
.fm-list-head input {
  accent-color: #5680bc;
}

.fm-file-icon {
  color: #fff;
  background: #74808e;
  font-weight: 650;
}

.fm-file-icon.folder {
  background: linear-gradient(#e8d8a6, #d7b967);
  box-shadow: inset 0 -8px 10px rgba(126, 99, 36, .10);
}

.fm-file-icon.office {
  background: #4e79a3;
}

.fm-file-icon.pdf {
  background: #b76360;
}

.fm-file-icon.image {
  background: #5f8f9b;
}

.fm-row-actions button,
.fm-row-action {
  color: #465a77;
  background: rgba(255, 255, 255, .9);
  border-color: #d2d9e2;
  font-weight: 600;
}

.fm-icon-tile {
  color: #29313b;
  background: transparent;
  border-color: transparent;
}

.fm-icon-tile:hover {
  background: rgba(78, 127, 216, .065);
}

.fm-icon-tile.selected {
  color: #fff;
  background: #5680bc;
  border-color: #4971aa;
  box-shadow: 0 3px 12px rgba(48, 76, 116, .17);
}

.fm-icon-tile:focus-visible,
.fm-icon-tile.selected:focus-visible {
  outline-color: rgba(78, 127, 216, .30);
}

.fm-icon-tile.is-drag-over {
  color: #29313b;
  background: #dfeafa;
  border-color: #5d86c5;
}

.fm-icon-name {
  font-weight: 600;
}

.fm-icon-meta,
.fm-icon-date {
  color: #737d8a;
}

.fm-folder-tab,
.fm-empty-folder::before {
  background: #cdb26c;
}

.fm-folder-body,
.fm-empty-folder {
  background: linear-gradient(155deg, #eadcae, #d9bd72);
  border-color: rgba(139, 111, 43, .22);
  box-shadow: 0 8px 18px rgba(112, 89, 35, .12), inset 0 1px 0 rgba(255, 255, 255, .58);
}

.fm-folder-mosaic {
  background: rgba(255, 255, 255, .80);
  box-shadow: 0 2px 7px rgba(76, 65, 42, .15);
}

.fm-mosaic-cell,
.fm-file-type {
  color: #fff;
  background: #737d8a;
  font-weight: 650;
}

.fm-mosaic-cell.office.word,
.fm-file-visual.office.word .fm-file-type {
  background: #4e79a3;
}

.fm-mosaic-cell.office.excel,
.fm-file-visual.office.excel .fm-file-type {
  background: #5c876d;
}

.fm-mosaic-cell.pdf,
.fm-file-visual.pdf .fm-file-type {
  background: #b76360;
}

.fm-mosaic-cell.image,
.fm-file-visual.image .fm-file-type {
  background: #5f8f9b;
}

.fm-file-visual.other.archive .fm-file-type {
  background: #8b765a;
}

.fm-file-visual.other.cad .fm-file-type {
  background: #716587;
}

/* Compact local time and weather, aligned below Archive with the daily tasks heading. */
.workspace-board[data-board-code="tasks"] .board-summary {
  align-items: stretch;
  gap: 24px;
}

.workspace-board[data-board-code="tasks"] .board-summary > :first-child {
  align-self: center;
  min-width: 220px;
}

.daily-brief {
  width: min(100%, 500px);
  min-width: 455px;
  display: grid;
  grid-template-columns: 226px minmax(220px, 1fr);
  gap: 8px;
  margin-left: auto;
  color: #354052;
}

.digital-clock,
.weather-today {
  min-height: 84px;
  border: 1px solid rgba(91, 113, 140, .34);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(41, 54, 72, .09), inset 0 1px 0 rgba(255, 255, 255, .78);
}

.digital-clock {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
  justify-items: center;
  padding: 9px 14px 7px;
  background:
    radial-gradient(circle at 15% -12%, rgba(224, 192, 112, .22), transparent 39%),
    radial-gradient(circle at 96% 104%, rgba(95, 132, 183, .17), transparent 46%),
    linear-gradient(145deg, #ffffff, #edf2f7);
  border-color: #cad6e4;
}

.digital-clock::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #6688b8, #98afcf 58%, #c9ad69);
}

.digital-clock-face {
  height: 51px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #4e74b8;
}

.segment-digit {
  position: relative;
  width: 26px;
  height: 47px;
  flex: 0 0 26px;
}

.segment {
  position: absolute;
  display: block;
  background: rgba(78, 116, 184, .085);
  transition: background-color .18s ease, box-shadow .18s ease;
}

.segment.is-on {
  background: #557db8;
  box-shadow: 0 0 5px rgba(85, 125, 184, .28);
}

.segment-a,
.segment-d,
.segment-g {
  left: 4px;
  width: 18px;
  height: 5px;
  clip-path: polygon(14% 0, 86% 0, 100% 50%, 86% 100%, 14% 100%, 0 50%);
}

.segment-a { top: 0; }
.segment-g { top: 21px; }
.segment-d { bottom: 0; }

.segment-b,
.segment-c,
.segment-e,
.segment-f {
  width: 5px;
  height: 19px;
  clip-path: polygon(50% 0, 100% 14%, 100% 86%, 50% 100%, 0 86%, 0 14%);
}

.segment-b { top: 4px; right: 0; }
.segment-c { right: 0; bottom: 4px; }
.segment-e { left: 0; bottom: 4px; }
.segment-f { top: 4px; left: 0; }

.digital-clock-colon {
  width: 7px;
  height: 36px;
  display: flex;
  flex: 0 0 7px;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  opacity: .7;
  transition: opacity .2s ease;
}

.digital-clock-colon.is-tick { opacity: 1; }

.digital-clock-colon i {
  width: 5px;
  height: 5px;
  display: block;
  background: #557db8;
  border-radius: 2px;
  box-shadow: 0 0 5px rgba(85, 125, 184, .24);
}

.digital-clock-date {
  color: #718096;
  font-size: 10px;
  font-weight: 560;
  letter-spacing: .01em;
  text-transform: capitalize;
}

.weather-today {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 25px;
  gap: 8px;
  align-items: center;
  padding: 9px 9px 8px 10px;
  color: #314155;
  background:
    radial-gradient(circle at 10% 0, rgba(116, 157, 205, .13), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(239, 244, 249, .98));
}

.weather-today-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: #5e7fa8;
}

.weather-today-icon svg {
  width: 48px;
  height: 44px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}

.weather-today-icon .weather-cloud {
  fill: #dfe9f2;
  stroke: #647f9f;
}

.weather-today-icon .weather-sun {
  fill: #f3dda1;
  stroke: #c29a41;
}

.weather-today-icon .weather-lightning {
  fill: #e7bd56;
  stroke: #b3872e;
}

.weather-today-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.weather-today-top {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.weather-temperature {
  flex: 0 0 auto;
  color: #2f435b;
  font-size: 23px;
  font-weight: 720;
  line-height: 1;
  letter-spacing: -.04em;
}

.weather-condition {
  min-width: 0;
  color: #485c72;
  overflow: hidden;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weather-range {
  color: #758396;
  font-size: 10px;
  white-space: nowrap;
}

.weather-source {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  align-self: start;
  color: #708095;
  background: rgba(255, 255, 255, .72);
  border: 1px solid #d4dde7;
  border-radius: 999px;
  font-size: 7px;
  font-weight: 750;
  letter-spacing: .02em;
  text-decoration: none;
}

.weather-source:hover {
  color: #315b9d;
  border-color: #9db2cd;
}

.weather-today.is-loading .weather-today-copy,
.weather-today.is-loading .weather-today-icon {
  opacity: .72;
}

.weather-today.is-unavailable .weather-today-icon {
  color: #8a96a5;
  filter: grayscale(1);
}

.weather-today.is-stale .weather-range::after {
  content: " · обновляется";
}

@media (max-width: 980px) {
  .workspace-board[data-board-code="tasks"] .board-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .workspace-board[data-board-code="tasks"] .board-summary > :first-child {
    align-self: auto;
  }

  .daily-brief {
    width: 100%;
    min-width: 0;
    margin-left: 0;
    grid-template-columns: minmax(200px, 226px) minmax(220px, 1fr);
  }
}

@media (max-width: 520px) {
  .daily-brief {
    grid-template-columns: minmax(124px, .86fr) minmax(156px, 1.14fr);
    gap: 6px;
  }

  .digital-clock,
  .weather-today {
    min-height: 69px;
    border-radius: 10px;
  }

  .digital-clock {
    grid-template-columns: 1fr;
    padding: 7px 7px 6px;
  }

  .digital-clock-face {
    justify-self: center;
    transform: scale(.86);
    transform-origin: center;
  }

  .digital-clock-caption { display: none; }
  .digital-clock-date {
    max-width: 100%;
    overflow: hidden;
    font-size: 8px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .weather-today {
    grid-template-columns: 37px minmax(0, 1fr);
    gap: 5px;
    padding: 7px 7px 6px;
  }

  .weather-today-icon,
  .weather-today-icon svg {
    width: 37px;
    height: 37px;
  }

  .weather-temperature { font-size: 19px; }
  .weather-condition { font-size: 9px; }
  .weather-range { font-size: 8px; }
  .weather-source {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    font-size: 6px;
  }
}

/* A wider, calmer masthead: the quote owns the full upper line and controls sit below it. */
@media (min-width: 761px) {
  .topbar {
    min-height: 154px;
    display: grid;
    grid-template-columns: 64px clamp(300px, 31vw, 420px) minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: clamp(22px, 2.8vw, 44px);
    row-gap: 9px;
    align-items: center;
    padding: 20px 36px;
  }

  .topbar .calendar-launch-button {
    grid-column: 1;
    grid-row: 1 / 3;
  }

  .topbar .brand-row {
    display: contents;
  }

  .topbar .brand-lockup {
    min-width: 0;
    grid-column: 2;
    grid-row: 1 / 3;
  }

  .topbar .brand-lockup .brand-full-logo {
    width: min(100%, 420px);
  }

  .topbar .brand-quote {
    min-width: 0;
    grid-column: 3;
    grid-row: 1;
    align-self: end;
  }

  .topbar .brand-quote h1 {
    width: 100%;
    max-width: none;
    margin: 0;
    color: #2d3540;
    font-size: clamp(22px, 2vw, 32px);
    font-weight: 680;
    line-height: 1.05;
    letter-spacing: -.025em;
    text-wrap: balance;
  }

  .topbar .brand-quote p {
    margin: 5px 0 0;
    font-size: 12px;
  }

  .topbar .topbar-actions {
    min-width: 0;
    grid-column: 3;
    grid-row: 2;
    align-self: start;
    justify-content: flex-end;
  }
}

@media (min-width: 1220px) {
  .topbar .brand-quote h1 {
    white-space: nowrap;
  }
}

@media (max-width: 760px) {
  .topbar {
    position: relative;
    min-height: 0;
    display: block;
    padding: 14px 14px 16px;
  }

  .topbar .calendar-launch-button {
    position: absolute;
    z-index: 2;
    top: 14px;
    left: 14px;
    width: 52px;
    height: 52px;
    padding: 9px;
  }

  .topbar .calendar-launch-button svg {
    width: 31px;
    height: 31px;
  }

  .topbar .brand-row {
    min-width: 0;
    display: grid;
    gap: 7px;
    padding-top: 54px;
  }

  .topbar .brand-lockup {
    min-width: 0;
  }

  .topbar .brand-lockup .brand-full-logo {
    width: min(320px, 84vw);
  }

  .topbar .brand-quote h1 {
    max-width: 370px;
    color: #2d3540;
    font-size: clamp(22px, 7vw, 27px);
    font-weight: 680;
    line-height: 1.09;
    letter-spacing: -.02em;
    text-wrap: balance;
  }

  .topbar .brand-quote p {
    margin-top: 4px;
    font-size: 12px;
  }

  .topbar .topbar-actions {
    top: 14px;
    right: 14px;
  }
}

/* Calendar task form uses the same light blue-gray material as the CRM. */
.calendar-datetime-wheels {
  border-color: #d3dde8;
  background: linear-gradient(145deg, #f8fafc, #eaf0f6 62%, #f4f7fa);
  box-shadow: 0 13px 30px rgba(39, 55, 76, .12), inset 0 1px 0 #fff;
}

.calendar-wheel header {
  color: #526278;
}

.calendar-wheel-arrow {
  color: #41699f;
  border-color: #cbd7e4;
  background: #fff;
}

.calendar-wheel-arrow:hover {
  color: #274d7d;
  border-color: #7899c1;
  background: #e8f0f8;
}

.calendar-wheel-viewport {
  border-color: #d1dce8;
  background: #fff;
}

.calendar-wheel-viewport::before {
  border-color: #8eadd0;
  background: linear-gradient(90deg, rgba(111, 145, 189, .12), rgba(255, 255, 255, .7), rgba(111, 145, 189, .12));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .8), 0 0 20px rgba(75, 112, 160, .1);
}

.calendar-wheel-viewport::after {
  background: linear-gradient(180deg, rgba(255, 255, 255, .98) 0, rgba(255, 255, 255, .3) 32%, transparent 42%, transparent 58%, rgba(255, 255, 255, .3) 68%, rgba(255, 255, 255, .98) 100%);
}

.calendar-wheel-scroll {
  scrollbar-color: #9eb2ca #edf2f7;
}

.calendar-wheel-scroll::-webkit-scrollbar-thumb {
  background: #9eb2ca;
}

.calendar-wheel-option,
.calendar-wheel-option small {
  color: #718096;
}

.calendar-wheel-option.active {
  color: #26384f;
}

.calendar-wheel-option.active strong {
  text-shadow: none;
}

.calendar-wheel-option.active small,
.calendar-wheel-hour .calendar-wheel-option.active strong,
.calendar-wheel-minute .calendar-wheel-option.active strong {
  color: #35699f;
}
