:root {
  --bg: #0b1020;
  --card: #111a33;
  --card2: #0f1730;
  --txt: #eaf0ff;
  --muted: #aeb8da;
  --border: rgba(255, 255, 255, 0.08);
  --accent: #81d100;
  --accent2: #94569f;
  --danger: #ff4d6d;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: linear-gradient(180deg, #070a14 0%, #0b1020 100%);
  color: var(--txt);
}
a {
  color: inherit;
}
.dgcrm-link {
  text-decoration: none;
}
.dgcrm-link-arrow {
  margin-left: 6px;
  color: var(--muted);
}
.dgcrm-palette-img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  border: 1px solid var(--border);
  object-fit: cover;
  display: block;
  background: rgba(0, 0, 0, 0.18);
}
.dgcrm-yarn-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 980px) {
  .dgcrm-yarn-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .dgcrm-yarn-grid {
    grid-template-columns: 1fr;
  }
}
.dgcrm-yarn-card {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgb(7 5 19 / 44%);
}

.dgcrm-yarn-view-card {
  width: 100%;
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 12px 14px;
  align-items: start;
}
.dgcrm-yarn-view-card.dgcrm-lk-materials-card {
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 8px 10px;
}
.dgcrm-yarn-view-card.dgcrm-lk-yarn-card {
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 8px 10px;
}
.dgcrm-yarn-view-card > :nth-child(1) {
  grid-column: 1;
  grid-row: 1;
}
.dgcrm-yarn-view-card > :nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}
.dgcrm-yarn-view-card > :nth-child(3) {
  grid-column: 1;
  grid-row: 2;
}
.dgcrm-yarn-view-card > :nth-child(4) {
  grid-column: 2;
  grid-row: 2;
}
@media (max-width: 640px) {
  .dgcrm-yarn-view-card {
    grid-template-columns: 1fr;
  }
  .dgcrm-yarn-view-card > :nth-child(1),
  .dgcrm-yarn-view-card > :nth-child(2),
  .dgcrm-yarn-view-card > :nth-child(3),
  .dgcrm-yarn-view-card > :nth-child(4) {
    grid-column: 1;
  }
  .dgcrm-yarn-view-card > :nth-child(1) {
    grid-row: 1;
  }
  .dgcrm-yarn-view-card > :nth-child(2) {
    grid-row: 2;
  }
  .dgcrm-yarn-view-card > :nth-child(3) {
    grid-row: 3;
  }
  .dgcrm-yarn-view-card > :nth-child(4) {
    grid-row: 4;
  }
}

/* 2 */
.dgcrm-yarn-view-actions {
  margin-top: 10px;
}
.dgcrm-yarn-view-actions .btn {
  width: 100%;
}

.dgcrm-yarn-meta-lines .muted {
  font-size: 14px;
}

.dgcrm-color-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  vertical-align: -2px;
  margin-right: 8px;
}

.dgcrm-color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dgcrm-input-multiline {
  /* min-height: 56px; */
  line-height: 1.25;
  resize: vertical;
}

.dgcrm-delivery-card {
  border-color: rgba(129, 209, 0, 0.22);
  background: linear-gradient(180deg, rgba(129, 209, 0, 0.08) 0%, rgba(0, 0, 0, 0.14) 100%);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.35);
}
.dgcrm-color-swatch {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  cursor: pointer;
  padding: 0;
  outline: none;
  position: relative;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}
.dgcrm-color-swatch.active {
  transform: scale(1.12);
  border-color: #f52d6b;
  box-shadow: 0 0 0 2px rgba(245, 45, 107, 0.75), 0 0 0 5px rgba(255, 255, 255, 0.22);
}
.dgcrm-color-swatch.active::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
  color: rgba(7, 16, 17, 0.92);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}
.dgcrm-color-swatch:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.22);
}
.dgcrm-yarn-check {
  display: block;
  cursor: pointer;
}
.dgcrm-yarn-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.dgcrm-yarn-check-inner {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}
.dgcrm-yarn-check input:checked + .dgcrm-yarn-check-inner {
  border-color: rgba(255, 255, 255, 0.75);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1) inset;
  background: rgba(255, 255, 255, 0.04);
}
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px;
}
body.dgcrm-tpl-fs .container {
  max-width: 100%;
  padding: 12px;
}
body.dgcrm-tpl-fs .card {
  border-radius: 0;
}
.dgcrm-tpl-editor {
  display: block;
}
.dgcrm-tpl-preview {
  display: none;
  width: 100%;
  min-height: 70vh;
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}
.dgcrm-tpl-editor.is-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}
.dgcrm-tpl-editor.is-preview .dgcrm-tpl-preview {
  display: block;
  margin-top: 0;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(11, 16, 32, 0.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
}
.brand-title {
  font-weight: 500;
  letter-spacing: 0.2px;
}
.nav {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}
.nav-left {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.nav-right {
  display: flex;
  gap: 10px;
  align-items: center;
}
.nav-gear {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 12px;
}
.nav-gear svg {
  opacity: 0.9;
}
.nav-gear:hover svg {
  opacity: 1;
}
.nav a {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--muted);
}
.nav a.active {
  color: var(--txt);
  border-color: rgba(129, 209, 0, 0.35);
  box-shadow: 0 0 0 3px rgba(129, 209, 0, 0.12) inset;
}
.card {
  background: linear-gradient(180deg, var(--card) 0%, var(--card2) 100%);
  background-image: url(/dgcrm/img/фон5.jpg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.card2 {
  background: linear-gradient(180deg, #000002 0%, var(--card2) 100%);
  /* background-image: url(/dgcrm/img/фон5.jpg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat; */
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}
.col-3 {
  grid-column: span 3;
}
.col-4 {
  grid-column: span 4;
}
.col-6 {
  grid-column: span 6;
}
.col-8 {
  grid-column: span 8;
}
.col-12 {
  grid-column: span 12;
}
@media (max-width: 900px) {
  .col-3,
  .col-4,
  .col-6,
  .col-8 {
    grid-column: span 12;
  }
}
.h1 {
  font-size: 20px;
  margin: 0 0 10px 0;
}
.muted {
  color: var(--muted);
}
.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--txt);
  text-decoration: none;
  cursor: pointer;
  font-weight: 500;
  font: inherit;
  line-height: 1;
}
.btn.primary {
  background: linear-gradient(135deg, var(--accent) 0%, #5aa900 100%);
  border-color: rgba(129, 209, 0, 0.35);
  color: #071011;
  font-weight: 500;
}
.btn.danger {
  background: rgba(255, 77, 109, 0.1);
  border-color: rgba(255, 77, 109, 0.35);
  color: #ffd6de;
}
.btn.small {
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 13px;
}
.btn.dgcrm-view-active {
  border-color: rgba(255, 255, 255, 0.75);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12) inset;
}
.input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.18);
  color: var(--txt);
  outline: none;
}
select.input {
  padding-right: 40px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20'%3E%3Cpath fill='%23aeb8da' d='M5.6 7.8a1 1 0 0 1 1.4 0L10 10.8l3-3a1 1 0 1 1 1.4 1.4l-3.7 3.7a1 1 0 0 1-1.4 0L5.6 9.2a1 1 0 0 1 0-1.4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
}
select.input option,
select.input optgroup {
  background: #0f1426;
  color: var(--txt);
}
.modal select.input {
  background-color: #0a0e1d;
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--txt);
}
textarea {
  min-height: 90px;
  resize: vertical;
}
#cal-time-warn {
  color: #ffd6de;
  border: 1px solid rgba(255, 77, 109, 0.35);
  background: rgba(255, 77, 109, 0.08);
  border-radius: 12px;
  padding: 8px 10px;
}
label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin: 10px 0 6px;
}
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th,
.table td {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.table th {
  color: var(--muted);
  font-weight: 600;
  text-align: left;
}
.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}
.pill.ok {
  border-color: rgba(129, 209, 0, 0.35);
  color: #dff8b3;
}
.pill.bad {
  border-color: rgba(255, 77, 109, 0.35);
  color: #ffd6de;
}
.flash {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}
.flash.error {
  border-color: rgba(255, 77, 109, 0.35);
  background: rgba(255, 77, 109, 0.1);
}
.flash.ok {
  border-color: rgba(129, 209, 0, 0.35);
  background: rgba(129, 209, 0, 0.08);
}
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.thumb {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}
.thumb img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}
.footer {
  margin: 18px 0;
  color: var(--muted);
  font-size: 12px;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 14px;
}
.tab {
  position: relative;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}
