/* CALÁ Flowers — components. Values come from tokens.css (var(--…)); this file holds only structure. */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--font-text); font-size: 15px; line-height: 22px; background: var(--paper); color: var(--ink); -webkit-font-smoothing: antialiased; }
.cl-row { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; padding: var(--space-4); }
.cl-col { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4); }
.cl-num { font-variant-numeric: tabular-nums; }
.eyebrow, .table-head { text-transform: uppercase; }
.cl-brand-dark { background: var(--brand-dark); color: var(--on-brand-dark); }
.cl-brand-dark .cl-muted { color: var(--on-brand-dark-muted); }
.cl-muted { color: var(--ink-muted); }
.cl-link { color: var(--primary-ink); text-decoration: underline; text-underline-offset: 2px; }

/* Icons */
.cl-icon { width: var(--icon-md); height: var(--icon-md); flex: none; }
.cl-icon-sm { width: var(--icon-sm); height: var(--icon-sm); }
.cl-icon-lg { width: var(--icon-lg); height: var(--icon-lg); }

/* Wordmark — text version until the SVG arrives */
.cl-wordmark { display: inline-flex; flex-direction: column; align-items: center; font-family: var(--font-display); font-weight: 300; text-transform: uppercase; color: var(--ink); line-height: 1; }
.cl-wordmark-main { font-size: 40px; letter-spacing: 0.18em; padding-left: 0.18em; }
.cl-wordmark-sub { font-size: 14px; letter-spacing: 0.42em; padding-left: 0.42em; margin-top: var(--space-2); font-weight: 400; }
.cl-wordmark-sm .cl-wordmark-main { font-size: 22px; } .cl-wordmark-sm .cl-wordmark-sub { font-size: 8px; margin-top: var(--space-1); }
.cl-wordmark-lg .cl-wordmark-main { font-size: 64px; } .cl-wordmark-lg .cl-wordmark-sub { font-size: 22px; margin-top: var(--space-3); }
.cl-wordmark-light { color: var(--on-brand-dark); }

