/* ==========================================================================
   CarLinx — shared design system ("Graphite": near-black UI, the orange logo
   is the only brand colour). Loaded on every page from boot_strap.php.
   Page-specific legacy styles may still exist inline; they read the same
   --cl-* tokens, so changing the palette here re-themes the whole site.
   ========================================================================== */

:root {
    /* Brand (graphite) */
    --cl-primary:        #111827;
    --cl-primary-dark:   #1f2937;
    --cl-primary-deep:   #030712;
    --cl-accent:         #111827;
    --cl-primary-light:  #f3f4f6;
    --cl-primary-soft:   #e5e7eb;
    --cl-primary-border: #d1d5db;
    --cl-primary-glow:   rgba(17, 24, 39, 0.16);
    --cl-gradient:       linear-gradient(90deg, #374151 0%, #6b7280 100%);
    --cl-hero-bg:
        radial-gradient(1000px 520px at 88% 0%, rgba(17, 24, 39, 0.05), transparent 62%),
        linear-gradient(180deg, #f9fafb 0%, #ffffff 100%);

    /* Neutrals (gray) */
    --cl-dark:    #111827;
    --cl-dark-2:  #1f2937;
    --cl-text:    #111827;
    --cl-text-2:  #374151;
    --cl-muted:   #6b7280;
    --cl-subtle:  #9ca3af;
    --cl-border:  #e5e7eb;
    --cl-line:    #f3f4f6;
    --cl-bg:      #f9fafb;
    --cl-white:   #ffffff;

    /* Status */
    --cl-success: #059669;
    --cl-danger:  #dc2626;

    /* Shape & depth */
    --cl-radius:    16px;
    --cl-radius-sm: 12px;
    --cl-radius-xs: 8px;
    --cl-shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.06);
    --cl-shadow-md: 0 4px 16px rgba(17, 24, 39, 0.08);
    --cl-shadow-lg: 0 18px 48px rgba(17, 24, 39, 0.12);

    /* Type */
    --cl-font:      'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --cl-font-head: 'Plus Jakarta Sans', 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Bootstrap hooks */
    --bs-body-font-family: var(--cl-font);
    --bs-body-color: var(--cl-text-2);
    --bs-body-bg: var(--cl-white);
}

/* ── Base ─────────────────────────────────────────────────── */
body {
    font-family: var(--cl-font);
    color: var(--cl-text-2);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--cl-font-head);
    color: var(--cl-text);
    letter-spacing: -0.02em;
}

a { color: var(--cl-primary-dark); }
a:hover { color: var(--cl-primary-deep); }

:focus-visible {
    outline: 3px solid var(--cl-primary-glow);
    outline-offset: 2px;
}

img { max-width: 100%; }

/* Bootstrap colour alignment for older pages */
.btn-primary, .btn-success {
    background-color: var(--cl-primary);
    border-color: var(--cl-primary);
}
.btn-primary:hover, .btn-primary:focus, .btn-success:hover, .btn-success:focus {
    background-color: var(--cl-primary-dark);
    border-color: var(--cl-primary-dark);
}
.btn-outline-primary { color: var(--cl-primary-dark); border-color: var(--cl-primary); }
.btn-outline-primary:hover { background-color: var(--cl-primary); border-color: var(--cl-primary); }
.text-primary { color: var(--cl-primary) !important; }
.bg-primary { background-color: var(--cl-primary) !important; }
.form-control:focus, .form-select:focus {
    border-color: var(--cl-primary);
    box-shadow: 0 0 0 4px var(--cl-primary-glow);
}
.form-check-input:checked { background-color: var(--cl-primary); border-color: var(--cl-primary); }
.spinner-border.text-primary { color: var(--cl-primary) !important; }

/* ── Layout helpers ───────────────────────────────────────── */
.cl-wrap {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

.cl-section { padding: 56px 0; }
.cl-section-tight { padding: 36px 0; }

.cl-eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--cl-primary-dark);
    margin-bottom: 8px;
}

.cl-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.cl-section-head h2 {
    font-size: clamp(1.5rem, 2.6vw, 1.95rem);
    font-weight: 800;
    margin: 0;
}

.cl-link-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--cl-primary-dark);
    text-decoration: none;
    white-space: nowrap;
}
.cl-link-more:hover { color: var(--cl-primary-deep); }
.cl-link-more i { font-size: 0.8em; transition: transform 0.15s ease; }
.cl-link-more:hover i { transform: translateX(3px); }

.cl-gradient-text {
    background: var(--cl-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--cl-primary-dark);
}

/* ── Buttons ──────────────────────────────────────────────── */
.cl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-family: var(--cl-font);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.cl-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.cl-btn-primary { background: var(--cl-primary); color: #fff; box-shadow: 0 6px 18px var(--cl-primary-glow); }
.cl-btn-primary:hover { background: var(--cl-primary-dark); color: #fff; }

.cl-btn-dark { background: var(--cl-dark); color: #fff; }
.cl-btn-dark:hover { background: var(--cl-dark-2); color: #fff; }

.cl-btn-soft { background: var(--cl-primary-light); color: var(--cl-primary-dark); border-color: var(--cl-primary-border); }
.cl-btn-soft:hover { background: var(--cl-primary-soft); color: var(--cl-primary-deep); }

.cl-btn-outline { background: #fff; color: var(--cl-text); border-color: var(--cl-border); }
.cl-btn-outline:hover { border-color: var(--cl-subtle); color: var(--cl-text); }

.cl-btn-ghost { background: transparent; color: var(--cl-text); }
.cl-btn-ghost:hover { background: var(--cl-line); color: var(--cl-text); }

.cl-btn-lg { min-height: 52px; padding: 0 26px; font-size: 1rem; }
.cl-btn-sm { min-height: 36px; padding: 0 14px; font-size: 0.85rem; }
.cl-btn-block { width: 100%; }

/* ── Chips ────────────────────────────────────────────────── */
.cl-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.cl-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--cl-border);
    color: var(--cl-text-2);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}
.cl-chip:hover { border-color: var(--cl-primary-border); color: var(--cl-primary-dark); background: var(--cl-primary-light); }

.cl-chip-active {
    background: var(--cl-primary-light);
    border-color: var(--cl-primary-border);
    color: var(--cl-primary-dark);
}
.cl-chip button {
    border: 0;
    background: none;
    padding: 0 0 0 2px;
    color: inherit;
    opacity: 0.6;
    line-height: 1;
    cursor: pointer;
}
.cl-chip button:hover { opacity: 1; }

.cl-chips-label { font-size: 0.85rem; color: var(--cl-muted); margin-right: 2px; }

/* ── Form fields ──────────────────────────────────────────── */
.cl-field { margin-bottom: 16px; }

.cl-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--cl-text);
    margin-bottom: 6px;
}

.cl-input, .cl-select, .cl-textarea {
    display: block;
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    font-family: var(--cl-font);
    font-size: 0.95rem;
    color: var(--cl-text);
    background: #fff;
    border: 1px solid var(--cl-border);
    border-radius: var(--cl-radius-sm);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.cl-textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
.cl-select {
    appearance: none;
    padding-right: 38px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px 10px;
}
.cl-input:focus, .cl-select:focus, .cl-textarea:focus {
    outline: none;
    border-color: var(--cl-primary);
    box-shadow: 0 0 0 4px var(--cl-primary-glow);
}
.cl-help { font-size: 0.8rem; color: var(--cl-muted); margin-top: 6px; }

.cl-input-affix {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--cl-border);
    border-radius: var(--cl-radius-sm);
    background: #fff;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.cl-input-affix:focus-within { border-color: var(--cl-primary); box-shadow: 0 0 0 4px var(--cl-primary-glow); }
.cl-input-affix span {
    display: flex;
    align-items: center;
    padding: 0 12px;
    background: var(--cl-bg);
    color: var(--cl-muted);
    font-weight: 600;
    font-size: 0.9rem;
}
.cl-input-affix input {
    flex: 1;
    min-width: 0;
    border: 0;
    padding: 10px 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--cl-text);
    outline: none;
    background: transparent;
}

/* ── Cards / surfaces ─────────────────────────────────────── */
.cl-card {
    background: #fff;
    border: 1px solid var(--cl-border);
    border-radius: var(--cl-radius);
    box-shadow: var(--cl-shadow-sm);
}
.cl-card-pad { padding: 22px; }

.cl-empty-state {
    text-align: center;
    padding: 56px 20px;
    background: #fff;
    border: 1px dashed var(--cl-border);
    border-radius: var(--cl-radius);
}
.cl-empty-state > i { font-size: 1.8rem; color: var(--cl-subtle); margin-bottom: 14px; display: block; }
.cl-empty-state h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.cl-empty-state p { color: var(--cl-muted); margin-bottom: 18px; }

/* ==========================================================================
   Navbar
   ========================================================================== */
.cl-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--cl-border);
    transition: box-shadow 0.2s ease;
}
.cl-nav.scrolled { box-shadow: 0 4px 18px rgba(17, 24, 39, 0.06); }