.tab.active {
  color: var(--txt);
  border-color: rgba(129, 209, 0, 0.35);
  box-shadow: 0 0 0 3px rgba(129, 209, 0, 0.12) inset;
}
.tab-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid rgba(129, 209, 0, 0.35);
  background: rgba(129, 209, 0, 0.12);
  color: var(--txt);
  font-size: 12px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.pager {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
}
.pager .current {
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid rgba(129, 209, 0, 0.35);
  background: rgba(129, 209, 0, 0.08);
  color: var(--txt);
  font-size: 13px;
}

.fieldset {
  border: 1px solid rgba(129, 209, 0, 0.35);
  background: rgba(129, 209, 0, 0.06);
  border-radius: 14px;
  padding: 12px;
}

.img-preview-sm {
  width: 150px;
  height: 150px;
  object-fit: cover;
  display: block;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #000;
}
.dgcrm-photo-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
@media (max-width: 1100px) {
  .dgcrm-photo-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .dgcrm-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.dgcrm-photo-tile {
  position: relative;
  width: 100%;
  padding-right: 0px;
  padding-left: 0px;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}
.dgcrm-photo-tile:hover {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
  transform: translateY(-1px);
}
.dgcrm-photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dgcrm-photo-date-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2px;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
}
.dgcrm-photo-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-style: dashed;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}
.dgcrm-photo-add-plus {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(129, 209, 0, 0.12);
  border: 1px solid rgba(129, 209, 0, 0.35);
  color: var(--accent);
  font-weight: 900;
  font-size: 24px;
  line-height: 1;
}
.dgcrm-photo-modal-img {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  display: block;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.section {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}
.section:first-child {
  margin-top: 0;
}

.cal-head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.cal-date-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.cal-date-human {
  display: none;
}
.cal-search {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.cal-date-input {
  width: 165px;
  padding: 8px 10px;
  border-radius: 10px;
  font-weight: 900;
  color: var(--txt);
}
.cal-dt {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr 0.8fr;
  gap: 8px;
  align-items: center;
}
.cal-nav {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.cal-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.cal-filter {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
  line-height: 1.4;
}
.cal-filter:hover {
  color: var(--txt);
  border-color: rgba(129, 209, 0, 0.25);
}
.cal-filter.active {
  background: rgba(129, 209, 0, 0.12);
  border-color: rgba(129, 209, 0, 0.35);
  color: #dff8b3;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.cal-dow {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  padding: 6px 0;
}
.cal-cell {
  display: block;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none;
  color: var(--txt);
  padding: 10px;
  /* min-height: 92px; */
  padding-bottom: 44px;
  position: relative;
}
.cal-cell.out {
  opacity: 0.55;
}
.cal-cell.has {
  border-color: rgba(129, 209, 0, 0.35);
  box-shadow: 0 0 0 3px rgba(129, 209, 0, 0.08) inset;
}
.cal-cell.sel {
  border-color: rgb(255 255 255 / 45%);
  box-shadow: 0 0 0 3px rgb(116 107 118 / 14%) inset;
}
.cal-cell.has.sel {
  border-color: #81d100;
  box-shadow: 0 0 0 3px rgba(148, 86, 159, 0.14) inset;
  background: linear-gradient(23deg, #81d10030 0%, rgba(255, 255, 255, 0.015) 100%);
}
.cal-cell.today {
  background: rgba(129, 209, 0, 0.35);
}
.cal-badges {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}
.cal-today {
  position: absolute;
  right: 10px;
  top: 10px;
  /* padding: 2px 8px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06); */
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}
.cal-badge {
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  border-radius: 5px;
  font-weight: 900;
  font-size: 12px;
  line-height: 22px;
  text-align: center;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
}
.cal-badge.a {
  background: linear-gradient(135deg, var(--accent) 0%, #5aa900 100%);
  color: #071011;
}
.cal-badge.a.future {
  color: #071011;
}
.cal-badge.a.past {
  background: #f52d6b;
  color: #071011;
}
.cal-badge.i {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--txt);
}
.cal-num {
  font-weight: 800;
  line-height: 1.1;
}
.cal-add-wrap {
  display: none;
  margin-top: 12px;
}
.cal-add-wrap.open {
  display: block;
}

.event-block-title {
  font-weight: 500;
  margin: 0 0 10px 0;
}
.event-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
  margin: 0 0 10px 0;
}
.event-card.has-kind-img {
  padding-right: 86px;
}
.event-card.today-past {
  border-color: rgba(245, 45, 107, 0.75);
  box-shadow: 0 0 0 3px rgba(245, 45, 107, 0.14) inset;
}
.event-card.today-upcoming {
  border-color: rgba(129, 209, 0, 0.6);
  box-shadow: 0 0 0 3px rgba(129, 209, 0, 0.12) inset;
}
.event-card.inactive {
  opacity: 0.55;
  filter: grayscale(1);
  background: #0f1730;
}
.event-time {
  position: absolute;
  right: 12px;
  top: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.22);
}
.event-kind-thumb {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.2);
}
.event-kind-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.event-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 6px;
}
.event-status-title {
  margin-top: 8px;
  font-weight: 500;
}
.event-modal-media {
  width: 140px;
  height: 100px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}
.event-modal-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dgcrm-event-kind-img {
  width: 70px;
  height: 52px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.2);
  object-fit: cover;
  display: block;
}

