/* convert-family.css — rl look for the Family Admin screens that keep relative's structural classes */

/* Cards converted from card-trw */
.card-head h2, .card-head h4, .card-head h5 { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; margin: 0; }
.cb { padding: 0; }
.card > .list, .card > .table-wrap { margin: 0; }
.card > .table-wrap { margin: 0 -6px; }
.card .card-head + .toolbar { margin-top: 4px; }
.card > .notice:last-child { margin-bottom: 0; }

/* Stat tiles → rl KPI tiles */
.panel .stat { display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid var(--line-soft); border-radius: 16px; padding: 20px 22px; text-align: left; color: inherit; height: 100%; }
.panel a.stat:hover { border-color: var(--gold); box-shadow: var(--shadow-sm); }
.panel .stat.is-alert { border-color: #efc9c4; background: #fff9f8; }
.stat-label { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted); order: 2; }
.stat-label .ico { width: 16px; height: 16px; color: var(--gold-deep); }
.stat-value { font-family: var(--font-display); font-size: 1.9rem; line-height: 1; font-weight: 600; color: var(--ink); order: 1; }
.stat-note { font-size: .78rem; color: var(--muted); order: 3; }
.row.g-3 > [class*="col-"] > .stat, .row.g-4 > [class*="col-"] > .stat { margin: 0; }

/* Tabs with counts */
.tabs .count { margin-left: 6px; font-size: .75rem; padding: 2px 7px; border-radius: 999px; background: var(--sand); color: var(--ink-soft); }
.tabs a.active .count { background: var(--gold-soft); color: var(--gold-deep); }

/* Welcome header on the dashboard */
.welcome { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.welcome h2 { font-size: 2.2rem; margin: 0 0 4px; }
.welcome p { margin: 0; color: var(--muted); }
.welcome .eyebrow { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-deep); font-weight: 600; }

