/* ============================================================
   ProRent — Rezervāciju Paraugs (DEMO)
   Gaišs, tīrs SaaS/app dizains
   ============================================================ */

:root {
  --bg: #F4F1ED;
  --surface: #FFFFFF;
  --ink: #14171C;
  --mid: #515A64;
  --faint: #8C96A3;
  --line: #E2DCD3;
  --orange: #F5820A;
  --orange-d: #9C4D07;
  --green: #2E7D32;
  --amber: #B26A00;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(20, 23, 28, 0.04), 0 2px 8px rgba(20, 23, 28, 0.05);
  --shadow-md: 0 4px 14px rgba(20, 23, 28, 0.08), 0 1px 3px rgba(20, 23, 28, 0.06);
  --shadow-lg: 0 18px 50px rgba(20, 23, 28, 0.18);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Barlow', sans-serif;
  font-weight: 400;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100vh;
}

.mono { font-family: 'IBM Plex Mono', monospace; font-weight: 500; }

h1, h2, h3, h4 {
  font-family: 'Barlow Condensed', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.05;
}

/* ===== Header ===== */
.hdr {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.hdr__inner {
  max-width: 1180px;
  margin: 0 auto;
  height: 60px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.hdr__brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hdr__logo { height: 32px; width: auto; display: block; object-fit: contain; }
.hdr__wordmark {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 1px;
  color: var(--ink);
}
.hdr__wordmark-accent { color: var(--orange); }
.hdr__badge {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.5px;
  color: var(--mid);
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 4px 8px;
  border-radius: 20px;
  white-space: nowrap;
}
.hdr__switch {
  display: flex;
  gap: 4px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 3px;
}
.switch-btn {
  font-family: 'Barlow', sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: var(--mid);
  background: transparent;
  border: none;
  padding: 7px 14px;
  border-radius: 18px;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.switch-btn:hover { color: var(--ink); }
.switch-btn.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* ===== Layout ===== */
.main { max-width: 1180px; margin: 0 auto; padding: 36px 20px 80px; }
.view.is-hidden { display: none; }

.view__head { margin-bottom: 28px; }
.view__title {
  font-weight: 900;
  font-size: 38px;
  color: var(--ink);
}
.view__sub {
  color: var(--mid);
  font-size: 16px;
  margin-top: 6px;
  max-width: 560px;
}

/* ===== Catalog grid ===== */
.catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #d8d0c4;
}
.card__media {
  background: #fff;
  height: 168px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}
.card__media img { max-width: 100%; max-height: 100%; object-fit: contain; }
.card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.card__cat {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.3px;
  color: var(--faint);
  text-transform: uppercase;
}
.card__name {
  font-weight: 800;
  font-size: 21px;
  color: var(--ink);
  margin: 3px 0 8px;
}
.card__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  width: fit-content;
}
.card__badge--ok { color: var(--green); background: rgba(46, 125, 50, 0.1); }
.card__badge--busy { color: var(--amber); background: rgba(178, 106, 0, 0.1); }
.card__badge--req { color: var(--mid); background: var(--bg); }
.card__badge .dot { font-size: 9px; line-height: 1; }
.card__footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card__price { font-size: 15px; color: var(--ink); font-weight: 600; }
.card__price b { font-size: 17px; color: var(--orange-d); }
.card__cta {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 13px;
  color: #1b1205;
  background: var(--orange);
  padding: 9px 16px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s ease, transform .12s ease, box-shadow .15s ease;
}
.card__cta:hover {
  background: #e0740a;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px -5px rgba(245, 130, 10, .6);
}

/* ===== Buttons ===== */
.btn {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 15px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--orange); color: #1b1205; }
.btn--primary:hover { filter: brightness(1.05); }
.btn--primary:disabled {
  background: var(--line);
  color: var(--faint);
  cursor: not-allowed;
  filter: none;
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn--ghost:hover { border-color: var(--mid); }

/* ===== Modal ===== */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal.is-hidden { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(20, 23, 28, 0.45); backdrop-filter: blur(2px); }
.modal__panel {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--mid);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s ease;
}
.modal__close:hover { background: var(--bg); color: var(--ink); }

/* ===== Detail content ===== */
.detail { padding: 24px; }
.detail__top { display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: start; }
.detail__media {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.detail__media img { max-width: 100%; max-height: 100%; object-fit: contain; }
.detail__cat {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--faint);
  text-transform: uppercase;
}
.detail__name { font-weight: 900; font-size: 30px; margin: 2px 0 10px; }
.detail__price { font-size: 16px; color: var(--mid); }
.detail__price b { font-size: 22px; color: var(--orange-d); }
.specs { list-style: none; margin: 14px 0 0; display: grid; gap: 6px; }
.specs li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  padding: 5px 0;
  border-bottom: 1px dashed var(--line);
}
.specs li span:first-child { color: var(--mid); }
.specs li span:last-child { font-weight: 600; color: var(--ink); }

