/* Zemes Portfelis - reģistrācijas konfigurators un konta modālis (koplietots) */

.plan-page { min-height: 100%; display: flex; flex-direction: column; }

.plan-topbar {
  height: 64px; flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px; border-bottom: 1px solid var(--line);
}
.plan-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.plan-brand-name { font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.plan-topbar-right { display: flex; align-items: center; gap: 14px; font-size: 13.5px; color: var(--ink-soft); white-space: nowrap; }
.plan-already { color: var(--green); font-weight: 500; }

.plan-wrap {
  width: 100%; max-width: 1180px; margin: 0 auto; padding: 44px 24px 60px;
  display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; align-items: start;
}
.plan-main { display: flex; flex-direction: column; gap: 40px; min-width: 0; }
#plan-root { display: flex; flex-direction: column; gap: 40px; }

.plan-heading { display: flex; flex-direction: column; gap: 8px; }
.plan-heading h1 {
  font-family: var(--font-display); margin: 0; font-size: 36px; font-weight: 700;
  letter-spacing: -.01em; line-height: 1.1;
}
.plan-heading p { margin: 0; color: var(--ink-soft); font-size: 15px; line-height: 1.45; }

.plan-section { display: flex; flex-direction: column; gap: 14px; }
.plan-section-head { display: flex; flex-direction: column; gap: 4px; }
.plan-step-row { display: flex; align-items: center; gap: 10px; }
.plan-step {
  width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--green); color: #f3efe2;
  font-weight: 600; font-size: 13px; display: flex; align-items: center; justify-content: center;
}
.plan-h2 { font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: -.01em; margin: 0; }
.plan-hint { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.45; padding-left: 36px; }

/* segmentēts slēdzis (joma) */
.seg { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; max-width: 520px; }
.seg.has-error { border-color: var(--red); }
.seg > button {
  flex: 1; border: none; background: none; padding: 10px 12px; text-align: center; font-size: 13.5px;
  font-weight: 500; color: var(--ink); border-left: 1px solid var(--line); font-family: inherit;
  transition: background-color .15s, color .15s;
}
.seg > button:first-child { border-left: none; }
.seg > button.on { background: var(--green); color: #fff; font-weight: 600; }
.seg > button:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(46, 125, 91, .15); position: relative; z-index: 1; }

/* kadastru pogas */
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip {
  padding: 9px 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-weight: 500;
  font-size: 14px; color: var(--ink); font-family: inherit; transition: background-color .15s, border-color .15s, color .15s;
  min-height: 40px;
}
.chip.on { background: var(--green); color: #fff; border-color: var(--green); font-weight: 600; }
.chip:focus-visible { outline: none; border-color: var(--green-bright); box-shadow: 0 0 0 3px rgba(46, 125, 91, .15); }
.chip-custom { width: 150px; margin-left: 6px; }
.plan-tier-note { margin: 0 0 8px; color: var(--ink-soft); font-size: 12.5px; }

/* slāņu ievadteksts un josla profila maiņai */
.plan-layers-intro { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.45; padding-left: 36px; }
.plan-profile-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: color-mix(in srgb, var(--gold) 12%, white); border: 1px solid color-mix(in srgb, var(--gold) 35%, white);
  border-radius: 8px; padding: 10px 14px; font-size: 13px; color: var(--ink);
}
.plan-profile-bar button { flex: none; }