/* Lists converted from list-trw */
.list li .meta { font-size: .8rem; color: var(--muted); }
.list li .date-chip { width: 48px; flex: none; text-align: center; background: var(--ivory); border: 1px solid var(--line-soft); border-radius: 10px; padding: 6px 0; line-height: 1.1; }
.list li .date-chip span { display: block; font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.list li .date-chip strong { display: block; font-family: var(--font-display); font-size: 1.3rem; }

/* Setup checklist & quick actions */
.roadmap-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); font-size: .92rem; }
.roadmap-item:first-child { border-top: 0; }
.roadmap-item .ico { width: 18px; height: 18px; color: var(--gold-deep); flex: none; }
.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-actions a { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: 12px; font-size: .9rem; font-weight: 500; color: var(--ink); background: var(--ivory); }
.quick-actions a:hover { border-color: var(--gold); background: #fff; }
.quick-actions .ico { width: 18px; height: 18px; color: var(--gold-deep); }

/* Storage meter */
.meter { height: 8px; background: var(--sand); border-radius: 999px; overflow: hidden; }
.meter-fill { display: block; height: 100%; background: var(--gold); border-radius: 999px; }
.meter-fill.is-warning { background: var(--warning); } .meter-fill.is-danger { background: var(--danger); }

/* Section columns converted from Bootstrap rows */
.section-gap { padding-block: 0; }
.col-xl-7.section-gap, .col-xl-5.section-gap, .col-xl-8.section-gap, .col-xl-4.section-gap { padding-block: 0; }
.section-gap > .card + .card, .section-gap > section + section { margin-top: 20px; }

/* Inline icons inside text and buttons */
.btn .ico, .link .ico, .badge .ico { width: 16px; height: 16px; }
td .ico, p .ico, small .ico, .meta .ico, .small .ico { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }

/* Key/value lists */
.kv dt .ico { width: 14px; height: 14px; }

/* Breadcrumbs converted from breadcrumb-trw */
.crumbs { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 8px; font-size: .85rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.crumbs a { color: var(--gold-deep); }

/* Forms */
.field .input-row > input { flex: 1; }
.check input { flex: none; }
.field + .btn, form > .btn:last-child { margin-top: 6px; }

/* Stat rows behave like rl's .kpis grid */
.row.g-3:has(> [class*="col-"] > .stat), .row.g-4:has(> [class*="col-"] > .stat) { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin: 0 0 24px; }
.row.g-3:has(> [class*="col-"] > .stat) > [class*="col-"], .row.g-4:has(> [class*="col-"] > .stat) > [class*="col-"] { width: auto; max-width: none; padding: 0; margin: 0; }

/* Two-column page bodies (row g-4 + col-xl-N) behave like rl's .cols grid */
.content > .row.g-4:has(> [class*="col-xl-"]), .content .tab-pane > .row.g-4:has(> [class*="col-xl-"]), .content .tab-pane > .row.g-4:has(> [class*="col-lg-"]), .content > form > .row.g-4:has(> [class*="col-xl-"]), .content > .row.g-4:has(> [class*="col-lg-"]) { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; margin: 0; align-items: start; }
.content .row.g-4:has(> [class*="col-"]) > [class*="col-"] { width: auto; max-width: none; padding: 0; margin: 0; grid-column: span 12; }
@media (min-width: 1100px) {
  .content .row.g-4 > .col-xl-3, .content .row.g-4 > .col-lg-3 { grid-column: span 3; }
  .content .row.g-4 > .col-xl-4, .content .row.g-4 > .col-lg-4 { grid-column: span 4; }
  .content .row.g-4 > .col-xl-5, .content .row.g-4 > .col-lg-5 { grid-column: span 5; }
  .content .row.g-4 > .col-xl-6, .content .row.g-4 > .col-lg-6 { grid-column: span 6; }
  .content .row.g-4 > .col-xl-7, .content .row.g-4 > .col-lg-7 { grid-column: span 7; }
  .content .row.g-4 > .col-xl-8, .content .row.g-4 > .col-lg-8 { grid-column: span 8; }
  .content .row.g-4 > .col-xl-9, .content .row.g-4 > .col-lg-9 { grid-column: span 9; }
}
.content .row.g-4 > [class*="col-"] > .card + .card, .content .row.g-4 > [class*="col-"] > section + section { margin-top: 20px; }

/* ---- Feature styles carried over from relative's original app.css/ui.css for classes rl has no equivalent for ---- */

/* ---- Feature styles carried over from relative's original app.css/ui.css for classes rl has no equivalent for ---- */
.template-preview .tp-title { font-family: var(--trw-font-display); font-size: 1.6rem; line-height: 1; position: relative; }
.template-preview .tp-lines { position: absolute; top: 1.25rem; left: 1.25rem; right: 1.25rem; display: flex; justify-content: space-between; }
.template-preview .tp-lines span { height: 4px; width: 22%; border-radius: 4px; background: currentColor; opacity: .35; }
.tp-heirloom { background: linear-gradient(160deg, #f4ede1, #e1d2b8); color: var(--trw-ink); }
.tp-meridian { background: linear-gradient(160deg, #e8ecea, #b9c6bf); color: var(--trw-forest); }
.tp-vows { background: linear-gradient(160deg, #f6e9ea, #d9b4ba); color: var(--trw-wine); }
.tp-regalia { background: linear-gradient(160deg, #3c1620, #6b2737 60%, #b08d57); }
.tp-gathering { background: linear-gradient(160deg, #1f2b26, #24392f 60%, #8c6d3f); }
.plan.featured .plan-features .bi { color: var(--trw-gold); }
.plan-features { list-style: none; padding: 0; margin: 1.75rem 0 2rem; display: grid; gap: .7rem; font-size: .93rem; }
.plan-features li { display: flex; gap: .65rem; }
.plan-features .bi { color: var(--trw-gold-deep); flex-shrink: 0; margin-top: .1rem; }
.h-0 { height:0 }
.h-5 { height:5% }
.h-10 { height:10% }
.h-15 { height:15% }
.h-20 { height:20% }
.h-25 { height:25% }
.h-30 { height:30% }
.h-35 { height:35% }
.h-40 { height:40% }
.h-45 { height:45% }
.h-50 { height:50% }
.h-55 { height:55% }
.h-60 { height:60% }
.h-65 { height:65% }
.h-70 { height:70% }
.h-75 { height:75% }
.h-80 { height:80% }
.h-85 { height:85% }
.h-90 { height:90% }
.h-95 { height:95% }
.h-100 { height:100% }
.upload-preview { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.upload-preview img, .upload-preview .file-chip { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--trw-line); }
.upload-preview .file-chip { display: inline-flex; align-items: center; justify-content: center; font-size: .7rem; color: var(--trw-muted); background: var(--trw-sand); padding: .25rem; text-align: center; overflow: hidden; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--trw-muted); margin-right: .4rem; }
.status-dot.success { background: var(--trw-success); }
.status-dot.warning { background: var(--trw-gold); }
.status-dot.danger { background: var(--trw-danger); }
.btn-icon { width: 36px; height: 36px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.w-0 { width:0 }
.w-5 { width:5% }
.w-10 { width:10% }
.w-15 { width:15% }
.w-20 { width:20% }
.w-25 { width:25% }
.w-30 { width:30% }
.w-35 { width:35% }
.w-40 { width:40% }
.w-45 { width:45% }
.w-50 { width:50% }
.w-55 { width:55% }
.w-60 { width:60% }
.w-65 { width:65% }
.w-70 { width:70% }
.w-75 { width:75% }
.w-80 { width:80% }
.w-85 { width:85% }
.w-90 { width:90% }
.w-95 { width:95% }
.w-100 { width:100% }
.template-preview .tp-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .8s var(--trw-ease); }
.template-card:hover .tp-photo { transform: scale(1.05); }
.tp-heirloom::before { background: linear-gradient(180deg, rgba(244, 237, 225, .25), rgba(60, 45, 30, .78)); }
.tp-meridian::before { background: linear-gradient(180deg, rgba(36, 57, 47, .05), rgba(36, 57, 47, .82)); }
.tp-vows::before { background: linear-gradient(180deg, rgba(107, 39, 55, .05), rgba(107, 39, 55, .8)); }
.tp-regalia::before { background: linear-gradient(180deg, rgba(60, 22, 32, .2), rgba(60, 22, 32, .88)); }
.tp-gathering::before { background: linear-gradient(180deg, rgba(31, 43, 38, .1), rgba(31, 43, 38, .85)); }
.template-preview, .tp-heirloom, .tp-meridian, .tp-vows { color: #fff; }
.template-preview .tp-title { text-shadow: 0 1px 12px rgba(0, 0, 0, .25); }
.bars .bar.h-0 { background: var(--trw-line); opacity: 1; min-height: 3px; }
.template-feature-media .tp-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1s var(--trw-ease); }
.template-feature:hover .tp-photo { transform: scale(1.03); }
.swatch-heirloom-0 { background: #f4ede1; }
.swatch-heirloom-1 { background: #b08d57; }
.swatch-heirloom-2 { background: #3c2d1e; }
.swatch-meridian-0 { background: #e8ecea; }
.swatch-meridian-1 { background: #5f7a68; }
.swatch-meridian-2 { background: #24392f; }
.swatch-vows-0 { background: #f6e9ea; }
.swatch-vows-1 { background: #a8566a; }
.swatch-vows-2 { background: #6b2737; }
.swatch-regalia-0 { background: #3c1620; }
.swatch-regalia-1 { background: #6b2737; }
.swatch-regalia-2 { background: #b08d57; }
.swatch-gathering-0 { background: #1f2b26; }
.swatch-gathering-1 { background: #24392f; }
.swatch-gathering-2 { background: #8c6d3f; }
.tree-context { background: var(--trw-ivory); border: 1px solid var(--trw-line); border-radius: var(--trw-radius-sm); padding: .9rem 1.1rem; font-size: .88rem; }
.tree-context strong { display: block; margin-bottom: .5rem; }
.tree-context dl { display: grid; grid-template-columns: auto 1fr; gap: .35rem .9rem; margin: 0; }
.tree-context dt { color: var(--trw-muted); font-weight: 500; }
.tree-context dd { margin: 0; }
.relate-sentence { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; font-size: 1.05rem; font-weight: 500; }
.relate-sentence .form-select { width: auto; min-width: 150px; font-size: .95rem; }
.relate-sentence .form-select#r-of { min-width: 240px; }
.invite-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; padding: 0; overflow: hidden; }
.invite-step { display: flex; gap: .85rem; padding: 1.1rem 1.3rem; border-right: 1px solid var(--trw-line); }
.invite-step:last-child { border-right: 0; }
.invite-step strong { display: block; font-size: .95rem; margin-bottom: .2rem; }
.invite-step span:not(.invite-step-num) { font-size: .85rem; color: var(--trw-ink-soft); }
.invite-step-num { width: 30px; height: 30px; border-radius: 50%; background: var(--trw-ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; flex-shrink: 0; font-size: .85rem; }
.join-claim { background: var(--trw-ivory); border: 1px solid var(--trw-line); border-radius: var(--trw-radius-sm); padding: .8rem 1rem; }
@media (max-width: 991.98px) { .invite-steps { grid-template-columns: 1fr; } }
@media (max-width: 991.98px) { .invite-step { border-right: 0; border-bottom: 1px solid var(--trw-line); } }
@media (max-width: 991.98px) { .invite-step:last-child { border-bottom: 0; } }
.tree-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; padding: .7rem 1.4rem; border-bottom: 1px solid var(--trw-line); background: var(--trw-ivory); font-size: .8rem; color: var(--trw-ink-soft); align-items: center; }
.tree-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.tree-legend-tip { margin-left: auto; color: var(--trw-muted); }
.tree-legend-line { display: inline-block; width: 22px; height: 0; border-top: 2px solid #b08d57; }
.tree-legend-spouse { border-top-style: dashed; }
.tree-legend-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #9b3b3b; }
.tp-atelier { background: linear-gradient(160deg, #f5f2ec, #d8cfbd); color: #171614; }
.tp-evergreen { background: linear-gradient(160deg, #1d3a2c, #3f6e55); color: #fff; }
.tp-lumiere { background: linear-gradient(160deg, #f6efe3, #e0cba6); color: #2c2420; }
.tp-nocturne { background: linear-gradient(160deg, #070b14, #1f2d52); color: #fff; }
.template-preview .tp-shape { position: absolute; background: rgba(255, 255, 255, .22); border: 1px solid rgba(255, 255, 255, .4); z-index: -1; }
.template-preview .tp-shape-split { top: 3.5rem; bottom: 1.5rem; right: 1.25rem; width: 38%; }
.template-preview .tp-shape-arch { top: 3.5rem; bottom: 1.5rem; right: 1.5rem; width: 34%; border-radius: 999px 999px 8px 8px; }
.template-preview .tp-shape-bleed { inset: 0; background: rgba(0, 0, 0, .18); border: 0; }
.template-preview .tp-shape-centre { display: none; }
.tp-atelier .tp-shape, .tp-lumiere .tp-shape { background: rgba(0, 0, 0, .08); border-color: rgba(0, 0, 0, .12); }
.btn-icon { width: 40px; height: 40px; padding: 0; }

/* Labels in converted forms */
.card label:not(.check, .chip, .btn, .type-card, .ei-pick, .ec-type, .ec-pill, .ec-draft, .check > label), .cb > label, form .row [class*="col-"] > label { display: block; font-size: .82rem; font-weight: 600; letter-spacing: .04em; color: var(--ink-soft); margin-bottom: 7px; }
.check label, label.check { font-size: .92rem; font-weight: 400; letter-spacing: 0; color: var(--ink-soft); margin: 0; }
.align-middle { vertical-align: middle; }
.offset-lg-4 { margin-left: 33.3333%; }

/* KPI tiles (restated after the carried-over rules) */
.panel .stat, .panel a.stat { display: flex !important; flex-direction: column; gap: 4px; background: #fff; border: 1px solid var(--line-soft); border-radius: 16px; padding: 20px 22px; text-align: left; color: inherit; height: 100%; grid-template-columns: none; }
.stat-label { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted); order: 2; margin: 0; text-transform: none; letter-spacing: 0; }
.stat-value { font-family: var(--font-display); font-size: 1.9rem; line-height: 1; font-weight: 600; color: var(--ink); order: 1; }
.stat-note { font-size: .78rem; color: var(--muted); order: 3; white-space: normal; }