.kv {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px 12px;
  align-items: start;
}
.kv .k {
  color: var(--muted);
  font-size: 12px;
}
.kv .v {
  white-space: pre-wrap;
}
.kv.dgcrm-kv-inline {
  gap: 6px 10px;
  align-items: center;
  padding-left: 14px;
}
.kv.dgcrm-kv-inline .k {
  font-size: inherit;
}
.kv.dgcrm-kv-inline .v {
  white-space: normal;
  font-size: inherit;
  line-height: 1.25;
}
.dgcrm-offer-price {
  margin-top: 14px;
  padding-left: 14px;
}
.dgcrm-offer-price-value {
  margin-top: 4px;
  font-size: 28px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #f52d6b;
}
.kv + .kv {
  margin-top: 12px;
}

.dgcrm-block {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.16);
}
.dgcrm-progress {
  margin-bottom: 12px;
}
.dgcrm-progress-title {
  font-weight: 900;
}
.dgcrm-progress-sub {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.3;
}
.dgcrm-progress-status {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--muted);
}
.dgcrm-progress-status.positive {
  color: var(--accent);
}
.dgcrm-progress-status.warn {
  color: #ffc107;
}
.dgcrm-progress-status.negative {
  color: var(--danger);
}
.dgcrm-progress-status.zero {
  color: var(--muted);
}
.dgcrm-price-pill {
  font-size: 16px;
}
.dgcrm-progress-bar {
  margin-top: 10px;
  height: 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}
.dgcrm-progress-bar.lg {
  height: 34px;
}
.dgcrm-progress-fill-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 999px;
}
.dgcrm-progress-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent) 0%, #5aa900 100%);
}
.dgcrm-progress-fill.positive {
  background: linear-gradient(135deg, var(--accent) 0%, #5aa900 100%);
}
.dgcrm-progress-fill.warn {
  background: linear-gradient(135deg, #ffc107 0%, rgba(255, 193, 7, 0.55) 100%);
}
.dgcrm-progress-fill.negative {
  background: linear-gradient(135deg, rgba(255, 77, 109, 0.95) 0%, rgba(255, 77, 109, 0.45) 100%);
}
.dgcrm-progress-text {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 10px;
  font-weight: 900;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.65), 0 0 6px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.dgcrm-progress-text.light {
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.65), 0 0 6px rgba(0, 0, 0, 0.35);
}
.dgcrm-progress-text.on-warn {
  color: rgba(0, 0, 0, 0.78);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55), 0 0 6px rgba(255, 255, 255, 0.15);
}
.dgcrm-progress-text.edge {
  left: calc(var(--p) * 1%);
  transform: translateX(-100%);
}
.dgcrm-progress-text.zero {
  left: 0;
  transform: none;
}

.dgcrm-contacts-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}
@media (max-width: 1100px) {
  .dgcrm-contacts-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .dgcrm-contacts-cards {
    grid-template-columns: minmax(0, 1fr);
  }
}
.dgcrm-contact-card {
  display: block;
  position: relative;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  background: var(--dgcrm-contact-card-bg);
  text-decoration: none;
  color: inherit;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
  backdrop-filter: blur(10px);
}
.dgcrm-contact-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
  transform: translateY(-1px);
}
.dgcrm-contact-card-title {
  font-weight: 600;
  line-height: 1.25;
}
.dgcrm-contact-card-stars {
  position: absolute;
  top: 10px;
  right: 12px;
  display: inline-flex;
  gap: 2px;
  font-size: 16px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.4px;
  user-select: none;
}
.dgcrm-contact-card-stars .filled {
  color: #ffc107;
}
.dgcrm-stars {
  display: inline-flex;
  gap: 2px;
  font-size: 18px;
  line-height: 1;
  user-select: none;
}
.dgcrm-star-btn {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 18px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
}
.dgcrm-star-btn.filled {
  color: #ffc107;
  text-shadow: 0 0 10px rgba(255, 193, 7, 0.22);
}
.dgcrm-star-btn:focus-visible {
  outline: 2px solid rgba(255, 193, 7, 0.6);
  outline-offset: 2px;
  border-radius: 4px;
}
.dgcrm-contact-card-progress {
  margin-top: 12px;
}

.dgcrm-btn-track {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.9);
  min-width: 150px;
  justify-content: center;
  white-space: nowrap;
}
.dgcrm-btn-track:hover {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(0, 0, 0, 0.28);
}

.dgcrm-progress-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.22);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.65), 0 0 6px rgba(0, 0, 0, 0.35);
}
.dgcrm-progress-pill.warn {
  background: linear-gradient(135deg, #ffc107 0%, rgba(255, 193, 7, 0.55) 100%);
  border-color: rgba(255, 193, 7, 0.4);
}
.dgcrm-progress-pill.positive {
  background: linear-gradient(135deg, var(--accent) 0%, #5aa900 100%);
  border-color: rgba(129, 209, 0, 0.45);
  color: rgba(0, 0, 0, 0.82);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
}
.dgcrm-progress-pill.negative {
  background: linear-gradient(135deg, rgba(255, 77, 109, 0.95) 0%, rgba(255, 77, 109, 0.45) 100%);
  border-color: rgba(255, 77, 109, 0.55);
}
.dgcrm-progress-pill.zero {
  background: rgba(0, 0, 0, 0.22);
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.9);
}

.dgcrm-btn-open-order {
  background: #f52d6b;
  border-color: rgba(245, 45, 107, 0.55);
  color: #ffffff;
}
.dgcrm-btn-open-order:hover {
  background: #ff3f7b;
  border-color: rgba(255, 63, 123, 0.6);
}

.dgcrm-progress-filter {
  display: inline-flex;
  gap: 8px;
  margin-left: 10px;
}
.dgcrm-radio {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.dgcrm-radio input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.dgcrm-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.18) inset;
}
.dgcrm-filter-all {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
  user-select: none;
}
.dgcrm-dot.dark {
  background: rgba(0, 0, 0, 0.55);
}
.dgcrm-dot.warn {
  background: #ffc107;
}
.dgcrm-dot.ok {
  background: #81d100;
}
.dgcrm-dot.bad {
  background: rgba(255, 77, 109, 0.95);
}
.dgcrm-radio input:checked + .dgcrm-dot {
  border-color: rgba(255, 255, 255, 0.75);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
  outline: 2px solid rgba(255, 255, 255, 0.75);
  outline-offset: 2px;
}
.dgcrm-radio input:checked + .dgcrm-filter-all {
  border-color: rgba(255, 255, 255, 0.75);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
}
.dgcrm-count-pill {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  user-select: none;
}
.dgcrm-count-pill.dark {
  border-color: #ffffff52;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0.14) 100%);
  color: rgba(255, 255, 255, 0.92);
}
.dgcrm-count-pill.warn {
  border-color: #ffc107;
  background: linear-gradient(180deg, rgba(255, 193, 7, 0.16) 0%, rgba(255, 193, 7, 0.08) 100%);
  color: rgb(255, 255, 255);
}
.dgcrm-count-pill.positive {
  border-color: #81d100;
  background: linear-gradient(180deg, rgba(129, 209, 0, 0.12) 0%, rgba(129, 209, 0, 0.06) 100%);
  color: rgb(255, 255, 255);
}
.dgcrm-count-pill.ok {
  border-color: #81d100;
  background: linear-gradient(180deg, rgba(129, 209, 0, 0.12) 0%, rgba(129, 209, 0, 0.06) 100%);
  color: rgb(255, 255, 255);
}
.dgcrm-count-pill.negative {
  border-color: rgba(255, 77, 109, 0.95);
  background: linear-gradient(180deg, rgba(255, 77, 109, 0.14) 0%, rgba(255, 77, 109, 0.06) 100%);
  color: rgba(255, 255, 255, 0.92);
}
.dgcrm-count-pill.bad {
  border-color: rgba(255, 77, 109, 0.95);
  background: linear-gradient(180deg, rgba(255, 77, 109, 0.14) 0%, rgba(255, 77, 109, 0.06) 100%);
  color: rgba(255, 255, 255, 0.92);
}
.dgcrm-count-label {
  font-size: 12px;
  font-weight: 600;
  user-select: none;
}
.dgcrm-count-label.dark {
  color: rgba(255, 255, 255, 0.92);
}
.dgcrm-count-label.warn {
  color: #ffc107;
}
.dgcrm-count-label.positive {
  color: #81d100;
}
.dgcrm-count-label.ok {
  color: #81d100;
}
.dgcrm-count-label.negative {
  color: rgba(255, 77, 109, 0.95);
}
.dgcrm-count-label.bad {
  color: rgba(255, 77, 109, 0.95);
}

