/* ==========================================================
   ServicePK – Customer & Agent dashboard theme (Clutch-style)
   Loaded only on user panel pages (wishlist, listings, become-agent,
   register). All classes are namespaced: db-*, dsb-*.
   ========================================================== */

:root {
    --db-ink: #1b2233;
    --db-text: #3d4659;
    --db-muted: #6b7385;
    --db-line: #e4e8f0;
    --db-bg: #f4f6fa;
    --db-card: #ffffff;
    --db-primary: #1f4fd8;
    --db-primary-ink: #173cad;
    --db-primary-soft: #eaf0ff;
    --db-success: #137a55;
    --db-success-soft: #e5f6ee;
    --db-warn: #9a5b00;
    --db-warn-soft: #fff3df;
    --db-danger: #b42318;
    --db-danger-soft: #fdeceb;
    --db-info: #245b9c;
    --db-info-soft: #e7f0fb;
    --db-star: #f5a524;
    --db-radius: 14px;
    --db-radius-sm: 10px;
    --db-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
}

/* ---------- Page wrapper ---------- */
.db-wrap {
    background: var(--db-bg);
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--db-text);
    padding: 28px 0 64px;
    min-height: 70vh;
}
.db-wrap .min-w-0 { min-width: 0; }
.db-wrap img { max-width: 100%; }

.db-card {
    background: var(--db-card);
    border: 1px solid var(--db-line);
    border-radius: var(--db-radius);
    box-shadow: var(--db-shadow);
    padding: 22px;
    margin-bottom: 20px;
}
.db-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.db-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--db-ink);
    margin: 0;
}
.db-card-sub {
    font-size: 14px;
    color: var(--db-muted);
    margin: 2px 0 0;
}

/* ---------- Hero (page header + stats) ---------- */
.db-hero {
    background: var(--db-card);
    border: 1px solid var(--db-line);
    border-radius: var(--db-radius);
    box-shadow: var(--db-shadow);
    overflow: hidden;
    margin-bottom: 20px;
}
.db-hero::before {
    content: "";
    display: block;
    height: 6px;
    background: linear-gradient(90deg, var(--db-primary), #5b8cff);
}
.db-hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 22px 22px 18px;
}
.db-hero-who {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}
.db-hero-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--db-primary-soft);
    flex-shrink: 0;
}
.db-eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--db-primary);
    margin: 0 0 4px;
}
.db-hero-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--db-ink);
    margin: 0;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.db-hero-desc {
    font-size: 15px;
    color: var(--db-muted);
    margin: 4px 0 0;
    line-height: 1.5;
}
.db-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    border-top: 1px solid var(--db-line);
}
.db-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-right: 1px solid var(--db-line);
    min-width: 0;
}
.db-stat:last-child { border-right: 0; }
.db-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
    background: var(--db-primary-soft);
    color: var(--db-primary);
}
.db-stat-icon.is-success { background: var(--db-success-soft); color: var(--db-success); }
.db-stat-icon.is-danger  { background: var(--db-danger-soft);  color: var(--db-danger); }
.db-stat-icon.is-warn    { background: var(--db-warn-soft);    color: var(--db-warn); }
.db-stat-value {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: var(--db-ink);
    line-height: 1.1;
    overflow-wrap: anywhere;
}
.db-stat-label {
    display: block;
    font-size: 13px;
    color: var(--db-muted);
    margin-top: 2px;
}