.cl-nav-inner {
    display: flex;
    align-items: center;
    height: 64px;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 8px;
}

.cl-nav-brand { display: flex; align-items: center; margin-right: 18px; }
.cl-nav-brand img { height: 40px; width: auto; }

.cl-nav-links { display: flex; align-items: stretch; height: 100%; gap: 2px; margin: 0; padding: 0; list-style: none; }
.cl-nav-links a {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 12px;
    color: var(--cl-text-2);
    font-size: 0.92rem;
    font-weight: 500;
    text-decoration: none;
}
.cl-nav-links a:hover { color: var(--cl-text); }
.cl-nav-links a.active { color: var(--cl-text); font-weight: 600; }
.cl-nav-links a.active::after {
    content: '';
    position: absolute;
    left: 12px; right: 12px; bottom: -1px;
    height: 2px;
    border-radius: 2px;
    background: var(--cl-accent);
}

.cl-nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.cl-nav-actions .cl-btn { min-height: 40px; font-size: 0.9rem; border-radius: 10px; }

.cl-nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 6px;
    border-radius: 999px;
    background: var(--cl-danger);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
}

.cl-nav-toggle {
    display: none;
    margin-left: auto;
    width: 42px; height: 42px;
    border-radius: 10px;
    border: 0;
    background: transparent;
    color: var(--cl-text);
    font-size: 1.2rem;
}
.cl-nav-toggle:hover, .cl-nav-toggle:focus-visible { background: var(--cl-line); }

/* Two-line menu icon (second line shorter), widens on hover */
.cl-menu-icon { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 6px; width: 22px; }
.cl-menu-icon span { display: block; height: 2px; border-radius: 2px; background: currentColor; transition: width 0.2s ease; }
.cl-menu-icon span:first-child { width: 22px; }
.cl-menu-icon span:last-child { width: 14px; }
.cl-nav-toggle:hover .cl-menu-icon span:last-child { width: 22px; }

.cl-nav-spacer { height: 64px; }

/* Mobile drawer */
.cl-drawer { width: 300px !important; border: 0 !important; }
.cl-drawer .offcanvas-header { padding: 16px 20px; border-bottom: 1px solid var(--cl-border); }
.cl-drawer .offcanvas-header img { height: 32px; }
.cl-drawer .offcanvas-body { padding: 12px 12px 20px; display: flex; flex-direction: column; }
.cl-drawer-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 10px;
    color: var(--cl-text-2);
    font-weight: 500;
    text-decoration: none;
}
.cl-drawer-link i { width: 18px; text-align: center; color: var(--cl-subtle); }
.cl-drawer-link:hover, .cl-drawer-link.active { background: var(--cl-primary-light); color: var(--cl-primary-dark); }
.cl-drawer-link:hover i, .cl-drawer-link.active i { color: var(--cl-primary); }
.cl-drawer-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cl-subtle);
    padding: 16px 12px 6px;
}
.cl-drawer-cta { display: grid; gap: 8px; padding: 16px 4px 4px; margin-top: auto; }
.cl-drawer-network { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 4px; }
.cl-drawer-network a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--cl-border);
    border-radius: 12px;
    color: var(--cl-text);
    text-decoration: none;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.cl-drawer-network a:hover { border-color: var(--cl-primary-border); background: var(--cl-bg); }
.cl-net-icon {
    flex-shrink: 0;
    width: 34px; height: 34px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px;
    background: var(--cl-line);
    color: var(--cl-text);
    font-size: 0.95rem;
}
.cl-drawer-network strong { display: block; font-size: 0.85rem; font-weight: 600; line-height: 1.2; }
.cl-drawer-network small { display: block; font-size: 0.72rem; color: var(--cl-muted); line-height: 1.2; }

