.input-group { display: flex; align-items: center; gap: 8px; border: 1px solid var(--pv-control); border-radius: 999px; padding: 0 14px; margin: 8px 0 20px; }
.input-group > input { border: 0 !important; box-shadow: none !important; min-width: 0; }
.input-group:focus-within { outline: 2px solid var(--pv-focus); outline-offset: 2px; }
.pin-input { max-width: 280px !important; letter-spacing: .5em; font-variant-numeric: tabular-nums; }
#strength-meter { width: 100%; height: 12px; }
.segmented { display: inline-flex; border: 1px solid var(--pv-control); border-radius: 999px; overflow: hidden; }
.segmented button { border: 0; padding: 12px 20px; background: var(--pv-surface); color: var(--pv-text); }
.segmented [aria-pressed=true] { background: var(--pv-selection-bg); color: var(--pv-selection-fg); }
.segmented button:focus-visible { outline-offset: -4px; }
.segmented button:disabled { background: var(--pv-disabled-bg); color: var(--pv-disabled-fg); }
.contextual-bar,.spread-demo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; border-radius: 12px; background: var(--pv-muted); }
.nested-menu summary { cursor: pointer; padding: 12px; }
.nested-menu > a,.nested-menu > details { display: block; margin-left: 20px; }
.nested-menu details .button { display: flex; margin: 8px 0; }
.calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 4px; }
.calendar-grid > span { text-align: center; padding: 6px 0; color: var(--pv-secondary); font-size: 12px; }
.calendar-grid button { min-width: 0; width: 100%; min-height: 36px; border: 0; border-radius: 50%; background: var(--pv-surface); color: var(--pv-text); }
.calendar-grid button:hover { background: var(--pv-muted); }
.calendar-grid button[aria-pressed=true] { background: var(--pv-red); color: var(--pv-white); }
.calendar-grid button[data-today] { box-shadow: inset 0 0 0 1px var(--pv-control); }
.carousel-stage { min-height: 180px; background: var(--pv-brand-soft); padding: 28px; border-radius: 16px; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.slide-dot { width: 28px; height: 28px; border: 0; padding: 8px; background: transparent; border-radius: 50%; }
.slide-dot::after { content: ''; display: block; width: 12px; height: 12px; border-radius: 50%; background: var(--pv-control); }
.slide-dot[aria-pressed=true]::after { background: var(--pv-red); }
.bar-chart { display: grid; gap: 16px; }
.bar-chart > div { padding: 10px 12px; position: relative; border-radius: 8px; overflow: hidden; background: var(--pv-muted); }
.bar-chart > div::before { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--value); background: var(--pv-brand-soft); }
.bar-chart span { position: relative; color: var(--pv-heading); }
.ringbar { --progress: 65%; width: 88px; height: 88px; flex: 0 0 88px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--pv-red) var(--progress),var(--pv-muted) 0); }
.ringbar > span { width: 68px; height: 68px; border-radius: 50%; background: var(--pv-surface); display: grid; place-items: center; font-weight: 600; }
.clamp-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.aspect-preview { aspect-ratio: 16/9; overflow: hidden; border-radius: 16px; background: var(--pv-muted); }
.aspect-preview img { width: 100%; height: 100%; object-fit: contain; }
#camera-preview { width: 100%; aspect-ratio: 4/3; background: var(--pv-muted); border-radius: 16px; }
#crop-preview { display: block; width: min(100%,320px); height: auto; margin: 16px auto; background: var(--pv-muted); border-radius: 12px; }
#signature-canvas { display: block; width: 100%; height: auto; touch-action: none; background: #fff; border: 1px solid var(--pv-control); border-radius: 16px; }
.typed-signature { font: italic 32px/1.5 cursive; overflow-wrap: anywhere; min-height: 64px; }
.qr-code { display: block; max-width: 100%; height: auto; background: #fff; border-radius: 12px; }
.pdf-frame { display: block; width: 100%; height: 460px; margin-top: 16px; border: 1px solid var(--pv-border); border-radius: 12px; }
.pdf-placement { position: relative; min-height: 440px; background: var(--pv-surface); border: 1px solid var(--pv-control); padding: 24px; overflow: hidden; }
.pdf-placement > p { margin: 20px 0; }
.pdf-field { position: absolute; border: 1px dashed var(--pv-control); padding: 8px; background: var(--pv-selection-bg); color: var(--pv-heading); min-height: 40px; text-align: left; overflow-wrap: anywhere; touch-action: none; }
.pdf-field[aria-pressed=true] { outline: 2px solid var(--pv-focus); }
.rich-toolbar { margin-bottom: 16px; }
.rich-toolbar [aria-pressed=true] { background: var(--pv-selection-bg); color: var(--pv-selection-fg); }
.rich-editor { padding: 20px; min-height: 240px; margin-top: 8px; border: 1px solid var(--pv-control); border-radius: 20px; overflow-wrap: anywhere; }
.rich-editor p { margin-bottom: 12px; }
#rich-preview { overflow-wrap: anywhere; }
@media (max-width:640px) { .rich-editor { font-size:16px; }.calendar-grid { gap:2px; }.segmented button { padding:12px 16px; } }
/* Six visual OTP cells backed by one labelled, autofill-friendly native input. */
.pin-control { position: relative; display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 8px; width: min(100%,344px); margin-top: 4px; }
.pin-control #pin-input { position: absolute; inset: 0; width: 100%; max-width: none !important; height: 100%; min-height: 0; margin: 0; padding: 0; opacity: 0; z-index: 1; cursor: text; font-size: 20px; letter-spacing: normal; }
.pin-cell { display: grid; place-items: center; height: 52px; min-width: 0; border: 1px solid var(--pv-control); border-radius: 12px; background: var(--pv-input-bg); color: var(--pv-heading); font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; position: relative; }
.pin-cell[data-filled] { background: var(--pv-brand-soft); }
.pin-cell[data-current] { border-color: var(--pv-focus); outline: 2px solid var(--pv-focus); outline-offset: 2px; }
.pin-cell[data-current]:empty::after { content: ''; width: 2px; height: 22px; background: var(--pv-focus); }
.pin-control:has([aria-invalid=true]) .pin-cell { border-color: var(--pv-error-fg); }
@media(max-width:400px) { .pin-control { gap:6px; }.pin-cell { height:48px; border-radius:10px; } }
/* A calendar day is square; it must not stretch to the full grid-column width. */
.calendar-grid button { width: min(100%,36px); height: auto; min-height: 0; aspect-ratio: 1; padding: 0; justify-self: center; display: grid; place-items: center; border-radius: 50%; }


/* Attached prefix/suffix panels share one rounded input boundary. */
.input-group--unit { align-items:stretch; gap:0; padding:0; margin:0; min-height:var(--pv-control-height); overflow:hidden; background:var(--pv-input-bg); }
.input-group--unit > input { flex:1 1 0%; width:0; min-width:0; min-height:calc(var(--pv-control-height) - 2px)!important; border-radius:0!important; background:transparent; font-variant-numeric:tabular-nums; }
.input-unit { display:flex; align-items:center; justify-content:center; flex:0 0 auto; min-width:56px; padding:10px 16px; border-left:1px solid var(--pv-control); background:var(--pv-muted); color:var(--pv-secondary); font-size:14px; line-height:20px; white-space:nowrap; }
.input-unit--prefix { border-left:0; border-right:1px solid var(--pv-control); }
.input-group--unit:has(input[aria-invalid=true]) { border-color:var(--pv-error-fg); }
.input-group--unit:has(input:disabled) { border-color:var(--pv-disabled-border); background:var(--pv-disabled-bg); }
.input-group--unit:has(input:disabled) .input-unit { color:var(--pv-disabled-fg); background:var(--pv-disabled-bg); border-color:var(--pv-disabled-border); }
.input-group--unit:has(input[readonly]) { background:var(--pv-muted); }
@media(max-width:640px) { .input-unit { padding-inline:14px; } }
