/**
 * HouseList Dashboard - Custom Styles
 */

/* =====================
   CSS Variables
   ===================== */
#houselist-dash-wrapper {
    /* Surface */
    --hl-bg-body:       #ffffff;
    --hl-bg-surface:    #ffffff;
    --hl-bg-hover:      #f3f4f6;
    --hl-bg-active:     #f0f0f0;
    --hl-bg-deep:       #ffffff;

    /* Borders */
    --hl-border:        #e5e7eb;
    --hl-border-light:  #f3f4f6;

    /* Text */
    --hl-text-primary:  #111827;
    --hl-text-secondary:#4b5563;
    --hl-text-muted:    #6b7280;
    --hl-text-faint:    #9ca3af;
    --hl-text-disabled: #d1d5db;

    /* Accent — full indigo palette (skinnable via Branding) */
    --hl-indigo:        #4f46e5;
    --hl-indigo-light:  #6366f1;
    --hl-indigo-hover:  #4338ca;
    --hl-indigo-400:    #818cf8;
    --hl-indigo-300:    #a5b4fc;
    --hl-indigo-200:    #c7d2fe;
    --hl-indigo-100:    #e0e7ff;
    --hl-indigo-50:     #eef2ff;

    /* Tooltip */
    --hl-tooltip-bg:    #1f2937;
    --hl-tooltip-text:  #ffffff;

    /* Logout */
    --hl-red:           #dc2626;
    --hl-red-bg:        #fef2f2;

    /* Scrollbar */
    --hl-scrollbar:     #d1d5db;

    /* Shadow */
    --hl-shadow-hover:  rgba(0,0,0,.07);

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Dark Mode Variables */
#houselist-dash-wrapper.houselist-dark {
    /* Surface */
    --hl-bg-body:       #0d0d0d;
    --hl-bg-surface:    #1a1a1a;
    --hl-bg-hover:      #2a2a2a;
    --hl-bg-active:     #2a2a2a;
    --hl-bg-deep:       #0d0d0d;

    /* Borders */
    --hl-border:        #2a2a2a;
    --hl-border-light:  #2a2a2a;

    /* Text */
    --hl-text-primary:  #f0f0f0;
    --hl-text-secondary:#999999;
    --hl-text-muted:    #666666;
    --hl-text-faint:    #666666;
    --hl-text-disabled: #3a3a3a;

    /* Accent — full indigo palette (skinnable via Branding) */
    --hl-indigo:        #4f46e5;
    --hl-indigo-light:  #6366f1;
    --hl-indigo-hover:  #4338ca;
    --hl-indigo-400:    #818cf8;
    --hl-indigo-300:    #a5b4fc;
    --hl-indigo-200:    #c7d2fe;
    --hl-indigo-100:    #e0e7ff;
    --hl-indigo-50:     #eef2ff;

    /* Tooltip (inverted in dark) */
    --hl-tooltip-bg:    #f0f0f0;
    --hl-tooltip-text:  #0d0d0d;

    /* Logout */
    --hl-red:           #f87171;
    --hl-red-bg:        rgba(239, 68, 68, 0.12);

    /* Scrollbar */
    --hl-scrollbar:     #3a3a3a;

    /* Shadow */
    --hl-shadow-hover:  rgba(0,0,0,.25);

    background-color: var(--hl-bg-body);
    color: #e0e0e0;
}

/* Admin bar offset */
.admin-bar .houselist-dash-sidebar {
    top: 32px;
    height: calc(100vh - 32px);
}

@media screen and (max-width: 782px) {
    .admin-bar .houselist-dash-sidebar {
        top: 46px;
        height: calc(100vh - 46px);
    }
}

/* =====================
   Sidebar
   ===================== */
.houselist-dash-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    z-index: 20;
    background: var(--hl-bg-surface);
    border-right: 1px solid var(--hl-border);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.houselist-vectorize-page .houselist-vector-badge {
    position: absolute;
    bottom: 35px;
    left: 12px;
}
.houselist-dash-sidebar-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* ---- Floating Toggle Button ---- */
.houselist-dash-sidebar-toggle {
    position: absolute;
    top: 28px;
    right: -14px;
    width: 28px;
    height: 28px;
    background: var(--hl-bg-surface);
    border: 1px solid var(--hl-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 25;
    color: var(--hl-text-muted);
    transition: background-color 0.2s, color 0.2s, transform 0.2s;
    padding: 0;
}

.houselist-dash-sidebar-toggle:hover {
    background: var(--hl-bg-hover);
    color: var(--hl-text-primary);
    transform: scale(1.1);
}

/* ---- Logo ---- */
.houselist-dash-logo {
    padding: 20px 16px 16px;
    border-bottom: 1px solid var(--hl-border);
}

.houselist-dash-logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.houselist-dash-logo-icon {
    width: 40px;
    height: 40px;
    background: var(--hl-indigo);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-radius 0.3s ease;
}

.houselist-dash-logo-title {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--hl-text-primary);
    line-height: 1.2;
}

.houselist-dash-logo-subtitle {
    display: block;
    font-size: 12px;
    color: var(--hl-text-faint);
    line-height: 1.3;
}

/* Logo image variants (dark/light switching) */
.houselist-dash-logo-img-link {
    justify-content: left;
}
.houselist-dash-logo-img-link img {
    max-height: 38px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}
.houselist-dash-logo-dark {
    display: block;
}
.houselist-dash-logo-light {
    display: none;
}
.houselist-dark .houselist-dash-logo-dark {
    display: none;
}
.houselist-dark .houselist-dash-logo-light {
    display: block;
}
/* If only one logo variant is set, always show it */
.houselist-dash-logo-dark:only-child,
.houselist-dash-logo-light:only-child {
    display: block !important;
}

/* Icon logos: hidden by default, shown only when collapsed */
.houselist-dash-logo-icon-link {
    display: none;
}
.houselist-dash-logo-icon-link img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}
/* When collapsed and icon logos exist: hide full logos, show icon logos */
.houselist-sidebar-collapsed .houselist-dash-logo-full.houselist-has-icon {
    display: none;
}
.houselist-sidebar-collapsed .houselist-dash-logo-icon-link {
    display: flex;
}

/* ---- Nav Labels ---- */
.houselist-dash-nav-label {
    white-space: nowrap;
    overflow: hidden;
    transition: opacity 0.2s ease, width 0.3s ease;
}

/* Nav group headings */
.houselist-dash-nav-heading {
    padding: 16px 10px 4px;
}
.houselist-dash-nav-heading .houselist-dash-nav-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--hl-text-faint);
}
.houselist-sidebar-collapsed .houselist-dash-nav-heading {
    padding: 12px 0 4px;
    text-align: center;
}
.houselist-sidebar-collapsed .houselist-dash-nav-heading .houselist-dash-nav-label {
    display: none;
}
.houselist-sidebar-collapsed .houselist-dash-nav-heading::after {
    content: '';
    display: block;
    width: 16px;
    height: 1px;
    background: var(--hl-border);
    margin: 0 auto;
}

/* ---- Navigation ---- */
.houselist-dash-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 12px;
    scrollbar-width: none;          /* Firefox */
    -ms-overflow-style: none;       /* IE / Edge */
}

.houselist-dash-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.houselist-dash-nav-item {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 4px;
    border-radius: 6px;
    color: var(--hl-text-secondary);
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    position: relative;
}

.houselist-dash-nav-item:hover {
    background: var(--hl-bg-hover);
    color: var(--hl-text-primary);
}

.houselist-dash-nav-item.active {
    background: var(--hl-bg-active);
    color: var(--hl-text-primary);
    font-weight: 600;
}

/* ---- Nav Icon Container ---- */
.houselist-dash-nav-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    flex-shrink: 0;
    transition: background-color 0.2s;
}
.houselist-dash-nav-icon svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}


/* ---- Sidebar Footer (Logout) ---- */
.houselist-dash-sidebar-footer {
    border-top: 1px solid var(--hl-border);
    padding: 12px;
    margin-top: auto;
}

.houselist-dash-nav-logout {
    color: var(--hl-red) !important;
}

.houselist-dash-nav-logout:hover {
    background: var(--hl-red-bg) !important;
}

/* ---- Sidebar Scrollbar ---- */
.houselist-dash-nav::-webkit-scrollbar {
    display: none;                  /* Chrome / Safari / Edge */
}

/* ---- Content offset ---- */
.houselist-dash-right {
    margin-left: 250px;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =====================
   Collapsed Sidebar
   ===================== */
.houselist-sidebar-collapsed .houselist-dash-sidebar {
    width: 76px;
}

.houselist-sidebar-collapsed .houselist-dash-right {
    margin-left: 76px;
}

/* Labels hidden */
.houselist-sidebar-collapsed .houselist-dash-nav-label {
    opacity: 0;
    width: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Center nav items */
.houselist-sidebar-collapsed .houselist-dash-nav-item {
    justify-content: center;
    padding: 8px;
    gap: 0;
}

/* Center logo */
.houselist-sidebar-collapsed .houselist-dash-logo {
    padding: 16px 12px;
    display: flex;
    justify-content: center;
}

.houselist-sidebar-collapsed .houselist-dash-logo-link {
    justify-content: center;
    gap: 0;
}

.houselist-sidebar-collapsed .houselist-dash-logo-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
}

.houselist-sidebar-collapsed .houselist-dash-logo-img-link img {
    max-height: 32px;
}

/* Center nav padding */
.houselist-sidebar-collapsed .houselist-dash-nav {
    padding: 12px 10px;
}

.houselist-sidebar-collapsed .houselist-dash-nav ul {
    align-items: center;
}

/* Center footer */
.houselist-sidebar-collapsed .houselist-dash-sidebar-footer {
    padding: 12px 10px;
    display: flex;
    justify-content: center;
}

/* =====================
   Tooltips (collapsed only)
   ===================== */
.houselist-sidebar-collapsed .houselist-dash-nav-item::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 14px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--hl-tooltip-bg);
    color: var(--hl-tooltip-text);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 50;
}

.houselist-sidebar-collapsed .houselist-dash-nav-item::before {
    content: "";
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-right-color: var(--hl-tooltip-bg);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 50;
}

.houselist-sidebar-collapsed .houselist-dash-nav-item:hover::after,
.houselist-sidebar-collapsed .houselist-dash-nav-item:hover::before {
    opacity: 1;
}

/* =====================
   Top Bar
   ===================== */
.houselist-dash-topbar {
    position: sticky;
    top: 0;
    z-index: 10;
}

.houselist-dash-topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.houselist-dash-topbar-left-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.houselist-dash-topbar-right-group {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

/* Avatar */
.houselist-dash-avatar {
    flex-shrink: 0;
}

/* =====================
   Stats Cards
   ===================== */
.houselist-dash-stat-card {
    transition: transform 0.2s ease;
}

.houselist-dash-stat-card:hover {
    transform: translateY(-2px);
}

/* Quick Actions */
.houselist-dash-quick-actions {
    margin-top: 0;
}

.qz-qa-header {
    margin-bottom: 20px;
}

.qz-qa-heading {
    font-size: 18px;
    font-weight: 700;
    color: var(--hl-text-primary);
    margin: 0 0 4px;
    letter-spacing: -.2px;
}

.qz-qa-sub {
    font-size: 13px;
    color: var(--hl-text-faint);
    margin: 0;
}

.qz-qa-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

@media (max-width: 1024px) {
    .qz-qa-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .qz-qa-grid { grid-template-columns: 1fr; }
}

.qz-qa-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--hl-bg-surface);
    border: 1.5px solid var(--hl-border-light);
    border-radius: 14px;
    text-decoration: none;
    transition: border-color .18s, box-shadow .18s, transform .18s;
    position: relative;
    overflow: hidden;
}

.qz-qa-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--qa-bg);
    opacity: 0;
    transition: opacity .18s;
    border-radius: inherit;
}

.qz-qa-card:hover {
    border-color: var(--qa-color);
    box-shadow: 0 4px 20px var(--hl-shadow-hover);
    transform: translateY(-2px);
    text-decoration: none;
}

.qz-qa-card:hover::before {
    opacity: 1;
}

.qz-qa-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--qa-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--qa-color);
    position: relative;
    z-index: 1;
    transition: background .18s;
}

.qz-qa-card:hover .qz-qa-icon {
    background: var(--qa-color);
    color: #fff;
}

.qz-qa-text {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.qz-qa-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--hl-text-primary);
    line-height: 1.3;
    margin-bottom: 2px;
    transition: color .18s;
}

.qz-qa-card:hover .qz-qa-label {
    color: var(--qa-color);
}

.qz-qa-desc {
    display: block;
    font-size: 12px;
    color: var(--hl-text-faint);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color .18s;
}

.qz-qa-card:hover .qz-qa-desc {
    color: var(--hl-text-muted);
}

.qz-qa-arrow {
    flex-shrink: 0;
    color: var(--hl-text-disabled);
    position: relative;
    z-index: 1;
    transition: color .18s, transform .18s;
}

.qz-qa-card:hover .qz-qa-arrow {
    color: var(--qa-color);
    transform: translateX(2px);
}