/* Button */
.cl-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); height: var(--control-md); padding: 0 var(--space-4); border-radius: var(--radius-md); border: 1px solid transparent; background: transparent; font-family: var(--font-text); font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); cursor: pointer; white-space: nowrap; text-decoration: none; transition: background-color .15s ease-out, border-color .15s ease-out, color .15s ease-out; }
.cl-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.cl-btn:disabled, .cl-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.cl-btn-primary { background: var(--primary); color: var(--on-primary); }
.cl-btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.cl-btn-primary:active:not(:disabled) { background: var(--primary-active); }
.cl-btn-secondary { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.cl-btn-secondary:hover:not(:disabled) { background: var(--surface-sunken); }
.cl-btn-soft { background: var(--primary-soft); color: var(--primary-ink); }
.cl-btn-soft:hover:not(:disabled) { background: var(--olive-200); color: var(--olive-900); }
.cl-btn-ghost { color: var(--primary-ink); }
.cl-btn-ghost:hover:not(:disabled) { background: var(--primary-soft); }
.cl-btn-danger { background: var(--danger); color: var(--on-danger); }
.cl-btn-danger:hover:not(:disabled) { filter: brightness(.92); }
.cl-btn-dark { border-color: var(--on-brand-dark); color: var(--on-brand-dark); }
.cl-btn-dark:hover:not(:disabled) { background: var(--brand-dark-raised); }
.cl-btn-sm { height: var(--control-sm); padding: 0 var(--space-3); font-size: 13px; }
.cl-btn-lg { height: var(--control-lg); padding: 0 var(--space-5); font-size: 15px; }
.cl-btn-block { width: 100%; }
.cl-btn-icon { width: var(--control-md); padding: 0; }
.cl-btn-sm.cl-btn-icon { width: var(--control-sm); }
.cl-btn-lg.cl-btn-icon { width: var(--control-lg); }
.cl-btn-loading { color: transparent !important; }
.cl-btn-loading .cl-icon { visibility: hidden; }
.cl-spinner { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: cl-spin .8s linear infinite; }
.cl-btn-primary .cl-spinner { border-color: var(--on-primary); border-right-color: transparent; }
.cl-btn-secondary .cl-spinner, .cl-btn-ghost .cl-spinner, .cl-btn-soft .cl-spinner { border-color: var(--primary-ink); border-right-color: transparent; }
.cl-btn-danger .cl-spinner { border-color: var(--on-danger); border-right-color: transparent; }
@keyframes cl-spin { to { transform: rotate(360deg); } }

/* Chip */
.cl-chip { display: inline-flex; align-items: center; gap: var(--space-1); height: var(--control-sm); padding: 0 var(--space-3); border-radius: var(--radius-full); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-family: var(--font-text); font-size: 13px; line-height: 18px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.cl-chip:hover { background: var(--surface-sunken); }
.cl-chip:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.cl-chip[aria-pressed="true"] { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-ink); }
.cl-chip:disabled { opacity: .5; cursor: not-allowed; }
.cl-chip .cl-icon { width: var(--icon-sm); height: var(--icon-sm); }
.cl-chip-count { color: var(--ink-muted); font-weight: 400; }

/* Badge */
.cl-badge { display: inline-flex; align-items: center; gap: var(--space-1); height: 20px; padding: 0 var(--space-2); border-radius: var(--radius-sm); font-family: var(--font-text); font-size: 11px; line-height: 16px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.cl-badge-new { background: var(--primary-soft); color: var(--primary-ink); }
.cl-badge-hit { background: var(--blush-soft); color: var(--blush-ink); }
.cl-badge-sale { background: var(--blush); color: var(--on-blush); }
.cl-badge-neutral { background: var(--surface-sunken); color: var(--ink-muted); }
.cl-badge-dark { background: var(--brand-dark-raised); color: var(--on-brand-dark); }

/* StatusTag */
.cl-status { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 var(--space-2); border-radius: var(--radius-sm); font-family: var(--font-text); font-size: 12px; line-height: 16px; font-weight: 600; white-space: nowrap; }
.cl-status .cl-icon { width: 14px; height: 14px; }
.cl-status-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.cl-status-info { background: var(--info-soft); color: var(--info-ink); }
.cl-status-warning { background: var(--warning-soft); color: var(--warning-ink); }
.cl-status-brand { background: var(--primary-soft); color: var(--primary-ink); }
.cl-status-success { background: var(--success-soft); color: var(--success-ink); }
.cl-status-danger { background: var(--danger-soft); color: var(--danger-ink); }
.cl-status-neutral { background: var(--surface-sunken); color: var(--ink-muted); }

/* OrderStatus timeline */
.cl-timeline { display: flex; padding: var(--space-2) 0; }
.cl-step { flex: 1; position: relative; display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.cl-step::before { content: ""; position: absolute; top: 11px; left: 24px; right: 0; height: 2px; background: var(--line); }
.cl-step:last-child::before { display: none; }
.cl-step-done::before { background: var(--primary); }
.cl-step-dot { position: relative; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; color: var(--on-primary); }
.cl-step-dot .cl-icon { width: 14px; height: 14px; stroke-width: 2; }
.cl-step-done .cl-step-dot { background: var(--primary); border-color: var(--primary); }
.cl-step-current .cl-step-dot { border-color: var(--primary); color: var(--primary-ink); box-shadow: 0 0 0 4px var(--primary-soft); }
.cl-step-final.cl-step-done .cl-step-dot { background: var(--success); border-color: var(--success); }
.cl-step-title { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ink-muted); padding-right: var(--space-2); }
.cl-step-done .cl-step-title, .cl-step-current .cl-step-title { color: var(--ink); }
.cl-step-time { font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.cl-timeline-cancelled { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--danger-soft); color: var(--danger-ink); font-size: 14px; font-weight: 600; }
.cl-timeline-vertical { flex-direction: column; gap: 0; }
.cl-timeline-vertical .cl-step { flex-direction: row; gap: var(--space-3); padding-bottom: var(--space-5); }
.cl-timeline-vertical .cl-step::before { top: 24px; left: 11px; right: auto; bottom: 0; width: 2px; height: auto; }
.cl-timeline-vertical .cl-step-body { display: flex; flex-direction: column; gap: 2px; }

/* Fields */
.cl-field { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.cl-field-label { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); }
.cl-field-label .cl-req { color: var(--danger-ink); margin-left: 2px; }
.cl-input { display: block; width: 100%; height: var(--control-md); padding: 0 var(--space-3); border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); font-family: var(--font-text); font-size: 15px; line-height: 22px; transition: border-color .15s ease-out, box-shadow .15s ease-out; }
.cl-input::placeholder { color: var(--ink-faint); }
.cl-input:hover:not(:disabled) { border-color: var(--ink-muted); }
.cl-input:focus { outline: none; border-color: var(--focus); box-shadow: var(--focus-ring); }
.cl-input:disabled { background: var(--surface-sunken); color: var(--ink-faint); cursor: not-allowed; }
.cl-input[aria-invalid="true"] { border-color: var(--danger); }
.cl-input-lg { height: var(--control-lg); }
.cl-input-sm { height: var(--control-sm); font-size: 13px; }
.cl-input-wrap { position: relative; display: flex; align-items: center; }
.cl-input-wrap > .cl-icon { position: absolute; left: var(--space-3); color: var(--ink-muted); pointer-events: none; }
.cl-input-wrap > .cl-icon + .cl-input { padding-left: calc(var(--space-3) * 2 + var(--icon-md)); }
.cl-input-prefix { position: absolute; left: var(--space-3); color: var(--ink-muted); font-size: 15px; pointer-events: none; font-variant-numeric: tabular-nums; }
.cl-input-prefix + .cl-input { padding-left: calc(var(--space-3) + 4.2em); }
.cl-select { position: relative; }
.cl-select .cl-input { appearance: none; padding-right: calc(var(--space-3) * 2 + var(--icon-md)); cursor: pointer; }
.cl-select > .cl-icon { position: absolute; right: var(--space-3); top: 50%; transform: translateY(-50%); color: var(--ink-muted); pointer-events: none; }
textarea.cl-input { height: auto; min-height: 96px; padding: var(--space-2) var(--space-3); resize: vertical; }
.cl-field-hint { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.cl-field-error { font-size: 13px; line-height: 18px; color: var(--danger-ink); display: flex; align-items: center; gap: var(--space-1); }
.cl-field-error .cl-icon { width: var(--icon-sm); height: var(--icon-sm); }
.cl-field-counter { font-size: 12px; color: var(--ink-muted); text-align: right; font-variant-numeric: tabular-nums; }

/* Choice controls */
.cl-choice { display: inline-flex; align-items: center; gap: var(--space-2); font-size: 15px; line-height: 22px; color: var(--ink); cursor: pointer; min-height: var(--touch-min); }
.cl-choice-desc { display: block; font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.cl-choice input:disabled + * { color: var(--ink-faint); }
.cl-check, .cl-radio { appearance: none; margin: 0; width: 20px; height: 20px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); display: inline-grid; place-content: center; cursor: pointer; flex: none; transition: background-color .15s ease-out, border-color .15s ease-out; }
.cl-check::before { content: ""; width: 12px; height: 12px; transform: scale(0); background: var(--on-primary); clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); transition: transform .12s ease-out; }
.cl-check:checked, .cl-radio:checked { background: var(--primary); border-color: var(--primary); }
.cl-check:checked::before { transform: scale(1); }
.cl-check:indeterminate { background: var(--primary); border-color: var(--primary); }
.cl-check:indeterminate::before { transform: scale(1); clip-path: none; height: 2px; border-radius: 1px; }
.cl-radio { border-radius: var(--radius-full); }
.cl-radio::before { content: ""; width: 8px; height: 8px; border-radius: 50%; transform: scale(0); background: var(--on-primary); transition: transform .12s ease-out; }
.cl-radio:checked::before { transform: scale(1); }
.cl-check:focus-visible, .cl-radio:focus-visible, .cl-switch:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.cl-check:disabled, .cl-radio:disabled, .cl-switch:disabled { opacity: .5; cursor: not-allowed; }
.cl-switch { appearance: none; margin: 0; position: relative; width: 44px; height: 24px; border-radius: var(--radius-full); background: var(--line-strong); border: 0; cursor: pointer; flex: none; transition: background-color .15s ease-out; }
.cl-switch::before { content: ""; position: absolute; left: 2px; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .15s ease-out; }
.cl-switch:checked { background: var(--primary); }
.cl-switch:checked::before { transform: translateX(20px); }

/* Price */
.cl-price { display: inline-flex; align-items: baseline; gap: var(--space-2); font-family: var(--font-text); font-variant-numeric: tabular-nums; }
.cl-price-value { font-size: 17px; line-height: 24px; font-weight: 700; color: var(--ink); }
.cl-price-lg .cl-price-value { font-size: 24px; line-height: 28px; }
.cl-price-old { font-size: 13px; line-height: 18px; color: var(--blush-ink); text-decoration: line-through; }
.cl-price-free .cl-price-value { color: var(--primary-ink); }

/* ProductCard */
.cl-product { display: flex; flex-direction: column; width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; transition: box-shadow .15s ease-out; }
.cl-product:hover { box-shadow: var(--shadow-sm); }
.cl-product-media { position: relative; aspect-ratio: 4 / 5; background: var(--olive-50); color: var(--olive-300); display: grid; place-items: center; }
.cl-product-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cl-product-media .cl-placeholder { width: 48px; height: 48px; }
.cl-product-badges { position: absolute; top: var(--space-2); left: var(--space-2); display: flex; gap: var(--space-1); }
.cl-product-fav { position: absolute; top: var(--space-2); right: var(--space-2); width: 32px; height: 32px; border-radius: var(--radius-full); border: 0; background: var(--surface); color: var(--ink-muted); display: grid; place-items: center; cursor: pointer; }
.cl-product-fav[aria-pressed="true"] { color: var(--blush); }
.cl-product-fav[aria-pressed="true"] .cl-icon { fill: currentColor; }
.cl-product-fav:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.cl-product-body { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-3); }
.cl-product-name { margin: 0; font-size: 15px; line-height: 22px; font-weight: 500; color: var(--ink); }
.cl-product-meta { font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.cl-product-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-2); margin-top: var(--space-1); }
.cl-product-foot .cl-price { flex-wrap: wrap; gap: 0 var(--space-2); min-width: 0; }
.cl-product-foot .cl-btn { flex: none; }
.cl-product-wide { flex-direction: row; width: 360px; }
.cl-product-wide .cl-product-media { width: 120px; aspect-ratio: auto; }
.cl-product-wide .cl-product-body { flex: 1; justify-content: center; }