@media (max-width: 991.98px) {
    .cl-nav-links, .cl-nav-actions { display: none; }
    .cl-nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .cl-nav-inner { height: 58px; }
    .cl-nav-spacer { height: 58px; }
    .cl-nav-brand img { height: 32px; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.cl-footer {
    background: var(--cl-dark);
    color: #cbd5e1;
    padding: 48px 0 0;
    margin-top: 0;
}
.cl-footer a { color: #94a3b8; text-decoration: none; }
.cl-footer a:hover { color: #fff; }

.cl-footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 32px;
    padding-bottom: 36px;
}
.cl-footer-brand img { height: 28px; filter: brightness(0) invert(1); margin-bottom: 14px; }
.cl-footer-brand p { color: #94a3b8; font-size: 0.9rem; max-width: 280px; margin-bottom: 16px; }

.cl-footer-social { display: flex; gap: 8px; }
.cl-footer-social a {
    width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
}
.cl-footer-social a:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }

.cl-footer h6 {
    font-family: var(--cl-font);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.cl-footer ul { list-style: none; padding: 0; margin: 0; }
.cl-footer li { margin-bottom: 10px; font-size: 0.92rem; }

.cl-footer-makes {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px 0;
}
.cl-footer-makes summary {
    cursor: pointer;
    list-style: none;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
}
.cl-footer-makes summary::-webkit-details-marker { display: none; }
.cl-footer-makes summary i { margin-left: 6px; font-size: 0.7rem; transition: transform 0.2s ease; }
.cl-footer-makes[open] summary i { transform: rotate(180deg); }
.cl-footer-makes .cl-chips { margin-top: 14px; }
.cl-footer-makes .cl-chip { background: transparent; border-color: rgba(255, 255, 255, 0.12); color: #cbd5e1; }
.cl-footer-makes .cl-chip:hover { border-color: var(--cl-accent); color: #fff; background: rgba(255, 255, 255, 0.08); }

.cl-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px 0;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: #64748b;
}

@media (max-width: 991.98px) {
    .cl-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cl-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 575.98px) {
    .cl-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
    .cl-footer-bottom { flex-direction: column; }
}

/* ==========================================================================
   Car cards (browse, home, make pages)
   ========================================================================== */
.cl-car-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.cl-car-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--cl-border);
    border-radius: var(--cl-radius);
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.cl-car-card:hover {
    color: inherit;
    border-color: var(--cl-primary-border);
    box-shadow: var(--cl-shadow-lg);
    transform: translateY(-3px);
}

.cl-car-media {
    position: relative;
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, var(--cl-line), var(--cl-border));
    overflow: hidden;
}
.cl-car-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.cl-car-card:hover .cl-car-media img { transform: scale(1.04); }

.cl-car-noimg {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cl-subtle);
    font-size: 2rem;
}

.cl-car-tag {
    position: absolute;
    top: 12px; left: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: rgba(255, 255, 255, 0.95);
    color: var(--cl-text);
    box-shadow: var(--cl-shadow-sm);
}
.cl-car-tag-new { background: var(--cl-primary); color: #fff; }

.cl-car-offers {
    position: absolute;
    left: 12px; bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.82);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
}

.cl-car-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }

.cl-car-price {
    font-family: var(--cl-font-head);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--cl-text);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.cl-car-title {
    font-family: var(--cl-font);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--cl-text-2);
    letter-spacing: 0;
    margin: 4px 0 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cl-car-meta { font-size: 0.85rem; color: var(--cl-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-car-meta span + span::before { content: '·'; margin: 0 6px; color: var(--cl-subtle); }

.cl-car-foot {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 12px;
    font-size: 0.82rem;
    color: var(--cl-muted);
}
.cl-car-foot > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-car-foot i { color: var(--cl-subtle); margin-right: 4px; }

/* Pagination (Bootstrap markup from pagination.php) */
.cl-pager { display: flex; justify-content: center; margin-top: 32px; }
.cl-pager .pagination { gap: 6px; flex-wrap: wrap; justify-content: center; }
.cl-pager .page-link {
    border: 1px solid var(--cl-border) !important;
    border-radius: 10px !important;
    min-width: 40px;
    text-align: center;
    color: var(--cl-text-2);
    font-weight: 600;
    font-size: 0.9rem;
}
.cl-pager .page-link:hover { background: var(--cl-primary-light); color: var(--cl-primary-dark); }
.cl-pager .page-item.active .page-link { background: var(--cl-primary); border-color: var(--cl-primary) !important; color: #fff; }

/* ==========================================================================
   Home (logged out)
   ========================================================================== */
.cl-hero {
    position: relative;
    padding: 64px 0 56px;
    background: var(--cl-hero-bg);
    overflow: hidden;
}

.cl-hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}

.cl-hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -0.035em;
    margin-bottom: 16px;
}

.cl-hero-sub { font-size: 1.08rem; color: var(--cl-muted); margin-bottom: 28px; }

.cl-search {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 620px;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--cl-border);
    border-radius: 999px;
    box-shadow: 0 12px 34px rgba(17, 24, 39, 0.08);
}
.cl-search-field {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}
.cl-search-field:first-child { flex: 1.4; }
.cl-search-field > i { position: absolute; left: 16px; color: var(--cl-subtle); pointer-events: none; }
.cl-search-field input, .cl-search-field select {
    width: 100%;
    height: 48px;
    border: 0;
    background: transparent;
    padding: 0 12px 0 42px;
    font-family: var(--cl-font);
    font-size: 0.98rem;
    color: var(--cl-text);
    outline: none;
}
.cl-search-field select { appearance: none; cursor: pointer; }
.cl-search-divider { width: 1px; height: 28px; background: var(--cl-border); flex-shrink: 0; }
.cl-search .cl-btn { min-height: 48px; padding: 0 24px; }

.cl-suggest {
    position: absolute;
    top: calc(100% + 12px);
    left: 0; right: 0;
    margin: 0; padding: 6px;
    list-style: none;
    background: #fff;
    border: 1px solid var(--cl-border);
    border-radius: var(--cl-radius-sm);
    box-shadow: var(--cl-shadow-lg);
    z-index: 50;
    display: none;
}
.cl-suggest.show { display: block; }
.cl-suggest li {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.92rem;
    color: var(--cl-text-2);
    cursor: pointer;
}
.cl-suggest li:hover, .cl-suggest li.active { background: var(--cl-primary-light); color: var(--cl-primary-dark); }

.cl-hero-chips { margin-top: 20px; }

/* Hero visual: a floating stack of real listings */
.cl-hero-visual { position: relative; min-height: 420px; }
.cl-hero-shot {
    position: absolute;
    border-radius: 22px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--cl-border);
    box-shadow: var(--cl-shadow-lg);
}
.cl-hero-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cl-hero-shot-main { inset: 0 0 56px 40px; }
.cl-hero-visual { display: block; }