/* ---------- Buttons ---------- */
.db-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--db-radius-sm);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.db-btn:hover, .db-btn:focus-visible { text-decoration: none; }
.db-btn-primary { background: var(--db-primary); color: #fff; }
.db-btn-primary:hover { background: var(--db-primary-ink); color: #fff; }
.db-btn-outline { background: #fff; color: var(--db-primary); border-color: #c9d6fb; }
.db-btn-outline:hover { background: var(--db-primary-soft); color: var(--db-primary-ink); }
.db-btn-ghost { background: transparent; color: var(--db-muted); }
.db-btn-ghost:hover { background: var(--db-bg); color: var(--db-ink); }
.db-btn-dark { background: var(--db-ink); color: #fff; }
.db-btn-dark:hover { background: #000; color: #fff; }
.db-btn-block { width: 100%; }
.db-btn-sm { padding: 7px 12px; font-size: 13px; }
.db-btn:disabled, .db-btn.is-disabled { opacity: .55; pointer-events: none; }

/* ---------- Badges ---------- */
.db-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    background: var(--db-bg);
    color: var(--db-text);
    text-transform: capitalize;
}
.db-badge.is-success { background: var(--db-success-soft); color: var(--db-success); }
.db-badge.is-danger  { background: var(--db-danger-soft);  color: var(--db-danger); }
.db-badge.is-warn    { background: var(--db-warn-soft);    color: var(--db-warn); }
.db-badge.is-info    { background: var(--db-info-soft);    color: var(--db-info); }
.db-badge.is-primary { background: var(--db-primary-soft); color: var(--db-primary-ink); }
.db-badge.is-verified { background: #f3e8ff; color: #6b21a8; }

/* ---------- Tip / notice bar ---------- */
.db-tip {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--db-info-soft);
    color: var(--db-info);
    border-radius: var(--db-radius-sm);
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
}
.db-tip i { margin-top: 3px; }

/* ---------- Steps (Next steps / How it works) ---------- */
.db-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}
.db-step {
    position: relative;
    border: 1px solid var(--db-line);
    border-radius: var(--db-radius-sm);
    padding: 16px;
    background: #fff;
    min-width: 0;
}
.db-step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--db-primary-soft);
    color: var(--db-primary);
    font-weight: 800;
    font-size: 14px;
    margin-bottom: 10px;
}
.db-step.is-done .db-step-num { background: var(--db-success); color: #fff; }
.db-step-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--db-ink);
    margin: 0 0 4px;
}
.db-step-text {
    font-size: 14px;
    color: var(--db-muted);
    margin: 0 0 10px;
    line-height: 1.5;
}
.db-step-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--db-primary);
    text-decoration: none;
}
.db-step-link:hover { color: var(--db-primary-ink); text-decoration: underline; }

/* ---------- Listing cards (grid, Clutch-like provider cards) ---------- */
.db-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
}
.db-listing {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--db-line);
    border-radius: var(--db-radius);
    overflow: hidden;
    box-shadow: var(--db-shadow);
    min-width: 0;
    transition: box-shadow .2s ease, transform .2s ease;
}
.db-listing:hover {
    box-shadow: 0 8px 24px rgba(16, 24, 40, .10);
    transform: translateY(-2px);
}
.db-listing-img {
    display: block;
    aspect-ratio: 16 / 10;
    background: var(--db-bg);
    overflow: hidden;
}
.db-listing-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.db-listing-body {
    padding: 14px 16px 6px;
    flex: 1;
    min-width: 0;
}
.db-listing-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.db-listing-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--db-ink);
    margin: 0 0 6px;
    overflow-wrap: anywhere;
}
.db-listing-title a { color: inherit; text-decoration: none; }
.db-listing-title a:hover { color: var(--db-primary); }
.db-listing-meta {
    font-size: 13px;
    color: var(--db-muted);
    margin: 0;
    display: flex;
    gap: 6px;
    align-items: flex-start;
    overflow-wrap: anywhere;
}
.db-listing-meta i { margin-top: 3px; }
.db-listing-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--db-line);
    margin-top: 10px;
}
.db-price { font-weight: 700; color: var(--db-ink); font-size: 15px; }

/* ---------- Empty state ---------- */
.db-empty {
    text-align: center;
    padding: 40px 20px;
}
.db-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--db-primary-soft);
    color: var(--db-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 14px;
}
.db-empty h3 { font-size: 18px; font-weight: 700; color: var(--db-ink); margin: 0 0 6px; }
.db-empty p { color: var(--db-muted); margin: 0 0 16px; font-size: 14px; }

/* ---------- Toolbar (filters) ---------- */
.db-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.db-toolbar form { display: flex; gap: 10px; flex-wrap: wrap; }
.db-toolbar select {
    height: 40px;
    border: 1px solid var(--db-line);
    border-radius: var(--db-radius-sm);
    padding: 0 12px;
    font-size: 14px;
    color: var(--db-ink);
    background: #fff;
    min-width: 150px;
}