/* Stepper */
.cl-stepper { display: inline-flex; align-items: center; height: var(--control-md); border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface); overflow: hidden; }
.cl-stepper button { width: 40px; height: 100%; border: 0; background: transparent; color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.cl-stepper button:hover:not(:disabled) { background: var(--surface-sunken); }
.cl-stepper button:disabled { color: var(--ink-faint); cursor: not-allowed; }
.cl-stepper button:focus-visible { outline: none; box-shadow: inset var(--focus-ring); }
.cl-stepper output { min-width: 36px; text-align: center; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cl-stepper-sm { height: var(--control-sm); } .cl-stepper-sm button { width: 32px; } .cl-stepper-sm output { min-width: 28px; font-size: 13px; }

/* CartLine */
.cl-cart-line { display: grid; grid-template-columns: 64px 1fr auto; gap: var(--space-3); align-items: center; padding: var(--space-3) 0; border-bottom: 1px solid var(--line); width: 100%; max-width: 560px; }
.cl-cart-thumb { width: 64px; height: 80px; border-radius: var(--radius-md); background: var(--olive-50); color: var(--olive-300); display: grid; place-items: center; overflow: hidden; }
.cl-cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cl-cart-info { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.cl-cart-name { font-size: 15px; line-height: 22px; font-weight: 500; color: var(--ink); }
.cl-cart-meta { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.cl-cart-actions { display: flex; align-items: center; gap: var(--space-3); margin-top: var(--space-1); }
.cl-cart-remove { font-size: 13px; color: var(--ink-muted); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; font-family: inherit; }
.cl-cart-remove:hover { color: var(--danger-ink); }
.cl-cart-right { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-1); }
.cl-cart-total { display: flex; justify-content: space-between; align-items: baseline; padding: var(--space-4) 0; max-width: 560px; font-size: 15px; }

/* DeliverySlotPicker */
.cl-slots { display: flex; flex-direction: column; gap: var(--space-3); max-width: 420px; }
.cl-slot-days { display: flex; gap: var(--space-2); overflow-x: auto; padding-bottom: 2px; }
.cl-slot-day { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 64px; height: 56px; justify-content: center; border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); font-family: var(--font-text); cursor: pointer; }
.cl-slot-day b { font-size: 15px; line-height: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cl-slot-day span { font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.cl-slot-day[aria-pressed="true"] { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-ink); }
.cl-slot-day[aria-pressed="true"] span { color: var(--primary-ink); }
.cl-slot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); }
.cl-slot { height: var(--control-md); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font-family: var(--font-text); font-size: 14px; font-variant-numeric: tabular-nums; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-1); }
.cl-slot:hover:not(:disabled) { background: var(--surface-sunken); }
.cl-slot[aria-pressed="true"] { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-ink); font-weight: 600; }
.cl-slot:disabled { color: var(--ink-faint); background: var(--surface-sunken); border-color: var(--line); text-decoration: line-through; cursor: not-allowed; }
.cl-slot:focus-visible, .cl-slot-day:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.cl-slot-note { display: flex; align-items: center; gap: var(--space-1); font-size: 13px; line-height: 18px; color: var(--primary-ink); font-weight: 500; }

