/* Dashboard shell, platform area, auth and public pages (on top of ds.css) */

/* ---------- app shell ---------- */
.app { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: #1b1a17; color: #d9d1bd; display: flex; flex-direction: column; position: sticky; top: 0;
           height: 100vh; overflow-y: auto; border-inline-end: 1px solid #2c2a25; }
.brandline { display: flex; align-items: center; gap: .65rem; padding: 1.1rem 1.25rem; color: #fff; font-weight: 700;
             font-size: 1.15rem; letter-spacing: .2px; }
.brandline:hover { text-decoration: none; }
.logo-mark { font-family: var(--serif); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 2px;
             background: #d8b878; color: #1b1a17; font-weight: 700; font-size: 1.05rem; }
.company-chip { display: flex; align-items: center; gap: .7rem; margin: 0 .85rem 1rem; padding: .7rem .8rem;
                background: #26241f; border: 1px solid #3a372f; border-radius: var(--r); }
.company-chip .avatar { width: 38px; height: 38px; border-radius: 2px; background: #d8b878; color: #1b1a17; font-family: var(--serif);
                        display: grid; place-items: center; font-weight: 700; flex: none; }
.company-chip strong { display: block; color: #fff; font-size: .95rem; line-height: 1.3; }
.company-chip small { color: #a39b86; }
.nav { padding: 0 .75rem 1rem; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-group { margin: 1.1rem .75rem .35rem; font-size: .72rem; letter-spacing: .08em; color: #8a8372; font-weight: 600; }
.nav-item { display: flex; align-items: center; gap: .7rem; padding: .55rem .75rem; border-radius: 2px; color: #d9d1bd;
            font-size: .94rem; font-weight: 500; transition: background .12s, color .12s; }
.nav-item .i { color: #8a8372; }
.nav-item:hover { background: #2a2823; color: #fff; text-decoration: none; }
.nav-item.active { background: #2f2c26; color: #fff; box-shadow: inset 3px 0 0 #d8b878; }
[dir=rtl] .nav-item.active { box-shadow: inset -3px 0 0 #d8b878; }
.nav-item.active .i { color: #d8b878; }
.nav-item .count { margin-inline-start: auto; background: #d8b878; color: #1b1a17; font-size: .72rem; font-weight: 700;
                   min-width: 1.35rem; text-align: center; border-radius: 2px; padding: 0 .4rem; }
.switch { padding: 0 1.25rem .75rem; display: grid; gap: .25rem; }
.switch .btn.link { color: #a39b86; justify-content: flex-start; }
.switch .btn.link.active { color: #fff; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1rem; padding: .7rem 1.5rem;
          background: var(--bg); backdrop-filter: none; border-bottom: 1px solid var(--line); }
.topbar .grow { flex: 1; min-width: 0; }
.topbar .where { color: var(--muted); font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-btn { display: none; }
.usermenu { position: relative; }
.usermenu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .55rem; padding: .25rem;
                    border-radius: 2px; }
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink);
                    display: grid; place-items: center; font-weight: 700; }
.usermenu .drop { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); min-width: 220px; background: var(--surface);
                  border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: .4rem; z-index: 30; }
.usermenu .drop a, .usermenu .drop button { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .55rem .7rem;
          border-radius: 2px; color: var(--ink); background: none; border: 0; font: inherit; cursor: pointer; text-align: start; }
.usermenu .drop a:hover, .usermenu .drop button:hover { background: var(--line-2); text-decoration: none; }
.usermenu .who { padding: .5rem .7rem; border-bottom: 1px solid var(--line-2); margin-bottom: .3rem; }
.content { padding: 1.5rem; width: 100%; max-width: 1180px; margin: 0 auto; }
.head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.head h1 { margin: 0; }
.head .sub { color: var(--muted); font-size: .92rem; margin-top: .15rem; }

/* ---------- dashboard home ---------- */
.welcome { background: var(--ink); color: #fff; border-radius: var(--r-lg);
           padding: 1.6rem 1.75rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
           align-items: center; margin-bottom: 1.25rem; position: relative; overflow: hidden; }
.welcome::after { content: none; }
.welcome h1 { color: #fff; font-size: 1.9rem; margin: 0 0 .25rem; } .welcome p { margin: 0; color: #d9d1bd; }
.welcome .btn { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.25); color: #fff; position: relative; z-index: 1; }
.welcome .btn:hover { background: rgba(255,255,255,.18); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat { display: flex; gap: .9rem; align-items: center; background: var(--surface); border: 1px solid var(--line);
        border-radius: var(--r); padding: 1rem 1.1rem; box-shadow: var(--shadow-sm); color: var(--ink);
        transition: box-shadow .15s, transform .15s; }
a.stat:hover { box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; }
.stat .ico { width: 44px; height: 44px; border-radius: 2px; display: grid; place-items: center;
             background: var(--brand-soft); color: var(--brand-ink); flex: none; }
.stat .ico .i { width: 1.35rem; height: 1.35rem; }
.stat .n { font-size: 1.65rem; font-weight: 700; line-height: 1.1; }
.stat .l { color: var(--muted); font-size: .88rem; }
.stat.hot .ico { background: var(--warn-bg); color: var(--warn); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: .75rem; align-items: center; padding: .65rem 0; border-bottom: 1px solid var(--line-2); }
.checklist li:last-child { border: 0; }
.checklist .dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid;
                  place-items: center; flex: none; color: #fff; }
.checklist .done .dot { background: var(--ok); border-color: var(--ok); }
.checklist .done a, .checklist .done span.t { color: var(--muted); text-decoration: line-through; }
.progress { height: 8px; background: var(--line-2); border-radius: 2px; overflow: hidden; margin: .5rem 0 1rem; }
.progress > i { display: block; height: 100%; background: var(--ink); border-radius: 2px; }
.quick { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
.quick a { display: flex; align-items: center; gap: .6rem; padding: .75rem; border: 1px solid var(--line);
           border-radius: var(--r-sm); color: var(--ink); font-weight: 600; font-size: .92rem; }
.quick a:hover { border-color: var(--brand-line); background: var(--brand-soft); text-decoration: none; }
.quick .i { color: var(--brand-ink); }

/* ---------- lists, filters, forms ---------- */
.filters { display: flex; gap: .6rem; margin-bottom: 1rem; flex-wrap: wrap; }
.filters input { flex: 2 1 220px; } .filters select { flex: 1 1 160px; }
.row { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line-2); align-items: center; }
.actions { display: flex; gap: .9rem; align-items: center; }
td.actions { display: table-cell; white-space: nowrap; text-align: end; }
td.actions > * { margin-inline-start: .9rem; }
.actions a, .actions .btn.link { font-weight: 600; font-size: .9rem; }
.inline-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; align-items: end;
              border-bottom: 1px dashed var(--line); padding: 0 0 .5rem; margin-bottom: .75rem; }
.thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 2px; border: 1px solid var(--line); }
form.stacked, .card > form:not(.inline) { max-width: 720px; }
.card form .btn + .btn { margin-inline-start: .4rem; }
#id_theme_color { display: grid; grid-template-columns: repeat(8, 2.4rem); gap: .5rem; padding: 0; list-style: none; }
#id_theme_color li, #id_theme_color div { margin: 0; }
#id_theme_color label { display: inline-flex; margin: 0; cursor: pointer; }
.swatch { display: inline-block; width: 2.2rem; height: 2.2rem; border-radius: 2px; border: 2px solid #fff;
          box-shadow: 0 0 0 1px var(--line); }
#id_theme_color input:checked + .swatch, #id_theme_color label:has(input:checked) .swatch { box-shadow: 0 0 0 3px var(--ink); }
#id_theme_color input { position: absolute; opacity: 0; }
.totals-box { max-width: 380px; } .trow { display: flex; justify-content: space-between; gap: 1rem; padding: .25rem 0; }
.trow.total { border-top: 1px solid var(--line); margin-top: .35rem; padding-top: .6rem; font-weight: 700; font-size: 1.05rem; }
.bar-row { display: flex; align-items: center; gap: .75rem; margin: .45rem 0; } .bar-label { width: 150px; font-size: .9rem; }
.bar { flex: 1; background: var(--line-2); border-radius: 2px; height: 10px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ink); border-radius: 2px; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 130px; }
.spark .col { flex: 1; height: 100%; display: flex; align-items: flex-end; background: var(--line-2); border-radius: 4px; }
.spark .col i { display: block; width: 100%; background: var(--brand); border-radius: 4px; min-height: 2px; opacity: .85; }
.chatbox { max-height: 70vh; display: flex; flex-direction: column; }
#chat-thread { max-height: 52vh; overflow: auto; padding-bottom: .5rem; }
.bubble { padding: .65rem .9rem; border-radius: 2px; margin: .45rem 0; max-width: 85%; background: var(--line-2); }
.bubble.user { background: var(--brand-soft); margin-inline-start: auto; border: 1px solid var(--brand-line); }
.bubble.staff { background: var(--ok-bg); }
.chat-form { display: flex; gap: .5rem; margin-top: .6rem; }

/* ---------- auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.auth-side { background: var(--ink); color: #fff;
             padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side::after { content: none; }
.auth-side .brandline { padding: 0; font-size: 1.4rem; }
.auth-side h2 { font-size: 1.9rem; line-height: 1.4; margin-bottom: 1rem; color: #fff; }
.auth-side p { color: #d9d1bd; max-width: 30rem; }
.auth-side ul { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .7rem; }
.auth-side li { display: flex; gap: .7rem; align-items: center; color: #e8e1cf; }
.auth-side li .i { color: #d8b878; }
.auth-main { display: grid; place-items: center; padding: 2rem 1.25rem; background: var(--surface); }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { margin-bottom: .3rem; }
.auth-card .lead { color: var(--muted); margin-bottom: 1.5rem; }
.auth-card form > div { margin-bottom: 1rem; }
.auth-card .foot { margin-top: 1.25rem; color: var(--muted); font-size: .92rem; }
.auth-mobile-brand { display: none; }

/* ---------- public landing / directory ---------- */
.pub-top { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.9); backdrop-filter: blur(10px);
           border-bottom: 1px solid var(--line); }
.pub-wrap { max-width: 1160px; margin: 0 auto; padding: 0 1.25rem; }
.pub-top .pub-wrap { display: flex; justify-content: space-between; align-items: center; padding-block: .75rem; }
.pub-brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.3rem; color: var(--ink); }
.pub-brand:hover { text-decoration: none; }
.pub-top nav { display: flex; gap: 1.25rem; align-items: center; }
.pub-top nav a:not(.btn) { color: var(--ink-2); font-weight: 500; }
.hero-pub { background: var(--bg); border-bottom: 1px solid var(--ink);
            padding: 5rem 0 4rem; text-align: center; }
.hero-pub .eyebrow { display: inline-flex; gap: .4rem; align-items: center; border: 1px solid var(--ink); color: var(--ink); background: transparent;
                     padding: .25rem .8rem; border-radius: 2px; font-weight: 600; font-size: .85rem; margin-bottom: 1rem; }
.hero-pub h1 { font-size: clamp(2.3rem, 1.5rem + 3.2vw, 3.8rem); max-width: 18ch; margin: 0 auto 1rem; line-height: 1.3; }
.hero-pub p.lead { color: var(--muted); font-size: 1.15rem; max-width: 40rem; margin: 0 auto 2rem; }
.hero-pub .cta { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }
.section { padding: 4rem 0; } .section.alt { background: var(--surface); border-block: 1px solid var(--line); }
.section h2 { text-align: center; font-size: 1.7rem; margin-bottom: .4rem; }
.section .sub { text-align: center; color: var(--muted); margin-bottom: 2.25rem; }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.feat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.5rem; box-shadow: var(--shadow-sm); }
.feat .ico { width: 48px; height: 48px; border-radius: 2px; background: var(--brand-soft); color: var(--brand-ink);
             display: grid; place-items: center; margin-bottom: 1rem; }
.feat .ico .i { width: 1.5rem; height: 1.5rem; }
.feat h3 { margin-bottom: .35rem; } .feat p { color: var(--muted); margin: 0; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; counter-reset: s; }
.step { position: relative; padding: 1.25rem; border: 1px solid var(--line); background: var(--surface); }
.step::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 36px; height: 36px;
                background: var(--ink); color: var(--bg); font-family: var(--serif); font-size: 1.3rem; margin-bottom: .75rem; }
.cta-band { background: var(--ink); color: #fff; border-radius: var(--r-lg); padding: 3rem 1.5rem;
            text-align: center; }
.cta-band h2 { color: #fff; } .cta-band p { color: #d9d1bd; }
.pub-foot { padding: 2rem 0; color: var(--muted); border-top: 1px solid var(--line); background: var(--surface); }
.pub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.1rem; margin: 1.5rem 0; }
.pub-co { display: block; color: inherit; transition: transform .15s, box-shadow .15s; }
.pub-co:hover { border-color: var(--ink); text-decoration: none; }
.pub-co img { height: 52px; width: auto; margin-bottom: .75rem; }

/* ---------- responsive ---------- */
@media (max-width: 960px) { .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: 280px; z-index: 50; height: 100dvh;
             transform: translateX(100%); transition: transform .2s ease; }
  [dir=ltr] .sidebar { transform: translateX(-100%); }
  body.nav-open .sidebar { transform: none; box-shadow: var(--shadow); }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(2,6,23,.45); z-index: 40; }
  .menu-btn { display: inline-flex; }
  .content { padding: 1rem; }
  .topbar { padding: .6rem 1rem; }
  .auth-wrap { grid-template-columns: 1fr; } .auth-side { display: none; }
  .auth-mobile-brand { display: flex; margin-bottom: 1.5rem; }
  table { display: block; overflow-x: auto; white-space: nowrap; }
  #id_theme_color { grid-template-columns: repeat(4, 2.4rem); }
  .quick { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  .stat { flex-direction: column; align-items: flex-start; gap: .6rem; padding: .85rem; }
  .bar-label { width: 96px; }
}

/* two-column forms (long fields span both columns) */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.25rem; max-width: none !important; }
.form-grid > div { margin: 0 0 1rem; }
.form-grid > div:has(textarea), .form-grid > div:has(input[type=file]), .form-grid > div:has(#id_theme_color),
.form-grid > div:has(input[type=checkbox]), .form-grid > .full, .form-grid > button, .form-grid > a,
.form-grid > h2, .form-grid > h3, .form-grid > p { grid-column: 1 / -1; }
.form-actions { grid-column: 1 / -1; display: flex; gap: .6rem; padding-top: .5rem; border-top: 1px solid var(--line-2); margin-top: .25rem; }
@media (max-width: 760px) { .form-grid { grid-template-columns: 1fr; } }

/* theme picker */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.theme-card { display: flex; flex-direction: column; gap: .35rem; padding: .75rem; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 400; }
.theme-card.on, .theme-card:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.theme-card input { position: absolute; opacity: 0; pointer-events: none; }
.theme-prev { display: flex; flex-direction: column; gap: .4rem; padding: 1rem; height: 110px; border: 1px solid var(--line); position: relative; }
.theme-prev i { display: block; height: 7px; width: 85%; opacity: .75; }
.theme-prev b { position: absolute; bottom: 1rem; inset-inline-end: 1rem; width: 34px; height: 14px; }

/* public: country picker */
.country-pick { position: relative; }
.country-pick summary { list-style: none; cursor: pointer; display: inline-flex; gap: .4rem; align-items: center; padding: .35rem .7rem; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: .92rem; }
.country-pick summary::-webkit-details-marker { display: none; }
.country-pick .drop { position: absolute; inset-inline-end: 0; top: calc(100% + 4px); z-index: 40; min-width: 12rem; max-height: 20rem; overflow: auto; background: var(--surface); border: 1px solid var(--ink); padding: .25rem 0; }
.country-pick .drop a { display: block; padding: .45rem 1rem; color: var(--ink); } .country-pick .drop a:hover, .country-pick .drop a.on { background: var(--line-2); text-decoration: none; }
.country-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.country-tile { display: flex; align-items: center; gap: .6rem; padding: .9rem 1rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; }
.country-tile:hover { border-color: var(--ink); text-decoration: none; } .country-tile span { font-size: 1.5rem; }

/* unified catalog workspace */
.catalog { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.ctree { border: 1px solid var(--line); background: var(--surface); padding: .75rem; position: sticky; top: 4.5rem; }
.ctree summary { font-family: var(--serif); font-size: 1.15rem; font-weight: 700; cursor: pointer; padding: .2rem .25rem .6rem; }
.ctree nav { display: flex; flex-direction: column; max-height: 55vh; overflow: auto; }
.tnode { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .4rem .5rem; padding-inline-start: calc(.5rem + var(--d, 0) * 1.1rem); color: var(--ink-2); border-inline-start: 2px solid transparent; font-size: .95rem; }
.tnode span { display: inline-flex; gap: .45rem; align-items: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tnode em { font-style: normal; font-size: .78rem; color: var(--muted); background: var(--line-2); padding: 0 .45rem; min-width: 1.4rem; text-align: center; }
.tnode:hover { background: var(--line-2); text-decoration: none; }
.tnode.on { background: var(--line-2); border-inline-start-color: var(--ink); color: var(--ink); font-weight: 700; }
.tl { width: .7rem; height: .7rem; border-inline-start: 1px solid var(--faint); border-bottom: 1px solid var(--faint); display: inline-block; }
.catadd { margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--line); display: grid; gap: .5rem; }
.catadd div { display: flex; gap: .4rem; flex-wrap: wrap; }
.ccrumbs { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .9rem; color: var(--muted); font-size: .92rem; }
.ccrumbs .grow { flex: 1; }
.quickadd { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: .5rem; padding: .75rem; border: 1px solid var(--ink); background: var(--surface); }
.qa-msg { min-height: 1.4rem; font-size: .88rem; margin: .35rem 0 .5rem; } .qa-msg.success { color: var(--ok); } .qa-msg.error { color: var(--err); }
.plist { border-top: 1px solid var(--ink); }
.prow { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto auto auto; gap: 1rem; align-items: center; padding: .65rem .25rem; border-bottom: 1px solid var(--line); }
.prow:hover { background: var(--surface); }
.pthumb { width: 52px; height: 52px; object-fit: cover; border: 1px solid var(--line); display: grid; place-items: center; background: var(--line-2); color: var(--faint); }
.pn { color: var(--ink); font-weight: 700; display: block; } .pn:hover { color: var(--brand-ink); }
.pprice { font-family: var(--serif); font-size: 1.1rem; white-space: nowrap; }
.pstate { display: flex; gap: .3rem; flex-wrap: wrap; }
.chip { font: inherit; font-size: .78rem; padding: .1rem .6rem; border: 1px solid var(--line); background: var(--line-2); color: var(--ink-2); }
button.chip { cursor: pointer; } .chip.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; } .chip.off { background: var(--err-bg); color: var(--err); border-color: transparent; }
.pact { display: flex; gap: .6rem; align-items: center; }
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--muted); max-width: 34rem; margin-inline: auto; }
.plist:has(.prow) .empty-state { display: none; }
.empty-state .i { width: 2.4rem; height: 2.4rem; color: var(--faint); }
@media (max-width: 860px) {
  .catalog { grid-template-columns: 1fr; } .ctree { position: static; } .ctree nav { max-height: 40vh; }
  .quickadd { grid-template-columns: 1fr 1fr; } .quickadd input:first-of-type + input { } .quickadd input[name=name] { grid-column: 1 / -1; } .quickadd .btn { grid-column: 1 / -1; }
  .prow { grid-template-columns: 44px minmax(0, 1fr) auto; } .pstate, .pact { grid-column: 2 / -1; } .pthumb { width: 44px; height: 44px; }
}

/* product form: sections + sticky save bar */
.pform .card h2 { font-size: 1.25rem; padding-bottom: .5rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.pform .card h3 { margin-top: 1.25rem; }
.pform .form-grid > div { margin-bottom: 1rem; }
.savebar { position: sticky; bottom: 0; z-index: 10; display: flex; gap: .6rem; padding: .8rem 0; background: var(--bg); border-top: 1px solid var(--ink); margin-top: 1rem; }

.sec { font-size: 1.05rem; margin: 1.25rem 0 .6rem; color: var(--ink-2); }

/* auth: two-column register grid, subdomain suffix, password toggle */
.auth-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.auth-grid > div { margin-bottom: 1rem; } .auth-grid .span2 { grid-column: 1 / -1; }
.auth-grid .btn.span2 { margin-top: .25rem; }
.input-group { display: flex; align-items: stretch; } .input-group input { border-start-end-radius: 0; border-end-end-radius: 0; flex: 1; min-width: 0; }
.input-group .suffix { display: grid; place-items: center; padding: 0 .8rem; background: var(--line-2); border: 1px solid var(--line); border-inline-start: 0; color: var(--muted); font-size: .92rem; white-space: nowrap; }
.pw-wrap { position: relative; } .pw-wrap input { padding-inline-end: 4.2rem; }
.pw-toggle { position: absolute; inset-inline-end: .5rem; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--brand-ink); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; padding: .25rem .4rem; }
@media (max-width: 520px) { .auth-grid { grid-template-columns: 1fr; } }

/* auth forms: error text goes under the field, invalid fields are outlined */
.auth-card form > div, .auth-grid > div { display: flex; flex-direction: column; }
.auth-card form > div > .errorlist, .auth-grid > div > .errorlist { order: 3; margin: .3rem 0 0; }
.auth-card form > div > .helptext, .auth-grid > div > .helptext { order: 2; }
.auth-card form > div:has(.errorlist) input, .auth-card form > div:has(.errorlist) select,
.auth-grid > div:has(.errorlist) input, .auth-grid > div:has(.errorlist) select { border-color: var(--err); }
.auth-grid > div.span2.is-sub { display: block; }