/* Static hero photo */
.cl-hero-photo { position: relative; }
.cl-hero-photo img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: var(--cl-shadow-lg);
}
.cl-hero-tag {
    position: absolute;
    left: 18px; bottom: 18px;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--cl-shadow-md);
    font-weight: 600; font-size: 0.9rem;
    color: var(--cl-text);
}
.cl-hero-visual.is-single .cl-hero-shot-main { inset: 20px 0 20px 20px; }
/* No usable photos: centre the hero instead of leaving an empty column */
.cl-hero-grid.cl-hero-solo { grid-template-columns: minmax(0, 1fr); max-width: 720px; margin: 0 auto; text-align: center; }
.cl-hero-solo .cl-search { margin: 0 auto; }
.cl-hero-solo .cl-chips, .cl-hero-solo .cl-trust { justify-content: center; }
.cl-hero-shot-side { width: 46%; aspect-ratio: 4 / 3; left: 0; bottom: 0; border: 4px solid #fff; }
.cl-hero-price {
    position: absolute;
    right: 18px; top: 18px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 14px;
    box-shadow: var(--cl-shadow-md);
    line-height: 1.25;
}
.cl-hero-price strong { display: block; font-family: var(--cl-font-head); font-size: 1.15rem; color: var(--cl-text); }
.cl-hero-price span { font-size: 0.8rem; color: var(--cl-muted); }

.cl-trust { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 28px; font-size: 0.9rem; color: var(--cl-text-2); }
.cl-trust span { display: inline-flex; align-items: center; gap: 8px; }
.cl-trust i { color: var(--cl-success); }

/* Sell band */
.cl-sell-band {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 36px 40px;
    border-radius: 24px;
    background:
        radial-gradient(600px 300px at 100% 0%, rgba(255, 255, 255, 0.08), transparent 60%),
        var(--cl-dark);
    color: #e2e8f0;
    overflow: hidden;
}
.cl-sell-band h2 { color: #fff; font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 800; margin-bottom: 8px; }
.cl-sell-band p { margin: 0; color: #cbd5e1; }
.cl-sell-band .cl-btn { flex-shrink: 0; }
.cl-sell-band .cl-btn-primary { background: #fff; color: var(--cl-text); box-shadow: none; }
.cl-sell-band .cl-btn-primary:hover { background: var(--cl-primary-light); color: var(--cl-text); }

/* Steps */
.cl-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cl-step { padding: 24px; border-radius: var(--cl-radius); background: var(--cl-bg); border: 1px solid var(--cl-line); }
.cl-step-icon {
    width: 46px; height: 46px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 14px;
    background: var(--cl-primary-light);
    color: var(--cl-primary);
    font-size: 1.1rem;
    margin-bottom: 16px;
}
.cl-step h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; }
.cl-step p { margin: 0; color: var(--cl-muted); font-size: 0.92rem; }

@media (max-width: 991.98px) {
    .cl-hero { padding: 40px 0 36px; }
    .cl-hero-grid { grid-template-columns: 1fr; }
    .cl-hero-visual, .cl-hero-photo { display: none; }
    .cl-steps { grid-template-columns: 1fr; }
    .cl-sell-band { flex-direction: column; align-items: flex-start; padding: 28px 24px; }
}

@media (max-width: 640px) {
    .cl-search { flex-direction: column; align-items: stretch; border-radius: 20px; padding: 8px; }
    .cl-search-divider { width: auto; height: 1px; margin: 0 10px; }
    .cl-search .cl-btn { width: 100%; }
    .cl-search-field input, .cl-search-field select { font-size: 16px; }
    .cl-section { padding: 40px 0; }
    .cl-section-head { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ==========================================================================
   Dashboard (logged in home)
   ========================================================================== */
.cl-dash-hero {
    padding: 40px 0 32px;
    background: var(--cl-hero-bg);
    border-bottom: 1px solid var(--cl-line);
}
.cl-dash-hero h1 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); font-weight: 800; margin-bottom: 6px; }
.cl-dash-hero p { color: var(--cl-muted); margin: 0; }

.cl-dash-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 28px;
}

.cl-dash-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--cl-border);
    border-radius: var(--cl-radius);
    color: inherit;
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.cl-dash-tile:hover { color: inherit; border-color: var(--cl-primary-border); box-shadow: var(--cl-shadow-md); transform: translateY(-2px); }
.cl-dash-tile-icon {
    width: 44px; height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 12px;
    background: var(--cl-primary-light);
    color: var(--cl-primary);
    font-size: 1.05rem;
}
.cl-dash-tile strong { display: block; font-family: var(--cl-font-head); font-size: 1rem; color: var(--cl-text); }
.cl-dash-tile span { font-size: 0.85rem; color: var(--cl-muted); }
.cl-dash-tile-primary { background: var(--cl-primary); border-color: var(--cl-primary); }
.cl-dash-tile-primary:hover { border-color: var(--cl-primary-dark); background: var(--cl-primary-dark); }
.cl-dash-tile-primary .cl-dash-tile-icon { background: rgba(255, 255, 255, 0.16); color: #fff; }
.cl-dash-tile-primary strong, .cl-dash-tile-primary span { color: #fff; }
.cl-dash-tile-primary span { opacity: 0.85; }
.cl-dash-count {
    position: absolute;
    top: 16px; right: 16px;
    min-width: 24px; height: 24px;
    padding: 0 7px;
    display: none;
    align-items: center; justify-content: center;
    border-radius: 999px;
    background: var(--cl-danger);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
}
.cl-dash-count.show { display: inline-flex; }

@media (max-width: 991.98px) { .cl-dash-actions { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .cl-dash-actions { gap: 10px; } .cl-dash-tile { padding: 16px; } }

/* ==========================================================================
   Browse page
   ========================================================================== */
.cl-browse-head {
    padding: 32px 0 20px;
    background: linear-gradient(180deg, #f9fafb 0%, #ffffff 100%);
}
.cl-browse-head h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; margin: 0; }
.cl-browse-count { color: var(--cl-muted); margin-top: 4px; font-size: 0.95rem; }

.cl-toolbar {
    position: sticky;
    top: 64px;
    z-index: 20;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--cl-line);
    padding: 12px 0;
}
.cl-toolbar-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cl-toolbar .cl-chips { flex: 1; min-width: 0; }
.cl-toolbar .cl-select { width: auto; min-height: 40px; border-radius: 999px; font-size: 0.9rem; font-weight: 500; }
.cl-filter-count {
    display: none;
    min-width: 20px; height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--cl-primary);
    color: #fff;
    font-size: 0.72rem;
    align-items: center; justify-content: center;
}
.cl-filter-count.show { display: inline-flex; }

.cl-results { padding: 24px 0 56px; min-height: 50vh; }
/* While the next cars load, the ones on screen fade a little (no blink, no jump); the new ones fade in */
#customer_search_id { transition: opacity .2s ease; }
#customer_search_id.cl-loading { opacity: .45; pointer-events: none; }

.cl-filters .offcanvas-header { border-bottom: 1px solid var(--cl-border); }
.cl-filters .offcanvas-title { font-family: var(--cl-font-head); font-weight: 700; }
.cl-filters .offcanvas-body { padding: 20px; }
.cl-filters-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--cl-border); }
.cl-filters .location-wrapper { position: relative; }
.cl-filters #suggesstion-postal ul { list-style: none; margin: 0; padding: 6px; }
.cl-filters #suggesstion-postal {
    position: absolute; left: 0; right: 0; top: calc(100% + 6px);
    background: #fff; border: 1px solid var(--cl-border); border-radius: var(--cl-radius-sm);
    box-shadow: var(--cl-shadow-lg); z-index: 50; display: none;
}
.cl-filters #suggesstion-postal li { padding: 10px 12px; border-radius: 8px; cursor: pointer; font-size: 0.92rem; }
.cl-filters #suggesstion-postal li:hover { background: var(--cl-primary-light); color: var(--cl-primary-dark); }

.cl-skeleton {
    border-radius: var(--cl-radius);
    background: linear-gradient(90deg, var(--cl-line) 25%, #e9eef4 37%, var(--cl-line) 63%);
    background-size: 400% 100%;
    animation: cl-shimmer 1.3s ease infinite;
    aspect-ratio: 4 / 4.2;
}
@keyframes cl-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

@media (max-width: 991.98px) { .cl-toolbar { top: 58px; } }
@media (max-width: 640px) {
    .cl-car-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .cl-car-body { padding: 10px 12px 12px; }
    .cl-car-price { font-size: 1.05rem; }
    .cl-car-title { font-size: 0.85rem; }
    .cl-car-meta { font-size: 0.78rem; }
    .cl-car-foot { font-size: 0.75rem; }
    .cl-car-foot > span:last-child { display: none; }
}
@media (max-width: 360px) { .cl-car-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Listing detail
   ========================================================================== */
.cl-detail { padding: 20px 0 64px; }

.cl-crumbs { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; color: var(--cl-muted); margin-bottom: 16px; flex-wrap: wrap; }
.cl-crumbs a { color: var(--cl-muted); text-decoration: none; }
.cl-crumbs a:hover { color: var(--cl-primary-dark); }
.cl-crumbs .cl-crumb-back { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border: 1px solid var(--cl-border, #e5e7eb); border-radius: 999px; background: #fff; font-weight: 600; color: var(--cl-text); }   /* back to the same list (history), or the search */
.cl-crumbs .cl-crumb-back:hover { border-color: var(--cl-text); color: var(--cl-text); }
.cl-crumbs .cl-crumb-back i { font-size: .8rem; }
.cl-crumbs i { font-size: 0.65rem; color: var(--cl-subtle); }

.cl-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    grid-template-areas: "gallery side" "main side";
    gap: 0 32px;
    align-items: start;
}
.cl-detail-gallery { grid-area: gallery; min-width: 0; }
.cl-detail-side    { grid-area: side; align-self: stretch; }
.cl-detail-main    { grid-area: main; min-width: 0; }

.cl-gallery-main {
    position: relative;
    aspect-ratio: 16 / 10;
    background: var(--cl-dark);
    border-radius: 20px;
    overflow: hidden;
}
.cl-gallery-main img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cl-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px; height: 42px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.92);
    color: var(--cl-text);
    box-shadow: var(--cl-shadow-md);
    display: inline-flex; align-items: center; justify-content: center;
}
.cl-gallery-nav:hover { background: #fff; }
.cl-gallery-prev { left: 14px; }
.cl-gallery-next { right: 14px; }
.cl-gallery-count {
    position: absolute;
    right: 14px; bottom: 14px;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.75);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
}
.cl-gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.cl-gallery-thumbs button {
    flex: 0 0 auto;
    width: 88px;
    aspect-ratio: 4 / 3;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    background: var(--cl-line);
    opacity: 0.7;
    transition: opacity 0.15s ease, border-color 0.15s ease;
}
.cl-gallery-thumbs button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cl-gallery-thumbs button.active, .cl-gallery-thumbs button:hover { opacity: 1; border-color: var(--cl-primary); }

.cl-keyspecs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 24px 0;
}
.cl-keyspec { padding: 14px 16px; border-radius: var(--cl-radius-sm); background: var(--cl-bg); border: 1px solid var(--cl-line); }
.cl-keyspec i { color: var(--cl-primary); margin-bottom: 8px; display: block; }
.cl-keyspec small { display: block; font-size: 0.75rem; color: var(--cl-muted); }
.cl-keyspec strong { font-size: 0.98rem; color: var(--cl-text); }