/* ---------- Pagination ---------- */
.db-wrap .pagination { gap: 4px; flex-wrap: wrap; margin: 20px 0 0; }
.db-wrap .pagination .page-link {
    border-radius: 8px !important;
    border: 1px solid var(--db-line);
    color: var(--db-text);
    font-size: 14px;
}
.db-wrap .pagination .page-item.active .page-link {
    background: var(--db-primary);
    border-color: var(--db-primary);
}

/* ---------- Plans (become an agent) ---------- */
.db-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
}
.db-plan {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--db-line);
    border-radius: var(--db-radius);
    padding: 22px;
    box-shadow: var(--db-shadow);
    min-width: 0;
}
.db-plan.is-featured {
    border: 2px solid var(--db-primary);
    box-shadow: 0 10px 30px rgba(31, 79, 216, .15);
}
.db-plan-flag {
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--db-primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
}
.db-plan-name { font-size: 18px; font-weight: 800; color: var(--db-ink); margin: 0 0 4px; }
.db-plan-sub { font-size: 14px; color: var(--db-muted); margin: 0 0 14px; min-height: 40px; }
.db-plan-price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 14px; }
.db-plan-price strong { font-size: 30px; font-weight: 800; color: var(--db-ink); line-height: 1; }
.db-plan-price span { font-size: 14px; color: var(--db-muted); }
.db-checklist {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
    display: grid;
    gap: 10px;
    flex: 1;
}
.db-checklist li {
    display: flex;
    gap: 10px;
    font-size: 14px;
    color: var(--db-text);
    line-height: 1.4;
}
.db-checklist li i { color: var(--db-success); margin-top: 3px; }

/* ---------- FAQ ---------- */
.db-faq .accordion-item {
    border: 1px solid var(--db-line);
    border-radius: var(--db-radius-sm) !important;
    margin-bottom: 10px;
    overflow: hidden;
}
.db-faq .accordion-button {
    font-weight: 600;
    color: var(--db-ink);
    font-size: 15px;
    box-shadow: none;
}
.db-faq .accordion-button:not(.collapsed) {
    background: var(--db-primary-soft);
    color: var(--db-primary-ink);
}
.db-faq .accordion-body { font-size: 14px; color: var(--db-muted); line-height: 1.6; }

/* ---------- Mobile menu button ---------- */
.db-menu-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid var(--db-line);
    border-radius: var(--db-radius-sm);
    padding: 9px 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--db-ink);
    margin-bottom: 14px;
}

/* ---------- Sidebar (user panel) ---------- */
.dsb-wrap .offcanvas-body,
.dsb-wrap.offcanvas-lg .offcanvas-body {
    padding: 0;
}
.dsb-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.dsb-user {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 4px 0;
}
.dsb-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.dsb-name {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--db-ink);
    overflow-wrap: anywhere;
}
.dsb-email {
    display: block;
    font-size: 12px;
    color: var(--db-muted);
    overflow-wrap: anywhere;
}
.dsb-body {
    background: #fff;
    border: 1px solid var(--db-line);
    border-radius: var(--db-radius);
    box-shadow: var(--db-shadow);
    padding: 14px;
    margin-bottom: 20px;
    font-family: Inter, system-ui, sans-serif;
}
.dsb-role { padding: 4px 6px 12px; border-bottom: 1px solid var(--db-line); margin-bottom: 12px; }
.dsb-group { margin-bottom: 14px; }
.dsb-group-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--db-muted);
    margin: 4px 8px 6px;
}
.dsb-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.dsb-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--db-radius-sm);
    color: var(--db-text);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    position: relative;
    transition: background .15s ease, color .15s ease;
}
.dsb-link i {
    width: 18px;
    text-align: center;
    color: var(--db-muted);
    font-size: 15px;
}
.dsb-link:hover { background: var(--db-bg); color: var(--db-ink); }
.dsb-link.active {
    background: var(--db-primary-soft);
    color: var(--db-primary-ink);
    font-weight: 700;
}
.dsb-link.active i { color: var(--db-primary); }
.dsb-link.active::before {
    content: "";
    position: absolute;
    left: -14px;
    top: 8px;
    bottom: 8px;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: var(--db-primary);
}
.dsb-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: var(--db-radius-sm);
    border: 1px solid var(--db-line);
    background: #fff;
    color: var(--db-danger);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}
