/* R30 shareholders app (/coop, PWA, phone first). Every class of this file starts with "cp-". 360 px first, touch targets ≥ 44 px, logical
   properties for RTL (Arabic is the default), the house colour tokens (dark mode follows the theme) plus the company's own colours from
   Shareholders › Mobile app (--cp-primary / --cp-accent, set on .cp-app). Amounts are shown with Ui.Money (3 decimals). */

.cp-app { --cp-primary: var(--primary); --cp-accent: var(--accent); --cp-on-primary: #fff; --cp-radius: 16px;
    min-height: 100vh; min-height: 100dvh; background: var(--ground); color: var(--text); font-family: var(--font);
    padding-bottom: calc(76px + env(safe-area-inset-bottom)); -webkit-tap-highlight-color: transparent; }
.cp-app a { color: var(--cp-primary); }
.cp-app :focus-visible { outline: 2px solid var(--cp-primary); outline-offset: 2px; }

/* ---------------------------------------------------------------- top bar */
.cp-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 2px; min-height: 58px;
    padding: env(safe-area-inset-top) 6px 0; background: var(--cp-primary); color: var(--cp-on-primary); box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.cp-top a, .cp-top button { color: var(--cp-on-primary); }
.cp-brand { display: inline-flex; align-items: center; gap: 8px; min-width: 0; text-decoration: none; padding-inline: 6px; }
.cp-brand img { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.15); object-fit: cover; flex: none; }
.cp-top-title { flex: 1; min-width: 0; padding-inline: 4px; }
.cp-top-title h1, .cp-title { margin: 0; font-size: 1.06rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
.cp-title small { display: block; font-size: .76rem; font-weight: 400; opacity: .85; }
.cp-top-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%;
    text-decoration: none; border: 0; background: transparent; cursor: pointer; flex: none; font: inherit; }
.cp-top-btn:hover { background: rgba(255,255,255,.12); }
.cp-lang { font-weight: 700; font-size: .95rem; }
[dir="rtl"] .cp-back .icon { transform: scaleX(-1); }
.cp-badge { position: absolute; top: 3px; inset-inline-end: 1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; box-sizing: border-box;
    background: var(--cp-accent); color: #1b1b1b; font-size: .7rem; font-weight: 700; line-height: 18px; text-align: center; }
.cp-badge.static { position: static; margin-inline-start: auto; }

.cp-main { max-width: 760px; margin: 0 auto; padding: 12px 14px 28px; box-sizing: border-box; }
.cp-main > * + * { margin-top: 14px; }
.cp-wide { margin-inline: -14px; }

/* ---------------------------------------------------------------- bottom tab bar */
.cp-tabs { position: fixed; inset-inline: 0; bottom: 0; z-index: 30; display: flex; justify-content: center; background: var(--surface);
    border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -4px 16px rgba(0,0,0,.05); }
.cp-tab { position: relative; flex: 1; max-width: 150px; min-height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    text-decoration: none; color: var(--muted) !important; font-size: .72rem; border: 0; background: transparent; cursor: pointer; font-family: inherit; padding: 6px 2px; }
.cp-tab.active { color: var(--cp-primary) !important; font-weight: 600; }
.cp-tab.active::before { content: ""; position: absolute; top: 0; inset-inline: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--cp-primary); }
.cp-tab .cp-badge { top: 4px; inset-inline-end: calc(50% - 24px); }

/* bottom sheet (more) */
.cp-sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.38); animation: cp-fade .15s ease-out; }
.cp-sheet { position: fixed; inset-inline: 0; bottom: 0; z-index: 41; max-width: 760px; margin: 0 auto; max-height: 88vh; overflow-y: auto; box-sizing: border-box;
    background: var(--surface); border-radius: 20px 20px 0 0; padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 30px rgba(0,0,0,.2);
    animation: cp-up .2s ease-out; }