.cl-detail-block { padding: 24px 0; border-top: 1px solid var(--cl-line); }
.cl-detail-block h2 { font-size: 1.15rem; font-weight: 700; margin-bottom: 14px; }
.cl-description { font-size: 1rem; line-height: 1.7; color: var(--cl-text-2); white-space: normal; overflow-wrap: anywhere; }
.cl-description.is-clamped { max-height: 10.2em; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent); }   /* six lines, then "Show more" */
.cl-more { margin-top: 8px; padding: 0; border: 0; background: none; font: inherit; font-size: .95rem; font-weight: 700; color: var(--cl-text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cl-more[hidden] { display: none; }

.cl-spec-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; margin: 0; }
.cl-spec-list div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--cl-line); font-size: 0.93rem; }
.cl-spec-list dt { font-weight: 400; color: var(--cl-muted); }
.cl-spec-list dd { margin: 0; font-weight: 600; color: var(--cl-text); text-align: right; }

.cl-side { position: sticky; top: 84px; display: grid; gap: 16px; }
.cl-price-card { padding: 22px; }
.cl-price-card .cl-price { font-family: var(--cl-font-head); font-size: 2rem; font-weight: 800; color: var(--cl-text); letter-spacing: -0.03em; line-height: 1.1; }
.cl-price-card h1 { font-size: 1.15rem; font-weight: 700; margin: 6px 0 10px; line-height: 1.35; }
.cl-price-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.88rem; color: var(--cl-muted); margin-bottom: 18px; }
.cl-price-meta i { color: var(--cl-subtle); margin-right: 4px; }
.cl-seller-link { display: inline-flex; align-items: center; gap: 8px; margin: -8px 0 16px; font-size: 0.95rem; font-weight: 700; color: var(--cl-text); text-decoration: none; }
.cl-seller-av { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--cl-primary, #2563eb); color: #fff; font-size: 0.85rem; font-weight: 800; }
.cl-seller-link:hover { text-decoration: underline; }
.cl-price-card .cl-btn + .cl-btn, .cl-price-card #customer_contact_id + .cl-btn { margin-top: 10px; }

.cl-offer-card { padding: 22px; }
.cl-offer-card h2 { font-size: 1.05rem; font-weight: 700; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: baseline; }
.cl-offer-card h2 small { font-family: var(--cl-font); font-size: 0.82rem; font-weight: 500; color: var(--cl-muted); }
.cl-offer-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 8px 0 14px; }
.cl-offer-quick button {
    padding: 7px 0;
    border-radius: 10px;
    border: 1px solid var(--cl-border);
    background: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--cl-text-2);
}
.cl-offer-quick button:hover { border-color: var(--cl-primary-border); color: var(--cl-primary-dark); }
.cl-offer-quick button.active { background: var(--cl-primary-light); border-color: var(--cl-primary); color: var(--cl-primary-dark); }
.cl-offer-note { margin: 10px 0 0; font-size: 0.78rem; color: var(--cl-muted); text-align: center; }
.cl-offer-stats { display: flex; gap: 10px; margin-bottom: 14px; }
.cl-offer-stats div { flex: 1; padding: 10px 12px; border-radius: var(--cl-radius-sm); background: var(--cl-bg); }
.cl-offer-stats small { display: block; font-size: 0.75rem; color: var(--cl-muted); }
.cl-offer-stats strong { font-family: var(--cl-font-head); font-size: 1.1rem; color: var(--cl-text); }
.cl-offer-stats .is-top { background: var(--cl-primary-light); }
.cl-offer-stats .is-top strong { color: var(--cl-primary-dark); }

.cl-note { padding: 14px 16px; border-radius: var(--cl-radius-sm); background: var(--cl-bg); font-size: 0.9rem; color: var(--cl-text-2); }
.cl-note i { color: var(--cl-primary); margin-right: 6px; }
.cl-safety { font-size: 0.82rem; color: var(--cl-muted); padding: 0 4px; margin: 0; }
.cl-safety i { color: var(--cl-success); margin-right: 6px; }

/* reCAPTCHA v3: badge hidden, attribution shown in text instead (allowed by Google) */
.grecaptcha-badge { visibility: hidden !important; }
.cl-recaptcha-note { font-size: 0.72rem; color: var(--cl-subtle); padding: 0 4px; margin: 0; }
.cl-recaptcha-note a { color: inherit; text-decoration: underline; }