/* PaymentMethod */
.cl-pay-list { display: flex; flex-direction: column; gap: var(--space-2); max-width: 420px; }
.cl-pay { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--surface); cursor: pointer; text-align: left; font-family: var(--font-text); color: var(--ink); width: 100%; }
.cl-pay:hover { background: var(--surface-sunken); }
.cl-pay[aria-checked="true"] { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); background: var(--surface); }
.cl-pay:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.cl-pay-logo { width: 44px; height: 28px; border-radius: var(--radius-sm); background: var(--surface-sunken); color: var(--ink-muted); display: grid; place-items: center; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; flex: none; }
.cl-pay-logo .cl-icon { width: 18px; height: 18px; }
.cl-pay-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.cl-pay-title { font-size: 15px; line-height: 20px; font-weight: 600; }
.cl-pay-desc { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.cl-pay .cl-radio { pointer-events: none; }

/* Header (web) */
.cl-header { display: flex; align-items: center; gap: var(--space-6); height: 64px; padding: 0 var(--space-6); background: var(--paper); border-bottom: 1px solid var(--line); width: 100%; }
.cl-header-scrolled { box-shadow: var(--shadow-sm); }
.cl-header-nav { display: flex; gap: var(--space-5); }
.cl-header-nav a { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink); text-decoration: none; padding: var(--space-2) 0; border-bottom: 2px solid transparent; }
.cl-header-nav a:hover { color: var(--primary-ink); }
.cl-header-nav a[aria-current="page"] { color: var(--primary-ink); border-bottom-color: var(--primary); }
.cl-header-search { flex: 1; max-width: 320px; }
.cl-header-search .cl-input { height: var(--control-sm); font-size: 14px; background: var(--surface-sunken); border-color: transparent; }
.cl-header-search .cl-input:focus { border-color: var(--focus); background: var(--surface); }
.cl-header-actions { margin-left: auto; display: flex; gap: var(--space-1); align-items: center; }
.cl-count { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--radius-full); background: var(--blush); color: var(--on-blush); font-size: 11px; line-height: 18px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }

/* BottomTabBar (app) */
.cl-tabbar { display: flex; width: 390px; height: 64px; background: var(--surface); border-top: 1px solid var(--line); }
.cl-tabbar a { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; line-height: 14px; font-weight: 500; color: var(--ink-muted); text-decoration: none; }
.cl-tabbar a .cl-icon { width: var(--icon-lg); height: var(--icon-lg); }
.cl-tabbar a[aria-current="page"] { color: var(--primary-ink); }
.cl-tabbar a[aria-current="page"] .cl-icon { stroke-width: 2; }
.cl-tabbar .cl-count { top: 6px; right: calc(50% - 22px); }

/* Sidebar (CRM) */
.cl-sidebar { width: var(--sidebar); min-height: 420px; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: var(--space-4) var(--space-3); gap: 2px; }
.cl-sidebar-brand { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3) var(--space-5); }
.cl-sidebar-brand small { font-size: 12px; color: var(--ink-muted); display: block; }
.cl-nav-section { font-family: var(--font-display); font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); padding: var(--space-4) var(--space-3) var(--space-1); }
.cl-nav-item { display: flex; align-items: center; gap: var(--space-3); height: 40px; padding: 0 var(--space-3); border-radius: var(--radius-md); color: var(--ink); text-decoration: none; font-size: 14px; line-height: 20px; font-weight: 500; }
.cl-nav-item:hover { background: var(--surface-sunken); }
.cl-nav-item[aria-current="page"] { background: var(--primary-soft); color: var(--primary-ink); }
.cl-nav-item .cl-icon { color: var(--ink-muted); }
.cl-nav-item[aria-current="page"] .cl-icon { color: var(--primary-ink); }
.cl-nav-item .cl-nav-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--radius-full); background: var(--info-soft); color: var(--info-ink); font-size: 12px; line-height: 20px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.cl-sidebar-foot { margin-top: auto; padding-top: var(--space-4); border-top: 1px solid var(--line); }