.dgcrm-offers-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}
@media (max-width: 1100px) {
  .dgcrm-offers-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .dgcrm-offers-cards {
    grid-template-columns: minmax(0, 1fr);
  }
}
.dgcrm-orders-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}
@media (max-width: 1100px) {
  .dgcrm-orders-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .dgcrm-orders-cards {
    grid-template-columns: minmax(0, 1fr);
  }
}
.dgcrm-order-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.015) 100%);
  color: inherit;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
  cursor: pointer;
  backdrop-filter: blur(10px);
}
.dgcrm-order-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
  transform: translateY(-1px);
}
.dgcrm-order-status-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  color: #fff;
  white-space: nowrap;
}
.dgcrm-order-status-badge.dark {
  background: rgba(0, 0, 0, 0.75);
  border-color: rgba(0, 0, 0, 0.9);
}
.dgcrm-order-status-badge.warn {
  background: #ffc107;
  border-color: rgba(255, 193, 7, 0.95);
  color: rgba(0, 0, 0, 0.9);
}
.dgcrm-order-status-badge.ok {
  background: #81d100;
  border-color: rgba(129, 209, 0, 0.95);
}
.dgcrm-order-status-badge.bad {
  background: rgba(255, 77, 109, 0.95);
  border-color: rgba(255, 77, 109, 0.95);
}
.dgcrm-order-contract-badge {
  position: absolute;
  top: 44px;
  right: 10px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  color: #fff;
  white-space: nowrap;
  text-transform: lowercase;
}
.dgcrm-order-contract-badge.ok {
  background: #81d100;
  border-color: rgba(129, 209, 0, 0.95);
}
.dgcrm-order-contract-badge.dark {
  background: rgba(0, 0, 0, 0.75);
  border-color: rgba(0, 0, 0, 0.9);
}
.dgcrm-offer-link-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  border: 1px solid rgba(129, 209, 0, 0.95);
  background: #81d100;
  color: #ffffff;
  white-space: nowrap;
  text-transform: lowercase;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.636);
  font-weight: 500;
}
.dgcrm-offer-link-badge + .dgcrm-offer-link-badge {
  top: 42px;
}
.dgcrm-offer-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.015) 100%);
  text-decoration: none;
  color: inherit;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
  cursor: pointer;
  backdrop-filter: blur(10px);
}
.dgcrm-offer-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
  transform: translateY(-1px);
}
.dgcrm-offer-thumb {
  position: relative;
  background: rgba(0, 0, 0, 0.18);
  border-bottom: 1px solid var(--border);
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.dgcrm-offer-thumb-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: blur(14px);
  transform: scale(1.1);
  opacity: 0.55;
}
.dgcrm-offer-thumb-fg {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.dgcrm-offer-thumb-empty {
  position: relative;
  z-index: 1;
  padding: 10px 12px;
  text-align: center;
}
.dgcrm-offer-meta {
  padding: 12px 14px 14px;
}
.dgcrm-offer-contact {
  font-weight: 600;
  line-height: 1.25;
}

.dgcrm-visual-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.dgcrm-visual-grid.dgcrm-visual-grid-8 {
  grid-template-columns: repeat(8, minmax(0, 1fr));
}
@media (max-width: 900px) {
  .dgcrm-visual-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dgcrm-visual-grid.dgcrm-visual-grid-8 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .dgcrm-visual-grid.dgcrm-visual-grid-8 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.dgcrm-visual-tile {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  background: rgba(0, 0, 0, 0.12);
  color: var(--txt);
  font-size: 12px;
  line-height: 1.25;
}
.dgcrm-visual-icon {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px auto;
}
.dgcrm-visual-tile img {
  max-width: 84px;
  max-height: 84px;
  width: 84px;
  height: 84px;
  object-fit: contain;
  display: block;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 50;
  background: rgba(0, 0, 0, 0.55);
}
.modal.open {
  display: flex;
}
.modal-card {
  width: min(760px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: linear-gradient(180deg, var(--card) 0%, var(--card2) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.modal-close {
  position: absolute;
  right: 18px;
  top: 18px;
}
.modal-title {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}
.dgcrm-charts-widget {
  position: relative;
  overflow: hidden;
  padding: 16px;
}
.dgcrm-charts-widget::before {
  content: '';
  position: absolute;
  inset: -40px;
  background: radial-gradient(circle at 10% 10%, rgba(125, 255, 211, 0.35), transparent 55%),
    radial-gradient(circle at 80% 20%, rgba(92, 147, 255, 0.3), transparent 60%),
    radial-gradient(circle at 70% 80%, rgba(255, 120, 217, 0.25), transparent 55%);
  opacity: 0.9;
  pointer-events: none;
}
.dgcrm-chart-title {
  position: relative;
  z-index: 1;
  font-weight: 500;
  font-size: 18px;
  margin-bottom: 12px;
}
.dgcrm-chart-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.dgcrm-chart-block {
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(10, 20, 50, 0.75), rgba(10, 10, 20, 0.6));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}
.dgcrm-chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.dgcrm-chart-heading {
  font-weight: 700;
}
.dgcrm-chart-subtitle {
  font-size: 12px;
  color: var(--muted);
}
.dgcrm-chart-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 6px;
  font-size: 11px;
  color: var(--muted);
}
.dgcrm-chart-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
}
.dgcrm-chart-dot.is-contacts {
  background: linear-gradient(180deg, #7cd7ff, #427cff);
}
.dgcrm-chart-dot.is-offers {
  background: linear-gradient(180deg, #ff9df4, #b86cff);
}
.dgcrm-chart-dot.is-orders {
  background: linear-gradient(180deg, #5dffb0, #22c48c);
}
.dgcrm-chart-bars {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  height: 150px;
  padding: 8px 0 4px;
  width: 100%;
  justify-content: space-between;
}
.dgcrm-chart-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 46px;
}
.dgcrm-chart-bars-stack {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  height: 110px;
}
.dgcrm-chart-bar {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 24px;
  border-radius: 6px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, filter 0.2s ease;
}
.dgcrm-chart-bar-value {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}
.dgcrm-chart-bar:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}
.dgcrm-chart-bar.is-zero {
  opacity: 0.35;
  min-height: 4px;
}
.dgcrm-chart-bar.is-contacts {
  background: linear-gradient(180deg, rgba(124, 215, 255, 1), rgba(66, 124, 255, 1));
}
.dgcrm-chart-bar.is-offers {
  background: linear-gradient(180deg, rgba(255, 157, 244, 1), rgba(184, 108, 255, 1));
}
.dgcrm-chart-bar.is-orders {
  background: linear-gradient(180deg, rgba(93, 255, 176, 1), rgba(34, 196, 140, 1));
}
.dgcrm-chart-month {
  font-size: 11px;
  color: var(--muted);
  text-transform: lowercase;
}
.dgcrm-chart-line {
  margin-top: 8px;
  border-radius: 14px;
  padding: 8px;
  background: linear-gradient(160deg, rgba(5, 20, 30, 0.6), rgba(5, 5, 10, 0.35));
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.dgcrm-chart-line svg {
  width: 90%;
  height: 120px;
  display: block;
  margin: 0 auto;
}
.dgcrm-chart-line-labels {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: 6px;
  font-size: 10px;
  color: var(--muted);
}
.dgcrm-chart-line-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 6px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.dgcrm-chart-line-label strong {
  font-size: 11px;
  color: var(--txt);
}
.dgcrm-attention-widget {
  padding: 14px 16px;
}
.dgcrm-attention-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.dgcrm-attention-title {
  font-weight: 500;
}
.dgcrm-attention-actions {
  display: flex;
  gap: 8px;
}
.dgcrm-attention-arrow {
  min-width: 32px;
}
.dgcrm-attention-track {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow: auto;
  padding-bottom: 4px;
  scroll-behavior: smooth;
}
.dgcrm-attention-track::-webkit-scrollbar {
  height: 6px;
}
.dgcrm-attention-track::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}
.dgcrm-attention-card {
  min-width: 210px;
  max-width: 230px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  text-decoration: none;
  color: var(--txt);
  position: relative;
}
.dgcrm-attention-card:hover {
  border-color: rgba(255, 255, 255, 0.24);
}
.dgcrm-attention-thumb {
  height: 96px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}
.dgcrm-attention-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dgcrm-attention-thumb-empty {
  font-size: 12px;
  color: var(--muted);
}
.dgcrm-attention-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dgcrm-attention-status {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.dgcrm-attention-card .dgcrm-progress-bar {
  height: 22px;
}
.dgcrm-attention-card .dgcrm-progress-text {
  font-size: 12px;
}
.dgcrm-attention-card.is-order .dgcrm-progress-bar {
  display: none;
}
.dgcrm-attention-note {
  font-size: 12px;
  font-weight: 700;
  color: #f2c94c;
}
.dgcrm-attention-note.is-danger {
  color: #ff4d6d;
}
.dgcrm-attention-price .pill {
  padding: 4px 8px;
  font-size: 12px;
}
.dgcrm-days-widget {
  padding: 12px 16px;
}
.dgcrm-days-row {
  display: flex;
  gap: 11px;
  flex-wrap: nowrap;
  overflow: hidden;
}
.dgcrm-day-cell {
  position: relative;
  min-width: 52px;
  height: 68px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--txt);
  font-weight: 700;
  font-size: 15px;
}
.dgcrm-day-cell.is-hidden {
  display: none;
}
.dgcrm-day-cell.is-weekend {
  border-color: transparent !important;
}
.dgcrm-day-cell.is-today {
  min-width: 74px;
  height: 88px;
  font-size: 18px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08) inset;
  align-self: flex-start;
  margin-top: -6px;
  background: #000;
}
.dgcrm-day-cell.is-yesterday {
  opacity: 0.55;
}
.dgcrm-day-cell.red {
  border-color: rgba(255, 77, 109, 0.9);
}
.dgcrm-day-cell.yellow {
  border-color: rgba(242, 201, 76, 0.9);
}
.dgcrm-day-cell.green {
  border-color: rgba(129, 209, 0, 0.9);
}
.dgcrm-day-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--fill, 0%);
  border-radius: 12px;
  opacity: 0.35;
  z-index: 0;
}
.dgcrm-day-cell.red .dgcrm-day-fill {
  background: rgba(255, 77, 110, 0.893);
}
.dgcrm-day-cell.yellow .dgcrm-day-fill {
  background: rgba(242, 201, 76, 0.6);
}
.dgcrm-day-cell.green .dgcrm-day-fill {
  background: rgba(129, 209, 0, 0.6);
}
.dgcrm-day-num,
.dgcrm-day-emoji {
  position: relative;
  z-index: 1;
  line-height: 1;
  font-size: 16px;
}
.dgcrm-day-emoji {
  width: 22px;
  height: 22px;
  display: block;
}
.dgcrm-day-label {
  font-size: 10px;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.dgcrm-days-month {
  text-align: center;
  margin-top: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: lowercase;
}
.dgcrm-days-title {
  font-weight: 500;
  margin-bottom: 10px;
}
.dgcrm-days-row {
  margin-top: 8px;
  padding-top: 20px;
}
.dgcrm-icon-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}
.dgcrm-icon-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.dgcrm-icon-btn.active {
  border-color: rgba(129, 209, 0, 0.7);
  box-shadow: 0 0 0 3px rgba(129, 209, 0, 0.18) inset;
  color: #b9f34f;
}
.dgcrm-date-range-modal .modal-card {
  width: min(520px, 100%);
}
.dgcrm-date-range-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.dgcrm-yarn-total {
  font-size: 22px;
  font-weight: 900;
  color: #f52d6b;
  line-height: 1.05;
}
.dgcrm-yarn-total-label {
  font-size: 14px;
}