/* Messages */
#houselist-dash-messages {
    animation: houselist-dash-slideDown 0.3s ease-in-out;
}

.houselist-dash-message-content {
    animation: houselist-dash-slideDown 0.3s ease-in-out;
}

.houselist-dash-message-error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.houselist-dash-message-success {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.houselist-dash-message-warning {
    background-color: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

@keyframes houselist-dash-slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Form Inputs Focus */
.houselist-dash-settings-form input:focus {
    outline: none;
}

/* Submit Button Loading State */
.houselist-dash-submit-btn[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
}

/* =====================
   Dark Mode Overrides
   (Only rules that can't be covered by variables)
   ===================== */

/* Dark - Sidebar toggle border uses a lighter shade than --hl-border */
.houselist-dark .houselist-dash-sidebar-toggle {
    border-color: #3a3a3a;
    color: #cccccc;
}


/* Dark - Mobile close button */
.houselist-dark .houselist-mobile-close-btn {
    background: var(--hl-bg-hover);
    border-color: #3a3a3a;
    color: #cccccc;
}

/* Dark - Collapsed icon containers */
.houselist-dark.houselist-sidebar-collapsed .houselist-dash-nav-icon {
    background: var(--hl-bg-hover);
}


/* Dark - Topbar */
.houselist-dark .houselist-dash-topbar {
    background-color: var(--hl-bg-surface);
    border-color: var(--hl-border);
}

.houselist-dark .houselist-dash-breadcrumbs a {
    color: var(--hl-text-muted);
}

.houselist-dark .houselist-dash-breadcrumbs a:hover {
    color: #cccccc;
}

.houselist-dark .houselist-dash-breadcrumbs span.text-gray-800 {
    color: var(--hl-text-primary);
}

.houselist-dark .houselist-dash-breadcrumbs svg.text-gray-300 {
    color: #3a3a3a;
}

/* Dark - Topbar subscription badges */
.houselist-dark .houselist-dash-topbar-subscription .bg-green-100 {
    background-color: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.houselist-dark .houselist-dash-topbar-subscription .bg-green-100 .bg-green-500 {
    background-color: #4ade80;
}

.houselist-dark .houselist-dash-topbar-subscription .bg-gray-100 {
    background-color: var(--hl-bg-hover);
    color: var(--hl-text-secondary);
}

/* Dark - Topbar credits badge */
.houselist-dark .houselist-dash-credits-badge {
    border-color: #3a3a3a;
    color: #cccccc;
}
.houselist-dark .houselist-dash-credits-badge:hover {
    background-color: var(--hl-bg-hover);
}

/* Dark - User dropdown */
.houselist-dark .houselist-dash-user-dropdown {
    background-color: var(--hl-bg-surface);
    border-color: var(--hl-border);
}
.houselist-dark .houselist-dash-user-dropdown .border-gray-100 {
    border-color: var(--hl-border);
}
.houselist-dark .houselist-dash-user-dropdown p.text-gray-800 {
    color: var(--hl-text-primary);
}
.houselist-dark .houselist-dash-user-dropdown p.text-gray-500 {
    color: var(--hl-text-muted);
}
.houselist-dark .houselist-dash-user-dropdown-item {
    color: #cccccc;
}
.houselist-dark .houselist-dash-user-dropdown-item:hover {
    background-color: var(--hl-bg-hover);
}
.houselist-dark .houselist-dash-user-dropdown-item svg {
    color: var(--hl-text-muted);
}

/* Dark - Topbar theme toggle */
.houselist-dark .houselist-dash-theme-toggle {
    color: var(--hl-text-secondary);
}

.houselist-dark .houselist-dash-theme-toggle:hover {
    background-color: var(--hl-bg-hover);
    color: var(--hl-text-primary);
}

/* Dark - Topbar separator */
.houselist-dark .houselist-dash-topbar .w-px {
    background-color: var(--hl-border);
}

/* Dark - Main Content */
.houselist-dark .houselist-dash-main-content {
    background-color: var(--hl-bg-body);
}

.houselist-dark .houselist-dash-main-content h1,
.houselist-dark .houselist-dash-main-content h2,
.houselist-dark .houselist-dash-main-content h3 {
    color: var(--hl-text-primary);
}

.houselist-dark .houselist-dash-main-content p.text-gray-600 {
    color: var(--hl-text-secondary);
}

/* Dark - Stats Cards */
.houselist-dark .houselist-dash-stat-card {
    background-color: var(--hl-bg-surface);
    border-color: var(--hl-border);
}

.houselist-dark .houselist-dash-stat-card h3 { color: var(--hl-text-primary); }
.houselist-dark .houselist-dash-stat-card p { color: var(--hl-text-secondary); }

.houselist-dark .houselist-dash-stat-card:hover {
    border-color: #3a3a3a;
}

/* Dark - Stats icon backgrounds */
.houselist-dark .houselist-dash-stat-icon.bg-blue-100 {
    background-color: rgba(59, 130, 246, 0.15);
}

.houselist-dark .houselist-dash-stat-icon.bg-green-100 {
    background-color: rgba(34, 197, 94, 0.15);
}

.houselist-dark .houselist-dash-stat-icon.bg-purple-100 {
    background-color: rgba(168, 85, 247, 0.15);
}

/* Dark - Quick Actions (label/desc handled by variables above) */
.houselist-dark .qz-qa-label { color: #e0e0e0; }

/* Dark - Settings Form */
.houselist-dark .houselist-dash-settings-form {
    background-color: var(--hl-bg-surface);
    border-color: var(--hl-border);
}

.houselist-dark .houselist-dash-settings-form label {
    color: #cccccc;
}

.houselist-dark .houselist-dash-settings-form input {
    background-color: var(--hl-bg-deep);
    border-color: var(--hl-border);
    color: var(--hl-text-primary);
}

.houselist-dark .houselist-dash-settings-form input:focus {
    border-color: var(--hl-indigo-light);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--hl-indigo-light) 25%, transparent);
}

.houselist-dark .houselist-dash-settings-form input:disabled {
    background-color: var(--hl-bg-surface);
    border-color: var(--hl-bg-surface);
    color: var(--hl-text-disabled);
}

.houselist-dark .houselist-dash-settings-form input::placeholder {
    color: var(--hl-text-disabled);
}

.houselist-dark .houselist-dash-settings-form p.text-gray-500 {
    color: var(--hl-text-muted);
}

.houselist-dark .houselist-dash-password-section {
    border-color: var(--hl-border);
}

/* Dark - Submit Button */
.houselist-dark .houselist-dash-submit-btn {
    background-color: var(--hl-indigo-light);
}

.houselist-dark .houselist-dash-submit-btn:hover {
    background-color: var(--hl-indigo);
}

.houselist-dark .houselist-dash-submit-btn:focus {
    box-shadow: 0 0 0 2px var(--hl-bg-body), 0 0 0 4px var(--hl-indigo-light);
}

/* Dark - Billing: Manage in Stripe button */
.houselist-dark .houselist-dash-billing > .flex button.houselist-stripe-portal {
    border-color: #3a3a3a;
    color: #cccccc;
}

.houselist-dark .houselist-dash-billing > .flex button.houselist-stripe-portal:hover {
    background-color: var(--hl-bg-hover);
}

/* Dark - Billing: Plan Card */
.houselist-dark .houselist-dash-plan-card {
    background-color: var(--hl-bg-surface);
    border-color: var(--hl-border);
}
.houselist-dark .houselist-dash-plan-card .border-gray-100 {
    border-color: var(--hl-border);
}
.houselist-dark .houselist-dash-plan-card .border-gray-200 {
    border-color: var(--hl-border);
}
.houselist-dark .houselist-dash-plan-card .border-gray-300 {
    border-color: #3a3a3a;
}
.houselist-dark .houselist-dash-plan-card .border-green-300 {
    border-color: rgba(34, 197, 94, 0.3);
}
.houselist-dark .houselist-dash-plan-card h2 { color: var(--hl-text-primary); }
.houselist-dark .houselist-dash-plan-card .text-gray-900 { color: var(--hl-text-primary); }
.houselist-dark .houselist-dash-plan-card .text-gray-700 { color: #cccccc; }
.houselist-dark .houselist-dash-plan-card .text-gray-600 { color: var(--hl-text-secondary); }
.houselist-dark .houselist-dash-plan-card .text-gray-500 { color: var(--hl-text-muted); }
.houselist-dark .houselist-dash-plan-card .text-indigo-600 { color: var(--hl-indigo-400); }
.houselist-dark .houselist-dash-plan-card .text-green-700 { color: #4ade80; }

/* Dark - Pricing Section */
.houselist-dark .houselist-dash-plans-section .text-gray-900 {
    color: var(--hl-text-primary);
}

/* Dark - Pricing Cards */
.houselist-dark .houselist-dash-plans-section .bg-white {
    background-color: var(--hl-bg-surface);
    border-color: var(--hl-border);
}

/* Popular card keeps its indigo border in dark */
.houselist-dark .houselist-dash-plans-section .border-indigo-600 {
    border-color: var(--hl-indigo-light);
}

.houselist-dark .houselist-dash-plans-section .border-indigo-600:hover {
    border-color: var(--hl-indigo-400);
}

/* Non-popular card hover in dark */
.houselist-dark .houselist-dash-plans-section .border-gray-200 {
    border-color: var(--hl-border);
}

.houselist-dark .houselist-dash-plans-section .hover\:border-indigo-500:hover {
    border-color: var(--hl-indigo-light);
}

/* Dark - Pricing card text */
.houselist-dark .houselist-dash-plans-section h3.text-gray-900 { color: var(--hl-text-primary); }
.houselist-dark .houselist-dash-plans-section span.text-gray-900 { color: var(--hl-text-primary); }
.houselist-dark .houselist-dash-plans-section span.text-gray-500 { color: var(--hl-text-muted); }
.houselist-dark .houselist-dash-plans-section p.text-gray-600 { color: var(--hl-text-secondary); }
.houselist-dark .houselist-dash-plans-section span.text-gray-700 { color: #cccccc; }

/* Dark - Pricing feature list */
.houselist-dark .houselist-dash-plans-section li span.text-gray-700 {
    color: #cccccc;
}

/* Dark - Pricing buttons: regular plan */
.houselist-dark .houselist-dash-plans-section .bg-gray-100 {
    background-color: var(--hl-bg-hover);
    color: #e0e0e0;
}

.houselist-dark .houselist-dash-plans-section .bg-gray-100:hover {
    background-color: #3a3a3a;
}

/* Dark - Pricing footer info */
.houselist-dark .houselist-dash-plans-section > .mt-12 p.text-gray-600 {
    color: var(--hl-text-muted);
}

.houselist-dark .houselist-dash-plans-section > .mt-12 .text-gray-500 {
    color: var(--hl-text-muted);
}

.houselist-dark .houselist-dash-plans-section > .mt-12 .text-sm {
    color: var(--hl-text-muted);
}

/* Dark - Messages */
.houselist-dark #houselist-dash-messages .bg-green-100 {
    background-color: rgba(34, 197, 94, 0.15);
    color: #86efac;
}

.houselist-dark #houselist-dash-messages .bg-red-100 {
    background-color: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

.houselist-dark .houselist-dash-message-error {
    background-color: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.3);
}

.houselist-dark .houselist-dash-message-success {
    background-color: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.3);
}

.houselist-dark .houselist-dash-message-warning {
    background-color: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.3);
}

/* Dark - "Plans not configured" empty state */
.houselist-dark .houselist-dash-plans-section .text-gray-500.text-lg {
    color: var(--hl-text-muted);
}

/* Dark - Invoices Card */
.houselist-dark .houselist-dash-invoices-card {
    background-color: var(--hl-bg-surface);
    border-color: var(--hl-border);
}

.houselist-dark .houselist-dash-invoices-card .border-gray-200 {
    border-color: var(--hl-border);
}

.houselist-dark .houselist-dash-invoices-card thead tr {
    border-bottom: 1px solid var(--hl-border);
}

.houselist-dark .houselist-dash-invoices-card tbody tr {
    border-color: var(--hl-border-light);
}

.houselist-dark .houselist-dash-invoices-card tbody tr:hover {
    background-color: var(--hl-bg-hover);
}

/* Dark - Billing: Trial banner */
.houselist-dark .houselist-dash-plan-card .border-amber-200 {
    border-color: rgba(245, 158, 11, 0.3);
}

.houselist-dark .houselist-dash-plan-card .bg-amber-50\/50 {
    background-color: rgba(245, 158, 11, 0.08);
}

.houselist-dark .houselist-dash-plan-card .text-amber-800 {
    color: #fbbf24;
}

.houselist-dark .houselist-dash-plan-card .text-amber-600 {
    color: #f59e0b;
}

.houselist-dark .houselist-dash-plan-card .text-amber-500 {
    color: #f59e0b;
}

/* Dark - Billing: Status badges */
.houselist-dark .houselist-dash-plan-card .border-amber-300 {
    border-color: rgba(245, 158, 11, 0.4);
    background-color: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
}

.houselist-dark .houselist-dash-plan-card .border-green-300.text-green-700 {
    border-color: rgba(34, 197, 94, 0.4);
    color: #4ade80;
}

/* =====================
   Dark Mode — Global Tailwind Utility Overrides
   Covers all form fields, labels, cards, and text across every dashboard view
   ===================== */

/* Backgrounds — #id selector beats single-class Tailwind utilities */
#houselist-dash-wrapper.houselist-dark .bg-white {
    background-color: var(--hl-bg-surface);
}

