/* =========================================================
   CareurPatients Platform Admin — console-specific components
   Loaded after ../assets/css/styles.css
   ========================================================= */
.grow { flex: 1; min-width: 0; }
.nowrap { white-space: nowrap; }

.brand-tag {
  display: inline-block; margin-left: 7px; padding: 2px 6px; border-radius: 5px; vertical-align: 3px;
  font-size: 9.5px; font-weight: 600; letter-spacing: .7px; text-transform: uppercase;
  background: rgba(255, 255, 255, .14); color: var(--sb-accent);
}
/* ---------- Plan badges ---------- */
.plan-pill {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 6px;
  font-size: 11px; font-weight: 600; border: 1px solid; white-space: nowrap;
}
.plan-starter { background: #f2f4f7; color: #475467; border-color: #e4e7ec; }
.plan-standard { background: var(--info-50); color: var(--info); border-color: color-mix(in srgb, var(--info) 22%, #fff); }
.plan-professional { background: var(--primary-50); color: var(--primary-600); border-color: var(--primary-100); }
.plan-enterprise { background: var(--t-brand); color: #fff; border-color: var(--t-brand); }

.t-logo { border-radius: 10px !important; }
.pack-ic { width: 26px; height: 26px; border-radius: 7px; display: inline-grid; place-items: center; }
.pack-ic svg { width: 14px; height: 14px; }
.pack-set { display: inline-flex; gap: 4px; }
.sub-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; color: var(--muted); }

/* ---------- Plan cards ---------- */
.plan-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.plan-card { position: relative; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.plan-card.popular { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-50); }
.plan-card .ribbon {
  position: absolute; top: -11px; right: 16px; padding: 3px 10px; border-radius: 20px;
  background: var(--primary); color: #fff; font-size: 10.5px; font-weight: 600;
}
.pc-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; }
.pc-ic svg { width: 20px; height: 20px; }
.plan-card h3 { font-size: 16px; font-weight: 600; }
.plan-card .tagline { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.price { font-size: 26px; font-weight: 700; letter-spacing: -.6px; line-height: 1.1; }
.price small { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.price-note { font-size: 11px; color: var(--muted); margin-top: 3px; min-height: 16px; }
.pc-list { list-style: none; display: flex; flex-direction: column; gap: 7px; font-size: 12px; color: var(--text-2); flex: 1; }
.pc-list li { display: flex; gap: 8px; align-items: flex-start; }
.pc-list li svg { width: 15px; height: 15px; color: var(--success); flex-shrink: 0; margin-top: 1px; }
.pc-list li.off { color: var(--muted); }
.pc-list li.off svg { color: #c7ccd5; }
.pc-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 12px; border-top: 1px dashed var(--border); }
.pc-meta .k { font-size: 10.5px; color: var(--muted); }
.pc-meta .v { font-size: 13px; font-weight: 600; }

/* ---------- Feature matrix ---------- */
.fmatrix th:not(:first-child), .fmatrix td:not(:first-child) { text-align: center; }
.fmatrix td:first-child { min-width: 240px; }
.fmatrix .fk { display: block; font-size: 10.5px; color: var(--muted); }
.fmatrix .yes { color: var(--success); }
.fmatrix .no { color: #c7ccd5; }
.fmatrix .yes svg, .fmatrix .no svg { width: 17px; height: 17px; vertical-align: middle; }
.fmatrix .val { font-weight: 600; font-size: 12px; }
.fmatrix th.hl, .fmatrix td.hl { background: color-mix(in srgb, var(--primary) 4%, #fff); }

/* ---------- Selectable option cards ---------- */
.opt-grid { display: grid; gap: 12px; }
.opt-grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opt-grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.opt-grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.opt-card {
  position: relative; display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%;
  padding: 14px; border: 1.5px solid var(--border); border-radius: 12px; background: #fff; cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.opt-card:hover { border-color: var(--primary-200); }
.opt-card.active { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 4%, #fff); box-shadow: 0 0 0 3px var(--primary-50); }
.opt-card.disabled { opacity: .55; cursor: not-allowed; }
.opt-card.disabled:hover { border-color: var(--border); }
.opt-card .oc-check {
  position: absolute; top: 10px; right: 10px; width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--border-strong); display: grid; place-items: center; color: #fff;
}
.opt-card .oc-check svg { width: 12px; height: 12px; stroke-width: 3; display: none; }
.opt-card.active .oc-check { background: var(--primary); border-color: var(--primary); }
.opt-card.active .oc-check svg { display: block; }
.opt-card .oc-t { font-weight: 600; font-size: 13px; padding-right: 22px; }
.opt-card .oc-d { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.opt-card.col { flex-direction: column; gap: 8px; }

/* ---------- Inputs ---------- */
.affix { display: flex; align-items: stretch; }
.affix .input { border-top-right-radius: 0; border-bottom-right-radius: 0; min-width: 0; }
.affix .sfx {
  display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--border); border-left: 0;
  border-radius: 0 8px 8px 0; background: #f8f9fb; color: var(--text-2); font-size: 12px; white-space: nowrap;
}
.affix .pfx {
  display: grid; place-items: center; padding: 0 11px; border: 1px solid var(--border); border-right: 0;
  border-radius: 8px 0 0 8px; background: #f8f9fb; color: var(--text-2); font-size: 12.5px; font-weight: 500;
}
.affix .pfx + .input { border-radius: 0 8px 8px 0; }
.field-hint { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.field-hint svg { width: 13px; height: 13px; }
.field-hint.ok { color: var(--success); }
.field-hint.bad { color: var(--danger); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.qty button { width: 28px; height: 30px; display: grid; place-items: center; color: var(--text-2); }
.qty button:hover { color: var(--primary); }
.qty button svg { width: 14px; height: 14px; }
.qty span { min-width: 26px; text-align: center; font-weight: 600; font-size: 12.5px; }

/* ---------- Usage meters ---------- */
.meter + .meter { margin-top: 16px; }
.meter .row-between { font-size: 12.5px; margin-bottom: 6px; }
.meter .row-between .row { gap: 8px; }
.meter .row-between svg { width: 15px; height: 15px; color: var(--muted); }
.meter .mv { font-weight: 600; }
.meter .mv small { color: var(--muted); font-weight: 400; }

/* ---------- Wizard ---------- */
.wizard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
.wiz-steps { display: flex; align-items: center; gap: 6px; padding: 14px 20px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.wiz-steps .step { cursor: pointer; white-space: nowrap; border-radius: 8px; padding: 4px 6px 4px 4px; }
.wiz-steps .step:hover { background: #f6f7f9; }
.wiz-steps .step-line { flex: 1; min-width: 14px; }
.wiz-pane { padding: 22px; }
.wiz-pane h3 { font-size: 15px; font-weight: 600; }
.wiz-pane .sub { font-size: 12px; color: var(--muted); margin-top: 2px; margin-bottom: 18px; }
.wiz-section { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--border); }
.wiz-section > h4 { font-size: 13px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.wiz-section > h4 svg { width: 16px; height: 16px; color: var(--primary); }
.sticky-side { position: sticky; top: calc(var(--topbar-h) + 20px); }
.sum-list { display: flex; flex-direction: column; }
.sum-list .si { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 12.5px; }
.sum-list .si:last-child { border-bottom: 0; }
.sum-list .si .k { color: var(--muted); }
.sum-list .si .v { font-weight: 500; text-align: right; }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 20px; border-top: 1px solid var(--border); background: #fbfbfc; border-radius: 0 0 14px 14px; }
.sum-total b { font-size: 18px; }

.prov-list { list-style: none; display: flex; flex-direction: column; gap: 4px; max-width: 520px; margin: 0 auto; }
.prov-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; font-size: 12.5px; color: var(--muted); }
.prov-list li .pi { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.prov-list li .pi svg { width: 16px; height: 16px; }
.prov-list li.run { background: var(--primary-50); color: var(--text); font-weight: 500; }
.prov-list li.run .pi { color: var(--primary); }
.prov-list li.done { color: var(--text); }
.prov-list li.done .pi { background: var(--success); color: #fff; }
.prov-list li.done .pi svg { width: 13px; height: 13px; stroke-width: 3; }
.prov-list li .pt { margin-left: auto; font-size: 11px; color: var(--muted); font-weight: 400; }
.spin { animation: pa-spin 0.9s linear infinite; }
@keyframes pa-spin { to { transform: rotate(360deg); } }
.success-mark { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto; background: var(--success-50); color: var(--success); }
.success-mark svg { width: 32px; height: 32px; }

/* ---------- Tenant header ---------- */
.t-head { display: flex; gap: 18px; align-items: center; padding: 20px 22px; flex-wrap: wrap; }
.t-head .t-logo-lg { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; font-size: 22px; font-weight: 600; flex-shrink: 0; }
.t-head h2 { font-size: 19px; font-weight: 600; letter-spacing: -.2px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.t-head .meta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 6px; font-size: 12px; color: var(--text-2); }
.t-head .meta span { display: inline-flex; align-items: center; gap: 5px; }
.t-head .meta svg { width: 14px; height: 14px; color: var(--muted); }
.t-life { display: flex; align-items: center; gap: 8px; padding: 12px 22px; border-top: 1px solid var(--border); background: #fbfbfc; border-radius: 0 0 14px 14px; overflow-x: auto; }
.t-life .step { white-space: nowrap; }
.t-life .step-line { flex: 1; min-width: 16px; }
.t-life .step.warn .n { background: var(--warning); border-color: var(--warning); color: #fff; }
.t-life .step.bad .n { background: var(--danger); border-color: var(--danger); color: #fff; }

/* ---------- Dashboard ---------- */
.funnel { display: flex; flex-direction: column; gap: 10px; }
.funnel a { display: grid; grid-template-columns: 150px 1fr 44px; align-items: center; gap: 12px; font-size: 12.5px; padding: 4px 6px; margin: 0 -6px; border-radius: 8px; }
.funnel a:hover { background: #f6f7f9; }
.funnel .track { height: 10px; border-radius: 6px; background: #f1f3f6; overflow: hidden; }
.funnel .track i { display: block; height: 100%; border-radius: inherit; }
.funnel b { text-align: right; }
.pool + .pool { margin-top: 14px; }
.pool .row-between { font-size: 12px; margin-bottom: 6px; }
.health { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.health .h { padding: 12px; border: 1px solid var(--border); border-radius: 10px; }
.health .h .k { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.health .h .k svg { width: 14px; height: 14px; }
.health .h .v { font-size: 16px; font-weight: 600; margin-top: 4px; }

/* ---------- DNS records ---------- */
.dns { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.dns .dr { display: grid; grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1.3fr) 34px; gap: 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 12px; }
.dns .dr:last-child { border-bottom: 0; }
.dns .dr.h { background: #f8f9fb; font-size: 10.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; padding: 8px 12px; }
.dns .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Add-on cards ---------- */
.addon-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.addon-card { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.addon-card .price { font-size: 20px; }
.addon-card .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 12px; border-top: 1px dashed var(--border); margin-top: auto; }

/* ---------- Retry track (dunning) ---------- */
.retry { display: inline-flex; align-items: center; gap: 4px; }
.retry i { display: inline-grid; place-items: center; height: 20px; padding: 0 6px; border-radius: 5px; font-style: normal; font-size: 10.5px; font-weight: 600; }
.retry .f { background: var(--danger-50); color: var(--danger); }
.retry .p { background: #f2f4f7; color: #667085; }
.retry .s { background: var(--success-50); color: var(--success); }

@media (max-width: 1280px) {
  .plan-grid, .addon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .opt-grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .wizard-grid { grid-template-columns: minmax(0, 1fr); }
  .sticky-side { position: static; }
}