/* LK */
.dgcrm-lk-profile-head {
  padding: 10px 0 6px;
}
.dgcrm-lk-profile-page-title {
  font-size: 32px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.dgcrm-lk-profile-greeting {
  margin-top: 6px;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
}
.dgcrm-lk-profile-card {
  margin-top: 16px;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(140deg, rgba(13, 18, 34, 0.9), rgba(10, 14, 28, 0.6));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
}
.dgcrm-lk-profile-card-title {
  font-size: 16px;
  font-weight: 700;
}
.dgcrm-lk-profile-fields {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.dgcrm-lk-profile-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
}
.dgcrm-lk-profile-value {
  margin-top: 6px;
  font-size: 16px;
  font-weight: 600;
}
.dgcrm-lk-profile-actions {
  margin-top: 16px;
}
@media (max-width: 700px) {
  .dgcrm-lk-profile-page-title {
    font-size: 26px;
  }
  .dgcrm-lk-profile-fields {
    grid-template-columns: 1fr;
  }
}
.dgcrm-lk-widget {
  padding: 18px;
}
.dgcrm-lk-summary {
  padding: 16px 18px;
}
.dgcrm-lk-summary-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.dgcrm-lk-summary-ring {
  flex: 0 0 auto;
}
.dgcrm-lk-summary-title {
  font-size: 20px;
  font-weight: 700;
  margin-top: 6px;
}
.dgcrm-lk-summary-stage {
  margin-top: 4px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
}
.dgcrm-lk-coupon-banner {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.4);
  background: rgba(11, 13, 18, 0.6) url('/dgcrm/img/lk/banner-lk.png') center/cover no-repeat;
  background-blend-mode: multiply;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dgcrm-lk-coupon-no {
  font-size: 15px;
  font-weight: 700;
}
.dgcrm-lk-coupon-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}
.dgcrm-lk-coupon-meta > div {
  display: flex;
  gap: 6px;
  align-items: baseline;
}
.dgcrm-lk-coupon-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.65);
}
.dgcrm-lk-coupon-details {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}
.dgcrm-lk-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  margin-top: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.dgcrm-lk-status.on_track {
  color: #dff8b3;
  border-color: rgba(129, 209, 0, 0.45);
  background: rgba(129, 209, 0, 0.12);
}
.dgcrm-lk-status.risk {
  color: #ffe3b3;
  border-color: rgba(255, 196, 102, 0.45);
  background: rgba(255, 196, 102, 0.12);
}
.dgcrm-lk-status.delayed {
  color: #ffd6de;
  border-color: rgba(255, 77, 109, 0.45);
  background: rgba(255, 77, 109, 0.12);
}
.dgcrm-lk-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.dgcrm-lk-ready {
  text-align: right;
  min-width: 220px;
}
.dgcrm-lk-ready-date {
  font-size: 20px;
  font-weight: 700;
  margin-top: 6px;
}
.dgcrm-lk-timeline {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.dgcrm-lk-timeline-scroll {
  scrollbar-width: none;
}
.dgcrm-lk-timeline-scroll::-webkit-scrollbar {
  height: 0;
}
.dgcrm-lk-timeline-meta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.dgcrm-lk-timeline-count {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.6);
}
.dgcrm-lk-timeline-nav {
  display: inline-flex;
  gap: 6px;
}
.dgcrm-lk-timeline-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.dgcrm-lk-timeline-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(143, 227, 0, 0.2);
}
.dgcrm-lk-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.18);
  font-size: 13px;
  min-width: 170px;
  scroll-snap-align: start;
}
.dgcrm-lk-step .dgcrm-lk-dot {
  width: 14px;
  height: 14px;
  border-radius: 0;
  background: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  flex: 0 0 auto;
}
.dgcrm-lk-step.done {
  border-color: rgba(129, 209, 0, 0.5);
  background: rgba(129, 209, 0, 0.08);
}
.dgcrm-lk-step.done .dgcrm-lk-dot {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20'%3E%3Cpath fill='%2381d100' d='M7.7 13.2 4.5 10l1.2-1.2 2 2 6.1-6.1 1.2 1.2z'/%3E%3C/svg%3E");
}
.dgcrm-lk-step.pending {
  opacity: 0.55;
  border-color: rgba(255, 255, 255, 0.08);
}
.dgcrm-lk-step.active {
  border-color: rgba(143, 227, 0, 0.6);
  background: rgba(143, 227, 0, 0.12);
  box-shadow: 0 0 18px rgba(143, 227, 0, 0.15);
}
.dgcrm-lk-step.active .dgcrm-lk-dot {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='6' fill='%238fe300'/%3E%3C/svg%3E");
}
.dgcrm-lk-step.pending .dgcrm-lk-dot {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20'%3E%3Cpath fill='%23aeb8da' d='M10 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16zm0 2.2a5.8 5.8 0 1 0 0 11.6 5.8 5.8 0 0 0 0-11.6zm.9 2.3v3.1l2.3 1.4-.9 1.5-3.2-1.9V6.5h1.8z'/%3E%3C/svg%3E");
}
.dgcrm-lk-dashboard {
  padding: 18px;
  background: linear-gradient(140deg, rgba(12, 16, 28, 0.72), rgba(14, 18, 32, 0.5));
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}
.dgcrm-lk-dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.dgcrm-lk-dashboard-grid {
  gap: 18px;
  align-items: start;
}
.dgcrm-lk-dashboard-col {
  min-width: 0;
}
.dgcrm-lk-update-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dgcrm-lk-photo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 10px;
  padding: 16px;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
}
.dgcrm-lk-photo-row::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--photo-url);
  background-size: cover;
  background-position: center;
  filter: blur(14px);
  transform: scale(1.08);
  opacity: 0.5;
}
.dgcrm-lk-photo-row::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 16, 0.45);
}
.dgcrm-lk-photo-wrap {
  position: relative;
  z-index: 1;
}
.dgcrm-lk-progress {
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 12, 20, 0.35);
  backdrop-filter: blur(14px);
}
.dgcrm-lk-progress-title {
  font-size: 18px;
  /* text-transform: uppercase; */
  letter-spacing: 0.04em;
  color: rgb(255 255 255);
  margin: 0 0 10px 0;
  font-weight: 500;
}
.dgcrm-lk-progress-metric + .dgcrm-lk-progress-metric {
  margin-top: 14px;
}
.dgcrm-lk-progress-value {
  font-size: 20px;
  font-weight: 700;
  margin-top: 4px;
}
.dgcrm-lk-new {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 10px;
  background: rgba(255, 77, 109, 0.2);
  color: #ffd6de;
}
.dgcrm-lk-photo-wrap {
  position: relative;
  margin-top: 12px;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), 0 10px 24px rgba(0, 0, 0, 0.35);
}
.dgcrm-lk-photo-wrap::before {
  content: '';
  position: absolute;
  inset: -12px;
  background: rgba(10, 12, 18, 0.6);
  filter: blur(16px);
  z-index: 0;
}
.dgcrm-lk-photo-wrap img {
  display: block;
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dgcrm-lk-photo-overlay {
  position: absolute;
  inset: auto 12px 12px 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(8, 10, 18, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  z-index: 2;
}
.dgcrm-lk-photo-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dgcrm-lk-dot-accent {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8fe300;
  box-shadow: 0 0 10px rgba(143, 227, 0, 0.6);
}
.dgcrm-lk-photo-meta {
  margin-top: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
}
.dgcrm-lk-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.dgcrm-lk-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(143, 227, 0, 0.25);
}
.dgcrm-lk-cta-icon {
  font-size: 12px;
}
.dgcrm-lk-progress-ring {
  --size: 140px;
  width: var(--size);
  height: var(--size);
  margin: 10px 0 16px;
  border-radius: 50%;
  background: conic-gradient(#8fe300 calc(var(--progress) * 1%), rgba(255, 255, 255, 0.08) 0);
  padding: 6px;
  box-shadow: 0 0 20px rgba(143, 227, 0, 0.2);
}
.dgcrm-lk-progress-ring-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(8, 12, 20, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.dgcrm-lk-progress-widget {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dgcrm-lk-progress-layout {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 20px;
  align-items: center;
}
.dgcrm-lk-progress-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}
.dgcrm-lk-progress-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgb(0 0 0 / 37%);
}
.dgcrm-lk-progress-figure {
  position: relative;
  width: 100%;
}
.dgcrm-lk-progress-figure-single {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dgcrm-lk-progress-figure-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}
.dgcrm-lk-progress-figure-grid.dgcrm-lk-progress-figure-grid-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.dgcrm-lk-progress-png {
  position: relative;
  width: 200px;
  height: 140px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}
.dgcrm-lk-progress-figure-grid .dgcrm-lk-progress-png {
  width: 100%;
  height: 60px;
}
.dgcrm-lk-progress-figure-single .dgcrm-lk-progress-png {
  width: 200px;
  height: 140px;
}
.dgcrm-lk-progress-fill-layer {
  position: absolute;
  inset: 0;
  height: 100%;
  background: linear-gradient(
    to top,
    #81d100 0%,
    #81d100 var(--fill, 0%),
    rgba(129, 209, 0, 0) var(--fill, 0%),
    rgba(129, 209, 0, 0) 100%
  );
  border-radius: 18px;
  z-index: 0;
  -webkit-mask-image: var(--mask-url);
  mask-image: var(--mask-url);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center center;
  mask-position: center center;
}
.dgcrm-lk-progress-figure-grid .dgcrm-lk-progress-fill-layer {
  background: linear-gradient(
    to top,
    #81d100 0%,
    #81d100 var(--fill, 0%),
    rgba(129, 209, 0, 0) var(--fill, 0%),
    rgba(129, 209, 0, 0) 100%
  );
}
.dgcrm-lk-progress-img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1;
  pointer-events: none;
  opacity: 0.45;
  filter: drop-shadow(0 0 0 #ffffff) drop-shadow(0 0 2px rgba(255, 255, 255, 0.8));
}
.dgcrm-lk-progress-svg {
  width: 100%;
  height: 120px;
}
.dgcrm-lk-progress-outline {
  fill: none;
  stroke: rgba(255, 255, 255, 0.25);
  stroke-width: 2;
}
.dgcrm-lk-progress-fill {
  fill: rgba(143, 227, 0, 0.7);
}
.dgcrm-lk-progress-mult {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.7);
}
.dgcrm-lk-progress-mult-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  opacity: 0.9;
}
.dgcrm-lk-progress-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dgcrm-lk-progress-text .dgcrm-lk-progress-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.6);
}
.dgcrm-lk-progress-text .dgcrm-lk-progress-value {
  font-size: 16px;
  font-weight: 600;
}
.dgcrm-lk-progress-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}
.dgcrm-lk-progress-empty {
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.2);
}
.dgcrm-lk-progress-empty-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}
.dgcrm-lk-progress-ring-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}
.dgcrm-lk-progress-ring-large {
  --size: 220px;
  padding: 8px;
  box-shadow: 0 0 28px rgba(143, 227, 0, 0.25);
}
.dgcrm-lk-progress-ring-summary {
  --size: 110px;
  margin: 0;
  padding: 6px;
  box-shadow: 0 0 18px rgba(143, 227, 0, 0.2);
}
.dgcrm-lk-progress-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dgcrm-lk-metrics {
  display: grid;
  gap: 10px;
}
.dgcrm-lk-metric-card {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.dgcrm-lk-metric-card:hover {
  transform: scale(1.02);
  box-shadow: 0 0 18px rgba(143, 227, 0, 0.12);
}
.dgcrm-lk-metric-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.6);
}
.dgcrm-lk-metric-value {
  margin-top: 6px;
  font-size: 16px;
  font-weight: 600;
}
.dgcrm-lk-metric-sub {
  margin-top: 4px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}