/* Tabs */
.cl-tabs { display: flex; gap: var(--space-6); border-bottom: 1px solid var(--line); }
.cl-tab { display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-3) 0; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: none; font-family: var(--font-text); font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink-muted); cursor: pointer; }
.cl-tab:hover { color: var(--ink); }
.cl-tab[aria-selected="true"] { color: var(--primary-ink); border-bottom-color: var(--primary); }
.cl-tab:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }
.cl-tab-count { font-size: 12px; font-weight: 600; color: var(--ink-muted); background: var(--surface-sunken); border-radius: var(--radius-full); padding: 0 6px; line-height: 18px; font-variant-numeric: tabular-nums; }
.cl-tab[aria-selected="true"] .cl-tab-count { background: var(--primary-soft); color: var(--primary-ink); }
.cl-segment { display: inline-flex; padding: 2px; gap: 2px; background: var(--surface-sunken); border-radius: var(--radius-md); }
.cl-segment .cl-tab { height: 32px; padding: 0 var(--space-3); margin: 0; border: 0; border-radius: 6px; font-size: 13px; }
.cl-segment .cl-tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

/* Table (CRM) */
.cl-table-wrap { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.cl-table-bar { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cl-table-bar .cl-input-wrap { width: 240px; }
.cl-table { width: 100%; border-collapse: collapse; font-family: var(--font-text); font-size: 13px; line-height: 20px; color: var(--ink); }
.cl-table th { height: var(--row-dense); padding: 0 var(--space-3); text-align: left; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-muted); background: var(--surface-sunken); border-bottom: 1px solid var(--line); white-space: nowrap; }
.cl-table th button { all: unset; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.cl-table th button .cl-icon { width: 14px; height: 14px; }
.cl-table th[aria-sort] button { color: var(--ink); }
.cl-table td { height: var(--row-default); padding: 0 var(--space-3); border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.cl-table tbody tr:last-child td { border-bottom: 0; }
.cl-table tbody tr:hover td { background: var(--surface-sunken); }
.cl-table tbody tr[aria-selected="true"] td { background: var(--primary-soft); }
.cl-table-dense td { height: var(--row-dense); }
.cl-td-num { text-align: right; font-variant-numeric: tabular-nums; }
.cl-td-muted { color: var(--ink-muted); }
.cl-table td:first-child, .cl-table th:first-child { padding-left: var(--space-4); }
.cl-table td:last-child, .cl-table th:last-child { padding-right: var(--space-4); }
.cl-table-foot { display: flex; align-items: center; justify-content: space-between; padding: var(--space-2) var(--space-4); font-size: 13px; color: var(--ink-muted); border-top: 1px solid var(--line); }

/* KpiCard */
.cl-kpi { display: flex; flex-direction: column; gap: var(--space-2); min-width: 200px; padding: var(--space-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.cl-kpi-label { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ink-muted); display: flex; align-items: center; gap: var(--space-1); }
.cl-kpi-value { font-size: 28px; line-height: 32px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.cl-kpi-value small { font-size: 15px; font-weight: 500; color: var(--ink-muted); margin-left: var(--space-1); }
.cl-kpi-delta { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; line-height: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cl-kpi-delta .cl-icon { width: 14px; height: 14px; stroke-width: 2; }
.cl-kpi-delta-up { color: var(--success-ink); }
.cl-kpi-delta-down { color: var(--danger-ink); }
.cl-kpi-delta-flat { color: var(--ink-muted); }
.cl-kpi-period { font-size: 12px; color: var(--ink-muted); font-weight: 400; }

/* Avatar */
.cl-avatar { width: 40px; height: 40px; border-radius: var(--radius-full); background: var(--primary-soft); color: var(--primary-ink); display: inline-grid; place-items: center; font-family: var(--font-text); font-size: 14px; font-weight: 600; overflow: hidden; flex: none; letter-spacing: .02em; }
.cl-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cl-avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.cl-avatar-lg { width: 56px; height: 56px; font-size: 18px; }
.cl-avatar-courier { background: var(--info-soft); color: var(--info-ink); }
.cl-avatar-group { display: inline-flex; } .cl-avatar-group .cl-avatar { box-shadow: 0 0 0 2px var(--surface); margin-left: -4px; } .cl-avatar-group .cl-avatar:first-child { margin-left: 0; }

/* Toast */
.cl-toast-host { position: fixed; left: 50%; bottom: var(--space-6); transform: translateX(-50%); display: flex; flex-direction: column; gap: var(--space-2); z-index: 50; }
.cl-toast { display: flex; align-items: flex-start; gap: var(--space-3); min-width: 280px; max-width: 420px; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-md); font-size: 14px; line-height: 20px; }
.cl-toast .cl-icon { margin-top: 1px; color: var(--primary-ink); }
.cl-toast-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.cl-toast-title { font-weight: 600; }
.cl-toast-desc { color: var(--ink-muted); font-size: 13px; line-height: 18px; }
.cl-toast-action { all: unset; cursor: pointer; font-weight: 600; color: var(--primary-ink); white-space: nowrap; }
.cl-toast-close { all: unset; cursor: pointer; color: var(--ink-muted); display: grid; place-items: center; width: 24px; height: 24px; border-radius: var(--radius-sm); }
.cl-toast-close:hover { background: var(--surface-sunken); }
.cl-toast-success { background: var(--success-soft); border-color: transparent; color: var(--success-ink); } .cl-toast-success .cl-icon, .cl-toast-success .cl-toast-desc, .cl-toast-success .cl-toast-action, .cl-toast-success .cl-toast-close { color: var(--success-ink); }
.cl-toast-danger { background: var(--danger-soft); border-color: transparent; color: var(--danger-ink); } .cl-toast-danger .cl-icon, .cl-toast-danger .cl-toast-desc, .cl-toast-danger .cl-toast-action, .cl-toast-danger .cl-toast-close { color: var(--danger-ink); }
.cl-toast-warning { background: var(--warning-soft); border-color: transparent; color: var(--warning-ink); } .cl-toast-warning .cl-icon, .cl-toast-warning .cl-toast-desc, .cl-toast-warning .cl-toast-action, .cl-toast-warning .cl-toast-close { color: var(--warning-ink); }

/* Dialog: modal + bottom sheet */
.cl-scrim { background: var(--overlay); display: grid; place-items: center; padding: var(--space-6); }
.cl-scrim-sheet { align-items: end; padding: 0; }
.cl-modal { width: 100%; max-width: 440px; background: var(--surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-md); padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-4); }
.cl-modal-wide { max-width: 560px; }
.cl-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.cl-modal-title { margin: 0; font-family: var(--font-display); font-size: 22px; line-height: 28px; font-weight: 500; color: var(--ink); }
.cl-modal-body { font-size: 15px; line-height: 22px; color: var(--ink-muted); }
.cl-modal-actions { display: flex; justify-content: flex-end; gap: var(--space-2); }
.cl-sheet { width: 390px; background: var(--surface); border-radius: var(--radius-xl) var(--radius-xl) 0 0; box-shadow: var(--shadow-md); padding: var(--space-3) var(--space-5) var(--space-5); display: flex; flex-direction: column; gap: var(--space-4); }
.cl-sheet-handle { width: 36px; height: 4px; border-radius: 2px; background: var(--line-strong); margin: 0 auto; }
.cl-sheet .cl-modal-actions { flex-direction: column-reverse; }
.cl-sheet .cl-modal-actions .cl-btn { width: 100%; height: var(--control-lg); font-size: 15px; }

/* EmptyState */
.cl-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-3); padding: var(--space-10) var(--space-6); max-width: 360px; margin: 0 auto; }
.cl-empty-icon { width: 56px; height: 56px; border-radius: var(--radius-full); background: var(--primary-soft); color: var(--primary-ink); display: grid; place-items: center; }
.cl-empty-icon .cl-icon { width: var(--icon-lg); height: var(--icon-lg); }
.cl-empty h3 { margin: 0; font-family: var(--font-text); font-size: 17px; line-height: 24px; font-weight: 600; color: var(--ink); }
.cl-empty p { margin: 0; font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.cl-empty .cl-btn { margin-top: var(--space-1); }

/* Skeleton */
.cl-skeleton { display: block; background: var(--surface-sunken); border-radius: var(--radius-sm); position: relative; overflow: hidden; }
.cl-skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, var(--line), transparent); animation: cl-shimmer 1.4s ease-in-out infinite; }
.cl-skeleton-text { height: 14px; margin: 4px 0; }
.cl-skeleton-circle { border-radius: var(--radius-full); }
.cl-skeleton-media { aspect-ratio: 4 / 5; border-radius: var(--radius-lg); }
@keyframes cl-shimmer { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .cl-skeleton::after, .cl-spinner { animation: none; } .cl-btn, .cl-input, .cl-check, .cl-radio, .cl-switch, .cl-switch::before { transition: none; } }