#houselist-dash-wrapper.houselist-dark .bg-gray-50 {
    background-color: var(--hl-bg-deep);
}

#houselist-dash-wrapper.houselist-dark .bg-gray-100 {
    background-color: var(--hl-bg-hover);
}

/* Borders */
#houselist-dash-wrapper.houselist-dark .border-gray-100 {
    border-color: var(--hl-border-light);
}

#houselist-dash-wrapper.houselist-dark .border-gray-200 {
    border-color: var(--hl-border);
}

#houselist-dash-wrapper.houselist-dark .border-gray-300 {
    border-color: #3a3a3a;
}

/* Text */
#houselist-dash-wrapper.houselist-dark .text-gray-800,
#houselist-dash-wrapper.houselist-dark .text-gray-900 {
    color: var(--hl-text-primary);
}

#houselist-dash-wrapper.houselist-dark .text-gray-700 {
    color: #cccccc;
}

#houselist-dash-wrapper.houselist-dark .text-gray-600 {
    color: var(--hl-text-secondary);
}

#houselist-dash-wrapper.houselist-dark .text-gray-500 {
    color: var(--hl-text-muted);
}

#houselist-dash-wrapper.houselist-dark .text-gray-400 {
    color: var(--hl-text-faint);
}

#houselist-dash-wrapper.houselist-dark .text-gray-300 {
    color: var(--hl-text-disabled);
}

#houselist-dash-wrapper.houselist-dark .text-gray-200 {
    color: #3a3a3a;
}

/* Form inputs, selects, textareas — global
   Uses #id for higher specificity to beat Tailwind utility classes */
#houselist-dash-wrapper.houselist-dark input[type="text"],
#houselist-dash-wrapper.houselist-dark input[type="email"],
#houselist-dash-wrapper.houselist-dark input[type="password"],
#houselist-dash-wrapper.houselist-dark input[type="number"],
#houselist-dash-wrapper.houselist-dark input[type="url"],
#houselist-dash-wrapper.houselist-dark input[type="search"],
#houselist-dash-wrapper.houselist-dark input[type="tel"],
#houselist-dash-wrapper.houselist-dark select,
#houselist-dash-wrapper.houselist-dark textarea {
    background-color: var(--hl-bg-deep);
    border-color: var(--hl-border);
    color: var(--hl-text-primary);
}

#houselist-dash-wrapper.houselist-dark input:focus,
#houselist-dash-wrapper.houselist-dark select:focus,
#houselist-dash-wrapper.houselist-dark textarea:focus {
    border-color: var(--hl-indigo-light);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--hl-indigo-light) 25%, transparent);
}

#houselist-dash-wrapper.houselist-dark input::placeholder,
#houselist-dash-wrapper.houselist-dark textarea::placeholder,
#houselist-dash-wrapper.houselist-dark select::placeholder {
    color: var(--hl-text-faint);
}

#houselist-dash-wrapper.houselist-dark input:disabled {
    background-color: var(--hl-bg-surface);
    color: var(--hl-text-disabled);
}

/* Labels */
#houselist-dash-wrapper.houselist-dark label {
    color: #cccccc;
}

/* Select option dropdown */
#houselist-dash-wrapper.houselist-dark select option {
    background-color: var(--hl-bg-surface);
    color: var(--hl-text-primary);
}

/* Divide utilities */
#houselist-dash-wrapper.houselist-dark .divide-gray-100 > :not([hidden]) ~ :not([hidden]) {
    border-color: var(--hl-border);
}

#houselist-dash-wrapper.houselist-dark .divide-gray-200 > :not([hidden]) ~ :not([hidden]) {
    border-color: var(--hl-border);
}

/* Dashed upload borders */
#houselist-dash-wrapper.houselist-dark .border-dashed {
    border-color: #3a3a3a;
}

/* Blue info boxes */
#houselist-dash-wrapper.houselist-dark .bg-blue-50 {
    background-color: color-mix(in srgb, var(--hl-indigo) 10%, transparent);
    border-color: color-mix(in srgb, var(--hl-indigo) 20%, transparent);
}

#houselist-dash-wrapper.houselist-dark .text-blue-800 {
    color: var(--hl-indigo-300);
}

#houselist-dash-wrapper.houselist-dark .text-blue-600 {
    color: var(--hl-indigo-400);
}

/* =====================
   Skinnable Indigo — Tailwind Utility Overrides
   Maps all bg-indigo-*, text-indigo-*, border-indigo-* classes to CSS vars
   so they respond to the dashboard skin color settings.
   ===================== */

/* Backgrounds */
#houselist-dash-wrapper .bg-indigo-600 {
    background-color: var(--hl-indigo);
}

#houselist-dash-wrapper .bg-indigo-50 {
    background-color: var(--hl-indigo-50);
}

#houselist-dash-wrapper .bg-indigo-50\/30 {
    background-color: color-mix(in srgb, var(--hl-indigo-50) 30%, transparent);
}

#houselist-dash-wrapper .bg-indigo-100 {
    background-color: var(--hl-indigo-100);
}

#houselist-dash-wrapper .bg-indigo-500 {
    background-color: var(--hl-indigo-light);
}

/* Hover backgrounds */
#houselist-dash-wrapper .hover\:bg-indigo-700:hover {
    background-color: var(--hl-indigo-hover);
}

#houselist-dash-wrapper .hover\:bg-indigo-50:hover {
    background-color: var(--hl-indigo-50);
}

#houselist-dash-wrapper .hover\:bg-indigo-100:hover {
    background-color: var(--hl-indigo-100);
}

#houselist-dash-wrapper .hover\:bg-indigo-50\/30:hover {
    background-color: color-mix(in srgb, var(--hl-indigo-50) 30%, transparent);
}

/* Text colors */
#houselist-dash-wrapper .text-indigo-600 {
    color: var(--hl-indigo);
}

#houselist-dash-wrapper .text-indigo-700 {
    color: var(--hl-indigo-hover);
}

#houselist-dash-wrapper .text-indigo-400 {
    color: var(--hl-indigo-400);
}

#houselist-dash-wrapper .text-indigo-500 {
    color: var(--hl-indigo-light);
}

/* Hover text */
#houselist-dash-wrapper .hover\:text-indigo-700:hover {
    color: var(--hl-indigo-hover);
}

/* Border colors */
#houselist-dash-wrapper .border-indigo-600 {
    border-color: var(--hl-indigo);
}

#houselist-dash-wrapper .border-indigo-200 {
    border-color: var(--hl-indigo-200);
}

#houselist-dash-wrapper .border-indigo-100 {
    border-color: var(--hl-indigo-100);
}

#houselist-dash-wrapper .border-indigo-300 {
    border-color: var(--hl-indigo-300);
}

#houselist-dash-wrapper .border-indigo-400 {
    border-color: var(--hl-indigo-400);
}

#houselist-dash-wrapper .hover\:border-indigo-400:hover {
    border-color: var(--hl-indigo-400);
}

#houselist-dash-wrapper .hover\:border-indigo-300:hover {
    border-color: var(--hl-indigo-300);
}

/* Focus ring */
#houselist-dash-wrapper .focus\:border-indigo-500:focus {
    border-color: var(--hl-indigo-light);
}

#houselist-dash-wrapper .focus\:ring-indigo-500:focus {
    --tw-ring-color: var(--hl-indigo-light);
}

/* Opacity variants */
#houselist-dash-wrapper .bg-indigo-600\/20 {
    background-color: color-mix(in srgb, var(--hl-indigo) 20%, transparent);
}

/* =====================
   Dark Mode — Tool Views (BG Remover, Upscale, Vectorize)
   ===================== */

/* Step indicator — inactive step circle */
#houselist-dash-wrapper.houselist-dark .qz-step-num.bg-gray-200 {
    background-color: #2a2a2a;
    color: #666666;
}

/* Step indicator — completed/active overrides already come from indigo which is fine */

/* Step line */
#houselist-dash-wrapper.houselist-dark .qz-step-line {
    background-color: #2a2a2a;
}

/* Step label — inactive */
#houselist-dash-wrapper.houselist-dark .qz-step-label.text-gray-400 {
    color: #666666;
}

/* Logo pick cards */
#houselist-dash-wrapper.houselist-dark .qz-bgrem-logo-pick,
#houselist-dash-wrapper.houselist-dark .qz-upscale-logo-pick,
#houselist-dash-wrapper.houselist-dark .qz-vectorize-logo-pick {
    background-color: #1a1a1a;
    border-color: #2a2a2a;
}

#houselist-dash-wrapper.houselist-dark .qz-bgrem-logo-pick:hover,
#houselist-dash-wrapper.houselist-dark .qz-upscale-logo-pick:hover,
#houselist-dash-wrapper.houselist-dark .qz-vectorize-logo-pick:hover {
    border-color: var(--hl-indigo-light);
}

/* Upload dropzone */
#houselist-dash-wrapper.houselist-dark [id$="-upload-dropzone"] {
    background-color: #0d0d0d;
    border-color: #3a3a3a;
}

#houselist-dash-wrapper.houselist-dark [id$="-upload-dropzone"]:hover {
    border-color: var(--hl-indigo-light);
    background-color: color-mix(in srgb, var(--hl-indigo) 6%, transparent);
}

/* Upload preview bar */
#houselist-dash-wrapper.houselist-dark [id$="-upload-preview"] {
    background-color: #0d0d0d;
    border-color: #2a2a2a;
}

/* Upload preview thumbnail */
#houselist-dash-wrapper.houselist-dark [id$="-upload-thumb"] {
    background-color: #1a1a1a;
    border-color: #2a2a2a;
}

/* Amber feedback buttons */
#houselist-dash-wrapper.houselist-dark .qz-feedback-trigger {
    background-color: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.25);
    color: #fbbf24;
}

#houselist-dash-wrapper.houselist-dark .qz-feedback-trigger:hover {
    background-color: rgba(245, 158, 11, 0.15);
}

/* Secondary action buttons (Start Over, Crisp Upscale, Vectorize links) */
#houselist-dash-wrapper.houselist-dark .bg-white.border.border-gray-300 {
    background-color: #1a1a1a;
    border-color: #3a3a3a;
    color: #cccccc;
}

#houselist-dash-wrapper.houselist-dark .bg-white.border.border-gray-300:hover {
    background-color: #2a2a2a;
}

/* Vectorize subtype selector buttons */
#houselist-dash-wrapper.houselist-dark .qz-vectorize-subtype-btn {
    background-color: #1a1a1a;
    border-color: #2a2a2a;
}

#houselist-dash-wrapper.houselist-dark .qz-vectorize-subtype-btn:hover {
    border-color: var(--hl-indigo-light);
}

#houselist-dash-wrapper.houselist-dark .qz-vectorize-subtype-btn.border-indigo-600 {
    background-color: color-mix(in srgb, var(--hl-indigo) 15%, #1a1a1a);
    border-color: var(--hl-indigo-light);
}

/* Vectorize subtype radio dot — inactive ring */
#houselist-dash-wrapper.houselist-dark .qz-vectorize-subtype-btn .border-gray-400 {
    border-color: #666666;
}

/* Vectorize subtype badges */
#houselist-dash-wrapper.houselist-dark .qz-vectorize-subtype-btn .bg-emerald-50 {
    background-color: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

#houselist-dash-wrapper.houselist-dark .qz-vectorize-subtype-btn .bg-indigo-50 {
    background-color: color-mix(in srgb, var(--hl-indigo) 15%, transparent);
    color: var(--hl-indigo-300);
}

/* Result preview container */
#houselist-dash-wrapper.houselist-dark .bg-gray-50.border.border-gray-100 {
    background-color: #0d0d0d;
    border-color: #2a2a2a;
}

/* Tab switcher — active tab inside bg-gray-100 wrapper */
#houselist-dash-wrapper.houselist-dark .qz-bgrem-tab.bg-white,
#houselist-dash-wrapper.houselist-dark .qz-upscale-tab.bg-white,
#houselist-dash-wrapper.houselist-dark .qz-source-tab.bg-white {
    background-color: #1a1a1a;
    color: #f0f0f0;
}

/* Tab switcher — inactive tab */
#houselist-dash-wrapper.houselist-dark .qz-bgrem-tab:not(.bg-white),
#houselist-dash-wrapper.houselist-dark .qz-upscale-tab:not(.bg-white),
#houselist-dash-wrapper.houselist-dark .qz-source-tab:not(.bg-white) {
    color: #666666;
}