.dgcrm-lk-progress-footnote {
  margin-top: 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}
.dgcrm-lk-note {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.5;
}
.dgcrm-lk-stage-dates {
  margin-top: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
}
@media (max-width: 800px) {
  .dgcrm-lk-header {
    flex-direction: column;
  }
  .dgcrm-lk-summary-top {
    flex-direction: column;
    align-items: flex-start;
  }
  .dgcrm-lk-summary-ring {
    align-self: center;
  }
  .dgcrm-lk-ready {
    text-align: left;
  }
  .dgcrm-lk-dashboard-grid {
    grid-template-columns: 1fr;
  }
  .dgcrm-lk-photo-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .dgcrm-lk-progress-layout {
    grid-template-columns: 1fr;
  }
  .dgcrm-lk-progress-columns {
    grid-template-columns: 1fr;
  }
}
.dgcrm-lk-stage-card {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}
.dgcrm-lk-stage-title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.6);
}
.dgcrm-lk-stage-name {
  margin-top: 10px;
  font-size: 18px;
  font-weight: 700;
}
.dgcrm-lk-stage-list {
  margin: 20px 0;
  padding-left: 18px;
  color: rgba(255, 255, 255, 0.8);
}
.dgcrm-lk-stage-list li + li {
  margin-top: 6px;
}
.dgcrm-lk-stage-next {
  margin-top: 12px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}