.detail__divider { height: 1px; background: var(--line); margin: 22px 0; }

.detail__section-title {
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 12px;
  color: var(--ink);
}

/* ===== Calendar ===== */
.cal {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.cal__head {
  background: var(--bg);
  padding: 10px 14px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 16px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal__dow {
  text-align: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--faint);
  padding: 8px 0;
  text-transform: uppercase;
}
.cal__day {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  border: 1px solid transparent;
  user-select: none;
  transition: background 0.12s ease;
}
.cal__day.is-empty { cursor: default; }
.cal__day.is-selectable:hover { background: rgba(245, 130, 10, 0.12); }
.cal__day.is-past {
  color: var(--faint);
  cursor: not-allowed;
  text-decoration: line-through;
  opacity: 0.55;
}
.cal__day.is-booked {
  color: var(--amber);
  background: repeating-linear-gradient(45deg, rgba(178,106,0,0.06), rgba(178,106,0,0.06) 4px, rgba(178,106,0,0.13) 4px, rgba(178,106,0,0.13) 8px);
  cursor: not-allowed;
  text-decoration: line-through;
}
.cal__day.in-range { background: rgba(245, 130, 10, 0.16); }
.cal__day.is-end-edge { background: var(--orange); color: #1b1205; font-weight: 700; border-radius: 6px; }

.cal__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--mid);
}
.cal__legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.swatch--sel { background: var(--orange); }
.swatch--booked { background: repeating-linear-gradient(45deg, rgba(178,106,0,0.13), rgba(178,106,0,0.13) 3px, rgba(178,106,0,0.3) 3px, rgba(178,106,0,0.3) 6px); }
.swatch--free { background: var(--surface); border: 1px solid var(--line); }

/* ===== Price box ===== */
.pricebox {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-top: 18px;
}
.pricebox__row { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; color: var(--mid); margin-bottom: 8px; }
.pricebox__row .mono { color: var(--ink); }
.pricebox__delivery { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--mid); margin: 12px 0; cursor: pointer; user-select: none; }
.pricebox__delivery input { width: 17px; height: 17px; accent-color: var(--orange); cursor: pointer; }
.pricebox__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 4px;
}
.pricebox__total-label { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; font-size: 17px; }
.pricebox__total-val { font-family: 'IBM Plex Mono', monospace; font-weight: 500; font-size: 26px; color: var(--orange-d); }
.pricebox__hint { font-size: 13px; color: var(--faint); margin-top: 4px; }

.detail__actions { margin-top: 20px; display: flex; gap: 12px; }
.detail__actions .btn { flex: 1; }

/* ===== Request-only note ===== */
.reqnote { padding: 32px 28px; text-align: center; }
.reqnote__icon { font-size: 40px; }
.reqnote__title { font-weight: 900; font-size: 26px; margin: 10px 0 8px; }
.reqnote p { color: var(--mid); max-width: 420px; margin: 0 auto 18px; }

/* ===== Confirmation ===== */
.confirm { padding: 36px 28px; text-align: center; }
.confirm__check {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(46, 125, 50, 0.12);
  color: var(--green);
  font-size: 34px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.confirm__title { font-weight: 900; font-size: 30px; color: var(--ink); }
.confirm__num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 19px;
  color: var(--orange-d);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 6px 16px;
  display: inline-block;
  margin: 14px 0 8px;
}
.confirm__summary {
  text-align: left;
  max-width: 420px;
  margin: 20px auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.confirm__summary .row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 11px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--line);
}
.confirm__summary .row:last-child { border-bottom: none; background: var(--bg); }
.confirm__summary .row span:first-child { color: var(--mid); }
.confirm__summary .row span:last-child { font-weight: 600; color: var(--ink); }
.confirm__summary .row .mono { color: var(--orange-d); }
.confirm__note { font-size: 13px; color: var(--faint); max-width: 380px; margin: 0 auto 20px; }
.confirm__lead { font-size: 15px; color: var(--mid); max-width: 440px; margin: 12px auto 4px; }