.dsb-logout:hover { background: var(--db-danger-soft); color: var(--db-danger); }

/* ---------- Auth (register) ---------- */
.db-auth-wrap {
    background: var(--db-bg);
    padding: 40px 0 72px;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--db-text);
}
.db-auth-card {
    background: #fff;
    border: 1px solid var(--db-line);
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(16, 24, 40, .08);
    padding: 34px;
    height: 100%;
    min-width: 0;
}
.db-auth-title { font-size: 26px; font-weight: 800; color: var(--db-ink); margin: 0 0 6px; }
.db-auth-sub { font-size: 15px; color: var(--db-muted); margin: 0 0 24px; line-height: 1.5; }
.db-field { margin-bottom: 16px; }
.db-field label { display: block; font-size: 14px; font-weight: 600; color: var(--db-ink); margin-bottom: 6px; }
.db-field label .req { color: var(--db-danger); }
.db-input {
    width: 100%;
    height: 46px;
    border: 1px solid #cfd6e4;
    border-radius: var(--db-radius-sm);
    padding: 0 14px;
    font-size: 15px;
    color: var(--db-ink);
    background: #fff;
}
.db-input:focus {
    outline: none;
    border-color: var(--db-primary);
    box-shadow: 0 0 0 3px rgba(31, 79, 216, .15);
}
.db-input.is-invalid { border-color: var(--db-danger); }
.db-error { color: var(--db-danger); font-size: 13px; margin-top: 5px; display: block; }
.db-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--db-text); margin-bottom: 18px; }
.db-check input { margin-top: 4px; }
.db-or {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--db-muted);
    font-size: 13px;
    margin: 16px 0;
}
.db-or::before, .db-or::after { content: ""; flex: 1; height: 1px; background: var(--db-line); }
.db-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 46px;
    border: 1px solid #cfd6e4;
    border-radius: var(--db-radius-sm);
    background: #fff;
    color: var(--db-ink);
    font-weight: 600;
    text-decoration: none;
    font-size: 15px;
}
.db-google:hover { background: var(--db-bg); color: var(--db-ink); }
.db-aside-card {
    background: linear-gradient(160deg, #1b2a5c 0%, #1f4fd8 100%);
    color: #fff;
    border-radius: 18px;
    padding: 34px;
    height: 100%;
    min-width: 0;
}
.db-aside-card h2 { color: #fff; font-size: 24px; font-weight: 800; margin: 0 0 8px; }
.db-aside-card > p { color: rgba(255,255,255,.85); font-size: 15px; margin: 0 0 22px; line-height: 1.5; }
.db-aside-steps { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 14px; }
.db-aside-steps li { display: flex; gap: 12px; align-items: flex-start; }
.db-aside-steps .n {
    width: 30px; height: 30px; border-radius: 50%;
    background: rgba(255,255,255,.18); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 14px; flex-shrink: 0;
}
.db-aside-steps strong { display: block; color: #fff; font-size: 15px; }
.db-aside-steps span { display: block; color: rgba(255,255,255,.8); font-size: 14px; line-height: 1.45; }
.db-aside-card .db-btn-light { background: #fff; color: var(--db-primary-ink); }
.db-aside-card .db-btn-light:hover { background: var(--db-primary-soft); color: var(--db-primary-ink); }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .db-wrap { padding: 16px 0 48px; }
    .db-menu-toggle { display: inline-flex; }
    .db-stat { border-right: 0; border-bottom: 1px solid var(--db-line); }
    .db-stat:last-child { border-bottom: 0; }
    .db-auth-card, .db-aside-card { padding: 26px; }
}

@media (max-width: 575.98px) {
    .db-wrap .container,
    .db-auth-wrap .container { padding-left: 16px; padding-right: 16px; }
    .db-hero-top { padding: 18px 16px 14px; }
    .db-hero-avatar { width: 52px; height: 52px; }
    .db-hero-title { font-size: 20px; }
    .db-stats { grid-template-columns: 1fr; }
    .db-stat { padding: 14px 16px; border-right: 0; border-bottom: 1px solid var(--db-line); }
    .db-stat:last-child { border-bottom: 0; }
    .db-stat-value { white-space: normal; }
    .db-card { padding: 16px; }
    .db-grid { grid-template-columns: 1fr; }
    .db-btn { white-space: normal; }
    .db-toolbar select { flex: 1 1 100%; min-width: 0; }
    .db-toolbar form { width: 100%; }
    .db-toolbar form .db-btn { width: 100%; }
    .db-auth-title { font-size: 22px; }
    .db-auth-card, .db-aside-card { padding: 22px 18px; }
}

/* ---------- Live chat ---------- */
.db-chat-card { padding: 0; overflow: hidden; }
.db-chat {
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
    min-height: 540px;
}
.db-chat-list {
    border-right: 1px solid var(--db-line);
    padding: 18px;
    overflow-y: auto;
    max-height: 640px;
    min-width: 0;
}
.db-chat-thread {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: var(--db-radius-sm);
    text-decoration: none;
    color: var(--db-text);
    margin-bottom: 4px;
    min-width: 0;
}
.db-chat-thread img { border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.db-chat-thread:hover { background: var(--db-bg); color: var(--db-ink); }
.db-chat-thread.is-active { background: var(--db-primary-soft); }
.db-chat-name {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--db-ink);
    overflow-wrap: anywhere;
}
.db-chat-date { display: block; color: var(--db-muted); font-size: 12px; }
.db-chat-unread {
    background: var(--db-danger);
    color: #fff;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.db-chat-pane { display: flex; flex-direction: column; min-width: 0; }
.db-chat-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--db-line);
}
.db-chat-head img { border-radius: 50%; object-fit: cover; }
.db-chat-status { display: block; font-size: 12px; color: var(--db-muted); }
.db-chat-status.is-live { color: var(--db-success); font-weight: 600; }
.db-chat-status.is-live::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--db-success);
    margin-right: 6px;
    vertical-align: middle;
}
.db-chat-body { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.db-chat-msgs {
    list-style: none;
    margin: 0;
    padding: 18px;
    flex: 1;
    overflow-y: auto;
    min-height: 360px;
    max-height: 480px;
    background: var(--db-bg);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.db-msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 80%; }
.db-msg.is-mine { align-self: flex-end; align-items: flex-end; }
.db-bubble {
    background: #fff;
    border: 1px solid var(--db-line);
    color: var(--db-ink);
    padding: 9px 13px;
    border-radius: 14px 14px 14px 4px;
    font-size: 15px;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.db-msg.is-mine .db-bubble {
    background: var(--db-primary);
    border-color: var(--db-primary);
    color: #fff;
    border-radius: 14px 14px 4px 14px;
}
.db-msg-time { font-size: 11px; color: var(--db-muted); margin-top: 3px; }
.db-chat-empty { text-align: center; color: var(--db-muted); margin: auto; font-size: 14px; }
.db-chat-form {
    display: flex;
    gap: 10px;
    padding: 14px;
    border-top: 1px solid var(--db-line);
    background: #fff;
}
.db-chat-form .db-input { flex: 1; min-width: 0; }
.db-chat-placeholder {
    margin: auto;
    text-align: center;
    padding: 40px 20px;
}
.db-chat-placeholder h3 { font-size: 18px; font-weight: 700; color: var(--db-ink); margin: 0 0 6px; }
.db-chat-placeholder p { color: var(--db-muted); margin: 0; font-size: 14px; }

@media (max-width: 767.98px) {
    .db-chat { grid-template-columns: 1fr; min-height: 0; }
    .db-chat-list { border-right: 0; border-bottom: 1px solid var(--db-line); max-height: 220px; }
    .db-chat-msgs { min-height: 300px; max-height: 55vh; }
    .db-msg { max-width: 88%; }
    .db-chat-form .db-btn span { display: none; }
}