#houselist-dash-wrapper.houselist-dark .qz-bgrem-tab:not(.bg-white):hover,
#houselist-dash-wrapper.houselist-dark .qz-upscale-tab:not(.bg-white):hover,
#houselist-dash-wrapper.houselist-dark .qz-source-tab:not(.bg-white):hover {
    color: #999999;
}

/* SVG icons that use text-gray-200 or text-gray-300 (decorative icons) */
#houselist-dash-wrapper.houselist-dark svg.text-gray-200 {
    color: #3a3a3a;
}

#houselist-dash-wrapper.houselist-dark svg.text-gray-300 {
    color: #3a3a3a;
}


/* =====================
   Mobile Menu Button & Overlay
   ===================== */
.houselist-mobile-menu-btn {
    display: none;
}

.houselist-mobile-close-btn {
    display: none;
}

.houselist-mobile-overlay {
    display: none;
}

/* =====================
   Responsive Design
   ===================== */
@media (max-width: 770px) {
    /* Inline hamburger button in topbar */
    .houselist-mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 8px;
        background: transparent;
        color: var(--hl-text-muted, #6b7280);
        border: 1px solid var(--hl-border, #e5e7eb);
        cursor: pointer;
        transition: background-color 0.2s, color 0.2s;
    }
    .houselist-mobile-menu-btn:hover {
        background: var(--hl-bg-hover, #f3f4f6);
        color: var(--hl-text-primary, #111827);
    }
    .houselist-mobile-menu-icon {
        width: 20px;
        height: 20px;
    }

    /* Hide hamburger when sidebar is open */
    .houselist-mobile-sidebar-open .houselist-mobile-menu-btn {
        display: none;
    }

    /* Overlay backdrop */
    .houselist-mobile-overlay {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 998;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(2px);
    }
    .houselist-mobile-sidebar-open .houselist-mobile-overlay {
        display: block;
    }

    /* Sidebar: off-canvas slide-in */
    .houselist-dash-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 270px !important;
        height: 100vh;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-right: 1px solid var(--hl-border);
    }
    .houselist-mobile-sidebar-open .houselist-dash-sidebar {
        transform: translateX(0);
    }

    /* Close button inside sidebar */
    .houselist-mobile-close-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 12px;
        right: 12px;
        z-index: 1001;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: var(--hl-bg-hover, #f3f4f6);
        border: 1px solid var(--hl-border);
        color: var(--hl-text-muted);
        cursor: pointer;
        transition: background-color 0.2s, color 0.2s;
    }
    .houselist-mobile-close-btn:hover {
        background: var(--hl-bg-surface);
        color: var(--hl-text-primary);
    }

    /* Hide desktop collapse toggle on mobile */
    .houselist-dash-sidebar-toggle {
        display: none;
    }

    /* Right side resets */
    .houselist-dash-right {
        margin-left: 0 !important;
    }

    .houselist-dash-main-content {
        padding: 1rem;
    }

    .houselist-dash-topbar {
        position: relative;
    }

    .houselist-dash-topbar > div {
        flex-wrap: wrap;
        gap: 0.3rem;
    }

    .houselist-dash-topbar-subscription {
        display: none;
    }

    .houselist-dash-topbar-right {
        flex: 1;
        justify-content: space-between;
    }

    .houselist-dash-topbar-right-group {
        margin-left: auto;
    }

    /* Show full logo (not icon) on mobile sidebar */
    .houselist-sidebar-collapsed .houselist-dash-logo-full.houselist-has-icon {
        display: flex;
    }
    .houselist-sidebar-collapsed .houselist-dash-logo-icon-link {
        display: none;
    }
    .houselist-sidebar-collapsed .houselist-dash-logo {
        padding: 20px 16px 16px;
        justify-content: flex-start;
    }
    .houselist-sidebar-collapsed .houselist-dash-logo-link {
        justify-content: flex-start;
        gap: 10px;
    }

    /* Always show labels on mobile */
    .houselist-sidebar-collapsed .houselist-dash-nav-label {
        opacity: 1;
        width: auto;
        pointer-events: auto;
    }

    /* Left-align nav items */
    .houselist-sidebar-collapsed .houselist-dash-nav-item {
        justify-content: flex-start;
        gap: 12px;
        padding: 10px 12px;
    }

    .houselist-sidebar-collapsed .houselist-dash-nav-icon {
        width: 36px;
        height: 36px;
        background: transparent;
    }

    /* Left-align nav list */
    .houselist-sidebar-collapsed .houselist-dash-nav ul {
        align-items: stretch;
    }

    /* Left-align nav section */
    .houselist-sidebar-collapsed .houselist-dash-nav {
        padding: 12px 16px;
    }

    /* Show nav heading labels and left-align */
    .houselist-sidebar-collapsed .houselist-dash-nav-heading {
        text-align: left;
        padding: 12px 0 4px;
    }
    .houselist-sidebar-collapsed .houselist-dash-nav-heading .houselist-dash-nav-label {
        display: inline;
    }
    .houselist-sidebar-collapsed .houselist-dash-nav-heading::after {
        display: none;
    }

    /* Left-align footer */
    .houselist-sidebar-collapsed .houselist-dash-sidebar-footer {
        padding: 12px 16px;
        justify-content: flex-start;
    }

    /* Disable tooltips on mobile */
    .houselist-sidebar-collapsed .houselist-dash-nav-item::after,
    .houselist-sidebar-collapsed .houselist-dash-nav-item::before {
        display: none;
    }
}

@media (max-width: 700px) {
    /* Topbar: wrap so breadcrumbs drop below the right-side controls */
    .houselist-dash-topbar > div {
        flex-wrap: wrap;
    }

    .houselist-dash-breadcrumbs {
        order: 2;
        width: 100%;
    }
}

/* =====================
   Print Styles
   ===================== */
@media print {
    .houselist-dash-sidebar,
    .houselist-dash-topbar {
        display: none;
    }

    .houselist-dash-right {
        margin-left: 0 !important;
    }

    .houselist-dash-main-content {
        padding: 0;
    }
}

/* =====================
   Logo Grid Pagination
   ===================== */
.qz-logo-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--hl-border, #e5e7eb);
}

.qz-logo-pagination button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--hl-border, #e5e7eb);
    background: var(--hl-bg-surface, #fff);
    color: var(--hl-text-secondary, #4b5563);
    font-size: 14px;
    cursor: pointer;
    transition: all .15s ease;
}

.qz-logo-pagination button:hover:not(:disabled) {
    border-color: var(--hl-indigo, #4f46e5);
    color: var(--hl-indigo, #4f46e5);
    background: var(--hl-bg-hover, #f3f4f6);
}

.qz-logo-pagination button:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.qz-logo-pagination .qz-pag-nums {
    display: flex;
    align-items: center;
    gap: 4px;
}

.qz-logo-pagination .qz-pag-num {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--hl-text-secondary, #4b5563);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s ease;
}

.qz-logo-pagination .qz-pag-num:hover {
    background: var(--hl-bg-hover, #f3f4f6);
}

.qz-logo-pagination .qz-pag-num.active {
    background: var(--hl-indigo, #4f46e5);
    color: #fff;
    border-color: var(--hl-indigo, #4f46e5);
    cursor: default;
}

.qz-logo-pagination .qz-pag-ellipsis {
    width: 26px;
    text-align: center;
    color: var(--hl-text-muted, #6b7280);
    font-size: 13px;
    user-select: none;
}

/* =====================
   Welcome Modal
   ===================== */
.houselist-welcome-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: houselist-fade-in .25s ease;
    padding: 24px;
}

@keyframes houselist-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes houselist-slide-up {
    from { opacity: 0; transform: translateY(24px) scale(.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.houselist-welcome-modal {
    position: relative;
    width: 100%;
    max-width: 780px;
    max-height: 90vh;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, .18);
    padding: 36px 32px 28px;
    animation: houselist-slide-up .35s ease;
}
.houselist-welcome-modal::-webkit-scrollbar {
    display: none;
}

.houselist-welcome-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: color .15s, background .15s;
    line-height: 0;
}

.houselist-welcome-close:hover {
    color: #374151;
    background: #f3f4f6;
}

/* Header */
.houselist-welcome-header {
    text-align: center;
    margin-bottom: 24px;
}

.houselist-welcome-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hl-indigo-50, #eef2ff);
    color: var(--hl-indigo, #4f46e5);
    border-radius: 14px;
}

.houselist-welcome-title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 6px;
}

.houselist-welcome-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

/* Plan badge */
.houselist-welcome-plan {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 24px;
    text-align: center;
}

.houselist-welcome-plan-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 6px;
}

.houselist-welcome-plan-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--hl-indigo, #4f46e5);
    background: var(--hl-indigo-50, #eef2ff);
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.houselist-welcome-plan-credits {
    font-size: 14px;
    color: #374151;
}

.houselist-welcome-plan-credits strong {
    font-weight: 700;
    color: #111827;
}

.houselist-welcome-plan-hint {
    font-size: 13px;
    color: #9ca3af;
    margin: 0;
}

/* Feature boxes */
.houselist-welcome-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.houselist-welcome-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 18px 12px 14px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    text-decoration: none;
    transition: border-color .15s, box-shadow .15s, transform .15s;
    cursor: pointer;
}

.houselist-welcome-feature:hover {
    border-color: #c7d2fe;
    box-shadow: 0 4px 12px rgba(99, 102, 241, .1);
    transform: translateY(-1px);
}

.houselist-welcome-feature-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    margin-bottom: 10px;
}

/* Color variants */
.houselist-welcome-feature[data-color="indigo"] .houselist-welcome-feature-icon {
    background: #eef2ff;
    color: #6366f1;
}
.houselist-welcome-feature[data-color="emerald"] .houselist-welcome-feature-icon {
    background: #d1fae5;
    color: #10b981;
}
.houselist-welcome-feature[data-color="rose"] .houselist-welcome-feature-icon {
    background: #ccfbf1;
    color: #0f766e;
}
.houselist-welcome-feature[data-color="violet"] .houselist-welcome-feature-icon {
    background: #f5f3ff;
    color: #8b5cf6;
}

.houselist-welcome-feature-label {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 2px;
}

.houselist-welcome-feature-desc {
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.35;
}

/* CTA button */
.houselist-welcome-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 auto;
    width: auto;
    padding: 12px 32px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: var(--hl-indigo, #4f46e5);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s;
}
.houselist-welcome-cta-wrap {
    text-align: center;
}

.houselist-welcome-cta:hover {
    background: var(--hl-indigo-hover, #4338ca);
    color: #fff;
}

/* Responsive */
@media (max-width: 680px) {
    .houselist-welcome-features {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 480px) {
    .houselist-welcome-modal {
        padding: 28px 20px 22px;
    }
    .houselist-welcome-features {
        grid-template-columns: 1fr;
    }
}

/* Dark mode */
.houselist-dark .houselist-welcome-modal {
    background: var(--hl-bg-surface, #1f2937);
}

.houselist-dark .houselist-welcome-title {
    color: var(--hl-text-primary, #f9fafb);
}

.houselist-dark .houselist-welcome-subtitle,
.houselist-dark .houselist-welcome-plan-hint {
    color: var(--hl-text-muted, #9ca3af);
}

.houselist-dark .houselist-welcome-plan {
    background: var(--hl-bg-hover, #374151);
    border-color: var(--hl-border, #4b5563);
}

.houselist-dark .houselist-welcome-plan-credits {
    color: var(--hl-text-secondary, #d1d5db);
}

.houselist-dark .houselist-welcome-plan-credits strong {
    color: var(--hl-text-primary, #f9fafb);
}

.houselist-dark .houselist-welcome-feature {
    background: var(--hl-bg-hover, #374151);
    border-color: var(--hl-border, #4b5563);
}

.houselist-dark .houselist-welcome-feature-label {
    color: var(--hl-text-primary, #f9fafb);
}

.houselist-dark .houselist-welcome-feature-desc {
    color: var(--hl-text-muted, #9ca3af);
}

.houselist-dark .houselist-welcome-close {
    color: var(--hl-text-muted, #9ca3af);
}

.houselist-dark .houselist-welcome-close:hover {
    color: var(--hl-text-primary, #f9fafb);
    background: var(--hl-bg-active, #4b5563);
}

/* =====================
   HouseList-Specific Components
   (Chat two-pane, gallery uploader, listing table, analytics chart,
    stat cards, quick actions, activity, badges, notices, toasts,
    form helpers, upgrade/empty cards, misc ah-* component classes)
   All styled with --hl- CSS vars and Tailwind-compatible patterns.
   ===================== */

/* ---- Toast notifications ---- */
.ah-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99990;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.ah-toast {
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    pointer-events: auto;
    animation: houselist-dash-slideDown 0.25s ease;
    max-width: 340px;
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
}

.ah-toast-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.ah-toast-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.ah-toast-info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* ---- Notices (inline form alerts) ---- */
.ah-notice {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 14px;
}
.ah-notice-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.ah-notice-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.ah-notice-info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* ---- View header ---- */
.ah-view-header { margin-bottom: 24px; }
.ah-view-header-flex {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.ah-view-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.ah-view-header-actions .ah-btn svg { flex-shrink: 0; }
.ah-view-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--hl-text-primary);
    margin: 0 0 4px;
    line-height: 1.25;
}
.ah-view-subtitle {
    font-size: 14px;
    color: var(--hl-text-muted);
    margin: 0;
}

/* ---- Stats grid ---- */
.ah-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.ah-stat-card {
    background: var(--hl-bg-surface);
    border: 1px solid var(--hl-border);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ah-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--hl-shadow-hover);
}

.ah-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ah-stat-icon-primary { background: var(--hl-indigo-100); color: var(--hl-indigo); }
.ah-stat-icon-blue    { background: #dbeafe; color: #2563eb; }
.ah-stat-icon-green   { background: #dcfce7; color: #16a34a; }
.ah-stat-icon-orange  { background: #ffedd5; color: #ea580c; }

.ah-stat-content { display: flex; flex-direction: column; gap: 2px; }
.ah-stat-number {
    font-size: 26px;
    font-weight: 700;
    color: var(--hl-text-primary);
    line-height: 1.1;
}
.ah-stat-label {
    font-size: 13px;
    color: var(--hl-text-muted);
    font-weight: 500;
}

/* ---- Welcome bottom (quick actions + activity) ---- */
.ah-welcome-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 24px;
}
@media (max-width: 768px) {
    .ah-welcome-bottom { grid-template-columns: 1fr; }
}

.ah-quick-actions-card,
.ah-activity-card {
    background: var(--hl-bg-surface);
    border: 1px solid var(--hl-border);
    border-radius: 14px;
    padding: 20px;
}

.ah-quick-actions-card h3,
.ah-activity-card h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--hl-text-primary);
    margin: 0 0 14px;
}

.ah-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ah-quick-action {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--hl-text-secondary);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.ah-quick-action:hover {
    background: var(--hl-bg-hover);
    color: var(--hl-indigo);
}

/* Activity list */
.ah-activity-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ah-activity-item { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; }
.ah-activity-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--hl-indigo-300); flex-shrink: 0; margin-top: 4px;
}
.ah-activity-text { flex: 1; color: var(--hl-text-secondary); line-height: 1.4; }
.ah-activity-details { color: var(--hl-text-muted); }
.ah-activity-time { font-size: 11px; color: var(--hl-text-faint); white-space: nowrap; margin-left: auto; padding-left: 8px; }
.ah-empty-state { color: var(--hl-text-muted); font-size: 13px; }

/* ---- Role badge in sidebar ---- */
.ah-role-badge { padding: 0 16px 12px; }
.ah-badge-role {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.ah-role-agent { background: var(--hl-indigo-100); color: var(--hl-indigo); }
.ah-role-buyer  { background: #dcfce7; color: #16a34a; }

/* ---- Badges ---- */
.ah-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}
.ah-badge-active   { background: #dcfce7; color: #166534; }
.ah-badge-pending  { background: #fef9c3; color: #854d0e; }
.ah-badge-draft    { background: var(--hl-bg-hover); color: var(--hl-text-muted); }
.ah-badge-sold     { background: #fee2e2; color: #991b1b; }
.ah-badge-featured { background: var(--hl-indigo-100); color: var(--hl-indigo); }
.ah-badge-new      { background: #dbeafe; color: #1d4ed8; }
.ah-badge-read     { background: var(--hl-bg-hover); color: var(--hl-text-muted); }
.ah-badge-replied  { background: #f0fdf4; color: #166534; }
.ah-badge-archived { background: #f3f4f6; color: #6b7280; }
.ah-badge-approved { background: #dcfce7; color: #166534; }
.ah-badge-rejected { background: #fee2e2; color: #991b1b; }

/* ---- Buttons ---- */
.ah-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s;
    justify-content: center;
}
.ah-btn-primary {
    background: var(--hl-indigo);
    color: #fff;
    border-color: var(--hl-indigo);
}
.ah-btn-primary:hover {
    background: var(--hl-indigo-hover);
    border-color: var(--hl-indigo-hover);
    color: #fff;
}
.ah-btn-outline {
    background: transparent;
    color: var(--hl-text-secondary);
    border-color: var(--hl-border);
}
.ah-btn-outline:hover {
    background: var(--hl-bg-hover);
    color: var(--hl-text-primary);
}
.ah-btn-danger {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}
.ah-btn-danger:hover {
    background: #fecaca;
    color: #7f1d1d;
}
.ah-btn-disabled {
    background: var(--hl-bg-hover);
    color: var(--hl-text-disabled);
    border-color: var(--hl-border-light);
    cursor: not-allowed;
    opacity: 0.7;
}
.ah-btn-sm { padding: 5px 10px; font-size: 12px; }
.ah-btn-lg { padding: 11px 24px; font-size: 15px; }
.ah-ml-2  { margin-left: 8px; }

/* ---- Empty / upgrade cards ---- */
.ah-empty-card,
.ah-upgrade-card {
    background: var(--hl-bg-surface);
    border: 1px solid var(--hl-border);
    border-radius: 14px;
    padding: 40px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.ah-empty-icon,
.ah-upgrade-icon { color: var(--hl-text-disabled); }
.ah-empty-card p,
.ah-upgrade-card p { color: var(--hl-text-muted); font-size: 14px; margin: 0; }
.ah-upgrade-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--hl-text-primary);
    margin: 0;
}
.ah-module-unavailable {
    background: var(--hl-bg-surface);
    border: 1px solid var(--hl-border);
    border-radius: 10px;
    padding: 20px;
    color: var(--hl-text-muted);
    font-size: 14px;
}

/* ---- Tables ---- */
.ah-table-wrap {
    background: var(--hl-bg-surface);
    border: 1px solid var(--hl-border);
    border-radius: 14px;
    overflow: hidden;
}
.ah-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.ah-table thead tr {
    border-bottom: 1px solid var(--hl-border-light);
}
.ah-table th {
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--hl-text-faint);
    text-align: left;
    background: transparent;
}
.ah-table td {
    padding: 12px 16px;
    height: 64px;
    color: var(--hl-text-secondary);
    border-top: 1px solid var(--hl-border-light);
    vertical-align: middle;
}
/* Header already draws the divider — avoid a doubled line under it. */
.ah-table tbody tr:first-child td {
    border-top: none;
}
.ah-table-sm .ah-table th,
.ah-table-sm .ah-table td { padding: 8px 12px; }

.ah-table-listing-cell { display: flex; align-items: center; gap: 12px; }
.ah-table-thumb {
    width: 56px; height: 40px; object-fit: cover;
    border-radius: 6px; flex-shrink: 0;
}
.ah-table-thumb-placeholder {
    width: 56px; height: 40px;
    border-radius: 6px;
    background: var(--hl-bg-hover);
    display: flex; align-items: center; justify-content: center;
    color: var(--hl-text-disabled);
    flex-shrink: 0;
}
.ah-table-listing-info { display: flex; flex-direction: column; gap: 3px; }
.ah-table-listing-info strong { font-size: 13px; font-weight: 600; color: var(--hl-text-primary); }
.ah-table-actions { display: flex; justify-content: flex-end; align-items: center; gap: 6px;height: 90px !important; }
.ah-table th:last-child {
    text-align: right;
}
.ah-action-btn {
    width: 30px; height: 30px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 6px;
    border: 1px solid var(--hl-border);
    background: var(--hl-bg-surface);
    color: var(--hl-text-muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
}
.ah-action-btn:hover { background: var(--hl-bg-hover); color: var(--hl-text-primary); }
.ah-action-delete:hover { background: #fee2e2; border-color: #fecaca; color: #991b1b; }

/* ---- Favorites grid — 4 columns ---- */
.ah-favorites-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}
@media (max-width: 1200px) {
    .ah-favorites-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .ah-favorites-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .ah-favorites-grid { grid-template-columns: 1fr; }
}

/* ---- Form cards (settings/import) ---- */
.ah-form-card {
    background: var(--hl-bg-surface);
    border: 1px solid var(--hl-border);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 20px;
}
.ah-form-card h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--hl-text-primary);
    margin: 0 0 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--hl-border-light);
}
.ah-form-card-full { width: 100%; }
.ah-settings-grid { display: flex; flex-direction: column; }
.ah-form-grid { display: grid; gap: 16px; }
.ah-form-grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 600px) {
    .ah-form-grid-2 { grid-template-columns: 1fr; }
}
.ah-form-group { display: flex; flex-direction: column; gap: 5px; }
.ah-form-group-full { grid-column: 1 / -1; }
.ah-form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--hl-text-secondary);
}
.ah-form-hint { font-size: 12px; color: var(--hl-text-faint); margin: 2px 0 0; }
.ah-form-hint--gap { margin-bottom: 18px; }
.ah-form-actions { margin-top: 20px; display: flex; align-items: center; gap: 10px; }

/* ---- Inputs ---- */
.ah-input, .ah-textarea, .ah-select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--hl-border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--hl-text-primary);
    background: var(--hl-bg-surface);
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}
.ah-input:focus, .ah-textarea:focus, .ah-select:focus {
    outline: none;
    border-color: var(--hl-indigo-light);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--hl-indigo-light) 20%, transparent);
}
.ah-input-readonly { background: var(--hl-bg-hover); color: var(--hl-text-muted); }
.ah-textarea { resize: vertical; }
.ah-select-multiple { height: auto; min-height: 80px; }
.ah-select-sm { padding: 4px 8px; font-size: 12px; border-radius: 6px; border: 1px solid var(--hl-border); background: var(--hl-bg-surface); color: var(--hl-text-secondary); }

/* ---- Avatar upload ---- */
.ah-avatar-upload-wrap {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
}
.ah-avatar-preview {
    width: 72px; height: 72px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--hl-border);
    flex-shrink: 0;
}
.ah-avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.ah-avatar-upload-controls { display: flex; flex-direction: column; gap: 6px; }

/* ---- Banner uploader ---- */
.ah-banner-upload {
    position: relative;
    width: 100%;
    height: 160px;
    border-radius: 12px;
    background-color: var(--hl-bg-hover);
    background-image: var(--ah-banner, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 1px dashed var(--hl-border);
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 12px;
    margin-bottom: 8px;
}
.ah-banner-upload-actions { display: flex; gap: 8px; }

/* ---- Gallery uploader ---- */
.ah-gallery-wrap {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
/* Upload dropzone */
.ah-gallery-upload-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 26px 20px;
    text-align: center;
    background: var(--hl-bg-hover);
    border: 2px dashed var(--hl-border);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.ah-gallery-upload-btn:hover {
    border-color: var(--hl-indigo);
    background: rgba(99, 102, 241, .06);
}
.ah-gallery-upload-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(99, 102, 241, .12);
    color: var(--hl-indigo);
}
.ah-gallery-upload-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--hl-text-primary);
}
.ah-gallery-upload-hint {
    font-size: 12px;
    color: var(--hl-text-faint);
}
#ah-gallery-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
#ah-gallery-previews:empty { display: none; }
.ah-gallery-item {
    position: relative;
    width: 96px; height: 74px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--hl-border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}
.ah-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ah-gallery-remove {
    position: absolute;
    top: 3px; right: 3px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: rgba(0,0,0,.6);
    color: #fff;
    font-size: 13px;
    line-height: 1;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    border: none;
    padding: 0;
}
.ah-gallery-remove:hover { background: #dc2626; }

/* Upload progress */
#ah-gallery-upload-progress {
    font-size: 13px;
    color: var(--hl-text-muted);
    margin-top: 8px;
}
.ah-import-progress { margin: 10px 0; }
.ah-progress-bar {
    height: 6px; border-radius: 3px;
    background: var(--hl-border);
    overflow: hidden; margin-bottom: 6px;
}
.ah-progress-fill {
    height: 100%;
    background: var(--hl-indigo);
    border-radius: 3px;
    transition: width 0.2s ease;
}

/* ---- Chat two-pane layout ---- */
.ah-chat-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    background: var(--hl-bg-surface);
    border: 1px solid var(--hl-border);
    border-radius: 14px;
    overflow: hidden;
    height: calc(100vh - 220px);
    min-height: 480px;
}
@media (max-width: 680px) {
    .ah-chat-layout { grid-template-columns: 1fr; height: auto; }
    .ah-chat-sidebar { border-right: none; border-bottom: 1px solid var(--hl-border); max-height: 200px; }
}

.ah-chat-sidebar {
    display: flex; flex-direction: column;
    border-right: 1px solid var(--hl-border);
    overflow: hidden;
}
.ah-chat-sidebar-header {
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--hl-text-secondary);
    border-bottom: 1px solid var(--hl-border);
    flex-shrink: 0;
}
.ah-thread-list {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--hl-scrollbar) transparent;
}
.ah-thread-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--hl-border-light);
    transition: background 0.15s;
}
.ah-thread-item:hover, .ah-thread-item.active { background: var(--hl-bg-hover); }
.ah-thread-item.active { border-left: 3px solid var(--hl-indigo); }
.ah-thread-name { font-size: 13px; font-weight: 600; color: var(--hl-text-primary); display: flex; align-items: center; gap: 6px; }
.ah-thread-snippet { font-size: 12px; color: var(--hl-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ah-thread-unread {
    background: var(--hl-indigo); color: #fff;
    border-radius: 10px; font-size: 10px; font-weight: 700;
    padding: 1px 6px; min-width: 18px; text-align: center;
}
.ah-chat-loading { padding: 16px; font-size: 13px; color: var(--hl-text-muted); text-align: center; }

.ah-chat-main { display: flex; flex-direction: column; overflow: hidden; }
.ah-chat-empty-state {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 12px; color: var(--hl-text-muted); padding: 24px;
    text-align: center;
}
.ah-chat-empty-state p { font-size: 14px; margin: 0; }

.ah-chat-conversation { display: flex; flex-direction: column; flex: 1; overflow: hidden; }
.ah-chat-conv-header {
    padding: 14px 18px;
    font-size: 14px; font-weight: 600;
    color: var(--hl-text-primary);
    border-bottom: 1px solid var(--hl-border);
    flex-shrink: 0;
}
.ah-chat-messages {
    flex: 1; overflow-y: auto; padding: 16px;
    display: flex; flex-direction: column; gap: 8px;
    scrollbar-width: thin; scrollbar-color: var(--hl-scrollbar) transparent;
}
.ah-chat-msg {
    max-width: 70%;
    padding: 9px 13px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
}
.ah-chat-msg-in  { background: var(--hl-bg-hover); color: var(--hl-text-primary); align-self: flex-start; border-bottom-left-radius: 3px; }
.ah-chat-msg-out { background: var(--hl-indigo); color: #fff; align-self: flex-end; border-bottom-right-radius: 3px; }
.ah-chat-msg-time { display: block; font-size: 10px; opacity: 0.65; margin-top: 4px; }

.ah-chat-input-wrap {
    padding: 12px 16px;
    border-top: 1px solid var(--hl-border);
    display: flex; gap: 10px; align-items: flex-end;
    flex-shrink: 0;
}
.ah-chat-input {
    flex: 1; padding: 9px 12px;
    border: 1px solid var(--hl-border);
    border-radius: 8px; font-size: 14px;
    resize: none;
    background: var(--hl-bg-surface);
    color: var(--hl-text-primary);
    transition: border-color 0.15s;
}
.ah-chat-input:focus { outline: none; border-color: var(--hl-indigo-light); }

/* ---- Analytics chart card ---- */
.ah-chart-card {
    background: var(--hl-bg-surface);
    border: 1px solid var(--hl-border);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 20px;
}
.ah-chart-card h3 {
    font-size: 14px; font-weight: 600;
    color: var(--hl-text-primary);
    margin: 0 0 14px;
}
.ah-chart-wrap {
    height: 200px;
    position: relative;
}
.ah-analytics-chart {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* ---- Leads / Inquiries ---- */
.ah-leads-list { display: flex; flex-direction: column; gap: 14px; }
.ah-lead-card {
    background: var(--hl-bg-surface);
    border: 1px solid var(--hl-border);
    border-radius: 12px;
    padding: 16px 18px;
}
.ah-lead-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; flex-wrap: wrap; gap: 8px; }
.ah-lead-contact { display: flex; flex-direction: column; gap: 2px; }
.ah-lead-contact strong { font-size: 14px; font-weight: 600; color: var(--hl-text-primary); }
.ah-lead-contact a { font-size: 13px; color: var(--hl-indigo); text-decoration: none; }
.ah-lead-contact span { font-size: 12px; color: var(--hl-text-muted); }
.ah-lead-meta { display: flex; flex-direction: column; gap: 3px; align-items: flex-end; }
.ah-lead-listing-link { font-size: 12px; color: var(--hl-indigo); text-decoration: none; font-weight: 500; }
.ah-lead-time { font-size: 11px; color: var(--hl-text-faint); }
.ah-lead-message { font-size: 13px; color: var(--hl-text-secondary); line-height: 1.5; margin-bottom: 12px; }
.ah-lead-footer { display: flex; align-items: center; gap: 10px; }

/* Filter tabs */
.ah-filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.ah-filter-tab {
    padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 500;
    color: var(--hl-text-muted); background: var(--hl-bg-hover);
    text-decoration: none; border: 1px solid transparent;
    transition: all 0.15s;
}
.ah-filter-tab.active,
.ah-filter-tab:hover {
    background: var(--hl-indigo-50); color: var(--hl-indigo);
    border-color: var(--hl-indigo-100);
}

/* ---- Reviews ---- */
.ah-reviews-list { display: flex; flex-direction: column; gap: 14px; }
.ah-review-card {
    background: var(--hl-bg-surface);
    border: 1px solid var(--hl-border);
    border-radius: 12px;
    padding: 16px 18px;
}
.ah-review-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; flex-wrap: wrap; gap: 8px; }
.ah-review-stars { display: flex; gap: 2px; color: #f59e0b; }
.ah-review-time { font-size: 11px; color: var(--hl-text-faint); }
.ah-review-title { font-size: 14px; font-weight: 600; color: var(--hl-text-primary); margin: 0 0 6px; }
.ah-review-content { font-size: 13px; color: var(--hl-text-secondary); line-height: 1.5; margin: 0 0 8px; }
.ah-review-listing { font-size: 12px; }
.ah-review-listing a { color: var(--hl-indigo); text-decoration: none; }
.ah-review-meta { display: flex; align-items: center; gap: 8px; }
.ah-rating-summary { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.ah-rating-avg { font-size: 15px; font-weight: 700; color: var(--hl-text-primary); }
.ah-rating-count { font-size: 13px; color: var(--hl-text-muted); }

/* ---- Saved searches ---- */
.ah-saved-searches-list { display: flex; flex-direction: column; gap: 12px; }
.ah-saved-search-card {
    background: var(--hl-bg-surface);
    border: 1px solid var(--hl-border);
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.ah-saved-search-info { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.ah-saved-search-info strong { font-size: 14px; font-weight: 600; color: var(--hl-text-primary); }
.ah-saved-search-time { font-size: 11px; color: var(--hl-text-faint); }
.ah-saved-search-params { font-size: 12px; color: var(--hl-text-muted); }
.ah-saved-search-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ---- Billing plan card ---- */
.ah-billing-plan-card {
    background: var(--hl-bg-surface);
    border: 1px solid var(--hl-border);
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 20px;
}
.ah-billing-plan-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}
ul.ah-billing-benefits li {
    gap: 5px;
    color: #222;
    display: flex;
    align-items: center;
}
.ah-billing-plan-header h3 {
    font-size: 18px; font-weight: 700;
    color: var(--hl-text-primary); margin: 0 0 6px;
}
.ah-billing-plan-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ah-plan-benefits {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 6px;
    font-size: 13px; color: var(--hl-text-secondary);
}
.ah-plan-benefits li { display: flex; align-items: center; gap: 7px; }
.ah-plan-benefits svg { color: var(--hl-indigo); flex-shrink: 0; }

.ah-billing-upgrade-section,
.ah-billing-invoices,
.ah-billing-orders,
.ah-billing-wc {
    background: var(--hl-bg-surface);
    border: 1px solid var(--hl-border);
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 20px;
}
.ah-billing-upgrade-section h3,
.ah-billing-invoices h3,
.ah-billing-orders h3 {
    font-size: 15px; font-weight: 600;
    color: var(--hl-text-primary); margin: 0 0 16px;
}
.ah-billing-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}
.ah-billing-plan-option {
    background: var(--hl-bg-hover);
    border: 1px solid var(--hl-border);
    border-radius: 10px;
    padding: 16px;
    display: flex; flex-direction: column; gap: 10px;
    transition: border-color 0.15s;
}
.ah-billing-plan-option:hover { border-color: var(--hl-indigo-300); }
.ah-billing-plan-active { border-color: var(--hl-indigo) !important; }
.ah-billing-plan-option h4 { font-size: 14px; font-weight: 600; color: var(--hl-text-primary); margin: 0; }
.ah-billing-price { display: flex; align-items: baseline; gap: 3px; }
.ah-price { font-size: 20px; font-weight: 700; color: var(--hl-text-primary); }
.ah-price-period { font-size: 12px; color: var(--hl-text-muted); }
.ah-loading-spinner {
    width: 24px; height: 24px; margin: 20px auto;
    border: 2px solid var(--hl-border);
    border-top-color: var(--hl-indigo);
    border-radius: 50%;
    animation: ah-spin 0.7s linear infinite;
}
@keyframes ah-spin { to { transform: rotate(360deg); } }

/* ---- Featured listings ---- */
.ah-featured-list { display: flex; flex-direction: column; gap: 12px; }
.ah-featured-item {
    background: var(--hl-bg-surface);
    border: 1px solid var(--hl-border);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex; align-items: center; gap: 14px;
    flex-wrap: wrap;
}
.ah-featured-thumb {
    width: 72px; height: 54px;
    border-radius: 8px; overflow: hidden; flex-shrink: 0;
}
.ah-featured-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ah-featured-info { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.ah-featured-info strong { font-size: 14px; font-weight: 600; color: var(--hl-text-primary); }
.ah-featured-action { flex-shrink: 0; }

/* ---- Import layout ---- */
.ah-import-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 768px) {
    .ah-import-layout { grid-template-columns: 1fr; }
}

/* ---- Listing edit form ---- */
.ah-listing-form-layout { display: flex; flex-direction: column; gap: 20px; }
.ah-section-title {
    font-size: 13px; font-weight: 600; text-transform: uppercase;
    letter-spacing: .05em; color: var(--hl-text-faint);
    margin: 0 0 14px; padding-bottom: 8px;
    border-bottom: 1px solid var(--hl-border-light);
}

/* ---- User dropdown open state ---- */
.ah-user-dropdown { display: none; }
.ah-user-dropdown.open { display: block; }

/* Topbar structure from new markup */
.ah-topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--hl-bg-surface);
    border-bottom: 1px solid var(--hl-border);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    gap: 16px;
}
.ah-topbar-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.ah-topbar-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.ah-topbar-sep { width: 1px; height: 22px; background: var(--hl-border); }

.ah-breadcrumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.ah-breadcrumb-home { color: var(--hl-text-faint); text-decoration: none; display: flex; align-items: center; }
.ah-breadcrumb-home:hover { color: var(--hl-text-secondary); }
.ah-breadcrumb-sep { color: var(--hl-text-faint); font-size: 15px; line-height: 1; }
.ah-breadcrumb-link { color: var(--hl-text-muted); text-decoration: none; font-weight: 500; }
.ah-breadcrumb-link:hover { color: var(--hl-text-primary); }
.ah-breadcrumb-current { color: var(--hl-text-primary); font-weight: 600; }

.ah-plan-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px; font-weight: 600;
    background: var(--hl-indigo-100); color: var(--hl-indigo);
    text-decoration: none; white-space: nowrap;
    transition: background 0.15s;
}
.ah-plan-badge:hover { background: var(--hl-indigo-200); color: var(--hl-indigo-hover); }

.ah-topbar-bell { position: relative; }
.ah-bell-btn {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px; color: var(--hl-text-muted);
    text-decoration: none; position: relative;
    transition: background 0.15s, color 0.15s;
}
.ah-bell-btn:hover { background: var(--hl-bg-hover); color: var(--hl-text-primary); }
.ah-bell-count {
    position: absolute; top: 2px; right: 2px;
    background: var(--hl-indigo); color: #fff;
    font-size: 9px; font-weight: 700; line-height: 1;
    padding: 2px 4px; border-radius: 8px; min-width: 14px; text-align: center;
}
.ah-bell-count.ah-hidden { display: none; }

.ah-theme-toggle {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px; background: transparent;
    color: var(--hl-text-muted); border: none; cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.ah-theme-toggle:hover { background: var(--hl-bg-hover); color: var(--hl-text-primary); }

/* Sun/moon icon visibility driven by dark class on wrapper */
.ah-icon-sun  { display: none; }
.ah-icon-moon { display: block; }
.houselist-dark .ah-icon-sun  { display: block; }
.houselist-dark .ah-icon-moon { display: none; }

/* User menu */
.ah-user-menu { position: relative; }
.ah-user-avatar-btn {
    width: 36px; height: 36px; border-radius: 50%;
    overflow: hidden; cursor: pointer; border: none; padding: 0;
    background: transparent;
    transition: box-shadow 0.15s;
}
.ah-user-avatar-btn:hover { box-shadow: 0 0 0 2px var(--hl-indigo-300); }
.ah-topbar-avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }

.ah-user-dropdown {
    position: absolute; right: 0; top: calc(100% + 8px);
    width: 230px;
    background: var(--hl-bg-surface);
    border: 1px solid var(--hl-border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
    overflow: hidden;
    z-index: 100;
    display: none;
}
.ah-user-dropdown.open { display: block; }
.ah-user-dropdown-header {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px; border-bottom: 1px solid var(--hl-border-light);
}
.ah-user-dropdown-header img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.ah-user-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ah-user-info strong { font-size: 13px; font-weight: 600; color: var(--hl-text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ah-user-info span { font-size: 11px; color: var(--hl-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ah-user-dropdown-items { padding: 6px; }
.ah-user-dropdown-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: 8px;
    font-size: 13px; font-weight: 500; color: var(--hl-text-secondary);
    text-decoration: none; transition: background 0.15s, color 0.15s;
}
.ah-user-dropdown-item:hover { background: var(--hl-bg-hover); color: var(--hl-text-primary); }
.ah-user-dropdown-logout:hover { background: var(--hl-red-bg); color: var(--hl-red); }
.ah-user-dropdown-divider { height: 1px; background: var(--hl-border-light); margin: 4px 0; }

/* Sidebar new class names */
.ah-sidebar {
    position: fixed; top: 0; left: 0;
    width: 250px; height: 100vh; z-index: 20;
    background: var(--hl-bg-surface);
    border-right: 1px solid var(--hl-border);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.ah-sidebar-inner {
    display: flex; flex-direction: column; height: 100%; overflow: hidden;
}
.ah-sidebar-toggle {
    position: absolute; top: 28px; right: -14px;
    width: 28px; height: 28px;
    background: var(--hl-bg-surface);
    border: 1px solid var(--hl-border);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 25;
    color: var(--hl-text-muted);
    transition: background 0.2s, color 0.2s, transform 0.2s;
    padding: 0;
}
.ah-sidebar-toggle:hover { background: var(--hl-bg-hover); color: var(--hl-text-primary); transform: scale(1.1); }
.ah-sidebar-logo {
    padding: 20px 16px 14px;
    border-bottom: 1px solid var(--hl-border);
}
.ah-logo-link { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.ah-logo-img { max-height: 36px; width: auto; max-width: 160px; object-fit: contain; }
.ah-logo-icon {
    width: 38px; height: 38px;
    background: var(--hl-indigo); border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; color: #fff;
}
.ah-logo-text { font-size: 17px; font-weight: 700; color: var(--hl-text-primary); white-space: nowrap; overflow: hidden; }

.ah-sidebar-nav { flex: 1; overflow-y: auto; padding: 10px; scrollbar-width: none; }
.ah-sidebar-nav::-webkit-scrollbar { display: none; }
.ah-sidebar-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }

.ah-nav-group-heading {
    padding: 14px 8px 3px;
}
.ah-nav-group-heading span {
    font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .07em;
    color: var(--hl-text-faint);
}

.ah-nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: 8px;
    color: var(--hl-text-secondary);
    font-size: 13px; font-weight: 500;
    text-decoration: none; cursor: pointer;
    transition: background 0.15s, color 0.15s;
    position: relative;
}
.ah-nav-item:hover { background: var(--hl-bg-hover); color: var(--hl-text-primary); }
.ah-nav-item.active {
    background: var(--hl-indigo-50); color: var(--hl-indigo);
    font-weight: 600;
}
.ah-nav-icon-wrap {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 7px; flex-shrink: 0;
}
.ah-nav-item.active .ah-nav-icon-wrap { background: var(--hl-indigo-100); }
.ah-nav-icon { width: 18px; height: 18px; }
.ah-nav-label { white-space: nowrap; overflow: hidden; transition: opacity 0.2s, width 0.3s; }
.ah-nav-logout { color: var(--hl-red) !important; }
.ah-nav-logout:hover { background: var(--hl-red-bg) !important; }

.ah-sidebar-footer { border-top: 1px solid var(--hl-border); padding: 10px; margin-top: auto; }

/* Sidebar right panel offset */
.ah-dash-right { margin-left: 250px; transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }
.ah-dash-main { flex: 1; padding: 32px; background: var(--hl-bg-body); }

/* Sidebar collapse state */
.ah-sidebar-collapsed .ah-sidebar { width: 68px; }
.ah-sidebar-collapsed .ah-dash-right { margin-left: 68px; }
.ah-sidebar-collapsed .ah-nav-label { opacity: 0; width: 0; overflow: hidden; pointer-events: none; }
.ah-sidebar-collapsed .ah-nav-item { justify-content: center; padding: 8px; gap: 0; }
.ah-sidebar-collapsed .ah-nav-group-heading span { display: none; }
.ah-sidebar-collapsed .ah-nav-group-heading::after { content: ''; display: block; width: 14px; height: 1px; background: var(--hl-border); margin: 0 auto; }
.ah-sidebar-collapsed .ah-sidebar-nav { padding: 10px 8px; }
.ah-sidebar-collapsed .ah-sidebar-nav ul { align-items: center; }
.ah-sidebar-collapsed .ah-sidebar-footer { padding: 10px 8px; display: flex; justify-content: center; }
.ah-sidebar-collapsed .ah-sidebar-logo { padding: 16px 8px; display: flex; justify-content: center; }
.ah-sidebar-collapsed .ah-logo-link { gap: 0; justify-content: center; }
.ah-sidebar-collapsed .ah-logo-text { display: none; }
.ah-sidebar-collapsed .ah-role-badge { display: none; }

/* Collapse tooltips */
.ah-sidebar-collapsed .ah-nav-item::after {
    content: attr(data-tooltip);
    position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%);
    background: var(--hl-tooltip-bg); color: var(--hl-tooltip-text);
    padding: 5px 10px; border-radius: 7px; font-size: 12px; font-weight: 500;
    white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity 0.15s; z-index: 50;
}
.ah-sidebar-collapsed .ah-nav-item::before {
    content: ''; position: absolute; left: calc(100% + 6px); top: 50%; transform: translateY(-50%);
    border: 5px solid transparent; border-right-color: var(--hl-tooltip-bg);
    pointer-events: none; opacity: 0; transition: opacity 0.15s; z-index: 50;
}
.ah-sidebar-collapsed .ah-nav-item:hover::after,
.ah-sidebar-collapsed .ah-nav-item:hover::before { opacity: 1; }

/* Mobile sidebar */
.ah-mobile-menu-btn {
    display: none;
    width: 36px; height: 36px; border-radius: 8px;
    background: transparent; color: var(--hl-text-muted);
    border: 1px solid var(--hl-border); cursor: pointer;
    align-items: center; justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.ah-mobile-menu-btn:hover { background: var(--hl-bg-hover); color: var(--hl-text-primary); }
.ah-mobile-close {
    display: none;
    position: absolute; top: 12px; right: 12px; z-index: 1001;
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--hl-bg-hover); border: 1px solid var(--hl-border);
    color: var(--hl-text-muted); cursor: pointer;
    align-items: center; justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.ah-mobile-overlay {
    display: none;
    position: fixed; inset: 0; z-index: 998;
    background: rgba(0,0,0,.5); backdrop-filter: blur(2px);
}

@media (max-width: 770px) {
    .ah-mobile-menu-btn { display: flex; }
    .ah-mobile-close { display: flex; }
    .ah-sidebar-toggle { display: none; }
    .ah-sidebar {
        width: 270px !important;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .ah-sidebar.ah-mobile-open { transform: translateX(0); }
    .ah-mobile-overlay.active { display: block; }
    .ah-dash-right { margin-left: 0 !important; }
    .ah-dash-main { padding: 16px; }
    .ah-topbar { padding: 0 14px; }
    .ah-sidebar-collapsed .ah-nav-label { opacity: 1; width: auto; pointer-events: auto; }
    .ah-sidebar-collapsed .ah-nav-item { justify-content: flex-start; padding: 8px 10px; gap: 10px; }
    .ah-sidebar-collapsed .ah-role-badge { display: block; }
}

/* Admin bar offset */
.admin-bar .ah-sidebar { top: 32px; height: calc(100vh - 32px); }
@media screen and (max-width: 782px) {
    .admin-bar .ah-sidebar { top: 46px; height: calc(100vh - 46px); }
}

/* Dark mode overrides for new ah- components */
.houselist-dark .ah-topbar { background: var(--hl-bg-surface); border-color: var(--hl-border); }
.houselist-dark .ah-user-dropdown { background: var(--hl-bg-surface); border-color: var(--hl-border); }
.houselist-dark .ah-user-dropdown-item { color: #cccccc; }
.houselist-dark .ah-user-dropdown-item:hover { background: var(--hl-bg-hover); }
.houselist-dark .ah-plan-badge { background: color-mix(in srgb, var(--hl-indigo) 20%, transparent); color: var(--hl-indigo-300); }
.houselist-dark .ah-stat-card { background: var(--hl-bg-surface); border-color: var(--hl-border); }
.houselist-dark .ah-form-card { background: var(--hl-bg-surface); border-color: var(--hl-border); }
.houselist-dark .ah-lead-card,
.houselist-dark .ah-review-card,
.houselist-dark .ah-saved-search-card,
.houselist-dark .ah-featured-item { background: var(--hl-bg-surface); border-color: var(--hl-border); }
.houselist-dark .ah-billing-plan-card,
.houselist-dark .ah-billing-upgrade-section,
.houselist-dark .ah-billing-invoices { background: var(--hl-bg-surface); border-color: var(--hl-border); }
.houselist-dark .ah-empty-card,
.houselist-dark .ah-upgrade-card { background: var(--hl-bg-surface); border-color: var(--hl-border); }
.houselist-dark .ah-table-wrap { background: var(--hl-bg-surface); border-color: var(--hl-border); }
.houselist-dark .ah-table td { border-color: var(--hl-border-light); }
.houselist-dark .ah-table tbody tr:hover td { background: var(--hl-bg-hover); }
.houselist-dark .ah-chat-layout { background: var(--hl-bg-surface); border-color: var(--hl-border); }
.houselist-dark .ah-chart-card { background: var(--hl-bg-surface); border-color: var(--hl-border); }
.houselist-dark .ah-quick-actions-card,
.houselist-dark .ah-activity-card { background: var(--hl-bg-surface); border-color: var(--hl-border); }
.houselist-dark .ah-input,
.houselist-dark .ah-textarea,
.houselist-dark .ah-select { background: var(--hl-bg-deep); border-color: var(--hl-border); color: var(--hl-text-primary); }
.houselist-dark .ah-toast-success { background: rgba(34,197,94,.12); color: #86efac; border-color: rgba(34,197,94,.25); }
.houselist-dark .ah-toast-error   { background: rgba(239,68,68,.12); color: #fca5a5; border-color: rgba(239,68,68,.25); }
.houselist-dark .ah-sidebar { background: var(--hl-bg-surface); border-color: var(--hl-border); }
.houselist-dark .ah-dash-main { background: var(--hl-bg-body); }

/* =========================================================
   Listing Edit — sidebar nav + stacked sections layout
   (settings-style editor; uses the dashboard's own tokens)
   ======================================================= */
.ah-ve-card {
    background: var(--hl-bg-surface);
    border: 1px solid var(--hl-border);
    border-radius: 14px;
    padding: 24px;
}
.ah-ve-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}
.ah-ve-content {
    flex: 1;
    min-width: 0;
    max-width: 760px;
}

/* Left sticky section nav */
.ah-ve-nav {
    width: 210px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: sticky;
    top: 76px;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    scrollbar-width: none;
}
.ah-ve-nav::-webkit-scrollbar { display: none; }
.ah-ve-nav-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--hl-text-muted);
    border-radius: 8px;
    text-decoration: none;
    transition: color .15s, background .15s;
    white-space: nowrap;
}
.ah-ve-nav-item svg { flex-shrink: 0; opacity: .6; transition: opacity .15s, color .15s; }
.ah-ve-nav-item:hover { color: var(--hl-text-primary); background: var(--hl-bg-hover); }
.ah-ve-nav-item:hover svg { opacity: 1; }
.ah-ve-nav-item.active { color: var(--hl-indigo); background: var(--hl-bg-hover); font-weight: 600; }
.ah-ve-nav-item.active svg { opacity: 1; color: var(--hl-indigo); }

/* Sections */
.ah-ve-section {
    padding: 28px 0;
    border-bottom: 1px solid var(--hl-border-light);
    scroll-margin-top: 96px;
}
.ah-ve-section:first-child { padding-top: 4px; }
.ah-ve-section:last-child { border-bottom: none; padding-bottom: 4px; }
.ah-ve-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--hl-border);
}
.ah-ve-section-header svg { flex-shrink: 0; color: var(--hl-indigo); opacity: .85; }
.ah-ve-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--hl-text-primary);
    margin: 0;
    line-height: 1.1;
}
.ah-ve-section-hint { font-size: 12px; font-weight: 500; color: var(--hl-text-faint); margin-left: auto; }

/* Field rhythm inside sections */
.ah-ve-section .ah-form-group { margin-bottom: 16px; }
.ah-ve-section .ah-form-group:last-child { margin-bottom: 0; }
.ah-ve-section .ah-form-row { display: flex; gap: 16px; margin-bottom: 16px; }
.ah-ve-section .ah-form-row:last-child { margin-bottom: 0; }
.ah-ve-section .ah-form-row .ah-form-group { flex: 1; margin-bottom: 0; }

/* Responsive — nav collapses to a horizontal tab strip */
@media (max-width: 782px) {
    .ah-ve-layout { flex-direction: column; }
    .ah-ve-content { max-width: 100%; }
    .ah-ve-nav {
        width: 100%;
        flex-direction: row;
        position: static;
        max-height: none;
        overflow-x: auto;
        gap: 4px;
        padding: 4px;
        background: var(--hl-bg-hover);
        border-radius: 10px;
    }
    .ah-ve-nav-item { flex: 0 0 auto; justify-content: center; padding: 8px 12px; }
    .ah-ve-nav-item svg { display: none; }
    .ah-ve-section { scroll-margin-top: 20px; }
}

/* Features — searchable "add as you go" picker */
.ah-feature-search-wrap { position: relative; }
.ah-feature-search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--hl-text-faint);
    pointer-events: none;
}
.ah-feature-search.ah-input { padding-left: 36px; }
.ah-feature-suggestions {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 20;
    max-height: 244px;
    overflow-y: auto;
    padding: 4px;
    background: var(--hl-bg-surface);
    border: 1px solid var(--hl-border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .10);
}
.ah-feature-suggestions[hidden] { display: none; }
.ah-feature-suggestion {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 7px;
    font-size: 13.5px;
    color: var(--hl-text-secondary);
    cursor: pointer;
}
.ah-feature-suggestion svg { flex-shrink: 0; color: var(--hl-indigo); opacity: 0; transition: opacity .15s; }
.ah-feature-suggestion:hover,
.ah-feature-suggestion.is-active {
    background: var(--hl-bg-hover);
    color: var(--hl-text-primary);
}
.ah-feature-suggestion:hover svg,
.ah-feature-suggestion.is-active svg { opacity: .85; }
.ah-feature-suggestion mark { background: transparent; color: var(--hl-indigo); font-weight: 700; }
.ah-feature-suggestion-empty {
    padding: 12px 10px;
    font-size: 13px;
    color: var(--hl-text-faint);
    text-align: center;
}
.ah-feature-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}
.ah-feature-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 6px 5px 13px;
    background: rgba(99, 102, 241, .12);
    border: 1px solid rgba(99, 102, 241, .28);
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 500;
    color: var(--hl-indigo-light);
    line-height: 1.3;
}
.ah-feature-chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    background: none;
    border: none;
    border-radius: 50%;
    color: var(--hl-indigo);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.ah-feature-chip-remove:hover { background: var(--hl-red-bg); color: var(--hl-red); }
.ah-feature-empty {
    font-size: 13px;
    color: var(--hl-text-faint);
    margin: 14px 0 0;
}
.ah-feature-empty[hidden] { display: none; }

/* Input with a currency / unit affix */
.ah-input-affix { position: relative; }
.ah-input-affix .ah-input { width: 100%; }
.ah-input-affix-symbol {
    position: absolute;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    color: var(--hl-text-muted);
    font-size: 14px;
    font-weight: 600;
    pointer-events: none;
}
.ah-input-affix--prefix .ah-input-affix-symbol { left: 12px; }
.ah-input-affix--prefix .ah-input { padding-left: 30px; }
.ah-input-affix--suffix .ah-input-affix-symbol { right: 12px; }
.ah-input-affix--suffix .ah-input { padding-right: 32px; }

/* =========================================================
   Agent dashboard — first screen
   ======================================================= */
.ah-dd { display: flex; flex-direction: column; gap: 18px; }

/* Context strip */
.ah-dd-strip {
	display: flex;
	align-items: center;
	gap: 24px;
	flex-wrap: wrap;
	background: var(--hl-bg-surface);
	border: 1px solid var(--hl-border);
	border-radius: 14px;
	padding: 16px 20px;
}
.ah-dd-strip__id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.ah-dd-strip__logo img,
.ah-dd-strip__logo .avatar {
	width: 52px; height: 52px; border-radius: 12px; object-fit: cover; display: block;
	border: 1px solid var(--hl-border);
}
.ah-dd-strip__name {
	display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
	font-size: 1.05rem; font-weight: 800; color: var(--hl-text-primary); letter-spacing: -0.01em;
}
.ah-dd-badge--verified {
	display: inline-flex; align-items: center; gap: 4px;
	font-size: 0.7rem; font-weight: 700; color: #0ea5e9;
	background: rgba(14, 165, 233, 0.12); padding: 3px 8px; border-radius: 999px;
}
.ah-dd-strip__plan { font-size: 0.82rem; color: var(--hl-text-muted); margin-top: 3px; }
.ah-dd-strip__plan a { color: var(--hl-indigo); font-weight: 600; text-decoration: none; }
.ah-dd-strip__plan a:hover { text-decoration: underline; }
.ah-dd-strip__sep { margin: 0 6px; opacity: 0.5; }

.ah-dd-strip__quota { flex: 1; min-width: 190px; }
.ah-dd-quota__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.ah-dd-quota__label { font-size: 0.82rem; font-weight: 600; color: var(--hl-text-secondary); }
.ah-dd-quota__upgrade { font-size: 0.78rem; font-weight: 700; color: var(--hl-indigo); text-decoration: none; }
.ah-dd-quota__upgrade:hover { text-decoration: underline; }
.ah-dd-quota__bar { height: 7px; border-radius: 999px; background: var(--hl-bg-hover); overflow: hidden; }
.ah-dd-quota__bar span { display: block; height: 100%; border-radius: 999px; background: var(--hl-indigo); width: var(--ah-quota, 0); }
.ah-dd-quota__bar span.is-near { background: #f59e0b; }

.ah-dd-strip__cta { margin-left: auto; }
.ah-dd-cta-full { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ah-dd-cta-full .ah-btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.ah-dd-cta-upsell { font-size: 0.72rem; color: var(--hl-text-faint); text-decoration: none; max-width: 210px; text-align: right; }
.ah-dd-cta-upsell:hover { color: var(--hl-indigo); }

/* Stat cards */
.ah-dd-stats {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 12px;
}
.ah-dd-stat {
	position: relative;
	background: var(--hl-bg-surface);
	border: 1px solid var(--hl-border);
	border-top: 3px solid var(--hl-indigo);
	border-radius: 12px;
	padding: 14px 16px;
	display: flex;
	flex-direction: column;
	gap: 3px;
}
.ah-dd-stat--primary { border-top-color: var(--hl-indigo); }
.ah-dd-stat--amber   { border-top-color: #f59e0b; }
.ah-dd-stat--green   { border-top-color: #16a34a; }
.ah-dd-stat--blue    { border-top-color: #0ea5e9; }
.ah-dd-stat--rose    { border-top-color: #0f766e; }
.ah-dd-stat--violet  { border-top-color: #8b5cf6; }
.ah-dd-stat.is-accent { background: rgba(15, 118, 110, 0.06); box-shadow: 0 0 0 1px rgba(15, 118, 110, 0.18) inset; }
.ah-dd-stat__value { font-size: 1.6rem; font-weight: 800; color: var(--hl-text-primary); line-height: 1.1; letter-spacing: -0.02em; }
.ah-dd-stat__label { font-size: 0.78rem; color: var(--hl-text-muted); font-weight: 500; }
.ah-dd-stat__change { font-size: 0.72rem; font-weight: 700; margin-top: 2px; display: inline-flex; align-items: center; gap: 5px; }
.ah-dd-stat__change.is-up { color: #16a34a; }
.ah-dd-stat__change.is-down { color: #dc2626; }
.ah-dd-stat__change-note { color: var(--hl-text-faint); font-weight: 500; }

/* Main two-column area */
.ah-dd-main { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
.ah-dd-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.ah-dd-card {
	background: var(--hl-bg-surface);
	border: 1px solid var(--hl-border);
	border-radius: 14px;
	padding: 16px 18px;
}
.ah-dd-card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.ah-dd-card__head h3 { font-size: 0.95rem; font-weight: 700; color: var(--hl-text-primary); margin: 0; }
.ah-dd-card__link { font-size: 0.8rem; font-weight: 600; color: var(--hl-indigo); text-decoration: none; }
.ah-dd-card__link:hover { text-decoration: underline; }
.ah-dd-empty { font-size: 0.85rem; color: var(--hl-text-faint); margin: 4px 0 2px; }

/* Leads queue */
.ah-dd-leads { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ah-dd-lead {
	display: flex; align-items: flex-start; gap: 12px;
	padding: 12px 0; border-bottom: 1px solid var(--hl-border-light);
}
.ah-dd-lead:last-child { border-bottom: none; }
.ah-dd-lead__body { flex: 1; min-width: 0; }
.ah-dd-lead__top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ah-dd-lead__name { font-weight: 700; font-size: 0.9rem; color: var(--hl-text-primary); }
.ah-dd-lead__listing { font-size: 0.78rem; color: var(--hl-indigo); font-weight: 600; }
.ah-dd-lead__time { font-size: 0.72rem; color: var(--hl-text-faint); margin-left: auto; }
.ah-dd-lead__msg { font-size: 0.82rem; color: var(--hl-text-secondary); margin: 4px 0 0; line-height: 1.4; }
.ah-dd-lead__actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.ah-dd-lead__btn {
	font-size: 0.76rem; font-weight: 600; padding: 6px 12px; border-radius: 8px;
	border: 1px solid var(--hl-border); background: var(--hl-bg-surface); color: var(--hl-text-secondary);
	text-decoration: none; text-align: center; cursor: pointer; white-space: nowrap;
	transition: background .15s, color .15s, border-color .15s;
}
.ah-dd-lead__btn--reply { background: var(--hl-indigo); border-color: var(--hl-indigo); color: #fff; }
.ah-dd-lead__btn--reply:hover { background: var(--hl-indigo-hover); }
.ah-dd-lead__mark:hover { border-color: var(--hl-text-muted); color: var(--hl-text-primary); }
.ah-dd-lead.is-done { opacity: 0.5; }
.ah-dd-lead.is-done .ah-dd-lead__mark { color: #16a34a; border-color: #16a34a; pointer-events: none; }

/* Needs attention */
.ah-dd-attention { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.ah-dd-attention a {
	display: flex; align-items: center; gap: 9px; padding: 9px 8px; border-radius: 8px;
	font-size: 0.85rem; color: var(--hl-text-secondary); text-decoration: none;
}
.ah-dd-attention a:hover { background: var(--hl-bg-hover); color: var(--hl-text-primary); }
.ah-dd-attention strong { color: var(--hl-text-primary); font-weight: 700; }
.ah-dd-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ah-dd-dot--amber { background: #f59e0b; }
.ah-dd-dot--gray  { background: var(--hl-text-faint); }
.ah-dd-dot--rose  { background: #0f766e; }

/* Locked / upgrade gate */
.ah-dd-blur { filter: blur(7px); user-select: none; }
.ah-dd-stat.is-locked { position: relative; }
.ah-dd-stat__lock { position: absolute; top: 12px; right: 12px; color: var(--hl-text-faint); display: inline-flex; }
.ah-dd-stat__lock:hover { color: var(--hl-indigo); }
.ah-dd-gate { position: relative; }
.ah-dd-gate__blur { filter: blur(5px); opacity: 0.5; pointer-events: none; user-select: none; color: var(--hl-indigo); }
.ah-dd-gate__overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	text-align: center;
	padding: 6px;
}
.ah-dd-gate__overlay svg { color: var(--hl-text-muted); }
.ah-dd-gate__overlay p {
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--hl-text-secondary);
	margin: 0;
	max-width: 230px;
	line-height: 1.35;
}
.ah-dd-gate__btn { padding: 7px 16px; font-size: 0.82rem; }

/* Sparkline */
.ah-dd-spark { width: 100%; height: 52px; color: var(--hl-indigo); display: block; }
.ah-dd-spark__foot { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--hl-text-muted); font-weight: 600; margin-top: 8px; }

/* Top performing */
.ah-dd-top { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.ah-dd-top li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--hl-border-light); }
.ah-dd-top li:last-child { border-bottom: none; }
.ah-dd-top__title { font-size: 0.85rem; font-weight: 600; color: var(--hl-text-primary); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ah-dd-top__title:hover { color: var(--hl-indigo); }
.ah-dd-top__views { font-size: 0.76rem; color: var(--hl-text-muted); flex-shrink: 0; }

/* Notifications */
.ah-dd-notes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ah-dd-note { font-size: 0.82rem; color: var(--hl-text-secondary); line-height: 1.4; }
.ah-dd-note a { color: var(--hl-indigo); font-weight: 600; text-decoration: none; margin-left: 4px; }
.ah-dd-note a:hover { text-decoration: underline; }
.ah-dd-note--error { color: #dc2626; font-weight: 500; }
.ah-dd-note--warn  { color: #b45309; font-weight: 500; }

/* Responsive */
@media (max-width: 1100px) {
	.ah-dd-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
	.ah-dd-main { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
	.ah-dd-stats { grid-template-columns: repeat(2, 1fr); }
	.ah-dd-strip__cta { margin-left: 0; width: 100%; }
	.ah-dd-cta-full { align-items: stretch; }
	.ah-dd-cta-upsell { text-align: left; max-width: none; }
}

/* ===== Ported inline styles (CodeCanyon: no inline CSS) ===== */
.ah-dash-none { display: none; }