@keyframes cp-up { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes cp-fade { from { opacity: 0; } to { opacity: 1; } }
.cp-sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: var(--border); margin: 4px auto 12px; }
.cp-who { display: flex; align-items: center; gap: 12px; padding: 4px 0 12px; border-bottom: 1px solid var(--row-line); }
.cp-who > div { display: flex; flex-direction: column; min-width: 0; }
.cp-avatar { flex: none; width: 46px; height: 46px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: var(--cp-accent); color: #1b1b1b; font-weight: 700; }
.cp-menu { display: flex; flex-direction: column; padding: 4px 0; }
.cp-menu-item { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 0 4px; color: var(--text) !important; text-decoration: none;
    border-bottom: 1px solid var(--row-line); background: none; border-inline: 0; border-top: 0; font: inherit; text-align: start; cursor: pointer; width: 100%; }
.cp-menu-item .icon { color: var(--cp-primary); }
.cp-signout { margin-top: 12px; }
.cp-signout .btn { width: 100%; justify-content: center; min-height: 48px; }

/* install banner */
.cp-install { display: flex; align-items: center; gap: 10px; max-width: 760px; margin: 10px auto 0; padding: 10px 12px; box-sizing: border-box;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--cp-radius); }
@media (max-width: 788px) { .cp-install { margin: 10px 14px 0; } }
.cp-install img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.cp-install-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: .84rem; }
.cp-install-text span { color: var(--muted); }
.cp-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent;
    color: var(--muted); cursor: pointer; flex: none; text-decoration: none; }
.cp-icon-btn:hover { background: var(--gray-bg); }

/* ---------------------------------------------------------------- building blocks */
.cp-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--cp-radius); padding: 14px 16px; }
.cp-card.flush { padding: 0; overflow: hidden; }
.cp-card > h2, .cp-h2 { font-size: 1rem; font-weight: 600; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.cp-sec-head { display: flex; align-items: center; gap: 8px; margin: 18px 2px 8px; }
.cp-sec-head h2 { flex: 1; margin: 0; font-size: 1.02rem; font-weight: 700; }
.cp-sec-head a { font-size: .84rem; font-weight: 500; text-decoration: none; display: inline-flex; align-items: center; gap: 2px; }
[dir="rtl"] .cp-sec-head a .icon { transform: scaleX(-1); }
.cp-muted { color: var(--muted); }
.cp-small { font-size: .82rem; }
.cp-num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.cp-pad { padding: 0 16px 14px; }
.cp-row { display: flex; align-items: center; gap: 10px; }
.cp-row.wrap { flex-wrap: wrap; }
.cp-grow { flex: 1; min-width: 0; }
.cp-center { text-align: center; }
.cp-hidden { display: none; }
.cp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 24px; border: 0;
    background: var(--cp-primary); color: var(--cp-on-primary) !important; font: inherit; font-size: 1rem; font-weight: 600; cursor: pointer; text-decoration: none; }
.cp-btn:hover { filter: brightness(1.06); }
.cp-btn:disabled { opacity: .55; cursor: default; filter: none; }
.cp-btn.block { width: 100%; }
.cp-btn.ghost { background: transparent; color: var(--cp-primary) !important; border: 1.5px solid var(--cp-primary); }
.cp-btn.light { background: var(--gray-bg); color: var(--text) !important; }
.cp-btn.danger { background: transparent; color: var(--danger) !important; border: 1.5px solid var(--danger); }
.cp-btn.sm { min-height: 38px; padding: 0 14px; font-size: .88rem; border-radius: 19px; }
.cp-link { background: none; border: 0; color: var(--cp-primary); font: inherit; cursor: pointer; padding: 6px 0; text-decoration: underline; text-underline-offset: 3px; }
.cp-msg { padding: 10px 12px; border-radius: 12px; font-size: .9rem; line-height: 1.5; }
.cp-msg.bad { background: var(--red-bg); color: var(--red-fg); }
.cp-msg.good { background: var(--green-bg); color: var(--green-fg); }
.cp-msg.info { background: var(--blue-bg); color: var(--blue-fg); }
.cp-msg.warn { background: var(--amber-bg); color: var(--amber-fg); }
.cp-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 12px; font-size: .74rem; font-weight: 600; white-space: nowrap;
    background: var(--gray-bg); color: var(--gray-fg); }