/* ===== Header right group + Skaidrojumi toggle ===== */
.hdr__right { display: flex; align-items: center; gap: 14px; }
.hdr__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.hdr__toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.hdr__toggle-track {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: 20px;
  background: var(--line);
  transition: background 0.18s ease;
  flex: none;
}
.hdr__toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease;
}
.hdr__toggle input:checked + .hdr__toggle-track { background: var(--orange); }
.hdr__toggle input:checked + .hdr__toggle-track .hdr__toggle-knob { transform: translateX(16px); }
.hdr__toggle input:focus-visible + .hdr__toggle-track { outline: 2px solid var(--orange-d); outline-offset: 2px; }
.hdr__toggle-label {
  font-family: 'Barlow', sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: var(--mid);
  white-space: nowrap;
}

/* ===== Callouts (skaidrojumi) ===== */
.callout {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(245, 130, 10, 0.08);
  border: 1px solid rgba(245, 130, 10, 0.22);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--orange-d);
  max-width: 540px;
}
.callout__icon { flex: none; line-height: 1.3; }
.view__how-row {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.view__how {
  display: inline-block;
  font-size: 14px;
  letter-spacing: 1px;
  text-decoration: none;
  box-shadow: 0 6px 18px -6px rgba(245, 130, 10, .55);
  animation: how-pulse 2.4s var(--ease, ease) infinite;
}
.view__how:hover { animation: none; }
@keyframes how-pulse {
  0%, 100% { box-shadow: 0 6px 18px -6px rgba(245, 130, 10, .45); }
  50%      { box-shadow: 0 8px 26px -4px rgba(245, 130, 10, .85); }
}
@media (prefers-reduced-motion: reduce) { .view__how { animation: none; } }
.view__how-note {
  font-size: 13px;
  color: var(--mid);
  max-width: 30ch;
  line-height: 1.4;
}
.callout--inline {
  margin-top: 10px;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 18px;
  align-items: center;
  max-width: none;
}
.callout--hidden { display: none !important; }

/* ===== B2B login ===== */
.login { display: flex; justify-content: center; padding: 30px 0 40px; }
.login.is-hidden { display: none; }
.login__card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 32px 30px;
  width: 100%;
  max-width: 400px;
}
.login__brand { display: flex; align-items: center; gap: 10px; }
.login__logo { height: 38px; width: auto; object-fit: contain; }
.login__title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 22px;
  color: var(--ink);
  line-height: 1.05;
}
.login__sub { color: var(--mid); font-size: 14px; margin: 12px 0 20px; }
.login__form { display: flex; flex-direction: column; gap: 14px; }
.login__field { display: flex; flex-direction: column; gap: 5px; }
.login__field span {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--faint);
}
.login__field input {
  font-family: 'Barlow', sans-serif;
  font-size: 15px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  transition: border-color 0.15s ease;
}
.login__field input:focus { outline: none; border-color: var(--orange); }
.login__btn { width: 100%; margin-top: 4px; }
.login__hint { font-size: 12px; color: var(--faint); text-align: center; margin-top: 2px; }

/* ===== B2B dashboard ===== */
.dash.is-hidden { display: none; }
.dash__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}
.dash__greet { font-weight: 900; font-size: 30px; color: var(--ink); }
.dash__logout {
  font-family: 'Barlow', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--mid);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
}
.dash__logout:hover { color: var(--orange-d); border-bottom-color: var(--orange-d); }

.dash__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 30px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat__label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--faint);
}
.stat__val { font-size: 26px; color: var(--orange-d); }

.dash__block { margin-bottom: 32px; }
.dash__block-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 14px;
}
.dash__block-head .callout { margin-top: 0; }
.dash__block-title {
  font-weight: 800;
  font-size: 20px;
  color: var(--ink);
  margin-bottom: 14px;
}
.dash__block-head .dash__block-title { margin-bottom: 0; }

