@font-face {
  font-family: Manrope;
  src: url("assets/manrope-latin-ext.woff2") format("woff2");
  font-weight: 400 800;
  unicode-range: U+0100-024F,U+1E00-1EFF;
  font-display: swap;
}
@font-face {
  font-family: Manrope;
  src: url("assets/manrope-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: Bricolage;
  src: url("assets/bricolage-latin-ext.woff2") format("woff2");
  font-weight: 400 800;
  unicode-range: U+0100-024F,U+1E00-1EFF;
  font-display: swap;
}
@font-face {
  font-family: Bricolage;
  src: url("assets/bricolage-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("assets/instrument-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-024F,U+1E00-1EFF;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("assets/instrument-latin.woff2") format("woff2");
  font-display: swap;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: Manrope, sans-serif; color: #211d2b; }
a { color: inherit; text-decoration: none; }
a:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--focus, #654db8); outline-offset: 4px; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
small { font-size: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Presentation and comparison */
.gallery { min-height: 100vh; background: #f7f6f2; }
.gallery-wrap { max-width: 1312px; padding-inline: 44px; margin: auto; }
.gallery-header { border-bottom: 1px solid #e1ded8; }
.gallery-brand { display: flex; align-items: center; gap: 22px; height: 70px; }
.gallery-brand img { width: 97px; height: auto; }
.gallery-brand span { color: #575162; border-left: 1px solid #dcd7e1; padding-left: 22px; font-size: .77rem; font-weight: 750; }
.gallery-intro { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 37px 0 26px; }
.gallery h1 { font: 700 3.35rem/.96 Bricolage, sans-serif; letter-spacing: -.04em; }
.gallery h1 em { color: #5a3c89; font-style: normal; }
.gallery-intro p { color: #5b5465; margin-top: 13px; font-size: .91rem; }
.screen-links, .concept-links { display: flex; align-items: center; gap: 3px; }
.screen-links { border: 1px solid #ded9e4; padding: 3px; border-radius: 100px; background: #fff; width: max-content; max-width: 100%; }
.screen-links a { padding: 7px 12px; border-radius: 100px; white-space: nowrap; font-size: .75rem; font-weight: 750; }
.screen-links a:hover { background: #f0edf5; }
.screen-links a[aria-current] { background: #352653; color: #fff; }
.concept-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.concept-card { display: block; border: 1px solid #e3dfe8; background: #fff; border-radius: 15px; overflow: hidden; }
.concept-card:hover { border-color: #8b78a9; }
.concept-image { aspect-ratio: 16 / 8.35; overflow: hidden; background: #dedbe6; }
.concept-image img { width: 100%; height: auto; }
.concept-card[data-concept="nakts"] .concept-image { background: #142522; }
.concept-card[data-concept="lauks"] .concept-image { background: #ede9dc; }
.concept-caption { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 17px 15px; border-top: 1px solid #e9e5ec; }
.concept-caption h2 { font: 750 1.35rem/1.12 Bricolage, sans-serif; letter-spacing: -.025em; }
.concept-caption p { margin-top: 4px; color: #5e5766; font-size: .76rem; }
.open-label { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #e3dee8; padding: 6px 10px; border-radius: 30px; font-size: .73rem; font-weight: 750; flex: none; }
.open-label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--swatch); }
.concept-card:hover .open-label { background: #f1edf6; }
.gallery-footer { padding-block: 20px 33px; color: #62596b; font-size: .75rem; }
.presentation { --focus: #cebaff; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 9px 22px; background: #231d2e; color: #faf7ff; border-bottom: 1px solid #4c405d; font-size: .73rem; font-weight: 720; }
.gallery-back { text-decoration: underline; text-underline-offset: .26em; }
.gallery-back:hover { color: #dabfff; }
.concept-links { flex-wrap: wrap; }
.concept-links a { padding: 7px 10px; border-radius: 7px; }
.concept-links a:hover, .concept-links a[aria-current] { background: #4b3c60; }
.presentation .screen-links { color: #282037; border-color: #fff; }
.presentation .screen-links a { padding: 4px 9px; }
.presentation-note { color: #d2c5de; font-weight: 600; }

/* Shared mock-up components */
.crm {
  --bg: #f2f0f7;
  --surface: #fff;
  --text: #242031;
  --muted: #645c73;
  --rule: #e4deee;
  --quiet: #f2edf9;
  --accent: #6046b8;
  --chart: #8368e6;
  --track: #e8def9;
  --good: #21613f;
  --good-bg: #e5f3e9;
  --warn: #8b304c;
  --warn-bg: #f9e7ec;
  --focus: var(--accent);
  --panel-radius: 16px;
  --element-radius: 8px;
  --gap: 16px;
  --heading-font: Manrope, sans-serif;
  min-height: calc(100vh - 49px);
  color: var(--text);
  background: var(--bg);
  font-size: .83rem;
}
.capture .crm { min-height: 100vh; }
.crm-nav { display: flex; gap: 26px; align-items: center; min-height: 66px; padding-inline: 32px; background: var(--surface); border-bottom: 1px solid var(--rule); }
.crm-brand { display: flex; align-items: center; gap: 7px; flex: none; color: var(--muted); font-size: .7rem; font-weight: 800; }
.brand-mark img { width: 89px; height: auto; }
.crm-links { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.crm-links > * { padding: 8px 12px; white-space: nowrap; font-weight: 710; color: var(--muted); }
.crm-links a:hover, .crm-links a[aria-current] { background: var(--quiet); color: var(--accent); border-radius: var(--element-radius); }
.account { display: flex; align-items: center; gap: 9px; margin-left: auto; flex: none; }
.account strong, .account small { display: block; font-size: .71rem; }
.account small { color: var(--muted); }
.avatar { display: inline-grid; width: 28px; height: 28px; border-radius: 50%; place-items: center; font-size: .64rem; background: var(--quiet); color: var(--accent); font-weight: 800; flex: none; }
.account .avatar { width: 34px; height: 34px; }
.workspace { width: 100%; max-width: 1540px; margin-inline: auto; padding: 24px 32px 33px; }
.screen-heading { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin-bottom: 20px; }
.screen-heading h1 { font: 750 2.48rem/.99 var(--heading-font); letter-spacing: -.04em; }
.screen-heading p { margin-top: 9px; color: var(--muted); }
.screen-tools { display: flex; flex-wrap: wrap; gap: 7px; }
.mock-control { display: inline-flex; align-items: center; min-height: 34px; white-space: nowrap; padding: 6px 12px; border-radius: var(--element-radius); border: 1px solid var(--rule); background: var(--surface); font-weight: 720; font-size: .73rem; }
.mock-control.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.panel { min-width: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--panel-radius); padding: 16px 18px; }
.panel-heading { display: flex; justify-content: space-between; align-items: start; gap: 10px; margin-bottom: 14px; }
.panel-heading h2 { font: 800 1.03rem/1.18 var(--heading-font); letter-spacing: -.025em; }
.panel-heading p { margin-top: 4px; color: var(--muted); font-size: .71rem; }
.pill { display: inline-block; white-space: nowrap; padding: 3px 8px; font-size: .68rem; font-weight: 780; border-radius: 40px; background: var(--quiet); color: var(--muted); }
.tone-info { color: var(--accent); }
.tone-good { color: var(--good); background: var(--good-bg); }
.tone-warn { color: var(--warn); background: var(--warn-bg); }
.team-grid { display: grid; align-items: start; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
.metrics { grid-area: metrics; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.metric { display: grid; align-content: start; gap: 4px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--panel-radius); padding: 14px 17px; }
.metric dt { color: var(--muted); font-weight: 740; font-size: .74rem; }
.metric .metric-number { color: var(--text); font: 760 2.26rem/1.05 var(--heading-font); letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.metric-note { display: block; color: var(--muted); font-size: .67rem; }
.metric-2 .metric-number { color: var(--warn); }
.team-grid > .chart-panel { grid-area: chart; }
.team-grid > .quota { grid-area: quota; }
.team-grid > .priorities { grid-area: tasks; }
.team-grid > .team-table { grid-area: table; }
.chart-content { display: flex; gap: 10px; }
.chart-axis { display: flex; flex-direction: column; justify-content: space-between; align-items: end; width: 19px; height: 127px; flex: none; margin-top: -5px; color: var(--muted); font-size: .65rem; }
.chart-bars { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end; gap: 12px; width: 100%; background: repeating-linear-gradient(to bottom, var(--rule) 0 1px, transparent 1px 40px) top left / 100% 121px no-repeat; }
.day { display: grid; justify-items: center; gap: 8px; min-width: 0; }
.bar-space { position: relative; width: min(100%, 70px); height: 121px; }
.bar-target, .bar-done { display: block; position: absolute; left: 0; right: 0; bottom: 0; border-radius: var(--element-radius) var(--element-radius) 2px 2px; }
.bar-target { height: calc(var(--target) / 15 * 100%); background: var(--track); }
.bar-done { display: grid; place-items: start center; height: calc(var(--done) / 15 * 100%); background: var(--chart); color: #fff; font-size: .66rem; padding-top: 4px; }
.chart-day { font-size: .66rem; color: var(--muted); white-space: nowrap; }
.horizontal-value { display: none; }
.legend { display: flex; flex-wrap: wrap; gap: 5px 11px; color: var(--muted); font-size: .65rem; }
.legend span { display: inline-flex; align-items: center; white-space: nowrap; gap: 5px; }
.legend span::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--chart); }
.legend span + span::before { background: var(--track); border: 1px solid var(--rule); }
.quota-body { display: grid; justify-items: center; gap: 3px; }
.quota-shape { width: 104px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--chart) 0 77%, var(--track) 77% 100%); }
.quota-shape strong { display: grid; grid-auto-flow: column; place-content: center; align-items: baseline; width: 82%; aspect-ratio: 1; border-radius: 50%; background: var(--surface); font: 760 1.95rem/1 var(--heading-font); letter-spacing: -.04em; }
.quota-shape strong span { font-size: .62em; }
.quota-value { margin-top: 4px; }
.quota-body small { color: var(--muted); font-size: .69rem; }
.table-scroll { overflow-x: auto; margin-inline: -2px; }
table { border-collapse: collapse; width: 100%; min-width: 577px; text-align: left; white-space: nowrap; font-size: .74rem; }
thead { background: var(--quiet); }
thead th { color: var(--muted); font-size: .64rem; font-weight: 780; }
tbody tr + tr { border-top: 1px solid var(--rule); }
td, th { padding: 8px 8px; }
tbody th { font-weight: 780; }
.person { display: flex; align-items: center; gap: 7px; }
.avatar-1 { background: var(--good-bg); color: var(--good); }
.avatar-2 { background: var(--warn-bg); color: var(--warn); }
.avatar-3 { background: var(--track); }
.cell-progress { display: flex; align-items: center; gap: 8px; }
.cell-progress strong span { color: var(--muted); font-weight: 550; }
.track { display: block; height: 4px; width: 32px; border-radius: 5px; background: var(--track); }
.track i { display: block; height: 100%; width: var(--fill); border-radius: inherit; background: var(--chart); }
.overdue { color: var(--warn); font-weight: 800; }
.zero { color: var(--muted); }
.priority-count { color: var(--warn); font-size: 1.45rem; line-height: 1; letter-spacing: -.04em; }
.priority-list { list-style: none; padding: 0; }
.priority-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 7px; padding: 10px 0; }
.priority-list li + li { border-top: 1px solid var(--rule); }
.priority-list small { display: block; color: var(--muted); margin-top: 2px; font-size: .69rem; }
.priority-date { color: var(--muted); font-size: .67rem; padding-top: 3px; white-space: nowrap; }
.priority-list a, .priority-list strong { font-size: .76rem; font-weight: 800; }
.priority-list a { text-decoration: underline; text-underline-offset: 3px; }
.priority-list a:hover { color: var(--accent); }

.breadcrumb { color: var(--muted); font-size: .7rem; margin-bottom: 9px; }
.breadcrumb span { margin-inline: 4px; }
.entity-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.client h1 + .pill { align-self: center; }
.client-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: var(--gap); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--panel-radius); }
.client-facts div { padding: 12px 16px; }
.client-facts div + div { border-left: 1px solid var(--rule); }
.client-facts dt, .contact-fields dt { font-size: .69rem; color: var(--muted); }
.client-facts dd, .contact-fields dd { margin-top: 2px; font-weight: 760; overflow-wrap: anywhere; }
.client-grid { display: grid; gap: var(--gap); align-items: start; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.contacts { grid-area: contacts; }
.locations { grid-area: locations; }
.followup { grid-area: followup; }
.history { grid-area: history; }
.contact-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.location { display: flex; align-items: start; justify-content: space-between; gap: 7px; padding-block: 8px; }
.location + .location { border-top: 1px solid var(--rule); }
.location small { display: block; color: var(--muted); font-size: .71rem; margin-top: 3px; }
.followup h3 { font-size: .89rem; }
.followup-content { padding: 9px 11px; background: var(--quiet); border-radius: var(--element-radius); }
.followup p, .followup-content span { display: block; margin-top: 4px; color: var(--muted); font-size: .72rem; }
.timeline { padding: 0; list-style: none; }
.timeline li { display: grid; grid-template-columns: 69px minmax(0, 1fr); gap: 16px; padding: 13px 0; border-top: 1px solid var(--rule); }
.timeline h3 { font-size: .89rem; }
.timeline p { margin-block: 4px; color: var(--muted); max-width: 55ch; }
.timeline small { display: block; color: var(--muted); font-size: .69rem; }
.timeline time strong { display: block; font-size: .75rem; }
.timeline time small { margin-top: 4px; }

/* Lavanda: soft pastel dashboard, with inset chart shapes */
[data-theme="lavanda"] .crm {
  --bg: radial-gradient(ellipse at 5% 25%, #eaeafd, transparent 62%), radial-gradient(ellipse at 95% 28%, #faecee, transparent 63%), #f3f0f8;
  --surface: #fcfbfe;
  --rule: #e9e2f2;
  --quiet: #f2edf9;
  --accent: #6043b0;
  --chart: #7456d9;
  --track: #e6defb;
  --panel-radius: 23px;
  --element-radius: 20px;
  --gap: 13px;
  padding: 15px 17px;
}
[data-theme="lavanda"] .crm-nav { border: 1px solid #fff; border-radius: 22px; min-height: 61px; background: #ffffffb8; }
[data-theme="lavanda"] .crm-links a[aria-current] { background: #2f254b; color: #fff; border-radius: 30px; }
[data-theme="lavanda"] .workspace { padding-inline: 14px; }
[data-theme="lavanda"] .team-grid {
  grid-template-areas: "metrics metrics metrics metrics metrics metrics metrics metrics metrics metrics metrics metrics"
    "chart chart chart chart chart chart chart chart quota quota quota quota"
    "table table table table table table table table tasks tasks tasks tasks";
}
[data-theme="lavanda"] .client-grid {
  grid-template-areas: "contacts contacts contacts contacts contacts history history history history history history history"
    "locations locations locations locations locations history history history history history history history"
    "followup followup followup followup followup history history history history history history history";
}
[data-theme="lavanda"] .metric-0, [data-theme="lavanda"] .chart-panel { background: #f9f6ff; }
[data-theme="lavanda"] .metric-1 { background: #f4faf4; }
[data-theme="lavanda"] .metric-2 { background: #fff7fa; }
[data-theme="lavanda"] .metric-3 { background: #fffaf1; }
[data-theme="lavanda"] .panel, [data-theme="lavanda"] .metric { box-shadow: 0 6px 20px #45327609; }
[data-theme="lavanda"] .bar-target { background: repeating-linear-gradient(135deg, #e8e1fb 0 5px, #e1d8f9 5px 8px); }
[data-theme="lavanda"] .bar-done { background: linear-gradient(180deg, #7c5cd5, #6548c4); }
[data-theme="lavanda"] .quota-shape { background: conic-gradient(#a189e9 0%, #7456d9 77%, #ebdff6 77% 100%); }
[data-theme="lavanda"] .locations, [data-theme="lavanda"] .followup { background: #fcf9ff; }
[data-theme="lavanda"] .timeline li + li { margin-top: 8px; }
[data-theme="lavanda"] .timeline li { padding: 14px 12px; background: #f5f1fb; border: 0; border-radius: 15px; }

/* Bidfood: purple navigation and a lime weekly focal point */
[data-theme="bidfood"] .crm {
  --bg: #f2f0f6;
  --text: #25183f;
  --muted: #61566e;
  --accent: #4c2f80;
  --track: #e5deef;
  --chart: #634494;
  --panel-radius: 8px;
  --element-radius: 5px;
  --heading-font: Bricolage, sans-serif;
  display: grid;
  grid-template-columns: 175px minmax(0, 1fr);
}
[data-theme="bidfood"] .crm-nav {
  --focus: #cae78e;
  align-items: stretch; flex-direction: column; justify-content: start; min-width: 0;
  padding: 31px 15px 20px; gap: 31px; background: #251544; border: 0; color: #fff;
}
[data-theme="bidfood"] .crm-brand { padding-left: 8px; color: #e1d8f0; }
[data-theme="bidfood"] .brand-mark { background: #fff; border-radius: 5px; padding: 5px 7px; }
[data-theme="bidfood"] .brand-mark img { width: 76px; }
[data-theme="bidfood"] .crm-links { flex-direction: column; align-items: stretch; gap: 5px; }
[data-theme="bidfood"] .crm-links > * { color: #e9e2f4; padding: 9px 11px; }
[data-theme="bidfood"] .crm-links a:hover, [data-theme="bidfood"] .crm-links a[aria-current] { background: #cae78e; color: #221434; }
[data-theme="bidfood"] .account { margin: auto 0 0; padding-left: 4px; }
[data-theme="bidfood"] .account small { color: #d5c7e4; }
[data-theme="bidfood"] .workspace { padding-top: 27px; }
[data-theme="bidfood"] .team-grid {
  grid-template-areas: "quota quota quota quota metrics metrics metrics metrics metrics metrics metrics metrics"
    "quota quota quota quota chart chart chart chart chart chart chart chart"
    "table table table table table table table table tasks tasks tasks tasks";
}
[data-theme="bidfood"] .metric { padding-inline: 12px; }
[data-theme="bidfood"] .quota { align-self: stretch; background: #d8ed9c; color: #281846; border-color: #c8e485; }
[data-theme="bidfood"] .quota .panel-heading p, [data-theme="bidfood"] .quota small { color: #414727; }
[data-theme="bidfood"] .quota-body { justify-items: start; margin: 31px 0 0; }
[data-theme="bidfood"] .quota-shape { display: block; width: 100%; aspect-ratio: auto; background: transparent; border-radius: 0; }
[data-theme="bidfood"] .quota-shape strong { display: flex; justify-content: start; width: 100%; aspect-ratio: auto; border-radius: 0; background: transparent; font-size: 4.6rem; }
[data-theme="bidfood"] .quota-shape::after { content: ""; display: block; height: 8px; width: 100%; margin-block: 13px 8px; background: linear-gradient(90deg, #4b306f 77%, #aabf6f 77%); }
[data-theme="bidfood"] .bar-space { width: min(100%, 57px); }
[data-theme="bidfood"] .client .screen-heading { background: #371f5c; color: #fff; border-radius: 8px; padding: 25px 21px; }
[data-theme="bidfood"] .client .screen-heading p, [data-theme="bidfood"] .client .breadcrumb { color: #e4daee; }
[data-theme="bidfood"] .client .screen-heading .mock-control { color: #29193e; }
[data-theme="bidfood"] .client .screen-heading .primary { background: #cae78e; border-color: #cae78e; }
[data-theme="bidfood"] .client-grid {
  grid-template-areas: "contacts contacts contacts contacts contacts history history history history history history history"
    "locations locations locations locations locations history history history history history history history"
    "followup followup followup followup followup history history history history history history history";
}
[data-theme="bidfood"] .history { align-self: stretch; }
[data-theme="bidfood"] .followup-content { background: #f3eef8; }

/* Nakts maiņa: grid-first workload and low-glare status colors */
[data-theme="nakts"] .crm {
  --bg: #11201f;
  --surface: #182a28;
  --text: #edf4ea;
  --muted: #acc1b7;
  --rule: #344b46;
  --quiet: #223834;
  --accent: #c6e88c;
  --chart: #a8d878;
  --track: #354d45;
  --warn: #ffb6a9;
  --warn-bg: #513536;
  --good: #d4eda8;
  --good-bg: #30472e;
  --panel-radius: 5px;
  --element-radius: 3px;
  --gap: 11px;
}
[data-theme="nakts"] .crm-nav { background: #152522; }
[data-theme="nakts"] .brand-mark { background: #e7eee4; border-radius: 3px; padding: 4px 7px; }
[data-theme="nakts"] .brand-mark img { width: 74px; }
[data-theme="nakts"] .workspace { padding-top: 24px; }
[data-theme="nakts"] .screen-heading { border-bottom: 1px solid var(--rule); padding-bottom: 15px; margin-bottom: 14px; }
[data-theme="nakts"] .team-grid {
  grid-template-areas: "metrics metrics metrics metrics metrics metrics metrics metrics metrics metrics metrics metrics"
    "table table table table table table table table tasks tasks tasks tasks"
    "chart chart chart chart chart chart chart chart quota quota quota quota";
}
[data-theme="nakts"] .metrics { border: 1px solid var(--rule); gap: 0; background: var(--surface); }
[data-theme="nakts"] .metric { border: 0; background: transparent; border-radius: 0; }
[data-theme="nakts"] .metric + .metric { border-left: 1px solid var(--rule); }
[data-theme="nakts"] .metric-0 .metric-number { color: var(--accent); }
[data-theme="nakts"] .metric .metric-number, [data-theme="nakts"] .quota-shape strong { font-family: ui-monospace, monospace; }
[data-theme="nakts"] .team-table { padding-bottom: 6px; }
[data-theme="nakts"] tbody tr:nth-child(even) { background: #1c302c; }
[data-theme="nakts"] .bar-done, [data-theme="nakts"] .mock-control.primary { color: #182a1a; }
[data-theme="nakts"] .priority-list li { grid-template-columns: 1fr auto; }
[data-theme="nakts"] .priority-date { grid-column: 1 / -1; }
[data-theme="nakts"] .priority-list li { gap: 3px 8px; padding-block: 8px; }
[data-theme="nakts"] .client-grid {
  grid-template-areas: "history history history history history history history history followup followup followup followup"
    "history history history history history history history history contacts contacts contacts contacts"
    "history history history history history history history history locations locations locations locations";
}
[data-theme="nakts"] .history { align-self: stretch; }
[data-theme="nakts"] .client-facts div:first-child dd { color: var(--accent); }
[data-theme="nakts"] .timeline time strong { color: var(--accent); }

/* Lauka piezīmes: open rules, horizontal bars and a visit journal */
[data-theme="lauks"] .crm {
  --bg: #f4f1e7;
  --surface: #fbf8ee;
  --text: #22372b;
  --muted: #4d6454;
  --rule: #cdd4c5;
  --quiet: #e8ecdf;
  --accent: #315b45;
  --chart: #4d785c;
  --track: #dae3d4;
  --warn: #8b442e;
  --warn-bg: #f6e5d8;
  --good: #345b43;
  --good-bg: #dce8d9;
  --panel-radius: 0;
  --element-radius: 2px;
  --gap: 19px;
}
[data-theme="lauks"] .crm-nav { --focus: #e0e8da; background: #284636; color: #f5f5e9; border: none; min-height: 63px; }
[data-theme="lauks"] .crm-nav .account small, [data-theme="lauks"] .crm-brand, [data-theme="lauks"] .crm-links > * { color: #e0e8da; }
[data-theme="lauks"] .crm-links a { border-radius: 0; }
[data-theme="lauks"] .crm-links a[aria-current], [data-theme="lauks"] .crm-links a:hover { color: #253e33; }
[data-theme="lauks"] .brand-mark { background: #f4f1e7; border-radius: 2px; padding: 4px 7px; }
[data-theme="lauks"] .brand-mark img { width: 74px; }
[data-theme="lauks"] .workspace { padding-inline: 43px; }
[data-theme="lauks"] .screen-heading { border-bottom: 1px solid #9bac9b; padding-bottom: 15px; }
[data-theme="lauks"] .screen-heading h1 { font: 400 3.75rem/.88 "Instrument Serif", Georgia, serif; letter-spacing: -.015em; }
[data-theme="lauks"] .panel-heading h2 { font: 400 1.72rem/.98 "Instrument Serif", Georgia, serif; letter-spacing: -.01em; }
[data-theme="lauks"] .team-grid {
  grid-template-areas: "metrics metrics metrics metrics metrics metrics metrics metrics metrics quota quota quota"
    "chart chart chart chart chart chart chart tasks tasks tasks tasks tasks"
    "table table table table table table table table table table table table";
}
[data-theme="lauks"] .panel { background: transparent; border-width: 1px 0 0; padding: 13px 0 0; }
[data-theme="lauks"] .metrics { gap: 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
[data-theme="lauks"] .metric { background: transparent; border: 0; padding: 11px 10px 11px 15px; }
[data-theme="lauks"] .metric:first-child { padding-left: 0; }
[data-theme="lauks"] .metric + .metric { border-left: 1px solid var(--rule); }
[data-theme="lauks"] .metric .metric-number { font: 400 2.55rem/.95 "Instrument Serif", Georgia, serif; }
[data-theme="lauks"] .quota { padding: 9px 13px; border: 0; background: #e3eadb; }
[data-theme="lauks"] .quota .panel-heading { margin-bottom: 5px; }
[data-theme="lauks"] .quota-body { grid-template-columns: auto 1fr; gap: 0 8px; justify-items: start; align-items: center; }
[data-theme="lauks"] .quota-shape { grid-row: span 2; display: block; background: transparent; width: auto; aspect-ratio: auto; }
[data-theme="lauks"] .quota-shape strong { border-radius: 0; display: block; width: auto; aspect-ratio: auto; background: transparent; font: 400 2.35rem/1 "Instrument Serif", Georgia, serif; }
[data-theme="lauks"] .quota-value { font-size: .7rem; white-space: nowrap; margin: 0; }
[data-theme="lauks"] .chart-axis { display: none; }
[data-theme="lauks"] .chart-bars { grid-template-columns: 1fr; gap: 7px; background: none; }
[data-theme="lauks"] .day { grid-template-columns: 38px 1fr 37px; justify-items: stretch; align-items: center; }
[data-theme="lauks"] .chart-day { grid-area: 1 / 1; }
[data-theme="lauks"] .horizontal-value { display: block; text-align: right; font-size: .66rem; color: var(--muted); }
[data-theme="lauks"] .bar-space { width: 100%; height: 12px; }
[data-theme="lauks"] .bar-target, [data-theme="lauks"] .bar-done { left: 0; right: auto; height: 100%; padding: 0; border-radius: 2px; }
[data-theme="lauks"] .bar-target { width: calc(var(--target) / 15 * 100%); }
[data-theme="lauks"] .bar-done { width: calc(var(--done) / 15 * 100%); }
[data-theme="lauks"] .bar-done b { display: none; }
[data-theme="lauks"] thead { background: transparent; border-bottom: 1px solid #a9b7a9; }
[data-theme="lauks"] td, [data-theme="lauks"] th { padding-block: 6px; }
[data-theme="lauks"] .client-grid {
  grid-template-areas: "history history history history history history history history contacts contacts contacts contacts"
    "history history history history history history history history locations locations locations locations"
    "history history history history history history history history followup followup followup followup";
}
[data-theme="lauks"] .client-facts { background: #e8ecdf; }
[data-theme="lauks"] .timeline li { grid-template-columns: 90px minmax(0, 1fr); padding-block: 21px; }
[data-theme="lauks"] .timeline time strong { font: 400 1.46rem/1 "Instrument Serif", Georgia, serif; }
[data-theme="lauks"] .timeline h3 { font-size: 1rem; }

@media (max-width: 1150px) {
  .priority-list li { grid-template-columns: 1fr auto; gap: 3px 8px; }
  .priority-date { grid-column: 1 / -1; }
  [data-theme="bidfood"] .crm { grid-template-columns: 143px minmax(0, 1fr); }
  [data-theme="bidfood"] .workspace, [data-theme="lauks"] .workspace { padding-inline: 23px; }
  [data-theme="bidfood"] .account .avatar { display: none; }
  [data-theme="bidfood"] .team-grid { grid-template-areas: "metrics metrics metrics metrics metrics metrics metrics metrics metrics metrics metrics metrics"
    "quota quota quota quota chart chart chart chart chart chart chart chart"
    "table table table table table table table table table table table table"
    "tasks tasks tasks tasks tasks tasks tasks tasks tasks tasks tasks tasks"; }
  [data-theme="bidfood"] .quota-body { margin-top: 0; }
}
@media (max-width: 900px) {
  .gallery-wrap { padding-inline: 25px; }
  .gallery-intro { align-items: start; flex-direction: column; gap: 13px; }
  .presentation-note { display: none; }
  .panel { padding-inline: 14px; }
  .workspace { padding-inline: 20px; }
  .crm-nav { padding-inline: 20px; gap: 13px; }
  .crm-links > * { padding-inline: 7px; }
  .account > div { display: none; }
  [data-theme] .team-grid { grid-template-areas: "metrics metrics metrics metrics metrics metrics metrics metrics metrics metrics metrics metrics"
    "chart chart chart chart chart chart chart chart quota quota quota quota"
    "table table table table table table table table table table table table"
    "tasks tasks tasks tasks tasks tasks tasks tasks tasks tasks tasks tasks"; }
  [data-theme="nakts"] .team-grid { grid-template-areas: "metrics metrics metrics metrics metrics metrics metrics metrics metrics metrics metrics metrics"
    "table table table table table table table table table table table table"
    "chart chart chart chart chart chart chart chart quota quota quota quota"
    "tasks tasks tasks tasks tasks tasks tasks tasks tasks tasks tasks tasks"; }
  [data-theme="lauks"] .quota-body { grid-template-columns: auto; }
  [data-theme="bidfood"] .account > div { display: block; }
}
@media (max-width: 690px) {
  .gallery-wrap { padding-inline: 15px; }
  .gallery-brand { height: 57px; gap: 13px; }
  .gallery-brand span { padding-left: 13px; }
  .gallery-intro { padding-block: 24px 17px; }
  .gallery h1 { font-size: 2.4rem; }
  .gallery-intro p { font-size: .82rem; }
  .concept-grid { grid-template-columns: 1fr; gap: 13px; }
  .concept-caption { padding: 11px 12px; }
  .presentation { justify-content: start; padding-inline: 11px; gap: 7px 10px; }
  .gallery-back { width: 100%; }
  .concept-links { gap: 1px; }
  .concept-links a { padding: 5px 7px; }
  .workspace, [data-theme="bidfood"] .workspace, [data-theme="lauks"] .workspace { padding: 19px 14px 25px; }
  .screen-heading { flex-direction: column; align-items: start; gap: 10px; }
  .screen-heading h1 { font-size: 2.2rem; }
  [data-theme="lauks"] .screen-heading h1 { font-size: 3.06rem; }
  .crm-nav, [data-theme="bidfood"] .crm-nav { gap: 7px 12px; flex-direction: row; flex-wrap: wrap; padding: 9px 13px; align-items: center; }
  [data-theme="bidfood"] .crm { display: block; }
  [data-theme="bidfood"] .account .avatar { display: inline-grid; }
  .account, [data-theme="bidfood"] .account { order: 1; margin: 0 0 0 auto; }
  [data-theme] .account > div { display: none; }
  .crm-links, [data-theme="bidfood"] .crm-links { order: 2; width: 100%; flex-direction: row; gap: 2px; }
  .crm-links > *, [data-theme="bidfood"] .crm-links > * { padding: 5px 8px; font-size: .73rem; }
  [data-theme="lavanda"] .crm { padding: 8px; }
  [data-theme="lavanda"] .workspace { padding-inline: 5px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  [data-theme="nakts"] .metric:nth-child(3), [data-theme="lauks"] .metric:nth-child(3) { border-left: 0; }
  [data-theme="nakts"] .metric:nth-child(n + 3), [data-theme="lauks"] .metric:nth-child(n + 3) { border-top: 1px solid var(--rule); }
  [data-theme="lauks"] .metric:nth-child(3) { padding-left: 0; }
  [data-theme="bidfood"] .quota-shape strong { font-size: 3.3rem; }
  [data-theme] .team-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "metrics" "chart" "quota" "table" "tasks"; }
  [data-theme="nakts"] .team-grid { grid-template-areas: "metrics" "table" "tasks" "chart" "quota"; }
  [data-theme] .client-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "contacts" "history" "locations" "followup"; }
  [data-theme="nakts"] .client-grid, [data-theme="lauks"] .client-grid { grid-template-areas: "history" "followup" "contacts" "locations"; }
  .client-facts div { padding: 8px; }
  .client-facts dd { font-size: .72rem; }
  [data-theme="lauks"] .quota-body { grid-template-columns: auto 1fr; }
}