/* phone reveal + offer responses (rendered by contact_information.php / contact_email_message.php) */
.offer-success, .offer-error, .contact-error { padding: 14px 16px; border-radius: var(--cl-radius-sm); font-size: 0.92rem; }
.offer-success { background: #ecfdf5; color: #065f46; }
.offer-error, .contact-error { background: #fef2f2; color: #991b1b; }
/* chat: their messages wait until they verify their phone (cl_trust_waiting) */
.cl-ask { font-size: 0.85rem; line-height: 1.45; color: #374151; background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: var(--cl-radius-sm); padding: 8px 12px; margin-bottom: 8px; }
.cl-ask a { color: inherit; font-weight: 600; text-decoration: underline; }
.cl-ask .fas { margin-right: 4px; }
.cl-ask[hidden] { display: none; }

@media (max-width: 991.98px) {
    .cl-detail-grid { grid-template-columns: 1fr; grid-template-areas: "gallery" "side" "main"; }
    .cl-side { position: static; margin-top: 18px; }
    .cl-keyspecs { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575.98px) {
    .cl-gallery-main { border-radius: 14px; aspect-ratio: 4 / 3; }
    .cl-gallery-nav { width: 36px; height: 36px; }
    .cl-spec-list { grid-template-columns: 1fr; }
    .cl-price-card .cl-price { font-size: 1.7rem; }
}

/* ==========================================================================
   Auth pages (login / register / reset)
   ========================================================================== */
.cl-auth {
    padding: 40px 20px 64px;
    background: var(--cl-hero-bg);
}

/* Split layout: photo panel + form */
.cl-auth-shell {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 1040px;
    min-height: 620px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--cl-border);
    border-radius: 24px;
    box-shadow: var(--cl-shadow-lg);
    overflow: hidden;
}

.cl-auth-aside {
    position: relative;
    display: flex;
    align-items: flex-end;
    background-color: var(--cl-dark);
    background-size: cover;
    background-position: center;
}
.cl-auth-aside {
    overflow: hidden;
    background:
        radial-gradient(520px 320px at 85% 10%, rgba(255, 255, 255, 0.10), transparent 60%),
        radial-gradient(1px 1px at 1px 1px, rgba(255, 255, 255, 0.12) 1px, transparent 0) 0 0 / 22px 22px,
        linear-gradient(160deg, #1f2937 0%, #111827 60%, #030712 100%);
}
.cl-auth-art {
    position: absolute;
    top: 14%; right: -6%;
    font-size: 15rem;
    color: rgba(255, 255, 255, 0.06);
    transform: rotate(-8deg);
    pointer-events: none;
}
.cl-auth-aside-inner { position: relative; padding: 36px; color: #fff; }
.cl-auth-aside h2 { color: #fff; font-size: 1.75rem; font-weight: 800; line-height: 1.15; margin-bottom: 18px; }
.cl-auth-points { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 10px; }
.cl-auth-points li { display: flex; align-items: center; gap: 10px; font-size: 0.95rem; color: #e5e7eb; }
.cl-auth-points i {
    width: 22px; height: 22px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    font-size: 0.65rem;
}
.cl-auth-stat { margin: 0; font-size: 0.88rem; color: #d1d5db; }
.cl-auth-stat strong { color: #fff; }

.cl-auth-main { display: flex; align-items: center; justify-content: center; padding: 44px 40px; }
.cl-auth-form { width: 100%; max-width: 380px; }
.cl-auth-form h1 { font-size: 1.75rem; font-weight: 800; margin-bottom: 4px; }
.cl-auth-sub { color: var(--cl-muted); margin-bottom: 22px; }

.cl-auth-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    margin-bottom: 28px;
    background: var(--cl-line);
    border-radius: 12px;
}
.cl-auth-tabs a {
    padding: 9px 0;
    border-radius: 9px;
    text-align: center;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--cl-muted);
    text-decoration: none;
}
.cl-auth-tabs a.active { background: #fff; color: var(--cl-text); box-shadow: var(--cl-shadow-sm); }

.cl-auth-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px; font-size: 0.88rem; font-weight: 600; color: var(--cl-muted); text-decoration: none; }
.cl-auth-back:hover { color: var(--cl-text); }

.cl-auth-google { display: flex; justify-content: center; min-height: 44px; max-width: 100%; overflow: hidden; }
.cl-auth-or { display: flex; align-items: center; gap: 12px; margin: 22px 0; font-size: 0.8rem; color: var(--cl-subtle); }
.cl-auth-or::before, .cl-auth-or::after { content: ''; flex: 1; height: 1px; background: var(--cl-border); }

.cl-label-row { display: flex; justify-content: space-between; align-items: baseline; }
.cl-label-row a { font-size: 0.82rem; font-weight: 600; color: var(--cl-muted); text-decoration: none; }
.cl-label-row a:hover { color: var(--cl-text); }

.cl-input-icon { position: relative; }
.cl-input-icon > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--cl-subtle); font-size: 0.9rem; pointer-events: none; }
.cl-input-icon .cl-input { padding-left: 40px; }
.cl-input-icon .cl-input:has(+ .cl-pw-toggle) { padding-right: 44px; }
.cl-pw-toggle {
    position: absolute;
    right: 6px; top: 50%;
    transform: translateY(-50%);
    width: 34px; height: 34px;
    border: 0; border-radius: 8px;
    background: transparent;
    color: var(--cl-muted);
}
.cl-pw-toggle:hover { background: var(--cl-line); color: var(--cl-text); }

.cl-auth-terms { display: flex; align-items: flex-start; gap: 8px; margin: 4px 0 18px; font-size: 0.85rem; color: var(--cl-muted); }
.cl-auth-terms input { margin-top: 3px; accent-color: var(--cl-primary); width: 16px; height: 16px; flex-shrink: 0; }
.cl-auth-terms a { color: var(--cl-text); }
.cl-auth-foot { margin: 22px 0 0; text-align: center; font-size: 0.9rem; color: var(--cl-muted); }
.cl-auth-foot a { font-weight: 600; color: var(--cl-text); }

.cl-auth-alert { padding: 12px 14px; border-radius: var(--cl-radius-sm); font-size: 0.9rem; margin-bottom: 16px; }
.cl-auth-alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.cl-auth-alert-ok { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }

/* Single-card variant (Google sign-in failure etc.) */
.cl-auth-card { max-width: 440px; margin: 0 auto; padding: 32px; }

@media (max-width: 860px) {
    .cl-auth { padding: 24px 16px 48px; }
    .cl-auth-shell { grid-template-columns: minmax(0, 1fr); min-height: 0; }
    .cl-auth-aside { display: none; }
    .cl-auth-main { padding: 24px 18px; }
}

/* ==========================================================================
   Simple form pages (edit listing, messages after posting)
   ========================================================================== */
.cl-page { padding: 36px 0 64px; background: var(--cl-bg); min-height: calc(100vh - 64px); }
.cl-page-narrow { max-width: 720px; margin: 0 auto; }
.cl-page h1 { font-size: clamp(1.5rem, 3vw, 1.9rem); font-weight: 800; margin-bottom: 4px; }
.cl-page-sub { color: var(--cl-muted); margin-bottom: 24px; }
.cl-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.cl-photo-strip { display: flex; gap: 8px; flex-wrap: wrap; }
.cl-photo-strip img { width: 96px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; border: 1px solid var(--cl-border); }
.cl-result { text-align: center; padding: 40px 28px; }
.cl-result-icon {
    width: 64px; height: 64px;
    margin: 0 auto 18px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    font-size: 1.6rem;
}
.cl-result-ok { background: #ecfdf5; color: var(--cl-success); }
.cl-result-bad { background: #fef2f2; color: var(--cl-danger); }
.cl-result h1 { font-size: 1.5rem; }
.cl-result p { color: var(--cl-muted); margin-bottom: 22px; }
.cl-result-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 575.98px) { .cl-form-grid { grid-template-columns: 1fr; } }

.cl-price-meta:last-child { margin-bottom: 0; }

/* ==========================================================================
   Sell your car (lhouse_rent.php) — one question per step + live preview
   ========================================================================== */
.cl-sell { background: var(--cl-bg); padding: 32px 20px 64px; min-height: calc(100vh - 64px); }
.cl-sell-layout { display: grid; grid-template-columns: minmax(0, 560px) 300px; gap: 40px; justify-content: center; align-items: start; }

.cl-sell-form { background: #fff; border: 1px solid var(--cl-border); border-radius: 24px; padding: 32px; box-shadow: var(--cl-shadow-sm); }
.cl-sell-progress { height: 4px; border-radius: 4px; background: var(--cl-line); overflow: hidden; }
.cl-sell-progress span { display: block; height: 100%; width: 33%; background: var(--cl-text); border-radius: 4px; transition: width 0.3s ease; }
.cl-sell-count { margin: 10px 0 22px; font-size: 0.8rem; font-weight: 600; color: var(--cl-muted); }
.cl-sell-step h1 { font-size: clamp(1.5rem, 4vw, 1.9rem); font-weight: 800; margin-bottom: 22px; }
.cl-sell-fields { display: grid; gap: 12px; }
.cl-sell-fields [hidden] { display: none !important; }
.cl-sell-fields > *:not([hidden]) { animation: cl-rise 0.25s ease; }
@keyframes cl-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.cl-select-lg { min-height: 56px; font-size: 1.02rem; border-radius: 14px; padding-left: 18px; }

.cl-big-input {
    position: relative;
    display: flex; align-items: center;
    min-height: 60px;
    background: #fff;
    border: 1px solid var(--cl-border);
    border-radius: 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.cl-big-input:focus-within { border-color: var(--cl-text); box-shadow: 0 0 0 4px var(--cl-primary-glow); }
.cl-big-input input {
    flex: 1; min-width: 0;
    height: 58px;
    border: 0; outline: none; background: transparent;
    padding: 0 18px;
    font-family: var(--cl-font); font-size: 1.15rem; font-weight: 600;
    color: var(--cl-text);
}
.cl-big-input input::placeholder { font-weight: 400; color: var(--cl-subtle); }
.cl-big-input > span { padding: 0 18px; font-weight: 600; color: var(--cl-muted); }
.cl-big-input > span:first-child { padding-right: 0; }
.cl-big-input > i { padding-left: 18px; color: var(--cl-subtle); }
.cl-big-input-loc input { padding-left: 12px; }
.cl-big-input .cl-suggest { top: calc(100% + 6px); }

.cl-geo-pill {
    justify-self: start;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.84rem; font-weight: 600;
    background: var(--cl-line); color: var(--cl-text-2);
}
.cl-geo-pill[data-state="ok"] { background: #ecfdf5; color: #047857; }
.cl-geo-pill[data-state="bad"] { background: #fef2f2; color: #b91c1c; }
.cl-geo-pill button { border: 0; background: none; padding: 0; font: inherit; color: inherit; text-decoration: underline; }

.cl-segment { display: inline-flex; padding: 4px; gap: 4px; background: var(--cl-line); border-radius: 14px; }
.cl-segment-lg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cl-segment input, .cl-toggle-chips input { position: absolute; opacity: 0; pointer-events: none; }
.cl-segment span { display: block; padding: 12px 18px; border-radius: 11px; text-align: center; font-size: 0.95rem; font-weight: 600; color: var(--cl-muted); cursor: pointer; }
.cl-segment input:checked + span { background: #fff; color: var(--cl-text); box-shadow: var(--cl-shadow-sm); }
.cl-segment input:focus-visible + span { outline: 3px solid var(--cl-primary-glow); }

.cl-toggle-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.cl-toggle-chips label { position: relative; }
.cl-toggle-chips span {
    display: inline-flex; align-items: center;
    padding: 9px 16px;
    border: 1px solid var(--cl-border);
    border-radius: 999px;
    font-size: 0.9rem; font-weight: 500;
    color: var(--cl-text-2);
    cursor: pointer;
    transition: all 0.15s ease;
}
.cl-toggle-chips input:checked + span { background: var(--cl-text); border-color: var(--cl-text); color: #fff; }
.cl-toggle-chips input:checked + span::before { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 0.75em; margin-right: 7px; }
.cl-toggle-chips input:focus-visible + span { outline: 3px solid var(--cl-primary-glow); }

.cl-link-btn { justify-self: start; border: 0; background: none; padding: 6px 0; font-weight: 600; font-size: 0.92rem; color: var(--cl-text); }
.cl-link-btn i { font-size: 0.8em; margin-right: 4px; }
.cl-link-btn:hover { text-decoration: underline; }
.cl-desc { position: relative; }
.cl-desc .cl-textarea { border-radius: 14px; padding-bottom: 28px; }
.cl-desc-count { position: absolute; right: 14px; bottom: 10px; font-size: 0.75rem; color: var(--cl-subtle); }

.cl-photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cl-photo-add {
    position: relative;
    aspect-ratio: 4 / 3;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    border: 2px dashed var(--cl-border);
    border-radius: 14px;
    background: var(--cl-bg);
    color: var(--cl-text);
    font-weight: 600; font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.cl-photo-add[hidden] { display: none; }
.cl-photo-add i { font-size: 1.4rem; }
.cl-photo-add:hover, .cl-photo-add.is-over { border-color: var(--cl-text); background: #fff; }
.cl-photo-add input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.cl-photo-grid:not(:has(.cl-photo-cell)) .cl-photo-add { grid-column: 1 / -1; aspect-ratio: auto; min-height: 200px; }
.cl-photo-cell { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: var(--cl-line); }
.cl-photo-cell img { width: 100%; height: 100%; object-fit: cover; }
.cl-photo-cell button {
    position: absolute; top: 6px; right: 6px;
    width: 26px; height: 26px;
    border: 0; border-radius: 50%;
    background: rgba(17, 24, 39, 0.75); color: #fff;
    font-size: 0.75rem;
}
.cl-photo-cell span {
    position: absolute; left: 6px; bottom: 6px;
    padding: 2px 8px; border-radius: 999px;
    background: #fff; color: var(--cl-text);
    font-size: 0.7rem; font-weight: 700;
}
.cl-sell-hint { margin: 12px 0 0; font-size: 0.85rem; color: var(--cl-muted); }

.cl-form-alert { padding: 12px 14px; margin-bottom: 18px; border-radius: 12px; background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; font-size: 0.9rem; }

.cl-sell-actions { display: flex; align-items: center; gap: 10px; margin-top: 28px; }
.cl-sell-actions .cl-btn-primary { margin-left: auto; min-width: 160px; }
.cl-sell-legal { margin: 12px 0 0; text-align: right; }

.cl-sell-preview { position: sticky; top: 96px; }
.cl-sell-preview .cl-car-card { box-shadow: var(--cl-shadow-md); }
.cl-sell-preview .cl-car-card:hover { transform: none; }
.cl-sell-preview .cl-car-media img { position: absolute; inset: 0; }

@media (max-width: 991.98px) {
    .cl-sell-layout { grid-template-columns: minmax(0, 560px); }
    .cl-sell-preview { display: none; }
}
@media (max-width: 575.98px) {
    .cl-sell { padding: 0 0 24px; background: #fff; }
    .cl-sell-form { border: 0; border-radius: 0; box-shadow: none; padding: 20px 16px 0; }
    .cl-sell-actions {
        position: sticky; bottom: 0; z-index: 10;
        margin: 24px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
        background: #fff; border-top: 1px solid var(--cl-border);
    }
    .cl-sell-actions .cl-btn-primary { flex: 1; }
    .cl-sell-legal { text-align: center; }
    .cl-big-input input, .cl-select-lg { font-size: 16px; }
}

/* ==========================================================================
   Messages (message_received.php) — list + chat, full height
   ========================================================================== */
.cl-inbox-page { background: var(--cl-bg); }
.cl-inbox {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    max-width: 1240px;
    height: calc(100vh - 64px);
    height: calc(100dvh - 64px);
    margin: 0 auto;
    background: #fff;
    border-left: 1px solid var(--cl-border);
    border-right: 1px solid var(--cl-border);
}

/* List */
.cl-inbox-list { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--cl-border); }
.cl-inbox-head { padding: 20px 16px 12px; border-bottom: 1px solid var(--cl-line); }
.cl-inbox-head h1 { font-size: 1.5rem; font-weight: 800; margin: 0 0 14px; }
.cl-inbox-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
.cl-inbox-tabs span { padding: 8px 10px; font-size: 0.88rem; }
.cl-tab-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px;
    border-radius: 999px; background: var(--cl-danger); color: #fff;
    font-size: 0.68rem; font-weight: 700;
}
.cl-tab-count[hidden] { display: none; }
.cl-inbox-threads { flex: 1; overflow-y: auto; padding: 6px; }

.cl-thread {
    position: relative;
    display: flex; align-items: center; gap: 12px;
    width: 100%;
    padding: 10px;
    border: 0; border-radius: 14px;
    background: transparent;
    text-align: left;
    color: inherit;
    transition: background-color 0.15s ease;
}
.cl-thread:hover { background: var(--cl-bg); }
.cl-thread.is-active { background: var(--cl-line); }
.cl-thread-img {
    flex-shrink: 0;
    width: 52px; height: 52px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 12px;
    overflow: hidden;
    background: var(--cl-line);
    color: var(--cl-subtle);
}
.cl-thread-img img { width: 100%; height: 100%; object-fit: cover; }
.cl-thread-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cl-thread-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.cl-thread-top strong { font-size: 0.95rem; font-weight: 600; color: var(--cl-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-thread-top time { flex-shrink: 0; font-size: 0.75rem; color: var(--cl-subtle); }
.cl-thread-car, .cl-thread-text { font-size: 0.83rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-thread-car { color: var(--cl-text-2); }
.cl-thread-car b { font-weight: 600; color: var(--cl-text); }
.cl-thread-text { color: var(--cl-muted); }
.cl-thread.is-new .cl-thread-top strong, .cl-thread.is-new .cl-thread-text { color: var(--cl-text); font-weight: 700; }
.cl-thread-dot { flex-shrink: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--cl-text); }

.cl-thread-skel .cl-thread-img, .cl-thread-skel i {
    background: linear-gradient(90deg, var(--cl-line) 25%, #e9edf2 37%, var(--cl-line) 63%);
    background-size: 400% 100%;
    animation: cl-shimmer 1.3s ease infinite;
}
.cl-thread-skel i { display: block; height: 10px; border-radius: 5px; margin: 4px 0; }
.cl-thread-skel i:first-child { width: 55%; }
.cl-thread-skel i:last-child { width: 85%; }

.cl-inbox-empty {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 56px 20px;
    text-align: center;
    color: var(--cl-muted);
    font-size: 0.9rem;
}
.cl-inbox-empty > i { font-size: 1.6rem; color: var(--cl-subtle); margin-bottom: 4px; }
.cl-inbox-empty strong { color: var(--cl-text); font-size: 1rem; }
.cl-inbox-empty .cl-btn { margin-top: 8px; }

/* Chat */
.cl-inbox-chat { position: relative; display: flex; flex-direction: column; min-height: 0; background: var(--cl-bg); }
.cl-chat-placeholder { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--cl-subtle); font-weight: 600; }
.cl-chat-placeholder[hidden] { display: none; }
.cl-chat-placeholder i { font-size: 2.2rem; }
.cl-chat-content { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.cl-chat-content:empty { display: none; }
.cl-chat-loading, .cl-chat-error { margin: auto; padding: 24px; color: var(--cl-muted); font-size: 0.9rem; text-align: center; }

.cl-chat-head {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid var(--cl-border);
}
.cl-chat-head .cl-thread-img { width: 44px; height: 44px; }
.cl-chat-back { display: none; border: 0; background: none; width: 36px; height: 36px; border-radius: 10px; color: var(--cl-text); }
.cl-chat-back:hover { background: var(--cl-line); }
.cl-chat-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cl-chat-who strong { font-size: 1rem; color: var(--cl-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-chat-who span { font-size: 0.83rem; color: var(--cl-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-chat-actions { display: flex; gap: 6px; flex-shrink: 0; }

.cl-icon-btn {
    width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--cl-border);
    border-radius: 12px;
    background: #fff;
    color: var(--cl-text);
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
.cl-icon-btn:hover { background: var(--cl-line); color: var(--cl-text); }

.cl-chat-log { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 6px; }
.cl-chat-day { display: flex; justify-content: center; margin: 10px 0 6px; }
.cl-chat-day span { padding: 3px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--cl-line); font-size: 0.75rem; font-weight: 600; color: var(--cl-muted); }

.cl-bubble-row { display: flex; }
.cl-bubble-row.mine { justify-content: flex-end; }
.cl-bubble {
    max-width: min(78%, 520px);
    padding: 9px 13px 6px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--cl-line);
    color: var(--cl-text);
    font-size: 0.94rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.cl-bubble-row.theirs .cl-bubble { border-bottom-left-radius: 6px; }
.cl-bubble-row.mine .cl-bubble { background: var(--cl-text); border-color: var(--cl-text); color: #fff; border-bottom-right-radius: 6px; }
.cl-bubble time { display: block; margin-top: 2px; font-size: 0.7rem; color: var(--cl-subtle); text-align: right; }
.cl-bubble-row.mine .cl-bubble time { color: rgba(255, 255, 255, 0.6); }
.cl-bubble-offer {
    display: inline-flex; align-items: center; gap: 6px;
    margin: 2px 0 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--cl-line);
    color: var(--cl-text);
    font-size: 0.85rem; font-weight: 700;
}
.cl-bubble-row.mine .cl-bubble-offer { background: rgba(255, 255, 255, 0.16); color: #fff; }

/* Composer */
.cl-composer { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--cl-border); }
.cl-composer[hidden] { display: none; }
.cl-composer-row { display: flex; align-items: flex-end; gap: 8px; }
.cl-composer textarea {
    flex: 1; min-width: 0;
    max-height: 140px;
    padding: 10px 14px;
    border: 1px solid var(--cl-border);
    border-radius: 20px;
    background: var(--cl-bg);
    font-family: var(--cl-font); font-size: 16px; line-height: 1.4;
    color: var(--cl-text);
    resize: none;
    outline: none;
}
.cl-composer textarea:focus { border-color: var(--cl-text); background: #fff; }
.cl-composer .cl-icon-btn { border-radius: 50%; }
.cl-send-btn {
    flex-shrink: 0;
    width: 42px; height: 42px;
    border: 0; border-radius: 50%;
    background: var(--cl-text); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
}
.cl-send-btn:disabled { opacity: 0.5; }
.cl-composer-offer {
    display: inline-flex; align-items: center; gap: 6px;
    margin: 0 0 8px 48px;
    padding: 4px 6px 4px 12px;
    border: 1px solid var(--cl-text);
    border-radius: 999px;
    font-weight: 700;
}
.cl-composer-offer[hidden] { display: none; }
.cl-composer-offer input { width: 120px; border: 0; outline: none; font-family: var(--cl-font); font-size: 16px; font-weight: 700; color: var(--cl-text); background: transparent; }
.cl-composer-offer button { border: 0; background: var(--cl-line); width: 26px; height: 26px; border-radius: 50%; color: var(--cl-text); font-size: 0.75rem; }

@media (max-width: 991.98px) {
    .cl-inbox { grid-template-columns: minmax(0, 1fr); height: calc(100vh - 58px); height: calc(100dvh - 58px); border: 0; }
    .cl-inbox-chat { display: none; }
    .cl-inbox.is-chat-open .cl-inbox-list { display: none; }
    .cl-inbox.is-chat-open .cl-inbox-chat { display: flex; }
    .cl-chat-back { display: inline-flex; align-items: center; justify-content: center; }
    .cl-chat-actions .cl-icon-btn { width: 36px; height: 36px; border: 0; background: var(--cl-line); }
}
@media (max-width: 420px) {
    .cl-chat-head { gap: 8px; padding: 10px 10px; }
    .cl-chat-head .cl-thread-img { display: none; }
}

/* ==========================================================================
   Profile (mprofile.php)
   ========================================================================== */
.cl-profile { max-width: 560px; margin: 0 auto; }
.cl-profile-head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.cl-profile-head h1 { margin: 0; }
.cl-profile-head p { margin: 2px 0 0; color: var(--cl-muted); font-size: 0.92rem; overflow-wrap: anywhere; }
.cl-avatar {
    flex-shrink: 0;
    width: 64px; height: 64px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--cl-text); color: #fff;
    font-family: var(--cl-font-head); font-size: 1.4rem; font-weight: 700;
}
.cl-profile .cl-card { margin-bottom: 18px; }
.cl-profile .cl-auth-alert a { color: inherit; }
.cl-settings-list { background: #fff; border: 1px solid var(--cl-border); border-radius: var(--cl-radius); overflow: hidden; }
.cl-settings-list a {
    display: flex; align-items: center; gap: 14px;
    padding: 15px 18px;
    color: var(--cl-text); text-decoration: none; font-weight: 500;
    border-top: 1px solid var(--cl-line);
}
.cl-settings-list a:first-child { border-top: 0; }
.cl-settings-list a:hover { background: var(--cl-bg); }
.cl-settings-list a span { flex: 1; }
.cl-settings-list a i:first-child { width: 20px; text-align: center; color: var(--cl-muted); }
.cl-settings-list a i:last-child { font-size: 0.75rem; color: var(--cl-subtle); }