/* Aktīvās nomas */
.rentals {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.rental {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 14px;
}
.rental__media {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}
.rental__media img { max-width: 100%; max-height: 76px; object-fit: contain; }
.rental__body { display: flex; flex-direction: column; min-width: 0; }
.rental__cat {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  text-transform: uppercase;
  color: var(--faint);
}
.rental__name { font-weight: 800; font-size: 18px; color: var(--ink); margin: 2px 0 4px; }
.rental__meta { font-size: 12px; color: var(--mid); margin-bottom: 8px; }
.rental__bar {
  height: 7px;
  background: var(--bg);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.rental__bar-fill { height: 100%; background: var(--orange); border-radius: 6px; }
.rental__bar-label { font-size: 11px; color: var(--faint); margin: 5px 0 10px; }
.rental__actions { display: flex; gap: 8px; margin-top: auto; }

.btn-mini {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-size: 12px;
  padding: 7px 12px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-mini:hover { border-color: var(--mid); }
.btn-mini--accent { background: var(--orange); color: #1b1205; border-color: var(--orange); }
.btn-mini--accent:hover { filter: brightness(1.05); border-color: var(--orange); }

/* ===== Rēķini (invoices) — statusa nozīmītes ===== */
.inv-badge {
  display: inline-block;
  font-family: 'Barlow', sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.inv-badge--paid { color: var(--green); background: rgba(46, 125, 50, 0.12); }
.inv-badge--unpaid { color: var(--amber); background: rgba(178, 106, 0, 0.12); }
.inv__count { font-size: 12px; color: var(--faint); margin-top: 10px; }

/* Akti */
.acts { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.act {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 14px 16px;
}
.act__info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.act__nr { font-size: 15px; color: var(--orange-d); }
.act__meta { font-size: 13px; color: var(--mid); }
.act__actions { display: flex; gap: 8px; }

/* ===== Nomas vēsture — kartes ===== */
.histcards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}
.histcard {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 12px 16px 12px 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.histcard:hover { border-color: var(--mid); box-shadow: var(--shadow-md); }
.histcard__media {
  width: 60px;
  height: 60px;
  flex: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}
.histcard__media img { max-width: 100%; max-height: 48px; object-fit: contain; }
.histcard__body { min-width: 0; }
.histcard__cat {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--faint);
}
.histcard__name {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 19px;
  line-height: 1.1;
  color: var(--ink);
  margin: 1px 0 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.histcard__meta {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--mid);
}
.histcard__dot { color: var(--faint); }
.histcard__sum {
  font-size: 17px;
  font-weight: 500;
  color: var(--orange-d);
  white-space: nowrap;
  text-align: right;
}

/* ===== Rēķini — kartes (akti stilā) ===== */
.invcards { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.invcard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 14px 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.invcard:hover { border-color: var(--mid); box-shadow: var(--shadow-md); }
.invcard.is-paid { opacity: 0.92; }
.invcard__info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.invcard__nr { font-size: 15px; color: var(--orange-d); }
.invcard__meta { font-size: 13px; color: var(--mid); }
.invcard__right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.invcard__sum {
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}

/* ===== Maksājuma modālis ===== */
.pay { padding: 28px 26px 24px; }
.pay__head { text-align: center; margin-bottom: 20px; }
.pay__nr {
  font-size: 12px;
  color: var(--faint);
  letter-spacing: 0.3px;
}
.pay__title { font-weight: 900; font-size: 24px; color: var(--ink); margin: 6px 0 8px; }
.pay__amount {
  font-size: 34px;
  font-weight: 500;
  color: var(--orange-d);
}
.pay__sub { font-size: 13px; color: var(--mid); margin-top: 4px; }

.pay__methods { display: flex; flex-direction: column; gap: 12px; }
.pay__method {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}
.pay__method:hover { border-color: var(--orange); background: rgba(245, 130, 10, 0.04); }
.pay__method:active { transform: translateY(1px); }
.pay__method-ico { font-size: 22px; line-height: 1; flex: none; }
.pay__method-txt { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.pay__method-txt b { font-size: 15px; color: var(--ink); font-weight: 600; }
.pay__method-txt small { font-size: 12px; color: var(--faint); }
.pay__method-arrow { color: var(--orange-d); font-weight: 700; flex: none; }

.pay__bank {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.pay__bank-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
}
.pay__banks { display: flex; gap: 8px; flex-wrap: wrap; }
.pay__bank-btn {
  flex: 1;
  min-width: 92px;
  font-family: 'Barlow', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}
.pay__bank-btn:hover { border-color: var(--orange); background: rgba(245, 130, 10, 0.06); }
.pay__bank-btn:active { transform: translateY(1px); }
.pay__note { font-size: 12px; color: var(--faint); text-align: center; margin-top: 18px; }

/* Apstrādes stāvoklis */
.pay--processing { text-align: center; padding: 48px 26px; }
.pay__spinner {
  width: 42px; height: 42px;
  margin: 0 auto 18px;
  border: 4px solid var(--line);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: pay-spin 0.7s linear infinite;
}
@keyframes pay-spin { to { transform: rotate(360deg); } }
.pay__processing-txt { font-size: 15px; color: var(--mid); }

/* Veiksmes stāvoklis */
.pay--success { text-align: center; padding: 36px 26px; }
.pay--success .confirm__check { margin-bottom: 16px; }
.pay__success-sub { font-size: 14px; color: var(--mid); margin: 6px 0 22px; }

/* ===== Magic-link login ===== */
.login__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 16px;
  color: var(--faint);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.login__divider::before, .login__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.login__magic-btn { width: 100%; }
.login__magic-hint {
  font-size: 12px;
  color: var(--green);
  text-align: center;
  margin-top: 8px;
  font-weight: 600;
}
.login__magic-sent { text-align: center; }
.login__magic-sent.is-hidden { display: none; }
.login__magic-check {
  width: 48px; height: 48px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: rgba(46, 125, 50, 0.12);
  color: var(--green);
  font-size: 26px;
  display: flex; align-items: center; justify-content: center;
}
.login__magic-msg { font-size: 14px; color: var(--mid); margin-bottom: 16px; }
.login__magic-msg b { color: var(--ink); }
.login__magic-open { width: 100%; }

/* ===== Footer ===== */
.ftr {
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.ftr__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.ftr__copy { font-size: 13px; color: var(--faint); }
.ftr__links { display: flex; gap: 18px; }
.ftr__links a {
  font-size: 13px;
  font-weight: 600;
  color: var(--mid);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.ftr__links a:hover { color: var(--orange-d); border-bottom-color: var(--orange-d); }

/* ===== Backoffice (Markuss) ===== */
.backoffice { display: flex; flex-direction: column; gap: 34px; }
.bo-block__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 16px;
}
.bo-block__title {
  font-weight: 800;
  font-size: 22px;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.bo-count {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  font-weight: 500;
  color: #1b1205;
  background: var(--orange);
  border-radius: 20px;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bo-block__head .callout { margin-top: 0; }
.bo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }

.bo-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bo-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.bo-card__name { font-weight: 800; font-size: 18px; color: var(--ink); }
.bo-card__phone { font-size: 12.5px; color: var(--mid); display: block; margin-top: 2px; }
.bo-card__ref {
  font-size: 12px;
  color: var(--orange-d);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 3px 10px;
  white-space: nowrap;
  flex: none;
}
.bo-card__equip {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.bo-card__thumb {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
}
.bo-card__thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.bo-card__equip-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.bo-card__equip-name { font-weight: 600; font-size: 15px; color: var(--ink); }
.bo-card__dates { font-size: 12.5px; color: var(--mid); }
.bo-card__flags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.bo-flag { font-size: 11.5px; color: var(--orange-d); font-weight: 600; }
.bo-flag--muted { color: var(--faint); font-weight: 500; }
.bo-card__total { text-align: right; display: flex; flex-direction: column; gap: 2px; }
.bo-card__total-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--faint);
}
.bo-card__total-val { font-size: 19px; color: var(--orange-d); }

.bo-avail { font-size: 14px; font-weight: 600; }
.bo-avail--ok { color: var(--green); }
.bo-avail--warn { color: var(--amber); }

.bo-card__actions { display: flex; gap: 10px; }
.bo-card__actions .btn { flex: 1; padding: 11px 18px; font-size: 14px; }

/* Automatizācijas soļu ķēde */
.bo-card__steps { display: flex; flex-direction: column; gap: 8px; }
.bo-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--faint);
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.bo-step__mark {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--faint);
  transition: all 0.25s ease;
}
.bo-step.is-active { color: var(--ink); border-color: rgba(245, 130, 10, 0.4); background: rgba(245, 130, 10, 0.06); }
.bo-step.is-active .bo-step__mark { background: var(--surface); border-color: var(--orange); }
.bo-step.is-done { color: var(--ink); background: rgba(46, 125, 50, 0.07); border-color: rgba(46, 125, 50, 0.3); }
.bo-step.is-done .bo-step__mark { background: var(--green); border-color: var(--green); color: #fff; }
.bo-card--processing { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(245, 130, 10, 0.12), var(--shadow-sm); }

/* Soļa spinneris */
.bo-spinner {
  display: block;
  width: 12px; height: 12px;
  border: 2px solid var(--line);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: pay-spin 0.7s linear infinite;
}

/* Atcelšanas logs (grace) */
.bo-grace {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: rgba(245, 130, 10, 0.07);
  border: 1px solid rgba(245, 130, 10, 0.3);
  border-radius: var(--radius-sm);
}
.bo-grace__txt { font-size: 13.5px; color: var(--ink); }
.bo-grace__txt strong { color: var(--orange); font-variant-numeric: tabular-nums; }
.bo-grace__cancel { flex: none; padding: 8px 16px; font-size: 13px; }

/* Manuāla aizvēršana ("Labi") */
.bo-done {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
  padding: 12px;
  background: rgba(46, 125, 50, 0.08);
  border: 1px solid rgba(46, 125, 50, 0.3);
  border-radius: var(--radius-sm);
}
.bo-done__txt { font-size: 14px; font-weight: 600; color: var(--green); }
.bo-done__ok { flex: none; padding: 9px 24px; font-size: 14px; }

/* Apstiprinātās rindas */
.bo-card--approved { gap: 8px; }
.bo-badge-approved {
  font-family: 'Barlow', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
  background: rgba(46, 125, 50, 0.12);
  border-radius: 20px;
  padding: 4px 12px;
  white-space: nowrap;
  flex: none;
}
.bo-card__approved-meta { font-size: 12.5px; color: var(--mid); }
.bo-empty { font-size: 14px; color: var(--faint); padding: 4px 2px; }

/* ===== Toast ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 12px);
  z-index: 200;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 20px;
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: 90vw;
  text-align: center;
}
.toast.is-hidden { display: none; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .main { padding: 24px 16px 60px; }
  .view__title { font-size: 30px; }
  .catalog { grid-template-columns: 1fr; }
  .hdr__badge { display: none; }
  /* Galvene divās rindās: brends + toggle augšā, skatu pārslēgs zem tā pilnā platumā */
  .hdr__inner {
    height: auto;
    flex-wrap: wrap;
    gap: 8px 10px;
    padding: 10px 14px;
  }
  .hdr__brand { order: 1; }
  .hdr__right { order: 2; margin-left: auto; }
  .hdr__switch { order: 3; flex-basis: 100%; }
  .switch-btn { flex: 1; font-size: 12px; padding: 7px 8px; text-align: center; }
  .detail { padding: 18px; }
  .detail__top { grid-template-columns: 1fr; }
  .detail__media { height: 150px; }
  .detail__actions { flex-direction: column; }
  .cal__day { font-size: 13px; }

  .hdr__toggle-label { display: none; }
  .hdr__right { gap: 10px; }
  .dash__greet { font-size: 24px; }
  .dash__stats { grid-template-columns: 1fr; gap: 10px; }
  .rentals { grid-template-columns: 1fr; }
  .dash__block-head { flex-direction: column; align-items: flex-start; }
  .act { flex-direction: column; align-items: flex-start; }
  .act__actions { width: 100%; }
  .act__actions .btn-mini { flex: 1; }

  .histcards { grid-template-columns: 1fr; }
  .invcard__right { width: 100%; justify-content: flex-start; }
  .invcard__right .inv__pay { margin-left: auto; }
  .pay__banks { flex-direction: column; }
  .ftr__inner { flex-direction: column; align-items: flex-start; gap: 8px; }

  .bo-list { grid-template-columns: 1fr; }
  .bo-block__head { flex-direction: column; align-items: flex-start; }
}