.cp-chip.green { background: var(--green-bg); color: var(--green-fg); }
.cp-chip.amber { background: var(--amber-bg); color: var(--amber-fg); }
.cp-chip.red { background: var(--red-bg); color: var(--red-fg); }
.cp-chip.blue { background: var(--blue-bg); color: var(--blue-fg); }
.cp-chip.gold { background: color-mix(in srgb, var(--cp-accent) 25%, transparent); color: color-mix(in srgb, var(--cp-accent) 40%, #2a1d00); }
.cp-empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.cp-empty .icon { color: var(--cp-primary); opacity: .6; }
.cp-empty h2 { color: var(--text); font-size: 1.05rem; margin: 10px 0 6px; }
.cp-skel { background: linear-gradient(90deg, var(--gray-bg) 25%, var(--row-line) 50%, var(--gray-bg) 75%); background-size: 200% 100%;
    animation: cp-shimmer 1.2s infinite; border-radius: 12px; }
@keyframes cp-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* key / value */
.cp-kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; font-size: .92rem; margin: 0; }
.cp-main > * + .cp-kv { margin-top: 14px; }
.cp-kv dt { color: var(--muted); }
.cp-kv dd { margin: 0; text-align: end; font-weight: 500; overflow-wrap: anywhere; }
.cp-kv .total { font-weight: 700; font-size: 1.05rem; color: var(--text); }

/* list rows */
.cp-list { display: flex; flex-direction: column; }
.cp-item { position: relative; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 16px; text-decoration: none; color: var(--text) !important;
    border-bottom: 1px solid var(--row-line); background: transparent; border-inline: 0; border-top: 0; width: 100%; text-align: start; font: inherit; cursor: pointer; box-sizing: border-box; }
.cp-item:last-child { border-bottom: 0; }
a.cp-item:hover, button.cp-item:hover { background: var(--ground); }
.cp-item.unread::before { content: ""; position: absolute; inset-inline-start: 5px; top: 50%; width: 7px; height: 7px; margin-top: -3px; border-radius: 50%; background: var(--cp-primary); }
.cp-item.unread strong { font-weight: 700; }
.cp-item-icon { flex: none; width: 42px; height: 42px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--cp-primary) 12%, transparent); color: var(--cp-primary); overflow: hidden; }
.cp-item-icon img { width: 100%; height: 100%; object-fit: cover; }
.cp-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cp-item-body strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-item-body > span { font-size: .82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.cp-item-end { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: end; }
.cp-item > .icon:last-child { color: var(--muted); flex: none; }
[dir="rtl"] .cp-item > .icon:last-child { transform: scaleX(-1); }

/* ---------------------------------------------------------------- home: slider */
.cp-slider { position: relative; overflow: hidden; border-radius: var(--cp-radius); background: var(--cp-primary); touch-action: pan-y; user-select: none;
    aspect-ratio: 12 / 5.2; box-shadow: 0 6px 20px rgba(0,0,0,.08); }
@media (max-width: 420px) { .cp-slider { aspect-ratio: 16 / 9; } }
.cp-slides { display: flex; height: 100%; transition: transform .65s cubic-bezier(.22,.8,.25,1); will-change: transform; }
.cp-slide { position: relative; flex: 0 0 100%; height: 100%; display: block; text-decoration: none; color: #fff !important; }
.cp-slide img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; -webkit-user-drag: none; }
.cp-slide-text { position: absolute; inset-inline: 0; bottom: 0; padding: 40px 18px 34px; background: linear-gradient(to top, rgba(0,0,0,.6), transparent);
    display: flex; flex-direction: column; gap: 2px; }
.cp-slide-text strong { font-size: 1.25rem; line-height: 1.25; text-shadow: 0 1px 6px rgba(0,0,0,.35); }
.cp-slide-text span { font-size: .9rem; opacity: .92; }
.cp-dots { position: absolute; bottom: 10px; inset-inline: 0; display: flex; justify-content: center; gap: 4px; }
.cp-dot { width: 26px; height: 26px; padding: 0; border: 0; background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.cp-dot::after { content: ""; width: 8px; height: 8px; border-radius: 4px; background: rgba(255,255,255,.55); transition: width .3s, background .3s; }
.cp-dot.on::after { width: 22px; background: #fff; }
.cp-slider-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (prefers-reduced-motion: reduce) { .cp-slides { transition: none; } }

/* greeting & quick tiles */
.cp-hello { display: flex; align-items: center; gap: 12px; }
.cp-hello h2 { margin: 0; font-size: 1.15rem; }
.cp-hello p { margin: 2px 0 0; color: var(--muted); font-size: .86rem; }
.cp-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 560px) { .cp-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.cp-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 16px; background: var(--surface);
    border: 1px solid var(--border); text-decoration: none; color: var(--text) !important; font-size: .76rem; text-align: center; line-height: 1.2; min-height: 84px; box-sizing: border-box; }
.cp-tile span.ic { width: 42px; height: 42px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--cp-primary) 12%, transparent); color: var(--cp-primary); }
.cp-tile:nth-child(3n+2) span.ic { background: color-mix(in srgb, var(--cp-accent) 22%, transparent); color: color-mix(in srgb, var(--cp-accent) 45%, #3a2a00); }
.cp-tile:active { transform: scale(.97); }

/* horizontal strips */
.cp-hscroll { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 2px 14px 6px; margin-inline: -14px; }
.cp-hscroll::-webkit-scrollbar { display: none; }
.cp-hscroll > * { scroll-snap-align: start; flex: none; }
.cp-offer { width: 220px; border-radius: 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: var(--text) !important; display: flex; flex-direction: column; }
.cp-offer-img { height: 110px; background: color-mix(in srgb, var(--cp-accent) 20%, var(--surface)); display: flex; align-items: center; justify-content: center; color: var(--cp-primary); }
.cp-offer-img img { width: 100%; height: 100%; object-fit: contain; }
.cp-offer-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.cp-offer-body strong { font-size: .92rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cp-news { width: 260px; border-radius: 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: var(--text) !important; }
.cp-news img { width: 100%; height: 130px; object-fit: cover; display: block; background: var(--gray-bg); }
.cp-news div { padding: 10px 12px; }
.cp-news strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .92rem; line-height: 1.35; }
.cp-news span { display: block; font-size: .76rem; color: var(--muted); margin-top: 4px; }
.cp-article img { width: 100%; border-radius: var(--cp-radius); display: block; }
.cp-article h2 { font-size: 1.2rem; margin: 12px 0 4px; line-height: 1.35; }
.cp-article p { white-space: pre-wrap; line-height: 1.8; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- store */
.cp-search { display: flex; align-items: center; gap: 8px; height: 46px; padding-inline: 14px; border-radius: 23px; background: var(--surface); border: 1px solid var(--border); }
.cp-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 1rem; color: var(--text); outline: none; height: 100%; }
.cp-search .icon { color: var(--muted); }
.cp-cats { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 14px 8px; margin-inline: -14px; scroll-snap-type: x proximity; }
.cp-cats::-webkit-scrollbar { display: none; }
.cp-cat { flex: none; width: 76px; display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: none; cursor: pointer; font: inherit;
    font-size: .74rem; color: var(--text); text-align: center; line-height: 1.2; padding: 0; scroll-snap-align: start; }
.cp-cat-pic { width: 60px; height: 60px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
    background: var(--surface); border: 2px solid var(--border); color: var(--cp-primary); font-weight: 700; font-size: 1.15rem; transition: border-color .2s, transform .2s; }
.cp-cat-pic img { width: 100%; height: 100%; object-fit: cover; }
.cp-cat.on .cp-cat-pic { border-color: var(--cp-primary); transform: scale(1.05); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cp-primary) 20%, transparent); }
.cp-cat.on span:last-child { color: var(--cp-primary); font-weight: 700; }
.cp-cat span:last-child { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cp-subcats { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.cp-subcats::-webkit-scrollbar { display: none; }
.cp-subcats button { flex: none; min-height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
    font: inherit; font-size: .84rem; cursor: pointer; }
.cp-subcats button.on { background: var(--cp-primary); border-color: var(--cp-primary); color: var(--cp-on-primary); }
.cp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 560px) { .cp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 740px) { .cp-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cp-prod { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.cp-prod.strip { width: 156px; }
.cp-prod-img { position: relative; display: block; aspect-ratio: 1; background: #fff; text-decoration: none; }
.cp-prod-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cp-prod-img .ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: color-mix(in srgb, var(--cp-primary) 45%, transparent);
    background: color-mix(in srgb, var(--cp-primary) 6%, var(--surface)); font-size: 2rem; font-weight: 700; }
.cp-tag { position: absolute; top: 8px; inset-inline-start: 8px; padding: 2px 8px; border-radius: 10px; font-size: .7rem; font-weight: 700; background: var(--danger); color: #fff; }
.cp-tag.sh { background: var(--cp-accent); color: #1b1b1b; top: auto; bottom: 8px; }
.cp-prod-body { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.cp-prod-name { font-size: .86rem; line-height: 1.3; min-height: 2.6em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    color: var(--text) !important; text-decoration: none; }
.cp-price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.cp-price b { font-size: 1rem; color: var(--text); }
.cp-price b.offer { color: var(--danger); }
.cp-price s { font-size: .78rem; color: var(--muted); }
.cp-price small { font-size: .7rem; color: var(--muted); font-weight: 500; }
.cp-add { margin-top: auto; }
.cp-add .cp-btn { width: 100%; min-height: 38px; font-size: .86rem; }
.cp-qty { display: flex; align-items: center; justify-content: space-between; height: 38px; border-radius: 19px; background: color-mix(in srgb, var(--cp-primary) 10%, transparent); }
.cp-qty button { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--cp-primary); color: var(--cp-on-primary); cursor: pointer; display: inline-flex;
    align-items: center; justify-content: center; font: inherit; }
.cp-qty b { font-variant-numeric: tabular-nums; }
.cp-qty.lg { height: 48px; border-radius: 24px; max-width: 180px; }
.cp-qty.lg button { width: 48px; height: 48px; }
.cp-pdp-img { background: #fff; border-radius: var(--cp-radius); overflow: hidden; aspect-ratio: 1; max-height: 52vh; display: flex; align-items: center; justify-content: center; margin-inline: auto; }
.cp-pdp-img img { width: 100%; height: 100%; object-fit: contain; }
.cp-pdp h2 { font-size: 1.2rem; margin: 6px 0; line-height: 1.35; }
.cp-pdp .cp-price b { font-size: 1.4rem; }
.cp-more-btn { display: flex; justify-content: center; padding: 8px 0; }

/* cart & checkout */
.cp-line { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--row-line); align-items: center; }
.cp-line:last-child { border-bottom: 0; }
.cp-line-img { flex: none; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: #fff; border: 1px solid var(--row-line); display: flex; align-items: center; justify-content: center; }
.cp-line-img img { width: 100%; height: 100%; object-fit: contain; }
.cp-line-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cp-line-body strong { font-size: .9rem; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cp-line.gone { opacity: .6; }
.cp-sticky { position: sticky; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 14px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 8px 26px rgba(0,0,0,.14); }
.cp-sticky .cp-grow b { display: block; font-size: 1.1rem; }
.cp-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cp-choice label { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 14px; border: 1.5px solid var(--border);
    background: var(--surface); cursor: pointer; font-size: .9rem; }
.cp-choice label .icon { color: var(--cp-primary); }
.cp-choice label small { color: var(--muted); font-size: .76rem; }
.cp-choice input { position: absolute; opacity: 0; pointer-events: none; }
.cp-choice label:has(input:checked) { border-color: var(--cp-primary); background: color-mix(in srgb, var(--cp-primary) 7%, var(--surface)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--cp-primary) 25%, transparent); }
.cp-choice label:has(input:disabled) { opacity: .5; cursor: default; }
.cp-field { display: flex; flex-direction: column; gap: 6px; font-size: .86rem; }
.cp-field > span { color: var(--muted); font-weight: 500; }
.cp-field input, .cp-field select, .cp-field textarea { min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface);
    color: var(--text); font: inherit; font-size: 1rem; box-sizing: border-box; width: 100%; }
.cp-field textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
.cp-field input:focus, .cp-field select:focus, .cp-field textarea:focus { border-color: var(--cp-primary); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--cp-primary) 18%, transparent); }
.cp-form { display: flex; flex-direction: column; gap: 14px; }
.cp-check { display: flex; align-items: flex-start; gap: 10px; font-size: .88rem; line-height: 1.5; }
.cp-check input { width: 20px; height: 20px; accent-color: var(--cp-primary); flex: none; margin-top: 2px; }

/* order timeline */
.cp-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.cp-steps li { position: relative; display: flex; gap: 12px; padding-bottom: 16px; }
.cp-steps li::before { content: ""; position: absolute; top: 26px; bottom: 0; inset-inline-start: 12px; width: 2px; background: var(--row-line); }
.cp-steps li:last-child::before { display: none; }
.cp-steps li.done::before { background: var(--cp-primary); }
.cp-steps .dot { flex: none; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; z-index: 1;
    background: var(--gray-bg); color: var(--muted); border: 2px solid var(--surface); }
.cp-steps li.done .dot { background: var(--cp-primary); color: var(--cp-on-primary); }
.cp-steps li.now .dot { background: var(--cp-accent); color: #1b1b1b; box-shadow: 0 0 0 4px color-mix(in srgb, var(--cp-accent) 30%, transparent); }
.cp-steps li.cancel .dot { background: var(--danger); color: #fff; }
.cp-steps div { display: flex; flex-direction: column; gap: 2px; padding-top: 3px; }
.cp-steps div span { font-size: .8rem; color: var(--muted); }
.cp-steps li.todo div strong { color: var(--muted); font-weight: 500; }

/* ---------------------------------------------------------------- shareholder card */
.cp-member { position: relative; border-radius: 22px; padding: 20px; color: #fff; overflow: hidden; box-shadow: 0 14px 34px rgba(0,0,0,.22);
    background: radial-gradient(circle at 110% -10%, color-mix(in srgb, var(--cp-accent) 70%, transparent) 0 22%, transparent 23%),
                linear-gradient(135deg, var(--cp-primary), color-mix(in srgb, var(--cp-primary) 55%, #000)); }
.cp-member::after { content: ""; position: absolute; inset-inline-end: -40px; bottom: -60px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255,255,255,.06); }
.cp-member-head { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.cp-member-head img.logo { width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.15); object-fit: cover; }
.cp-member-head img.photo { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.7); margin-inline-start: auto; }
.cp-member small { display: block; opacity: .82; font-size: .74rem; letter-spacing: .02em; }
.cp-member strong.name { display: block; font-size: 1.3rem; margin: 14px 0 12px; position: relative; z-index: 1; line-height: 1.3; }
.cp-member-ids { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: relative; z-index: 1; }
.cp-member-ids b { font-size: 1.25rem; letter-spacing: .04em; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.cp-member-code { margin-top: 16px; background: #fff; border-radius: 16px; padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 10px; position: relative; z-index: 1; color: #111; }
.cp-member-code .qr svg { width: min(220px, 60vw); height: auto; display: block; }
.cp-member-code .bar svg { width: min(320px, 78vw); height: 70px; display: block; }
.cp-member-code .val { font-family: var(--mono, monospace); font-size: 1rem; letter-spacing: .12em; direction: ltr; }
.cp-switch { display: inline-flex; padding: 3px; border-radius: 20px; background: var(--gray-bg); }
.cp-switch button { min-height: 34px; padding: 0 14px; border: 0; border-radius: 17px; background: transparent; font: inherit; font-size: .84rem; color: var(--text); cursor: pointer; }
.cp-switch button.on { background: var(--surface); box-shadow: 0 1px 4px rgba(0,0,0,.12); font-weight: 600; }

/* balance */
.cp-stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cp-stat { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.cp-stat span { font-size: .8rem; color: var(--muted); }
.cp-stat b { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.cp-stat.hero { grid-column: 1 / -1; background: linear-gradient(135deg, var(--cp-primary), color-mix(in srgb, var(--cp-primary) 65%, #000)); color: #fff; border: 0; }
.cp-stat.hero span { color: rgba(255,255,255,.85); }
.cp-stat.hero b { font-size: 1.9rem; }
.cp-bars { display: flex; align-items: flex-end; gap: 8px; height: 120px; padding-top: 8px; }
.cp-bars div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; font-size: .7rem; color: var(--muted); }
.cp-bars i { display: block; width: 100%; max-width: 38px; border-radius: 8px 8px 3px 3px; background: var(--cp-primary); min-height: 3px; }

/* receipt (e-invoice) */
.cp-receipt { background: #fff; color: #111; border-radius: 14px; padding: 18px 16px; font-size: .9rem; border: 1px dashed var(--border); }
.cp-receipt h2 { text-align: center; margin: 0; font-size: 1.05rem; }
.cp-receipt .c { text-align: center; color: #555; font-size: .8rem; }
.cp-receipt table { width: 100%; border-collapse: collapse; margin: 10px 0; }
.cp-receipt td, .cp-receipt th { padding: 5px 2px; text-align: start; border-bottom: 1px dotted #ccc; font-weight: 400; vertical-align: top; }
.cp-receipt td.n, .cp-receipt th.n { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cp-receipt .sum td { border: 0; font-weight: 700; }
.cp-receipt .qr { display: flex; justify-content: center; margin-top: 8px; }
.cp-receipt .qr svg { width: 110px; height: 110px; }

/* feedback conversation */
.cp-bubbles { display: flex; flex-direction: column; gap: 10px; }
.cp-bubble { max-width: 86%; padding: 10px 12px; border-radius: 16px; white-space: pre-wrap; line-height: 1.6; overflow-wrap: anywhere; font-size: .92rem; }
.cp-bubble.me { align-self: flex-end; background: color-mix(in srgb, var(--cp-primary) 12%, var(--surface)); border-end-end-radius: 4px; }
.cp-bubble.them { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-end-start-radius: 4px; }
.cp-bubble small { display: block; color: var(--muted); font-size: .72rem; margin-top: 4px; }
.cp-photo-pick { display: flex; align-items: center; gap: 10px; }
.cp-photo-pick img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; }

/* branches */
.cp-branch { display: flex; flex-direction: column; gap: 10px; }
.cp-branch-head { display: flex; gap: 12px; align-items: flex-start; }
.cp-branch-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- sign-in (static page) */
.cp-auth { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--ground); }
.cp-auth-hero { position: relative; padding: calc(28px + env(safe-area-inset-top)) 20px 64px; color: #fff; text-align: center;
    background: radial-gradient(circle at 85% 0%, color-mix(in srgb, var(--cp-accent) 55%, transparent) 0 18%, transparent 19%),
                linear-gradient(160deg, var(--cp-primary), color-mix(in srgb, var(--cp-primary) 55%, #000)); }
.cp-auth-hero img { width: 76px; height: 76px; border-radius: 22px; background: rgba(255,255,255,.15); object-fit: cover; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.cp-auth-hero h1 { margin: 12px 0 4px; font-size: 1.35rem; }
.cp-auth-hero p { margin: 0; opacity: .88; font-size: .9rem; }
.cp-auth-lang { position: absolute; top: calc(10px + env(safe-area-inset-top)); inset-inline-end: 10px; color: #fff !important; font-weight: 700; text-decoration: none;
    width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,.12); }
.cp-auth-card { position: relative; z-index: 1; width: min(460px, calc(100% - 28px)); margin: -40px auto 24px; background: var(--surface); border-radius: 22px; padding: 18px; box-sizing: border-box;
    box-shadow: 0 12px 34px rgba(0,0,0,.1); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 14px; }
.cp-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 16px; background: var(--gray-bg); gap: 4px; }
.cp-seg a { min-height: 42px; display: flex; align-items: center; justify-content: center; text-align: center; border-radius: 12px; text-decoration: none;
    color: var(--text) !important; font-size: .84rem; line-height: 1.15; padding: 4px; }
.cp-seg a.on { background: var(--surface); box-shadow: 0 1px 4px rgba(0,0,0,.12); font-weight: 700; color: var(--cp-primary) !important; }
.cp-otp { font-size: 1.8rem !important; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; direction: ltr; padding-inline-start: .5em !important; }
.cp-auth-foot { text-align: center; color: var(--muted); font-size: .8rem; padding: 0 20px 24px; }
.cp-demo { border: 1px dashed var(--amber-fg); background: var(--amber-bg); color: var(--amber-fg); border-radius: 12px; padding: 8px 12px; font-size: .85rem; text-align: center; }

/* pay pages */
.cp-pay { max-width: 460px; margin: 0 auto; padding: 32px 16px; display: flex; flex-direction: column; gap: 16px; text-align: center; }
.cp-pay .big { width: 84px; height: 84px; margin: 0 auto; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.cp-pay .big.ok { background: var(--green-bg); color: var(--green-fg); }
.cp-pay .big.wait { background: var(--amber-bg); color: var(--amber-fg); }
.cp-pay .big.no { background: var(--red-bg); color: var(--red-fg); }

/* ---------------------------------------------------------------- staff screens (Shareholders › Mobile app …) */
.cpa-banner-thumb { width: 120px; height: 52px; border-radius: 8px; object-fit: cover; display: block; background: var(--gray-bg); }
.cpa-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; display: block; background: var(--gray-bg); }
.cpa-preview { width: 320px; max-width: 100%; border: 8px solid #1d1d1f; border-radius: 34px; overflow: hidden; background: var(--ground); box-shadow: 0 16px 40px rgba(0,0,0,.18); }
.cpa-preview-bar { height: 46px; display: flex; align-items: center; gap: 8px; padding-inline: 10px; color: #fff; font-weight: 600; font-size: .9rem; }
.cpa-preview-bar img { width: 26px; height: 26px; border-radius: 8px; }
.cpa-preview-body { padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.cpa-preview-slide { border-radius: 12px; aspect-ratio: 12 / 5.2; overflow: hidden; background: var(--gray-bg); }
.cpa-preview-slide img { width: 100%; height: 100%; object-fit: cover; }
.cpa-swatch { display: inline-flex; align-items: center; gap: 8px; }
.cpa-swatch input[type=color] { width: 44px; height: 36px; padding: 0; border: 1px solid var(--border); border-radius: 8px; background: none; }
.cpa-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.cpa-stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--text); }
.cpa-stat b { font-size: 1.35rem; }
.cpa-stat span { font-size: .8rem; color: var(--muted); }
.cpa-stat.on { border-color: var(--primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 20%, transparent); }
.cpa-steps { display: flex; flex-wrap: wrap; gap: 8px; }
.cpa-conv { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; }
.cpa-conv .msg { padding: 8px 12px; border-radius: 10px; background: var(--ground); white-space: pre-wrap; overflow-wrap: anywhere; }
.cpa-conv .msg.staff { background: color-mix(in srgb, var(--primary) 10%, var(--surface)); }
.cpa-conv .msg small { display: block; color: var(--muted); font-size: .75rem; }
.cpa-qr svg { width: 150px; height: 150px; }

/* ---------------------------------------------------------------- print (e-invoice) */
@media print {
    .cp-top, .cp-tabs, .cp-install, .cp-noprint, .cp-sheet, .cp-sheet-backdrop { display: none !important; }
    .cp-app { padding: 0; background: #fff; }
    .cp-main { max-width: none; padding: 0; }
    .cp-receipt { border: 0; }
}
