/* Codhix Solutions — generated previews and candlestick charts.
   Shared by the website and the admin panel. */

.candles .grid { stroke: rgba(255, 255, 255, .06); stroke-width: 1; vector-effect: non-scaling-stroke; }
.candles .wick { stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.candles .up { stroke: #22C55E; fill: #22C55E; }
.candles .down { stroke: #F43F5E; fill: #F43F5E; }
.candles .body.down { fill: #F43F5E; }

/* ==========================================================================
   Generated previews (catalog cards, project covers). 1em = 1/45 of width.
   ========================================================================== */
.pv { position: relative; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; container-type: inline-size; }
.pv-in { position: absolute; inset: 0; font-size: calc(100cqi / 45); line-height: 1.3; }

.pv-store { background: var(--bg); color: var(--fg); }
.pv-store .pv-in { display: grid; grid-template-rows: auto minmax(0, 1.3fr) minmax(0, 1fr); gap: 1.2em; padding: 0 2em 2em; }
.pv-store .pv-nav { display: flex; align-items: center; gap: 1.1em; height: 3.8em; border-bottom: 1px solid color-mix(in srgb, var(--fg) 12%, transparent); }
.pv-store .pv-nav b { flex: 1; min-width: 0; font-size: 1.1em; font-weight: 720; letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-store .pv-nav span { width: 2.6em; height: .45em; border-radius: 1em; background: currentColor; opacity: .25; flex-shrink: 0; }
.pv-store .pv-nav i { width: 1.4em; height: 1.4em; border-radius: 50%; border: .18em solid currentColor; opacity: .6; flex-shrink: 0; }
.pv-banner { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 1em; padding: 0 2em; border-radius: .9em; overflow: hidden; background: color-mix(in srgb, var(--ac) 18%, var(--bg)); }
.pv-banner em { display: block; font-style: normal; font-size: 1.5em; font-weight: 740; line-height: 1.08; margin-bottom: .5em; max-width: 9em; overflow-wrap: anywhere; }
.pv-banner span { display: block; height: .5em; width: 80%; border-radius: 1em; background: currentColor; opacity: .2; margin-top: .45em; }
.pv-banner span.s { width: 55%; }
.pv-banner u { display: block; margin-top: 1em; width: 6em; height: 1.9em; border-radius: 99em; background: var(--ac); }
.pv-banner .shape { font-size: 2.2em; justify-self: center; }
.pv-products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1em; min-height: 0; }
.pv-products span { display: grid; place-items: center; border-radius: .7em; background: color-mix(in srgb, var(--fg) 6%, var(--bg)); min-height: 0; }
.pv-store .v1 .pv-banner, .pv-store.v1 .pv-banner { grid-template-columns: 1fr 1.2fr; }
.pv-store.v1 .pv-banner > div { order: 2; }
.pv-store.v2 .pv-banner { background: var(--ac); color: var(--on-ac, var(--bg)); }
.pv-store.v2 .pv-banner u, .pv-store.v2 .pv-banner .shape { background: var(--bg); }
.shape { display: block; position: relative; background: var(--ac); }
.shape.s0 { width: 1.7em; height: 2.6em; border-radius: .45em .45em .7em .7em; }
.shape.s0::before { content: ""; position: absolute; left: 50%; top: -.6em; width: .8em; height: .6em; transform: translateX(-50%); border-radius: .15em; background: inherit; filter: brightness(.8); }
.shape.s1 { width: 2.4em; height: 2.4em; border-radius: 50%; }
.shape.s2 { width: 2.2em; height: 2.2em; border-radius: .6em; transform: rotate(-12deg); }
.shape.s3 { width: 2.2em; height: 2.7em; border-radius: 1.1em 1.1em .3em .3em; }

.pv-site { background: #fff; color: #0D1530; }
.pv-site.v2 { background: var(--tint); }
.pv-site .pv-in { display: grid; grid-template-rows: auto minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.1em; padding: 0 2em 2em; }
.pv-site .pv-nav { display: flex; align-items: center; gap: 1.1em; height: 3.8em; }
.pv-site .pv-nav b { flex: 1; min-width: 0; display: flex; align-items: center; gap: .5em; font-size: 1em; font-weight: 720; white-space: nowrap; overflow: hidden; }
.pv-site .pv-nav b i { width: .9em; height: .9em; border-radius: .22em; background: var(--ac); transform: rotate(45deg); flex-shrink: 0; }
.pv-site .pv-nav span { width: 2.6em; height: .45em; border-radius: 1em; background: #0D1530; opacity: .2; flex-shrink: 0; }
.pv-site .pv-nav u { width: 4.6em; height: 1.7em; border-radius: .45em; background: #0D1530; flex-shrink: 0; }
.pv-hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 1.6em; align-items: center; min-height: 0; }
.pv-site.v1 .pv-hero { background: var(--tint); border-radius: .9em; padding: 0 1.4em; }
.pv-hero strong { display: block; font-size: 1.55em; font-weight: 760; line-height: 1.06; letter-spacing: -.01em; overflow-wrap: anywhere; }
.pv-hero span { display: block; height: .45em; width: 85%; border-radius: 1em; background: #0D1530; opacity: .15; margin-top: .6em; }
.pv-hero span.s { width: 60%; }
.pv-hero u { display: block; width: 5.4em; height: 1.8em; border-radius: .45em; background: var(--ac); margin-top: 1em; }
.pv-hero .pic { align-self: stretch; margin: .8em 0; border-radius: .9em; position: relative; overflow: hidden; background: linear-gradient(135deg, color-mix(in srgb, var(--ac) 34%, #fff), color-mix(in srgb, var(--ac) 10%, #fff)); }
.pv-hero .pic::after { content: ""; position: absolute; width: 70%; aspect-ratio: 1; right: -15%; bottom: -25%; border-radius: 50%; background: var(--ac); opacity: .75; }
.pv-hero .pic::before { content: ""; position: absolute; width: 30%; aspect-ratio: 1; left: 14%; top: 18%; border-radius: .5em; background: #fff; opacity: .8; }
.pv-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1em; min-height: 0; }
.pv-cols span { border: 1px solid #E3E7EF; background: #fff; border-radius: .7em; padding: .9em; min-height: 0; overflow: hidden; }
.pv-cols i { display: block; width: 1.8em; height: 1.8em; border-radius: .5em; background: color-mix(in srgb, var(--ac) 20%, #fff); }
.pv-cols b { display: block; height: .45em; border-radius: 1em; background: #DDE2EC; margin-top: .6em; }
.pv-cols b.s { width: 60%; }

.pv-erp { background: #F5F6FB; }
.pv-erp .pv-in { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); }
.pv-side { background: #141938; padding: 1.2em .9em; display: flex; flex-direction: column; gap: .7em; }
.pv-side b { width: 1.6em; height: 1.6em; border-radius: .4em; background: var(--ac); margin-bottom: .6em; }
.pv-side span { height: .55em; border-radius: 1em; background: rgba(255, 255, 255, .2); }
.pv-side span.on { background: var(--ac); }
.pv-erp.v1 .pv-side { background: #fff; border-right: 1px solid #E3E6EF; }
.pv-erp.v1 .pv-side span { background: #DDE2EC; }
.pv-erp.v1 .pv-side span.on { background: var(--ac); }
.pv-main { display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 1em; padding: 1.2em 1.4em 1.4em; min-width: 0; }
.pv-head { display: flex; justify-content: space-between; align-items: center; gap: 1em; }
.pv-head strong { font-size: 1.15em; font-weight: 740; color: #0D1530; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-head span { width: 2em; height: 2em; border-radius: 50%; background: #FFE7D6; flex-shrink: 0; }
.pv-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8em; }
.pv-tiles span { background: #fff; border: 1px solid #E6E9F1; border-radius: .6em; padding: .7em .8em; }
.pv-tiles i { display: block; width: 60%; height: .4em; border-radius: 1em; background: #DDE2EC; }
.pv-tiles b { display: block; font-size: 1.15em; color: #0D1530; margin-top: .3em; font-weight: 740; }
.pv-split { display: grid; grid-template-columns: 1fr 1.3fr; gap: .8em; min-height: 0; }
.pv-bars { display: flex; align-items: flex-end; gap: .45em; padding: .8em; background: #fff; border: 1px solid #E6E9F1; border-radius: .6em; min-height: 0; }
.pv-bars i { flex: 1; border-radius: .25em .25em .1em .1em; background: color-mix(in srgb, var(--ac) 40%, #fff); }
.pv-bars i:nth-child(6) { background: var(--ac); }
.pv-rows { display: grid; gap: .45em; align-content: start; padding: .8em; background: #fff; border: 1px solid #E6E9F1; border-radius: .6em; min-height: 0; overflow: hidden; }
.pv-rows span { display: grid; grid-template-columns: 1fr 1.6fr 1.1em; gap: .5em; align-items: center; }
.pv-rows i { height: .4em; border-radius: 1em; background: #DDE2EC; }
.pv-rows em { height: .8em; border-radius: 1em; }
.pv-rows em.k0 { background: #A7F3D0; }
.pv-rows em.k1 { background: #FED7AA; }
.pv-rows em.k2 { background: #C7D2FE; }

.pv-trading { background: #0A0F1F; }
.pv-trading .pv-in { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.pv-tnav { display: flex; align-items: center; gap: 1em; padding: 0 1.6em; height: 3.4em; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.pv-tnav b { flex: 1; min-width: 0; color: #fff; font-size: 1em; font-weight: 720; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-tnav span { width: 3em; height: .55em; border-radius: 1em; background: rgba(255, 255, 255, .18); }
.pv-tnav span.up { background: #22C55E; }
.pv-tbody { display: grid; grid-template-columns: minmax(0, 1fr) 9em; min-height: 0; }
.pv-chart { padding: 1em; min-height: 0; }
.pv-chart svg { display: block; width: 100%; height: 100%; }
.pv-tpanel { display: grid; grid-template-columns: 1fr 1fr; align-content: start; gap: .5em; padding: 1em; border-left: 1px solid rgba(255, 255, 255, .08); }
.pv-tpanel span { height: 2.4em; border-radius: .45em; }
.pv-tpanel .sell { background: #E11D48; }
.pv-tpanel .buy { background: #16A34A; }
.pv-tpanel i { grid-column: 1 / -1; height: .6em; border-radius: 1em; background: rgba(255, 255, 255, .12); margin-top: .5em; }
.pv-tpanel i:first-of-type { background: var(--ac); width: 70%; }

/* Trading: phone layout */
.pv-phone { background: radial-gradient(circle at 70% 30%, color-mix(in srgb, var(--ac) 34%, #fff), color-mix(in srgb, var(--ac) 10%, #F3F5F9) 70%); }
.pv-phone .pv-in { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.6em; padding: 0 2.4em; }
.pv-phone .pv-copy strong { display: block; font-size: 1.45em; font-weight: 760; line-height: 1.08; color: #0D1530; overflow-wrap: anywhere; }
.pv-phone .pv-copy span { display: block; height: .45em; width: 85%; border-radius: 1em; background: #0D1530; opacity: .15; margin-top: .6em; }
.pv-phone .pv-copy u { display: block; width: 5.6em; height: 1.8em; border-radius: .5em; background: #0D1530; margin-top: 1em; }
.pv-device { width: 12.5em; height: 24em; border-radius: 2em; background: #0A0F1F; border: .45em solid #1C2340; box-shadow: 0 1.6em 3em -1.2em rgba(10, 15, 31, .7); display: grid; grid-template-rows: auto 1fr auto; padding: 1.4em .9em 1em; gap: .7em; transform: rotate(-4deg); }
.pv-device b { display: block; height: .55em; width: 55%; border-radius: 1em; background: rgba(255, 255, 255, .3); }
.pv-device b + i { display: block; font-style: normal; color: #fff; font-weight: 720; font-size: 1.05em; margin-top: .3em; }
.pv-device svg { width: 100%; height: 100%; display: block; }
.pv-device .pv-dbtn { display: grid; grid-template-columns: 1fr 1fr; gap: .4em; }
.pv-device .pv-dbtn span { height: 2em; border-radius: .5em; background: #E11D48; }
.pv-device .pv-dbtn span + span { background: #16A34A; }
.pv-toastcard { align-self: end; margin-bottom: 4em; background: #fff; border-radius: .8em; padding: .9em 1em; box-shadow: 0 1em 2em -1em rgba(13, 21, 48, .4); display: grid; gap: .45em; }
.pv-toastcard i { display: block; width: 1.6em; height: 1.6em; border-radius: 50%; background: #16A34A; }
.pv-toastcard span { display: block; height: .45em; width: 7em; border-radius: 1em; background: #DDE2EC; }
.pv-toastcard span + span { width: 4.5em; }