.dgcrm-lk-waybill-link {
  text-decoration: none;
  color: var(--accent);
  font-weight: 500;
}

/* Mobile */
@media (max-width: 900px) {
  .topbar-inner {
    flex-wrap: wrap;
  }
  .nav {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }
  .nav-left {
    width: 100%;
  }
  .nav-right {
    width: 100%;
    justify-content: flex-end;
  }
  .dgcrm-tpl-editor.is-preview {
    grid-template-columns: 1fr;
  }
  .dgcrm-chart-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 700px) {
  body {
    font-size: 14px;
  }
  .container {
    padding: 12px;
  }
  .card,
  .card2,
  .section {
    padding: 12px;
    border-radius: 14px;
  }
  .h1 {
    font-size: 18px;
  }
  .row {
    gap: 8px;
  }
  .row > .btn,
  .row > .input,
  .row > select,
  .row > textarea {
    width: 100%;
  }
  .grid > [style*="grid-column"] {
    grid-column: span 12 !important;
  }
  .btn {
    min-height: 40px;
  }
  .btn.small {
    min-height: 36px;
  }
  label {
    margin: 8px 0 4px;
  }
  .topbar {
    position: static;
  }
  .brand-title {
    font-size: 14px;
  }
  .nav a {
    padding: 7px 9px;
    font-size: 12px;
  }
  .tabs {
    gap: 6px;
  }
  .tab {
    padding: 7px 9px;
    font-size: 12px;
  }
  .table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table th,
  .table td {
    white-space: nowrap;
  }
  .dgcrm-price-pill {
    font-size: 14px;
  }
  .dgcrm-progress-text {
    font-size: 14px;
  }
  .dgcrm-progress-bar.lg {
    height: 26px;
  }
  .dgcrm-offer-thumb {
    height: 120px;
  }
  .dgcrm-order-status-badge,
  .dgcrm-order-contract-badge {
    font-size: 11px;
    padding: 5px 8px;
  }
  .dgcrm-order-contract-badge {
    top: 38px;
  }
  .dgcrm-offer-link-badge {
    font-size: 11px;
    padding: 5px 8px;
  }
  .dgcrm-visual-icon {
    height: 68px;
  }
  .dgcrm-visual-tile img {
    width: 64px;
    height: 64px;
  }
  .kv {
    grid-template-columns: 1fr;
  }
  .dgcrm-kv-inline {
    padding-left: 0;
  }
  .modal {
    padding: 12px;
  }
  .modal-card {
    padding: 12px;
  }
  .dgcrm-date-range-fields {
    grid-template-columns: 1fr;
  }
  .cal-dt {
    grid-template-columns: 1fr;
  }
  .cal-grid {
    grid-template-columns: repeat(7, minmax(64px, 1fr));
    overflow-x: auto;
    min-width: 560px;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }
  .cal-dow {
    font-size: 10px;
  }
  .cal-cell {
    padding: 8px;
    padding-bottom: 36px;
  }
  .cal-badges {
    left: 6px;
    right: 6px;
    bottom: 6px;
    gap: 4px;
  }
  .cal-badge {
    min-width: 18px;
    height: 18px;
    font-size: 10px;
    line-height: 18px;
  }
  .event-card.has-kind-img {
    padding-right: 12px;
  }
  .event-kind-thumb {
    right: 10px;
    bottom: 10px;
    width: 42px;
    height: 42px;
  }
  .event-time {
    right: 10px;
    top: 10px;
  }
  .dgcrm-chart-bars {
    height: 120px;
    gap: 10px;
  }
  .dgcrm-chart-col {
    min-width: 40px;
  }
  .dgcrm-chart-line svg {
    height: 100px;
  }
  .dgcrm-attention-head {
    flex-direction: column;
    align-items: stretch;
  }
  .dgcrm-attention-actions {
    width: 100%;
    justify-content: space-between;
  }
  .dgcrm-days-row {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .dgcrm-day-cell.is-today {
    min-width: 64px;
    height: 80px;
    font-size: 16px;
  }
  .dgcrm-lk-profile-page-title {
    font-size: 24px;
  }
  .dgcrm-lk-summary-title {
    font-size: 18px;
  }
  .dgcrm-lk-summary-stage {
    font-size: 14px;
  }
  .dgcrm-lk-ready-date {
    font-size: 18px;
  }
  .dgcrm-lk-summary-title,
  .dgcrm-lk-summary-stage {
    display: inline;
  }
  .dgcrm-lk-summary-title {
    margin-right: 8px;
  }
  .dgcrm-lk-summary-stage {
    margin-top: 0;
  }
  .dgcrm-lk-ready {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 10px;
  }
  .dgcrm-lk-ready .muted {
    margin: 0;
  }
  .dgcrm-lk-ready-date {
    margin-top: 0;
  }
  .dgcrm-lk-status {
    width: 100%;
  }
  .dgcrm-lk-progress-ring {
    --size: 96px;
  }
  .dgcrm-lk-progress-ring-large {
    --size: 180px;
  }
  .dgcrm-lk-progress-ring-summary {
    --size: 96px;
  }
  .dgcrm-lk-photo-wrap {
    max-width: 100%;
  }
  .dgcrm-lk-photos-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-left: -12px;
    margin-right: -12px;
    width: calc(100% + 24px);
  }
  .dgcrm-lk-photos-grid .dgcrm-photo-tile {
    aspect-ratio: 4 / 3;
    border-radius: 12px;
  }
  .dgcrm-lk-stage-grid {
    grid-template-columns: 1fr !important;
  }
  .dgcrm-lk-stage-grid > div:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left !important;
  }
  .dgcrm-lk-stage-grid > div:first-child > div {
    margin: 0 !important;
  }
  .dgcrm-lk-stage-row a {
    flex-wrap: wrap;
  }
  .dgcrm-lk-stage-photos {
    width: 100%;
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 8px;
  }
  .dgcrm-lk-stage-photo {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
    border-radius: 10px !important;
  }
  .dgcrm-lk-stage-photo-more {
    font-size: 14px !important;
  }
  .dgcrm-yarn-card {
    align-items: stretch;
  }
  .dgcrm-yarn-view-card.dgcrm-lk-yarn-card {
    grid-template-columns: 72px minmax(0, 1fr);
    grid-template-rows: auto;
    align-items: center;
  }
  .dgcrm-yarn-view-card.dgcrm-lk-yarn-card > :nth-child(1) {
    grid-column: 1;
    grid-row: 1;
  }
  .dgcrm-yarn-view-card.dgcrm-lk-yarn-card > :nth-child(2) {
    grid-column: 2;
    grid-row: 1;
  }
  .dgcrm-yarn-view-card.dgcrm-lk-materials-card {
    grid-template-columns: 72px minmax(0, 1fr);
    grid-template-rows: auto;
    align-items: center;
  }
  .dgcrm-yarn-view-card.dgcrm-lk-materials-card > :nth-child(1) {
    grid-column: 1;
    grid-row: 1;
  }
  .dgcrm-yarn-view-card.dgcrm-lk-materials-card > :nth-child(2) {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 520px) {
  .nav-right {
    justify-content: flex-start;
  }
  .dgcrm-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dgcrm-lk-photos-grid {
    grid-template-columns: 1fr;
  }
  .dgcrm-order-status-badge,
  .dgcrm-order-contract-badge {
    position: static;
    margin: 8px 0 0 0;
    display: inline-flex;
  }
  .dgcrm-lk-summary-top,
  .dgcrm-lk-header {
    gap: 12px;
  }
  .dgcrm-lk-timeline-btn {
    width: 28px;
    height: 28px;
  }
  .dgcrm-lk-step {
    min-width: 150px;
    font-size: 12px;
  }
}