/* slāņu kartītes */
.lcard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.lcard {
  background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; position: relative;
  display: flex; flex-direction: column; cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .1s;
  /* .lcard ir <label> - atsit styles.css "label" noklusējumus (margin-bottom, muted krāsu, mazu fontu) */
  margin-bottom: 0; color: var(--ink); font-size: 14px; font-weight: 400;
}
.lcard.on { border-color: var(--green-bright); box-shadow: 0 0 0 3px rgba(46, 125, 91, .15); }
.lcard:focus-within { border-color: var(--green-bright); box-shadow: 0 0 0 3px rgba(46, 125, 91, .15); }
.lcard:active { transform: scale(.995); }
.lcard input[type="checkbox"] {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.lcard .img { aspect-ratio: 2 / 1; background: #e9e6da; display: block; width: 100%; object-fit: cover; }
.lcard .lcard-body { padding: 12px 14px 13px; display: flex; flex-direction: column; gap: 5px; }
.lcard .lcard-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lcard .lcard-name { color: var(--ink); font-weight: 600; font-size: 14px; }
.lcard .lcard-price { font-weight: 600; font-size: 13px; color: var(--green); white-space: nowrap; }
.lcard .lcard-desc { font-size: 12.5px; color: var(--ink-soft); line-height: 1.45; }
.lcard .lcard-desc::first-letter { text-transform: capitalize; }
.lcard .lcard-badges { display: flex; gap: 6px; margin-top: 2px; }
.lcard .lcard-note {
  font-size: 12px; color: var(--green); font-weight: 500; padding: 0 14px 10px;
}

.check {
  position: absolute; top: 10px; left: 10px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; border: 1.5px solid var(--line); display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.lcard.on .check { background: var(--green-bright); border-color: var(--green-bright); }

.badge {
  font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 20px;
  background: var(--paper-2); color: var(--ink-soft); white-space: nowrap;
}
.badge.green { background: color-mix(in srgb, var(--green-bright) 16%, white); color: var(--green); }
.badge.gold { background: color-mix(in srgb, var(--gold) 22%, white); color: #7a5f1f; }
.badge.soon { background: var(--paper-2); color: var(--ink-soft); font-size: 10.5px; padding: 2px 8px; }

/* plāna kartītes */
.plan-cards-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.plan-card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px 18px 16px;
  display: flex; flex-direction: column; gap: 10px; cursor: pointer; position: relative;
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.plan-card.on { border-color: var(--green-bright); box-shadow: 0 0 0 3px rgba(46, 125, 91, .15); }
.plan-card:focus-visible { outline: none; border-color: var(--green-bright); box-shadow: 0 0 0 3px rgba(46, 125, 91, .15); }
.plan-card:active { transform: scale(.995); }
.plan-card-badge { position: absolute; top: 14px; right: 14px; }
.plan-card-name { font-family: var(--font-display); font-size: 18px; font-weight: 600; letter-spacing: -.01em; margin: 0; padding-right: 84px; }
.plan-card-desc { margin: 0; color: var(--ink-soft); font-size: 12.5px; line-height: 1.45; min-height: 34px; }
.plan-card-price { display: flex; align-items: baseline; gap: 6px; margin-top: 2px; }
.plan-card-price-num { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--ink); }
.plan-card-price-unit { font-size: 12px; color: var(--ink-soft); }
.plan-card-monthly { margin: -6px 0 0; font-size: 13px; font-weight: 600; color: var(--green); }
.plan-card-users { margin: 0; font-size: 12.5px; color: var(--ink-soft); }
.plan-card-list { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.plan-card-list li {
  font-size: 12.5px; color: var(--ink); line-height: 1.4; padding-left: 20px; position: relative;
}
.plan-card-list li::before {
  content: ''; position: absolute; left: 0; top: 5px; width: 12px; height: 12px; border-radius: 50%;
  background: color-mix(in srgb, var(--green-bright) 18%, white);
}
.plan-card-list li::after {
  content: ''; position: absolute; left: 3px; top: 7px; width: 6px; height: 3px;
  border-left: 1.6px solid var(--green); border-bottom: 1.6px solid var(--green); transform: rotate(-45deg);
}
.plan-card-details { margin-top: auto; padding-top: 6px; }
.plan-card-details summary {
  cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--green); list-style: none;
}
.plan-card-details summary::-webkit-details-marker { display: none; }
.plan-card-details summary::before { content: '+ '; }
.plan-card-details[open] summary::before { content: '- '; }
.plan-card-details-body { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.plan-card-details-group strong { display: block; font-size: 11.5px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .02em; margin-bottom: 3px; }
.plan-card-details-group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.plan-card-details-group li { font-size: 12.5px; color: var(--ink); }
.plan-trial-note { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; }

/* marketinga sadaļa lapas apakšā - kartes slāņu attēli */
.layers-marketing { border-top: 1px solid var(--line); padding: 48px 24px 60px; }
.layers-marketing-inner { max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.layers-marketing-title { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -.01em; margin: 0; text-align: center; }
.layers-marketing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.layer-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.layer-card img { aspect-ratio: 1200 / 750; width: 100%; height: auto; object-fit: cover; display: block; background: #f6f4ee; }
.layer-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.layer-card-name { font-weight: 600; font-size: 13.5px; color: var(--ink); }
.layer-card-desc { font-size: 12.5px; color: var(--ink-soft); line-height: 1.45; }

/* periods */
.period-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 640px; }
.period-card {
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px;
  display: flex; flex-direction: column; gap: 4px; text-align: left; cursor: pointer; font-family: inherit;
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.period-card.on { border-color: var(--green-bright); box-shadow: 0 0 0 3px rgba(46, 125, 91, .15); }
.period-card:focus-visible { outline: none; border-color: var(--green-bright); box-shadow: 0 0 0 3px rgba(46, 125, 91, .15); }
.period-card:active { transform: scale(.995); }
.period-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.period-card-head .title-row { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.period-card .check { position: static; }
.period-price { font-family: var(--font-display); font-size: 24px; font-weight: 600; }
.period-price small { font-size: 13px; font-weight: 400; color: var(--ink-soft); font-family: var(--font-body); }
.period-note { color: var(--ink-soft); font-size: 12.5px; margin: 0; }
.period-card.on .check { background: var(--green-bright); border-color: var(--green-bright); }

/* konts */
.plan-account-grid { display: flex; flex-direction: column; gap: 12px; max-width: 640px; }
.plan-account-row { display: flex; gap: 12px; }
.plan-account-row > label { flex: 1; margin-bottom: 0; }
.field-error { display: block; color: var(--red); font-size: 12.5px; margin: 4px 0 0; }
[aria-invalid="true"] { border-color: var(--red) !important; }

/* kopsavilkuma panelis */
.plan-summary {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px;
  display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow);
  position: sticky; top: 24px; align-self: start;
}
.plan-summary-rows { display: flex; flex-direction: column; gap: 8px; }
.plan-summary-title { font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: -.01em; margin: 0; }
.plan-summary-sub { margin: 0; color: var(--ink-soft); font-size: 13px; }
.plan-summary-hr { height: 1px; background: var(--line); border: none; margin: 0; }
.plan-summary .row { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.plan-summary .row.muted { color: var(--ink-soft); }
.plan-summary .row.bold span:last-child { font-weight: 600; }
.plan-summary .row span:last-child { font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; transition: opacity .12s; }
.plan-summary .row.total { font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.plan-summary .row.total span:last-child { min-width: 96px; }
.plan-summary-note { margin: 0; color: var(--ink-soft); font-size: 12.5px; }
.plan-summary-legal { margin: 0; font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; }

.consent {
  display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; color: var(--ink-soft); line-height: 1.45; cursor: pointer;
  margin-bottom: 0; font-weight: 400;
}
.consent input[type="checkbox"] {
  width: 16px; height: 16px; flex: none; margin-top: 1px; accent-color: var(--green);
}
.consent a { color: var(--green); }

.plan-submit-note { margin: 0; font-size: 12px; color: var(--ink-soft); text-align: center; }
.plan-summary .btn-primary { width: 100%; padding: 13px 16px; font-size: 15px; text-align: center; }

/* mobilā apakšējā josla */
.plan-bar {
  position: fixed; left: 0; right: 0; bottom: 0; display: none; align-items: center; justify-content: space-between;
  gap: 12px; background: #fff; border-top: 1px solid var(--line); padding: 12px 16px 18px;
  box-shadow: 0 -8px 30px rgba(34, 48, 31, .10); z-index: 20;
}
.plan-bar-total { display: flex; flex-direction: column; }
.plan-bar-total strong { font-family: var(--font-display); font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.plan-bar-total span { color: var(--ink-soft); font-size: 11.5px; }
.plan-bar .btn-primary { flex: 1; text-align: center; padding: 12px 16px; min-height: 44px; }

@media (max-width: 768px) {
  .plan-topbar { padding: 10px 16px; height: auto; min-height: 56px; flex-wrap: wrap; row-gap: 6px; }
  .plan-topbar-right { flex-wrap: wrap; justify-content: flex-end; white-space: normal; text-align: right; font-size: 12.5px; }
  .plan-wrap { grid-template-columns: 1fr; padding: 22px 16px 130px; gap: 28px; }
  .plan-heading h1 { font-size: 28px; }
  .lcard-grid { grid-template-columns: 1fr; }
  .plan-cards-grid { grid-template-columns: 1fr; }
  .layers-marketing { padding: 32px 16px 40px; }
  .layers-marketing-grid { grid-template-columns: 1fr; }
  .lcard { flex-direction: row; align-items: stretch; }
  .lcard .img { width: 112px; flex: none; aspect-ratio: auto; }
  .lcard .lcard-body { padding: 10px 44px 10px 12px; }
  .lcard .check { left: auto; right: 10px; top: 10px; }
  .lcard .lcard-note { padding-left: 12px; }
  .plan-account-row { flex-direction: column; gap: 12px; }
  .plan-summary { position: static; box-shadow: none; border-radius: 12px; padding: 16px; }
  .plan-bar { display: flex; }
  .chip, .seg > button, .period-card { min-height: 44px; }
  /* 4 jomas neietilpst vienā rindā šaurā ekrānā - divas rindas pa divām, ne apgriezts teksts */
  #profile-seg { display: grid; grid-template-columns: 1fr 1fr; max-width: 100%; }
  #profile-seg > button { border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
  #profile-seg > button:nth-child(odd) { border-left: none; }
  #profile-seg > button:nth-child(-n+2) { border-top: none; }
}

@media (prefers-reduced-motion: reduce) {
  .lcard, .chip, .seg > button, .period-card, .plan-card, .plan-summary .row span:last-child, .lcard .lcard-note { transition: none; }
}

/* konta modālis */
.account-card { width: 720px; }
.account-card h2 { margin-bottom: 4px; }
.acct-section { padding: 18px 0; border-bottom: 1px solid var(--line); }
.acct-section:first-of-type { padding-top: 14px; }
.acct-section:last-child { border-bottom: none; padding-bottom: 4px; }
.acct-h3 { font-family: var(--font-display); font-size: 16px; font-weight: 600; margin: 0 0 10px; }
.acct-status-text { margin: 0 0 8px; font-weight: 600; font-size: 13.5px; }
.acct-status-text.sub-trial { color: var(--green-bright); }
.acct-status-text.sub-warn { color: var(--amber); }
.acct-status-text.sub-bad { color: var(--red); }
.acct-status-text.ok { color: var(--green); }
.acct-rows { display: flex; flex-direction: column; gap: 5px; margin-bottom: 4px; }
.acct-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.acct-row span:first-child { color: var(--ink-soft); }
.acct-row span:last-child { font-weight: 500; text-align: right; }
.acct-verify { margin: 6px 0 0; font-size: 12.5px; color: var(--ink-soft); display: flex; align-items: center; gap: 8px; }
.acct-verify-ok { color: var(--green-bright); font-weight: 600; }
.acct-verify-bad { color: var(--amber); }
.acct-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.acct-order-hint { margin: 0 0 12px; font-size: 12.5px; color: var(--ink-soft); }
.acct-period-seg { max-width: 280px; margin: 12px 0; }
.acct-change-link { margin-top: 4px; }
.account-card .plan-summary {
  position: static; box-shadow: none; border-radius: 10px; padding: 14px 16px; margin: 12px 0 0;
}
.account-card .plan-section { gap: 10px; }
.acct-billing-form { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; }
.acct-billing-form label { margin-bottom: 10px; }
.acct-span2 { grid-column: 1 / -1; }
.acct-billing-actions { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.settings-lang-row { max-width: 220px; }
.settings-lang-row select { width: 100%; }

@media (max-width: 768px) {
  .account-card { width: calc(100vw - 24px); }
  .acct-billing-form { grid-template-columns: 1fr; }
}
