:root {
    --primary: #cda434; /* Luxury Gold */
    --primary-light: #fdfbf6; /* Soft Cream */
    --primary-dark: #b58e26; /* Dark Gold */
    --success: #2d6a4f; /* Emerald Green */
    --success-light: #e8f5e9;
    --warning: #d4a373;
    --warning-light: #faedcd;
    --danger: #9b2226; /* Deep Red */
    --danger-light: #fdf0f0;
    --sidebar-bg: #0a1128; /* Deep Navy / Charcoal */
    --sidebar-hover: #1c2541;
    --bg-main: #faf9f6; /* Off-white luxury background */
    --text-main: #111827;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 15px -1px rgb(0 0 0 / 0.08), 0 2px 6px -2px rgb(0 0 0 / 0.05);
    --radius-lg: 0.75rem;
    --radius-md: 0.5rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
}

.hidden { display: none !important; }

/* Premium Split-Screen Login */
.auth-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background: var(--white);
}

.auth-visual-side {
    flex: 1; 
    background: linear-gradient(rgba(15, 23, 42, 0.75), rgba(15, 23, 42, 0.9)), url('../../assets/img/background.png');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    padding: 4rem;
    position: relative;
    overflow: hidden;
    color: white;
}

.auth-visual-side::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(79, 70, 229, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79, 70, 229, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 1;
}

.auth-visual-side::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
    animation: glow-pulse 8s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.visual-content {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.visual-brand-text {
    font-size: 5.5rem;
    font-weight: 900;
    letter-spacing: -4px;
    margin-bottom: 0.5rem;
    background: linear-gradient(to bottom, #ffffff 40%, #818cf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.4));
}

.velochat-branding h2 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.velochat-branding p {
    font-size: 1.2rem;
    color: #cbd5e1;
    line-height: 1.6;
    max-width: 500px;
}

.visual-footer {
    position: relative;
    z-index: 2;
    font-size: 0.875rem;
    color: #94a3b8;
}

.floating-bubbles {
    position: absolute;
    right: 10%;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 300px;
}

.chat-bubble-visual {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 1rem 1.5rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #e2e8f0;
    width: fit-content;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.1);
    animation: float 6s infinite ease-in-out;
    position: relative;
    overflow: hidden;
}

.chat-bubble-visual::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

.bubble-1 { align-self: flex-start; animation-delay: 0s; }
.bubble-2 { align-self: flex-end; animation-delay: 2s; border-radius: 20px 20px 4px 20px; background: linear-gradient(135deg, rgba(79, 70, 229, 0.25) 0%, rgba(124, 58, 237, 0.15) 100%); border-color: rgba(79, 70, 229, 0.4); box-shadow: 0 10px 30px -5px rgba(79, 70, 229, 0.3), inset 0 1px 0 rgba(255,255,255,0.1); }
.bubble-3 { align-self: flex-start; animation-delay: 4s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* Right Side Form */
.auth-form-side {
    width: 38%; 
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    border-left: 1px solid #f1f5f9;
    position: relative;
    overflow: hidden;
}

.auth-form-side::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4f46e5, #7c3aed, #4f46e5);
    background-size: 200% 100%;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.auth-form-clean {
    width: 100%;
    max-width: 380px;
}

.form-logo-top {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.form-logo-top::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 160px;
    height: 160px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
    border-radius: 50%;
    z-index: 0;
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.8;
    }
}

.form-logo-top img {
    height: 150px;
    object-fit: contain;
    filter: drop-shadow(0 8px 20px rgba(79, 70, 229, 0.3));
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.form-logo-top img:hover {
    transform: scale(1.1) translateY(-5px);
    filter: drop-shadow(0 12px 30px rgba(79, 70, 229, 0.5));
}

.auth-header-minimal {
    margin-bottom: 2.5rem;
    text-align: center;
}

.auth-header-minimal h1 {
    font-size: 1.85rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.auth-header-minimal p {
    color: #64748b;
    font-size: 1rem;
}

.form-group-premium {
    margin-bottom: 1.5rem;
}

.form-group-premium label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 0.75rem;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    z-index: 1;
}

.input-with-icon input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 44px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    position: relative;
    overflow: hidden;
}

.input-with-icon input::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.input-with-icon input:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15), 0 4px 12px rgba(79, 70, 229, 0.1);
    transform: translateY(-2px);
}

.input-with-icon input:focus + i,
.input-with-icon:focus-within i {
    color: var(--primary);
    transform: translateY(-50%) scale(1.1);
}

.form-options {
    margin-bottom: 2rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    color: #475569;
    cursor: pointer;
}

.btn-login-premium {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

.btn-login-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-login-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.5);
    gap: 16px;
}

.btn-login-premium:hover::before {
    left: 100%;
}

.btn-login-premium:active {
    transform: translateY(0);
}

.auth-footer-help {
    margin-top: 2.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: #64748b;
}

.auth-footer-help a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* Dashboard & Layout Styles */
#admin-layout { display: flex; min-height: 100vh; }
.sidebar { width: 280px; background: var(--sidebar-bg); color: var(--white); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; height: 100dvh; border-right: 1px solid rgba(255,255,255,0.05); overflow: hidden; }
.sidebar-nav { flex: 1; padding: 1rem; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 999px; }
.sidebar-nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.28); }
.sidebar-brand { 
    padding: 1.5rem; 
    display: flex; 
    justify-content: center; 
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.05); 
}
.brand-logo-full {
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;
}
.brand-logo-full:hover {
    transform: scale(1.05);
}
.sidebar-nav--legacy { flex: 1; padding: 1rem; }
.nav-label { padding: 1.5rem 1rem 0.75rem; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,0.3); }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 0.875rem 1.25rem; color: rgba(255,255,255,0.85); text-decoration: none; border-radius: 12px; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); font-weight: 600; margin-bottom: 0.35rem; font-size: 0.9rem; }
.nav-item i { 
    width: 24px; 
    font-size: 1.15rem; 
    transition: transform 0.3s ease; 
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary); /* Bright icons */
}
.nav-item:hover { background: var(--sidebar-hover); color: var(--white); }
.nav-item.active { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: var(--white); box-shadow: 0 4px 12px rgba(205, 164, 52, 0.3); }
.nav-item.active i { color: var(--white); }

/* Accordion Styles — Premium (no white gap) */
.nav-accordion {
    margin-bottom: 0.45rem;
    border-radius: 14px;
    border: 1px solid transparent;
    overflow: hidden;
    background: transparent;
    transition: background .25s ease, border-color .25s ease;
}
.nav-accordion.open {
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 8px 20px rgba(0,0,0,.2);
}
.nav-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.25rem;
    color: rgba(255,255,255,0.85);
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-size: 0.9rem;
    user-select: none;
}
.nav-accordion-header:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-accordion.open .nav-accordion-header { background: linear-gradient(135deg, rgba(205,164,52,.18), rgba(205,164,52,.08)); color: #fff; }
.nav-accordion-header i:first-child {
    width: 24px;
    font-size: 1.15rem;
    color: var(--primary);
}
.nav-accordion-header.active i:first-child,
.nav-accordion.open .nav-accordion-header i:first-child { color: #fff; }

.nav-item.sub-item {
    font-size: 0.85rem;
    padding: 0.72rem 0.9rem;
    margin-bottom: 0.2rem;
    color: rgba(255,255,255,0.72);
    border-radius: 10px;
    border: 1px solid transparent;
}
.nav-item.sub-item i {
    font-size: 1.02rem;
    opacity: 1;
    color: var(--primary);
}
.nav-item.sub-item:hover { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.06); }
.nav-item.sub-item.active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-color: rgba(205,164,52,.4);
    box-shadow: 0 4px 12px rgba(205,164,52,.25);
}
.nav-item.sub-item.active i { color: #fff; }

/* Sub-Accordion Styles */
.nav-sub-accordion {
    margin-bottom: 0.15rem;
}

.nav-sub-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1rem 0.65rem 1.25rem;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 600;
    font-size: 0.85rem;
}

.nav-sub-accordion-header:hover {
    color: var(--white);
}

.sub-accordion-arrow {
    font-size: 0.65rem;
    transition: transform 0.2s ease;
    opacity: 0.5;
}

.nav-sub-accordion.open .sub-accordion-arrow {
    transform: rotate(180deg);
    opacity: 1;
}

.nav-sub-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease-out, padding .2s ease;
    padding-left: 0.75rem;
    margin-left: 0.5rem;
    border-left: 1px solid rgba(255,255,255,.08);
}
.nav-sub-accordion.open .nav-sub-accordion-content {
    max-height: 500px;
    padding-top: 0.25rem;
    padding-bottom: 0.35rem;
    margin-bottom: 0.35rem;
}

.nav-item.sub-sub-item {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.1rem;
    color: rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-item.sub-sub-item i {
    width: 16px;
    font-size: 0.9rem;
    text-align: center;
}

.nav-item.sub-sub-item:hover, .nav-item.sub-sub-item.active {
    color: var(--white);
    background: rgba(255, 255, 255, 0.05);
}

.nav-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1), padding .25s ease;
    padding: 0 0.45rem;
    background: transparent;
}
.nav-accordion.open .nav-accordion-content {
    max-height: 1200px;
    padding: 0.4rem 0.45rem 0.65rem;
    margin-top: 0;
}
.accordion-arrow {
    font-size: 0.75rem;
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), color .2s ease, opacity .2s ease;
    opacity: .7;
    color: rgba(255,255,255,.7);
}
.nav-accordion.open .accordion-arrow { transform: rotate(180deg); opacity: 1; color: #fff; }
.nav-accordion.open .accordion-arrow { filter: drop-shadow(0 1px 4px rgba(205,164,52,.4)); }

.nav-item.text-danger:hover { background: var(--danger-light); color: var(--danger); }
.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.main-header { height: 72px; background: var(--white); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 2rem; position: sticky; top: 0; z-index: 50; }
.header-left h2 { font-size: 1.25rem; font-weight: 700; }
.user-profile { display: flex; align-items: center; gap: 12px; padding: 0.5rem; border-radius: var(--radius-md); cursor: pointer; transition: background 0.2s; }
.user-avatar { width: 36px; height: 36px; background: #e2e8f0; color: #475569; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 600; }
.tab-viewport { padding: 2rem; flex: 1; }
.tab-pane { display: none !important; }
.tab-pane.active { display: block !important; }
/* Helpdesk Luxury UI Overhaul */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12) !important;
}

.badge-luxury {
    padding: 6px 14px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
    border-radius: 20px;
}

.hd-ticket-row {
    border-radius: 16px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.hd-ticket-row:hover {
    background: #f8fafc;
    border-color: rgba(205, 164, 52, 0.2);
    transform: scale(1.005);
}

.stat-icon-premium {
    width: 45px;
    height: 45px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 8px 16px rgba(0,0,0,0.05);
}

/* Scrollbar Refinement for Helpdesk */
.overflow-auto::-webkit-scrollbar {
    width: 6px;
}
.overflow-auto::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}
.overflow-auto::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.card-header h3 {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.bg-soft-info {
    background: #e0f2fe;
    color: #0284c7;
}

.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px -8px rgba(0,0,0,0.15);
}

/* Premium dashboard */
.dash-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 22px 26px;
    border-radius: 20px;
    color: #fff;
    background: radial-gradient(600px 200px at 85% -20%, rgba(205,164,52,.35), transparent 60%), linear-gradient(135deg, #0a1128 0%, #1b2a5e 100%);
    box-shadow: 0 18px 40px -18px rgba(10,17,40,.55);
    margin-bottom: 18px;
    position: relative;
    overflow: hidden;
}
.dash-greet { font-size: 1.35rem; font-weight: 900; letter-spacing: -.3px; }
.dash-sub { font-size: .8rem; opacity: .85; margin-top: 4px; display: flex; align-items: center; gap: 8px; }
.dash-live { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; }
.dash-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52,211,153,.25); animation: dashPulse 2s infinite; }
@keyframes dashPulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
.dash-actions { display: flex; gap: 10px; }
.dash-btn { border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.12); color: #fff; border-radius: 12px; padding: 10px 16px; font-weight: 800; font-size: .8rem; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; transition: all .2s; }
.dash-btn:hover { background: rgba(255,255,255,.22); transform: translateY(-1px); }
.dash-btn-accent { background: linear-gradient(135deg,#cda434,#a8821f); border: none; box-shadow: 0 8px 20px rgba(205,164,52,.4); }
.dash-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 14px; }
.dash-kpi { background: #fff; border: 1px solid #e8edf5; border-radius: 18px; padding: 18px; display: flex; gap: 14px; align-items: center; transition: transform .25s, box-shadow .25s; }
.dash-kpi:hover { transform: translateY(-4px); box-shadow: 0 16px 32px -16px rgba(10,17,40,.25); }
.dash-kpi-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 1.25rem; background: linear-gradient(135deg,#0a1128,#2b3f8f); color: #fff; box-shadow: 0 10px 20px -8px rgba(10,17,40,.5); flex-shrink: 0; }
.dash-kpi-green { background: linear-gradient(135deg,#059669,#34d399); box-shadow: 0 10px 20px -8px rgba(5,150,105,.5); }
.dash-kpi-gold { background: linear-gradient(135deg,#cda434,#8a6d1c); box-shadow: 0 10px 20px -8px rgba(205,164,52,.5); }
.dash-kpi-red { background: linear-gradient(135deg,#dc2626,#f87171); box-shadow: 0 10px 20px -8px rgba(220,38,38,.5); }
.dash-kpi-body h4 { margin: 0; font-size: 1.5rem; font-weight: 900; color: #0f172a; letter-spacing: -.5px; }
.dash-kpi-body p { margin: 2px 0 0; font-size: .75rem; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .4px; }
.dash-kpi-body p small { display: block; text-transform: none; letter-spacing: 0; font-weight: 600; }
.dash-mini-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.dash-mini { background: #fff; border: 1px solid #e8edf5; border-radius: 14px; padding: 12px 14px; display: flex; gap: 10px; align-items: center; transition: transform .2s, box-shadow .2s; }
.dash-mini:hover { transform: translateY(-3px); box-shadow: 0 12px 24px -14px rgba(10,17,40,.25); }
.dash-mini i { font-size: 1.1rem; color: #4f46e5; width: 30px; height: 30px; border-radius: 10px; background: #eef2ff; display: grid; place-items: center; flex-shrink: 0; }
.dash-mini h5 { margin: 0; font-size: 1.05rem; font-weight: 900; color: #0f172a; }
.dash-mini p { margin: 0; font-size: .68rem; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .3px; }
.dash-toplist { display: flex; flex-direction: column; gap: 8px; }
.dash-toprow { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; background: #f8fafc; border: 1px solid #eef2f7; border-radius: 12px; font-size: .82rem; font-weight: 700; color: #0f172a; }
.dash-toprow .dash-rank { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg,#0a1128,#2b3f8f); color: #fff; display: grid; place-items: center; font-size: .72rem; font-weight: 900; flex-shrink: 0; }
.dash-toprow .dash-count { background: #eef2ff; color: #4f46e5; border-radius: 999px; padding: 2px 10px; font-size: .72rem; font-weight: 900; flex-shrink: 0; }
.dash-toprow span.dash-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-botlist { display: flex; flex-direction: column; gap: 10px; max-height: 330px; overflow-y: auto; padding-right: 4px; }
.dash-botrow { display: flex; gap: 10px; align-items: center; padding: 10px 12px; background: #f8fafc; border: 1px solid #eef2f7; border-radius: 14px; transition: transform .2s, box-shadow .2s; }
.dash-botrow:hover { transform: translateX(3px); box-shadow: 0 10px 22px -14px rgba(10,17,40,.3); background: #fff; }
.dash-botava { width: 38px; height: 38px; border-radius: 12px; border: 1px solid; display: grid; place-items: center; font-weight: 900; font-size: 1rem; flex-shrink: 0; }
.dash-botmain { flex: 1; min-width: 0; }
.dash-bottop { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.dash-botname { font-weight: 800; font-size: .82rem; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-botcount { font-size: .72rem; font-weight: 900; color: #4f46e5; white-space: nowrap; }
.dash-botbar { height: 6px; border-radius: 999px; background: #e8edf5; margin-top: 6px; overflow: hidden; }
.dash-botbar i { display: block; height: 100%; border-radius: 999px; transition: width .5s ease; }
.dash-botsub { font-size: .68rem; color: #64748b; font-weight: 600; margin-top: 4px; }
.card-header h3 i { margin-right: 6px; color: #cda434; }
@media (max-width: 768px) {
    .dash-hero { padding: 18px; }
    .dash-greet { font-size: 1.1rem; }
}

@media (max-width: 1200px) {
    .stats-overview {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .stats-overview {
        grid-template-columns: 1fr;
    }
    .content {
        padding: 1rem;
    }
}

/* User Management Row */
.user-details-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}
.card { 
    background: var(--white); 
    border-radius: var(--radius-lg); 
    box-shadow: var(--shadow-sm); 
    border: 1px solid var(--border); 
    overflow: hidden;
}
.card-header { 
    padding: 1.25rem 1.5rem; 
    border-bottom: 1px solid var(--border); 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    background: #fafbfc;
}
.card-header h3 { font-size: 1rem; font-weight: 600; }
.card-body { padding: 1.5rem; }
.btn { padding: 0.75rem 1.5rem; border-radius: var(--radius-md); font-weight: 600; font-size: 0.875rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.2s; border: 1px solid transparent; outline: none; }
.btn-block { display: flex; width: 100%; }
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-light { background: var(--white); border-color: var(--border); color: var(--text-main); }
.btn-light:hover { background: var(--bg-main); }
.btn-success { background: var(--success); color: var(--white); }
.table { width: 100%; border-collapse: collapse; }
.table th { background: var(--bg-main); padding: 1rem 1.5rem; text-align: left; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.table td { padding: 1rem 1.5rem; border-top: 1px solid var(--border); font-size: 0.875rem; }
.table-hover tr:hover { background: var(--bg-main); }
/* Premium Modal System */
.modal { 
    position: fixed; 
    inset: 0; 
    background: rgba(15, 23, 42, 0.7); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    z-index: 1000; 
    backdrop-filter: blur(8px);
    padding: 1rem;
}

/* Chatbot Modal - Professional Design */
#chatbot-modal .chatbot-modal-wrapper {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 0 auto;
}

#chatbot-modal .chatbot-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    min-height: 200px;
    max-height: 65vh;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

#chatbot-modal .chatbot-modal-body::-webkit-scrollbar {
    width: 6px;
}

#chatbot-modal .chatbot-modal-body::-webkit-scrollbar-track {
    background: transparent;
}

#chatbot-modal .chatbot-modal-body::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 3px;
}

.chatbot-modal-header {
    background: linear-gradient(135deg, var(--sidebar-bg) 0%, var(--sidebar-hover) 100%);
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-modal-header .d-flex {
    align-items: center;
    gap: 1rem;
}

.chatbot-modal-header .header-icon {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.25rem;
}

.chatbot-modal-header h3 {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
}

.chatbot-modal-header p {
    color: rgba(255,255,255,0.75);
    font-size: 0.8rem;
    margin: 2px 0 0 0;
}

.chatbot-modal-header .close-icon {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.chatbot-modal-header .close-icon:hover {
    background: rgba(255,255,255,0.25);
    transform: rotate(90deg);
}

.chatbot-modal-body {
    padding: 1.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.section-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6366f1;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0.25rem;
}

.branding-section {
    border-right: 1px solid #e5e7eb;
    padding-right: 1rem;
}

.avatar-upload-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.avatar-box {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.avatar-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    padding: 0;
    border-radius: 50%;
    background: transparent;
    display: block;
}

.avatar-box .edit-icon {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: #4f46e5;
    border-radius: 6px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    cursor: pointer;
}

.color-picker-wrap label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    display: block;
    margin-bottom: 0.35rem;
}

.color-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-inputs input[type="color"] {
    width: 32px;
    height: 30px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
    background: none;
}

.color-inputs input[type="text"] {
    flex: 1;
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    font-family: monospace;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    outline: none;
}

.color-inputs input[type="text"]:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}

.identity-section {
    gap: 0.6rem;
}

.input-row {
    display: flex;
    gap: 0.75rem;
}

.input-row.three-col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
}

.input-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
}

.input-group input,
.input-group textarea {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    outline: none;
    transition: all 0.2s;
    background: #f9fafb;
}

.input-group input:focus,
.input-group textarea:focus {
    border-color: #4f46e5;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.input-group textarea {
    resize: none;
}

.messenger-section {
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    margin-top: 0.5rem;
}

.chatbot-modal-footer {
    padding: 1rem 1.5rem;
    background: #f9fafb;
    display: flex;
    justify-content: center;
    gap: 1rem;
    border-top: 1px solid #e5e7eb;
    flex-wrap: wrap;
}

.btn-cancel {
    padding: 0.65rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #374151;
}

.btn-save {
    padding: 0.65rem 2rem;
    font-size: 0.875rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--sidebar-bg) 0%, var(--sidebar-hover) 100%);
    border: none;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(10, 17, 40, 0.3);
}

.btn-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(10, 17, 40, 0.4);
}

.btn-save:active {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .branding-section {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        padding-right: 0;
        padding-bottom: 1rem;
    }
    .input-row, .input-row.three-col {
        grid-template-columns: 1fr;
    }
}

.modal-content { 
    background: var(--white); 
    border-radius: 1.5rem; 
    width: 100%; 
    max-width: 600px; 
    max-height: 90vh; 
    overflow-y: auto; 
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); 
}

.modal-content-premium .modal-body-premium {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.modal-glass { 
    backdrop-filter: blur(12px); 
    background: rgba(15, 23, 42, 0.45); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    padding: 1rem;
}

.modal-content-premium { 
    background: #ffffff; 
    border-radius: 16px; 
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35); 
    width: 100%; 
    border: none;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-lg {
    max-width: 800px;
    width: 95%;
    margin: 0 auto;
}

.wiz-wrapper {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 32px 64px -12px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 900px;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: wizSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modal Header with Close Button */
.modal-header-with-close {
    background: linear-gradient(135deg, var(--sidebar-bg) 0%, var(--sidebar-hover) 100%);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.modal-header-with-close .modal-title-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.modal-header-with-close .modal-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.modal-header-with-close h3 {
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.modal-header-with-close p {
    color: rgba(255,255,255,0.75);
    font-size: 0.85rem;
    margin: 0;
}

.modal-close-btn {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.modal-close-btn:hover {
    background: rgba(255,255,255,0.25);
    transform: rotate(90deg);
}

/* Modal Body */
.modal-body-premium { 
    padding: 2rem; 
    overflow-y: auto;
    flex: 1;
}

/* Custom Scrollbar for Modal */
.modal-body-premium::-webkit-scrollbar,
.modal-content-premium::-webkit-scrollbar {
    width: 6px;
}

.modal-body-premium::-webkit-scrollbar-track,
.modal-content-premium::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.modal-body-premium::-webkit-scrollbar-thumb,
.modal-content-premium::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.modal-body-premium::-webkit-scrollbar-thumb:hover,
.modal-content-premium::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.modal-header-premium { 
    padding: 2rem 2.5rem; 
    border-bottom: 1px solid #f1f5f9; 
}

.form-section-title { 
    font-size: 0.75rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 1.5px; 
    color: #6366f1; 
    margin-bottom: 1.75rem; 
    display: flex; 
    align-items: center; 
    gap: 12px; 
}

.form-section-title::after { 
    content: ''; 
    flex: 1; 
    height: 1px; 
    background: #f1f5f9; 
}

/* Modal Footer */
.modal-footer-premium {
    padding: 1.25rem 2rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0;
    border-radius: 0 0 20px 20px;
}

/* Better Button Styles */
.btn { 
    padding: 0.75rem 1.5rem; 
    border-radius: 10px; 
    font-weight: 600; 
    font-size: 0.875rem; 
    cursor: pointer; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px; 
    transition: all 0.2s; 
    border: 1px solid transparent; 
    outline: none; 
}

.btn-block { display: flex; width: 100%; }

.btn-primary { 
    background: var(--primary); 
    color: var(--white); 
}
.btn-primary:hover { 
    background: var(--primary-dark); 
    transform: translateY(-1px); 
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}
.btn-primary:active { 
    transform: translateY(0); 
}

.btn-light { 
    background: var(--white); 
    border-color: #e2e8f0; 
    color: #475569; 
}
.btn-light:hover { 
    background: #f1f5f9; 
    border-color: #cbd5e1;
}
.premium-group { margin-bottom: 0.75rem; }
.premium-label { display: block; font-size: 0.85rem; font-weight: 600; color: #475569; margin-bottom: 0.6rem; }
.premium-input { 
    background: #f8fafc; 
    border: 1.5px solid #e2e8f0; 
    border-radius: 12px; 
    padding: 0.8rem 1.1rem; 
    font-size: 0.95rem; 
    color: #1e293b; 
    width: 100%; 
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); 
}
.premium-input:focus { 
    background: #ffffff; 
    border-color: #6366f1; 
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1); 
    outline: none; 
}
.premium-input::placeholder {
    color: #94a3b8;
}
.avatar-uploader { position: relative; width: 70px; height: 70px; margin: 0 auto 0.5rem; }
.avatar-preview { width: 100%; height: 100%; border-radius: 12px; object-fit: contain; background: #f8fafc; border: 2px solid #e2e8f0; padding: 6px; }
.avatar-edit-btn { position: absolute; bottom: -3px; right: -3px; background: #4f46e5; color: #ffffff; width: 22px; height: 22px; border-radius: 6px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 0.65rem; }
.avatar-edit-btn:hover { transform: scale(1.1); background: #4338ca; }
.modal-header { padding: 1.5rem 2rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { font-size: 1.25rem; font-weight: 700; }
.close-btn { font-size: 1.5rem; background: none; border: none; cursor: pointer; color: var(--text-muted); }
.form-control, .form-select { width: 100%; padding: 0.75rem 1rem; border-radius: var(--radius-md); border: 1px solid var(--border); font-family: inherit; font-size: 0.875rem; transition: border-color 0.2s; outline: none; }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1); }
.form-label { display: block; margin-bottom: 0.5rem; font-size: 0.875rem; font-weight: 600; color: var(--text-main); }
.chatbot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; }

.chatbot-card { 
    background: #fff; 
    border-radius: 14px; 
    border: 1px solid #e5e7eb; 
    overflow: hidden; 
    transition: all 0.25s ease; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.chatbot-card:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 12px 24px rgba(0,0,0,0.12); 
    border-color: #d1d5db;
}

.card-accent { 
    height: 5px; 
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
}

.chatbot-card-body { 
    padding: 1.25rem; 
}

/* Bot Header */
.bot-header {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 0.875rem;
}

.bot-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.bot-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    padding: 0;
    border-radius: 50%;
    background: transparent;
    display: block;
}

.bot-info {
    flex: 1;
    min-width: 0;
}

.bot-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bot-slug {
    font-size: 0.75rem;
    color: #9ca3af;
    font-family: 'Fira Code', monospace;
}

/* Bot Description */
.bot-desc {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0 0 1rem 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Bot Footer */
.bot-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid #f3f4f6;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #059669;
    background: #ecfdf5;
    padding: 4px 10px;
    border-radius: 20px;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.bot-actions {
    display: flex;
    gap: 6px;
}

.action-btn {
    height: 32px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid #e0e7ff;
    background: #eef2ff;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.75rem;
    font-weight: 700;
}

.action-btn.delete-btn {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

.action-btn:hover {
    background: #f3f4f6;
    color: #4f46e5;
    border-color: #4f46e5;
}

.action-btn.delete-btn:hover {
    background: #fef2f2;
    color: #ef4444;
    border-color: #ef4444;
}
.code-container { position: relative; background: #1e293b; border-radius: var(--radius-md); padding: 1.5rem; margin-top: 0.5rem; }
#widget-code-display { color: #e2e8f0; font-family: 'Fira Code', monospace; font-size: 0.875rem; white-space: pre-wrap; word-break: break-all; margin: 0; }
.copy-btn { position: absolute; top: 0.75rem; right: 0.75rem; padding: 0.4rem 0.8rem; font-size: 0.75rem; }
.shadow-primary { box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4); }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.p-0 { padding: 0 !important; }

/* Lead Capture Section */
.section-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--sidebar-bg);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0.25rem;
}

.toggle-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}

.toggle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.toggle-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toggle-label span:first-child {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
}

.toggle-desc {
    font-size: 0.7rem;
    color: #9ca3af;
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* End Session Confirmation Modal */
#end-session-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(8px);
}

#end-session-modal.hidden {
    display: none;
}

.confirm-modal-wrapper {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.confirm-modal-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 2rem;
    color: #d97706;
}

.confirm-modal-wrapper h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.75rem;
}

.confirm-modal-wrapper p {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0 0 1.5rem;
}

.confirm-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.confirm-modal-actions .btn-cancel {
    padding: 0.75rem 1.5rem;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    color: #6b7280;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.confirm-modal-actions .btn-cancel:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.confirm-modal-actions .btn-confirm {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.confirm-modal-actions .btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

/* AI Suggestions & Quick Spills */
.suggestions-container, .spills-container {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -10px 25px rgba(0,0,0,0.1);
    z-index: 100;
    max-height: 250px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.suggestions-header, .spills-header {
    padding: 10px 14px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: 0.5px;
}

.suggestions-header button, .spills-header button {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.9rem;
}

.suggestions-list, .spills-list {
    padding: 8px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.suggestion-item, .spill-item {
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    text-align: left;
    font-size: 0.85rem;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1.4;
}

.suggestion-item:hover, .spill-item:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateX(4px);
}

.chat-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #fff;
    border-top: 1px solid var(--border);
}

.ai-suggest-btn, .ai-rephrase-btn, .spills-toggle-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.ai-suggest-btn:hover, .ai-rephrase-btn:hover, .spills-toggle-btn:hover {
    background: #fff;
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.1);
}

.ai-suggest-btn { color: #f59e0b; }
.ai-suggest-btn:hover { border-color: #f59e0b; color: #d97706; }

.spills-toggle-btn { color: var(--primary); }

.chat-input-field {
    flex: 1;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 16px;
    font-size: 0.9rem;
    outline: none;
    background: #f8fafc;
    transition: all 0.2s;
}

.chat-input-field:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.chat-send-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.chat-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(79, 70, 229, 0.4);
}

.user-info-panel {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 20px;
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 0.8rem;
    color: #64748b;
}

.user-info-name {
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Messenger Interactive Stepper */
.setup-stepper-premium {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    padding: 2rem;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    margin-bottom: 3rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex: 1;
    position: relative;
    z-index: 2;
}

.step-item:hover {
    transform: translateY(-5px) scale(1.05);
}

.step-number {
    width: 44px;
    height: 44px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #64748b;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.step-item:hover .step-number {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 10px 20px rgba(205, 164, 52, 0.3);
}

.step-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    transition: color 0.3s ease;
}

.step-item:hover .step-label {
    color: var(--primary);
}

.step-divider {
    flex: 1;
    height: 2px;
    background: #e2e8f0;
    margin: 0 15px;
    margin-bottom: 44px;
    position: relative;
}

.step-divider::after {
    content: '\f061';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    color: #cbd5e1;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.step-item:hover + .step-divider::after {
    color: var(--primary);
    transform: translateY(-50%) translateX(5px);
}

/* Enhanced Messenger Table */
#messenger-webhooks-table {
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

#messenger-webhooks-table thead th {
    background-color: var(--sidebar-bg);
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 1.25rem 1.5rem;
    border: none;
}

#messenger-webhooks-table tbody td {
    padding: 1.25rem 1.5rem;
    vertical-align: middle;
    background: white;
    border-bottom: 1px solid #f1f5f9;
}

#messenger-webhooks-table tbody tr:last-child td {
    border-bottom: none;
}

#messenger-webhooks-table tbody tr:hover td {
    background-color: #f8fafc;
}

.bot-icon-small {
    width: 32px;
    height: 32px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.step-visual {
    width: 80px;
    height: 80px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto;
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.1);
}

.bg-soft-primary { background: #eef2ff; color: #4f46e5; }
.bg-soft-success { background: #ecfdf5; color: #10b981; }
.bg-soft-warning { background: #fffbeb; color: #f59e0b; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .setup-stepper-premium {
        flex-direction: column;
        gap: 20px;
    }
    .step-divider {
        display: none;
    }
}

/* Premium History Table Styling */
.history-header-premium {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.history-filters-bar {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.history-row-premium {
    transition: all 0.2s ease;
}

.history-row-premium:hover {
    background-color: #f1f5f9 !important;
}

.avatar-sm-premium {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.bg-soft-primary { background-color: #e0e7ff; color: #4338ca; }
.bg-soft-info { background-color: #e0f2fe; color: #0369a1; }
.bg-soft-success { background-color: #dcfce7; color: #15803d; }

.border-soft-info { border: 1px solid #bae6fd; }
.border-soft-success { border: 1px solid #bbf7d0; }

.extra-small {
    font-size: 0.7rem;
}

.agent-name-cell {
    font-weight: 500;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-icon-only {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.btn-soft-primary { background: #eef2ff; color: #4f46e5; border: none; }
.btn-soft-primary:hover { background: #e0e7ff; color: #4338ca; }

.btn-soft-success { background: #f0fdf4; color: #16a34a; border: none; }
.btn-soft-success:hover { background: #dcfce7; color: #15803d; }

/* Luxury Modal Overrides */
.luxury-modal {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    background: #fff;
    max-width: 800px;
    width: 90%;
    margin: 2rem auto;
}

.history-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-modal-header {
    background: #fff;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.conversation-participants {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.participant {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
}

.participant.user { background: #f1f5f9; color: #475569; }
.participant.agent { background: #eef2ff; color: #4f46e5; }

.history-modal-body {
    background: #f8fafc;
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
}

.history-message-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
}

.history-message-row.agent { align-items: flex-end; }
.history-message-row.user { align-items: flex-start; }

.history-message-bubble {
    padding: 1rem 1.25rem;
    border-radius: 18px;
    max-width: 80%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.agent .history-message-bubble {
    background: #fff;
    border-bottom-right-radius: 4px;
    border: 1px solid #e2e8f0;
}

.user .history-message-bubble {
    background: #4f46e5;
    color: #fff;
    border-bottom-left-radius: 4px;
}

.ai-bubble {
    background: #f0f9ff !important;
    border-color: #bae6fd !important;
    color: #0369a1 !important;
}

.message-sender {
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 4px;
    opacity: 0.8;
}

.message-time-small {
    font-weight: 400;
    margin-left: 8px;
    opacity: 0.6;
}

.history-modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #f1f5f9;
}

.session-info-pills {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.pill {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    color: #64748b;
}

.history-modal-close {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.history-modal-close:hover {
    background: #e2e8f0;
    color: #ef4444;
}

/* Final Filter Bar Refinements */
.history-filters-bar {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    margin-bottom: 2rem;
}

.history-filters-bar .row {
    align-items: flex-end;
}

.premium-label {
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
    display: block;
}

/* Enhanced Premium UI Refinements */
.history-filters-bar {
    background: #ffffff;
    border: 1px solid #edf2f7;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.04);
    padding: 1.25rem !important;
}

.premium-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.premium-input {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    transition: all 0.2s;
    width: 100%;
    color: #334155;
}

.premium-input:focus {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(205, 164, 52, 0.1);
    outline: none;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.input-with-icon .premium-input {
    padding-left: 2.75rem;
}

.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

.btn-soft-success {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #d1fae5;
    font-weight: 600;
}

.btn-soft-success:hover {
    background: #d1fae5;
    color: #047857;
}

/* Compact Scrollbar for Table */
.table-responsive::-webkit-scrollbar {
    height: 6px;
}
.table-responsive::-webkit-scrollbar-track {
    background: #f1f5f9;
}
.table-responsive::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

/* Strict Horizontal Filter Alignment */
.filter-flex-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap; /* Forces items to stay on one line */
    gap: 1rem;
    align-items: flex-end;
    width: 100%;
}

.filter-flex-row > div {
    min-width: 0; /* Prevents flex items from overflowing */
}

/* Ensure date inputs don't take too much space but stay visible */
input[type="date"].premium-input {
    min-width: 130px;
}

@media (max-width: 991px) {
    .filter-flex-row {
        flex-wrap: wrap; /* Allow wrap on mobile only */
    }
}

/* ============ Activity Logs — Premium ============ */
.al-hero { margin-bottom: 18px; }
.al-hero .dash-greet i { color: var(--primary); margin-right: 8px; }
.al-filter { padding: 18px 20px; margin-bottom: 16px; border-radius: 18px; }
.al-filter-row { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.al-field { display: flex; flex-direction: column; gap: 6px; min-width: 170px; }
.al-field label { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: #64748b; }
.al-field .form-select, .al-field .form-control { border-radius: 12px; border: 1.5px solid #e2e8f0; padding: 10px 14px; font-size: .85rem; font-weight: 600; color: #0f172a; background: #f8fafc; transition: border-color .2s, box-shadow .2s; }
.al-field .form-select:focus, .al-field .form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(205,164,52,.15); outline: none; background: #fff; }
.al-search { flex: 1; min-width: 220px; }
.al-search-wrap { position: relative; }
.al-search-wrap i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: .85rem; }
.al-search-wrap .form-control { padding-left: 38px; width: 100%; }
.al-go { border: none; cursor: pointer; border-radius: 12px; padding: 11px 22px; font-weight: 800; font-size: .82rem; color: #fff; background: linear-gradient(135deg,#0a1128,#2b3f8f); box-shadow: 0 10px 22px -10px rgba(10,17,40,.5); display: inline-flex; gap: 8px; align-items: center; transition: transform .2s, box-shadow .2s; }
.al-go:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -10px rgba(10,17,40,.55); }
.al-feed-card { border-radius: 18px; overflow: hidden; }
.al-feed-head { justify-content: space-between; }
.al-count { font-size: .72rem; font-weight: 800; color: #64748b; background: #f1f5f9; border-radius: 999px; padding: 4px 14px; }
.al-feed { display: flex; flex-direction: column; }
.al-item { display: flex; gap: 14px; align-items: flex-start; padding: 16px 20px; border-bottom: 1px solid #eef2f7; transition: background .2s; position: relative; }
.al-item:last-child { border-bottom: none; }
.al-item:hover { background: linear-gradient(90deg, rgba(205,164,52,.06), transparent 60%); }
.al-item::before { content: ''; position: absolute; left: 43px; top: 62px; bottom: -2px; width: 2px; background: linear-gradient(#e2e8f0, transparent); }
.al-item:last-child::before { display: none; }
.al-ico { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; font-size: 1.1rem; color: #fff; flex-shrink: 0; box-shadow: 0 10px 20px -8px rgba(10,17,40,.45); z-index: 1; }
.al-m-navy { background: linear-gradient(135deg,#0a1128,#2b3f8f); }
.al-m-indigo { background: linear-gradient(135deg,#4f46e5,#818cf8); }
.al-m-gold { background: linear-gradient(135deg,#cda434,#8a6d1c); }
.al-m-green { background: linear-gradient(135deg,#059669,#34d399); }
.al-m-teal { background: linear-gradient(135deg,#0d9488,#5eead4); }
.al-m-slate { background: linear-gradient(135deg,#334155,#94a3b8); }
.al-m-orange { background: linear-gradient(135deg,#ea580c,#fdba74); }
.al-m-purple { background: linear-gradient(135deg,#7c3aed,#c4b5fd); }
.al-m-red { background: linear-gradient(135deg,#dc2626,#f87171); }
.al-m-gray { background: linear-gradient(135deg,#475569,#cbd5e1); }
.al-m-cyan { background: linear-gradient(135deg,#0891b2,#67e8f9); }
.al-m-dark { background: linear-gradient(135deg,#020617,#475569); }
.al-main { flex: 1; min-width: 0; }
.al-summary { font-weight: 800; font-size: .88rem; color: #0f172a; letter-spacing: -.2px; }
.al-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.al-actor { display: inline-flex; align-items: center; gap: 7px; font-size: .76rem; font-weight: 800; color: #334155; }
.al-ava { width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg,#0a1128,#2b3f8f); color: #fff; display: inline-grid; place-items: center; font-size: .68rem; font-weight: 900; }
.al-pill { font-size: .66rem; font-weight: 900; text-transform: uppercase; letter-spacing: .5px; border-radius: 999px; padding: 3px 11px; }
.al-a-create, .al-a-upload, .al-a-import, .al-a-push, .al-a-sync { background: #dcfce7; color: #15803d; }
.al-a-update, .al-a-save, .al-a-toggle, .al-a-take { background: #dbeafe; color: #1d4ed8; }
.al-a-delete, .al-a-revoke, .al-a-cancel, .al-a-clear { background: #fee2e2; color: #b91c1c; }
.al-a-login, .al-a-close, .al-a-mark_paid { background: #f1f5f9; color: #475569; }
.al-mod { font-size: .7rem; font-weight: 800; color: #7c8aa5; text-transform: uppercase; letter-spacing: .4px; }
.al-chip { display: inline-flex; align-items: center; gap: 6px; font-size: .7rem; font-weight: 800; border-radius: 999px; padding: 3px 11px; }
.al-chip i { font-size: .66rem; }
.al-chip-bot { background: #fdf6e3; color: #8a6d1c; border: 1px solid #f0dfae; }
.al-chip-global { background: #eef2ff; color: #4f46e5; border: 1px solid #dbe2ff; }
.al-ip { font-size: .68rem; font-weight: 600; color: #94a3b8; font-family: monospace; }
.al-time { text-align: right; font-size: .74rem; font-weight: 800; color: #0f172a; white-space: nowrap; flex-shrink: 0; }
.al-time small { display: block; font-weight: 600; color: #94a3b8; font-size: .66rem; margin-top: 2px; }
.al-pager { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-top: 1px solid #eef2f7; background: #fafbfd; }
.al-page { border: 1.5px solid #e2e8f0; background: #fff; color: #0f172a; box-shadow: none; font-size: .76rem; padding: 8px 16px; }
.al-page:hover { background: #0a1128; color: #fff; border-color: #0a1128; }
.al-loading, .al-empty { text-align: center; padding: 48px 20px; color: #94a3b8; }
.al-loading i, .al-empty i { font-size: 2rem; display: block; margin-bottom: 12px; color: #cbd5e1; }
.al-empty p { font-weight: 800; color: #475569; margin: 0 0 4px; }
.al-empty span { font-size: .78rem; }
@media (max-width: 640px) {
    .al-item { padding: 14px; gap: 10px; }
    .al-item::before { left: 37px; }
    .al-time { display: none; }
    .al-field { min-width: 100%; }
    .al-go { width: 100%; justify-content: center; }
}
/* ============ Inquiries — Premium ============ */
.inq-item { border-left: 4px solid transparent; }
.inq-open { border-left-color: #cda434; }
.inq-answered { border-left-color: #1d4ed8; }
.inq-closed { border-left-color: #cbd5e1; opacity: .92; }
.inq-ava-open { background: linear-gradient(135deg,#cda434,#8a6d1c); font-weight: 900; }
.inq-ava-answered { background: linear-gradient(135deg,#1d4ed8,#60a5fa); font-weight: 900; }
.inq-ava-closed { background: linear-gradient(135deg,#64748b,#cbd5e1); font-weight: 900; }
.inq-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inq-name { font-weight: 900; font-size: .92rem; color: #0f172a; letter-spacing: -.2px; }
.inq-s-open { background: #fdf3d7; color: #8a6d1c; }
.inq-s-answered { background: #dbeafe; color: #1d4ed8; }
.inq-s-closed { background: #f1f5f9; color: #64748b; }
.inq-t-quote { background: #fdf6e3; color: #8a6d1c; border: 1px solid #f0dfae; }
.inq-t-order { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.inq-t-support { background: #dbeafe; color: #1d4ed8; border: 1px solid #bfdbfe; }
.inq-t-general { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.inq-subject { font-weight: 700; font-size: .84rem; color: #1e293b; margin-top: 6px; }
.inq-msg { font-size: .8rem; color: #64748b; margin-top: 4px; line-height: 1.55; }
.inq-more { border: none; background: none; cursor: pointer; font-size: .72rem; font-weight: 800; color: var(--primary-dark); padding: 0; }
.inq-more:hover { text-decoration: underline; }
.inq-side { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; flex-shrink: 0; }
.inq-side small { text-align: right; font-size: .68rem; font-weight: 600; color: #94a3b8; line-height: 1.5; }
.inq-status { border-radius: 12px; border: 1.5px solid #e2e8f0; background: #0a1128; color: #fff; font-size: .74rem; font-weight: 800; padding: 8px 12px; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.inq-status:hover { transform: translateY(-1px); box-shadow: 0 10px 20px -10px rgba(10,17,40,.5); }
.inq-status option { background: #fff; color: #0f172a; }
@media (max-width: 640px) {
    .inq-side { align-items: stretch; width: 100%; }
    .inq-side small { text-align: left; }
    .inq-item { flex-wrap: wrap; }
}
/* ---------- Knowledge Base premium cards (kb-*) ---------- */
.kb-card { align-items: flex-start; }
.kb-card:hover { background: linear-gradient(90deg, rgba(205,164,52,.07), transparent 65%); }
.kb-card.kb-open { background: linear-gradient(90deg, rgba(205,164,52,.09), transparent 65%); }
.kb-ico { background: linear-gradient(135deg, #0a1128, #2b3f8f); color: #fff; }
.kb-main { flex: 1 1 auto; min-width: 0; }
.kb-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.kb-q { margin: 0; font-size: .95rem; font-weight: 800; color: #0f172a; line-height: 1.4; }
.kb-badges { display: flex; gap: 6px; flex-shrink: 0; }
.kb-prio { display: inline-flex; align-items: center; font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.kb-prio-high { background: #fef3c7; color: #92400e; border: 1px solid #f5d67a; }
.kb-prio-mid { background: #e0e7ff; color: #3730a3; border: 1px solid #c3cbff; }
.kb-prio-low { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }
.kb-answer { margin: 6px 0 0; font-size: .84rem; line-height: 1.6; color: #334155; white-space: pre-wrap; word-break: break-word; }
.kb-more { background: none; border: none; padding: 2px 0; margin-top: 2px; font-size: .76rem; font-weight: 800; color: #8a6d1c; cursor: pointer; }
.kb-more i { font-size: .62rem; margin-left: 3px; transition: transform .2s; }
.kb-card.kb-open .kb-more i { transform: rotate(90deg); }
.kb-more:hover { text-decoration: underline; }
.kb-suggest { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; font-size: .78rem; font-weight: 600; color: #6d28d9; background: #f5f3ff; border: 1px dashed #c4b5fd; border-radius: 12px; padding: 8px 12px; }
.kb-suggest i { margin-top: 2px; font-size: .72rem; }
.kb-kw-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.kb-kw { display: inline-flex; align-items: center; gap: 5px; font-size: .68rem; font-weight: 700; color: #475569; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 999px; padding: 2px 10px; }
.kb-kw i { font-size: .6rem; color: #94a3b8; }
.kb-meta { margin-top: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kb-actions { display: flex; gap: 6px; flex-shrink: 0; }
.kb-icon-btn { width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid #e2e8f0; background: #f8fafc; color: #475569; cursor: pointer; transition: transform .15s, box-shadow .15s, color .15s; }
.kb-icon-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 16px -8px rgba(10,17,40,.35); color: #0a1128; }
.kb-icon-btn.kb-del:hover { color: #dc2626; border-color: #fecaca; background: #fef2f2; }
@media (max-width: 640px) {
    .kb-title-row { flex-direction: column; }
    .kb-actions { width: 100%; justify-content: flex-end; margin-top: 4px; }
}
/* ---- Doc Links premium cards ---- */
.dl-ico-url { background: linear-gradient(135deg,#1d4ed8,#60a5fa); }
.dl-ico-pdf { background: linear-gradient(135deg,#dc2626,#f87171); }
.dl-ico-html { background: linear-gradient(135deg,#7c3aed,#a78bfa); }
.dl-card:hover { background: linear-gradient(90deg, rgba(29,78,216,.05), transparent 60%); }
.dl-main { display: flex; flex-direction: column; gap: 6px; }
.dl-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dl-title { font-weight: 800; color: #0f172a; font-size: .95rem; }
.dl-type-url { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.dl-type-pdf { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.dl-type-html { background: #f5f3ff; color: #7c3aed; border: 1px solid #ddd6fe; }
.dl-source { font-size: .78rem; color: #475569; min-width: 0; }
.dl-source a { color: #2563eb; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; display: inline-block; vertical-align: bottom; }
.dl-source i, .dl-meta i { color: #94a3b8; font-size: .7rem; }
.dl-preview { margin: 2px 0 0; font-size: .8rem; color: #64748b; line-height: 1.55; }
.dl-expand { background: none; border: none; padding: 0; color: #2563eb; font-weight: 800; font-size: .75rem; cursor: pointer; }
.dl-expand:hover { text-decoration: underline; }
.dl-meta { font-size: .72rem; color: #94a3b8; font-weight: 600; }
.dl-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.dl-actions .btn { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; border-radius: 10px; }
/* ---- Catalog premium cards ---- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; padding: 18px 20px; }
.cat-card { border: 1px solid #e8edf5; border-radius: 16px; overflow: hidden; background: #fff; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.cat-card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px -16px rgba(10,17,40,.25); }
.cat-media { aspect-ratio: 16/10; background: #f1f5f9; overflow: hidden; }
.cat-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.cat-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.cat-type-product { background: #fdf6e3; color: #8a6d1c; border: 1px solid #f0dfae; }
.cat-type-service { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.cat-cat { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.cat-name { margin: 0; font-size: 1rem; font-weight: 800; color: #0f172a; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cat-price { font-size: 1.35rem; font-weight: 900; color: #0f172a; letter-spacing: -.5px; }
.cat-bot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .72rem; font-weight: 600; color: #94a3b8; }
.cat-bot > i { font-size: .7rem; }
.cat-status { display: inline-flex; align-items: center; gap: 5px; font-size: .66rem; font-weight: 900; text-transform: uppercase; letter-spacing: .5px; border-radius: 999px; padding: 3px 11px; }
.cat-status-on { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.cat-status-off { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }
/* ---- Catalog qty (opt-in stock tracking) ---- */
.cat-qty-wrap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cat-qty-label { font-size: .78rem; font-weight: 700; color: #475569; }
.cat-qty-input { max-width: 120px; margin-left: auto; }
.cat-qty-input:disabled { background: #f1f5f9; color: #94a3b8; cursor: not-allowed; }
.cat-qty-hint { display: block; margin-top: 6px; font-size: .7rem; color: #94a3b8; line-height: 1.4; }
.cat-qty-unlimited { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }
.cat-qty-tracked { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.cat-qty-oos { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.cat-card-oos .cat-media img { filter: grayscale(1) contrast(.85); opacity: .55; }
.cat-card-oos .cat-name, .cat-card-oos .cat-price { color: #94a3b8; }
.cat-oos-ribbon { display: flex; align-items: center; justify-content: center; gap: 6px; background: #b91c1c; color: #fff; font-size: .68rem; font-weight: 900; text-transform: uppercase; letter-spacing: .4px; padding: 6px 10px; }
.cat-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 6px; }
.cat-btn { flex: 1; border-radius: 10px; padding: 8px 10px; font-weight: 800; font-size: .76rem; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; justify-content: center; transition: transform .15s, box-shadow .15s; }
.cat-edit { border: 1.5px solid #e2e8f0; background: #f8fafc; color: #0f172a; }
.cat-edit:hover { border-color: #cda434; box-shadow: 0 6px 16px -8px rgba(205,164,52,.6); }
.cat-del { border: 1.5px solid #fecaca; background: #fef2f2; color: #dc2626; flex: 0 0 44px; }
.cat-del:hover { background: #dc2626; border-color: #dc2626; color: #fff; }
@media (max-width: 640px) {
    .cat-grid { grid-template-columns: 1fr; gap: 10px; padding: 12px 14px; }
    .dl-title-row { gap: 6px; }
    .dl-actions { width: 100%; }
    .dl-actions .btn { flex: 1; justify-content: center; }
    .dl-source a { max-width: 100%; white-space: normal; word-break: break-all; }
}
/* ============ Live Chat premium (lc-*) ============ */
.lc-queue-badge { font-weight: 800; border-radius: 999px; padding: 4px 12px; }
.lc-queue-badge.lc-hot { background: #dc2626 !important; color: #fff !important; box-shadow: 0 6px 14px -6px rgba(220,38,38,.6); }
.lc-queue { max-height: 600px; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.lc-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #eef2f7; border-radius: 14px; background: #fff; cursor: pointer; transition: transform .2s, box-shadow .2s, border-color .2s; }
.lc-row:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -16px rgba(10,17,40,.35); border-color: #e0d3a3; }
.lc-waiting { border-left: 4px solid #cda434; }
.lc-active { border-left: 4px solid #1d4ed8; }
.lc-current { background: linear-gradient(90deg, rgba(29,78,216,.07), transparent 70%); border-color: #bcd0ff; }
.lc-ava { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 1rem; color: #fff; flex-shrink: 0; background: linear-gradient(135deg,#0a1128,#2b3f8f); box-shadow: 0 8px 16px -8px rgba(10,17,40,.5); }
.lc-ava-wait { background: linear-gradient(135deg,#cda434,#8a6d1c); }
.lc-ava-live { background: linear-gradient(135deg,#1d4ed8,#60a5fa); }
.lc-row-main { flex: 1; min-width: 0; }
.lc-row-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lc-name { font-weight: 800; font-size: .88rem; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-time { font-size: .7rem; font-weight: 700; color: #94a3b8; white-space: nowrap; }
.lc-time i { margin-right: 3px; }
.lc-row-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.lc-wait-pill { display: inline-flex; align-items: center; gap: 6px; font-size: .68rem; font-weight: 800; color: #8a6d1c; background: #fdf6e3; border: 1px solid #f0dfae; border-radius: 999px; padding: 3px 10px; }
.lc-live-pill { display: inline-flex; align-items: center; gap: 6px; font-size: .68rem; font-weight: 800; color: #1d4ed8; background: #dbeafe; border-radius: 999px; padding: 3px 10px; }
.lc-agent { font-size: .72rem; font-weight: 700; color: #64748b; }
.lc-agent i { margin-right: 4px; color: #94a3b8; }
.lc-take { border-radius: 999px; font-weight: 800; font-size: .72rem; padding: 6px 14px; display: inline-flex; gap: 6px; align-items: center; flex-shrink: 0; }
.lc-go { color: #cbd5e1; font-size: .8rem; flex-shrink: 0; }
.lc-row:hover .lc-go { color: #1d4ed8; }
.lc-chat-head { padding: 14px 18px; border-bottom: 1px solid #eef2f7; background: #fafbfd; }
.lc-name-badge { font-size: .72rem; border-radius: 999px; padding: 4px 12px; }
.lc-status { display: flex; align-items: center; gap: 7px; font-size: .74rem; }
.lc-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.lc-dot-live { background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.2); animation: lcPulse 2s infinite; }
.lc-dot-idle { background: #cbd5e1; }
@keyframes lcPulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
.lc-display { background-color: #f6f8fc; background-image: radial-gradient(#dbe2ef 1px, transparent 1px); background-size: 20px 20px; }
.lc-welcome .lc-welcome-ico { width: 84px; height: 84px; border-radius: 28px; display: grid; place-items: center; font-size: 2rem; color: #fff; background: linear-gradient(135deg,#0a1128,#2b3f8f); box-shadow: 0 18px 36px -14px rgba(10,17,40,.5); margin: 0 auto 18px; }
.lc-uinfo { background: #fafbfd; border-bottom: 1px solid #eef2f7; padding: 10px 18px; font-size: .8rem; color: #475569; }
.lc-uinfo-name { font-weight: 800; color: #0f172a; margin-bottom: 2px; }
.lc-uinfo-name i, .lc-uinfo .user-info-item i { color: #cda434; margin-right: 6px; }
.lc-msg { max-width: 100%; }
.lc-meta { font-size: .7rem; font-weight: 700; color: #94a3b8; margin-bottom: 4px; }
.lc-meta .lc-time { font-size: .68rem; font-weight: 600; color: #b0bac9; }
.lc-bubble { max-width: 75%; padding: 10px 15px; font-size: .86rem; line-height: 1.5; word-break: break-word; box-shadow: 0 6px 16px -10px rgba(10,17,40,.35); }
.lc-bubble.lc-agent { background: linear-gradient(135deg,#0a1128,#2b3f8f); color: #fff; border-radius: 16px 16px 4px 16px; }
.lc-bubble.lc-visitor { background: #eef2f7; color: #0f172a; border: 1px solid #e2e8f0; border-radius: 16px 16px 16px 4px; }
.lc-sys { display: block; width: fit-content; max-width: 90%; margin-left: auto; margin-right: auto; text-align: center; font-size: .76rem; font-weight: 700; border-radius: 999px; padding: 8px 18px; background: #eef2f7; color: #475569; border: 1px solid #e2e8f0; }
.lc-sys i { margin-right: 6px; }
.lc-sys-closed { background: #fee2e2; color: #991b1b; border-color: #fecaca; border-radius: 12px; }
.lc-sys-warn { background: #fef3c7; color: #92400e; border-color: #fde68a; border-radius: 12px; }
/* ============ Users premium (usr-*) ============ */
.usr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.usr-card { background: #fff; border: 1px solid #e8edf5; border-radius: 18px; padding: 18px; transition: transform .25s, box-shadow .25s; }
.usr-card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px -16px rgba(10,17,40,.25); }
.usr-top { display: flex; align-items: center; gap: 12px; }
.usr-ava { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 1.05rem; color: #fff; flex-shrink: 0; box-shadow: 0 10px 20px -8px rgba(10,17,40,.45); }
.usr-ava.usr-gold { background: linear-gradient(135deg,#cda434,#8a6d1c); }
.usr-ava.usr-navy { background: linear-gradient(135deg,#0a1128,#2b3f8f); }
.usr-id { flex: 1; min-width: 0; }
.usr-name { font-weight: 800; font-size: .92rem; color: #0f172a; display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.usr-email { font-size: .76rem; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.usr-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.usr-dot.on { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.2); }
.usr-dot.off { background: #cbd5e1; }
.usr-actions { display: flex; gap: 6px; flex-shrink: 0; }
.usr-icon { border-radius: 10px; }
.usr-pills { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.usr-role-super { background: #fdf6e3; color: #8a6d1c; border: 1px solid #f0dfae; }
.usr-role-admin { background: #dbeafe; color: #1d4ed8; }
.usr-role-op { background: #f1f5f9; color: #475569; }
.usr-status { display: inline-flex; align-items: center; gap: 6px; font-size: .7rem; font-weight: 800; }
.usr-status.on { color: #15803d; }
.usr-status.off { color: #94a3b8; }
.usr-bots { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid #eef2f7; }
.usr-bot i { color: #8a6d1c; }
@media (max-width: 900px) {
    .lc-bubble { max-width: 88%; }
}
@media (max-width: 640px) {
    .usr-grid { grid-template-columns: 1fr; }
    .lc-row { padding: 10px 12px; }
    .lc-take { padding: 5px 10px; }
}
/* ============ Orders premium (ord-*) ============ */
.ord-pending { border-left-color: #cda434; }
.ord-confirmed { border-left-color: #1d4ed8; }
.ord-completed { border-left-color: #059669; }
.ord-cancelled { border-left-color: #cbd5e1; opacity: .92; }
.ord-ava-pending { background: linear-gradient(135deg,#cda434,#8a6d1c); font-weight: 900; }
.ord-ava-confirmed { background: linear-gradient(135deg,#1d4ed8,#60a5fa); font-weight: 900; }
.ord-ava-completed { background: linear-gradient(135deg,#059669,#34d399); font-weight: 900; }
.ord-ava-cancelled { background: linear-gradient(135deg,#64748b,#cbd5e1); font-weight: 900; }
.ord-s-pending { background: #fdf3d7; color: #8a6d1c; }
.ord-s-confirmed { background: #dbeafe; color: #1d4ed8; }
.ord-s-completed { background: #dcfce7; color: #15803d; }
.ord-s-cancelled { background: #f1f5f9; color: #64748b; }
.ord-qty { font-size: .72rem; font-weight: 800; color: #8a6d1c; background: #fdf6e3; border-radius: 999px; padding: 1px 9px; }
.ord-total { font-size: .9rem; font-weight: 900; color: #0f172a; }
/* ---- Orders: payment status mirrors Payment Activity ---- */
.ord-st { font-size: .64rem; font-weight: 900; text-transform: uppercase; letter-spacing: .5px; border-radius: 999px; padding: 3px 11px; white-space: nowrap; }
.ord-gw { font-size: .68rem; font-weight: 800; color: #64748b; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 999px; padding: 1px 9px; margin-left: 6px; white-space: nowrap; }
.ord-cancel { display: inline-flex; align-items: center; justify-content: center; gap: 5px; width: auto; margin-bottom: 0; padding: 6px 12px; border-radius: 9px; border: 1.5px solid #fecaca; background: #fef2f2; color: #dc2626; font-size: .72rem; font-weight: 800; cursor: pointer; transition: background .15s, color .15s; }
.ord-cancel:hover { background: #dc2626; border-color: #dc2626; color: #fff; }
/* Status pinned right; action buttons sit directly beneath it. */
.ord-side { align-items: flex-end; text-align: right; }
.ord-side .ord-st { margin-bottom: 8px; }
.ord-side small { text-align: right; display: block; }
.ord-btnrow { display: flex; gap: 6px; justify-content: flex-end; margin-bottom: 8px; }
.ord-btn { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; border: 1.5px solid #e2e8f0; background: #f8fafc; color: #0f172a; font-size: .8rem; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s, color .15s; }
.ord-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 14px -8px rgba(15,23,42,.5); }
.ord-view { border-color: #c7d2fe; background: #eef2ff; color: #4338ca; }
.ord-view:hover { border-color: #cda434; background: #cda434; color: #fff; }
.ord-cancel.ord-btn { width: 32px; padding: 0; font-size: .8rem; }
/* ============ Order details modal (ovx) ============ */
.ovx { max-height: 92vh; border-radius: 20px; overflow: hidden; }

/* Top bar */
.ovx-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; background: linear-gradient(135deg, var(--sidebar-bg) 0%, var(--sidebar-hover) 100%); flex-shrink: 0; }
.ovx-bar-l { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: .95rem; letter-spacing: -.2px; }
.ovx-bar-l > i { color: var(--primary); font-size: 1rem; }
.ovx-x-close { width: 34px; height: 34px; border: none; border-radius: 10px; background: rgba(255,255,255,.14); color: #fff; font-size: .95rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background .2s, transform .2s; flex-shrink: 0; }
.ovx-x-close:hover { background: rgba(255,255,255,.26); transform: rotate(90deg); }

/* Scroll region */
.ovx-scroll { flex: 1; min-height: 0; overflow-y: auto; background: #f8fafc; }
.ovx-scroll::-webkit-scrollbar { width: 8px; }
.ovx-scroll::-webkit-scrollbar-track { background: #eef2f7; }
.ovx-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; border: 2px solid #eef2f7; }
.ovx-scroll::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Hero */
.ovx-hero { padding: 20px 22px 0; background: linear-gradient(135deg, var(--sidebar-bg) 0%, #16203c 60%, var(--sidebar-hover) 100%); color: #fff; position: relative; overflow: hidden; }
.ovx-hero::after { content: ''; position: absolute; right: -60px; top: -70px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(205,164,52,.22), transparent 70%); pointer-events: none; }
/* The halo picks up the order's state, so the hero reads at a glance. */
.ovx-hero-paid::after { background: radial-gradient(circle, rgba(16,185,129,.3), transparent 70%); }
.ovx-hero-expired::after, .ovx-hero-failed::after { background: radial-gradient(circle, rgba(239,68,68,.3), transparent 70%); }
.ovx-hero-awaiting_receipt::after { background: radial-gradient(circle, rgba(245,158,11,.28), transparent 70%); }
.ovx-hero-pending::after { background: radial-gradient(circle, rgba(59,130,246,.26), transparent 70%); }
.ovx-hero-cancelled::after { background: radial-gradient(circle, rgba(148,163,184,.28), transparent 70%); }
.ovx-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; position: relative; z-index: 1; }
.ovx-hero-l { min-width: 0; }
.ovx-label { font-size: .62rem; font-weight: 900; text-transform: uppercase; letter-spacing: 1.2px; color: rgba(255,255,255,.5); }
.ovx-inv { display: flex; align-items: center; gap: 8px; font-size: 1.3rem; font-weight: 900; letter-spacing: -.4px; margin-top: 3px; word-break: break-all; }
.ovx-crumb { display: flex; align-items: center; gap: 7px; margin-top: 6px; font-size: .76rem; color: rgba(255,255,255,.7); font-weight: 600; flex-wrap: wrap; }
.ovx-crumb > i { color: var(--primary); }
.ovx-tag { padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.18); font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; }
.ovx-hero-r { text-align: right; }
.ovx-amt { font-size: 1.75rem; font-weight: 900; letter-spacing: -.8px; line-height: 1.1; margin-top: 8px; }
.ovx-amt-sub { font-size: .7rem; color: rgba(255,255,255,.55); font-weight: 700; margin-top: 2px; }

/* Status pills */
.ovx-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: .62rem; font-weight: 900; text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }
.ovx-badge-lg { font-size: .66rem; padding: 5px 13px; }

/* Progress steps */
.ovx-steps { list-style: none; display: flex; gap: 8px; margin: 18px -22px 0; padding: 14px 22px 16px; position: relative; z-index: 1; }
.ovx-step { flex: 1; display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); min-width: 0; }
.ovx-step > i { color: var(--primary); font-size: .82rem; }
.ovx-step > span { font-size: .74rem; font-weight: 800; letter-spacing: -.1px; }
.ovx-step > small { font-size: .62rem; color: rgba(255,255,255,.5); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ovx-step.is-last { background: rgba(255,255,255,.13); border-color: rgba(205,164,52,.4); }

/* Card grid */
.ovx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 16px 22px; }
.ovx-card { background: #fff; border: 1px solid #e8edf5; border-radius: 14px; padding: 14px 16px; box-shadow: 0 2px 8px -6px rgba(15,23,42,.18); min-width: 0; }
.ovx-card-h { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: .68rem; font-weight: 900; text-transform: uppercase; letter-spacing: .9px; color: #64748b; padding-bottom: 9px; border-bottom: 1px solid #eef2f7; }
.ovx-card-h > i { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; font-size: .7rem; background: #f1f5f9; color: #475569; }
.ovx-item .ovx-card-h > i { background: #fdf6e3; color: #8a6d1c; }
.ovx-user .ovx-card-h > i { background: #eff6ff; color: #1d4ed8; }
.ovx-pay .ovx-card-h > i { background: #ecfdf5; color: #059669; }
.ovx-rec .ovx-card-h > i { background: #f5f3ff; color: #6d28d9; }

/* Key/value rows */
.ovx-rows { display: flex; flex-direction: column; }
.ovx-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: .79rem; }
.ovx-row + .ovx-row { border-top: 1px dashed #f1f5f9; }
.ovx-k { color: #94a3b8; font-weight: 700; white-space: nowrap; }
.ovx-v { color: #0f172a; font-weight: 700; text-align: right; min-width: 0; word-break: break-word; display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.ovx-none { color: #cbd5e1; font-weight: 700; }
.ovx-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .74rem; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 6px; padding: 1px 7px; word-break: break-all; }
.ovx-link { color: #1d4ed8; font-weight: 800; text-decoration: none; border-bottom: 1px dotted #93c5fd; }
.ovx-link:hover { color: #1e40af; border-bottom-style: solid; }

/* Copy button */
.ovx-copy { width: 22px; height: 22px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #e2e8f0; background: #f8fafc; color: #94a3b8; border-radius: 6px; font-size: .6rem; cursor: pointer; transition: all .18s; }
.ovx-copy:hover { color: var(--primary-dark); border-color: var(--primary); background: #fffbeb; }
.ovx-copy.ok { color: #059669; border-color: #a7f3d0; background: #ecfdf5; }
.ovx-inv .ovx-copy { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); color: rgba(255,255,255,.75); }
.ovx-inv .ovx-copy:hover { background: rgba(255,255,255,.24); color: #fff; border-color: rgba(255,255,255,.4); }

/* Footer */
.ovx-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; background: #fff; border-top: 1px solid #e8edf5; position: sticky; bottom: 0; flex-wrap: wrap; }
.ovx-foot-note { font-size: .72rem; color: #94a3b8; font-weight: 600; }
.ovx-x { display: inline-flex; align-items: center; gap: 7px; padding: 9px 18px; border-radius: 10px; font-size: .8rem; font-weight: 800; cursor: pointer; border: 1.5px solid transparent; transition: transform .15s, box-shadow .15s, background .15s; }
.ovx-x:hover { transform: translateY(-1px); }
.ovx-x-primary { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: #fff; box-shadow: 0 6px 16px -8px rgba(205,164,52,.7); }
.ovx-x-danger { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.ovx-x-danger:hover { background: #dc2626; border-color: #dc2626; color: #fff; }

@media (max-width: 640px) {
    .ovx-grid { grid-template-columns: 1fr; padding: 12px; gap: 10px; }
    .ovx-hero { padding: 16px 14px 0; }
    .ovx-steps { margin: 14px -14px 0; padding: 12px 14px 14px; flex-direction: column; }
    .ovx-step { flex-direction: row; align-items: center; gap: 9px; }
    .ovx-step > small { margin-left: auto; }
    .ovx-hero-top { flex-direction: column; gap: 12px; }
    .ovx-hero-r { text-align: left; }
    .ovx-foot { padding: 12px 14px; }
    .ovx-foot-note { display: none; }
    .ovx-x { flex: 1; justify-content: center; }
}
.ord-paid { border-left-color: #10b981; }
.ord-awaiting_receipt { border-left-color: #f59e0b; }
.ord-pay_on_delivery { border-left-color: #64748b; }
.ord-expired { border-left-color: #ef4444; }
.ord-failed { border-left-color: #ef4444; }
.ord-ava-paid { background: linear-gradient(135deg,#10b981,#34d399); font-weight: 900; }
.ord-ava-awaiting_receipt { background: linear-gradient(135deg,#f59e0b,#fbbf24); font-weight: 900; }
.ord-ava-pay_on_delivery { background: linear-gradient(135deg,#64748b,#94a3b8); font-weight: 900; }
.ord-ava-expired { background: linear-gradient(135deg,#ef4444,#f87171); font-weight: 900; }
.ord-ava-failed { background: linear-gradient(135deg,#dc2626,#f87171); font-weight: 900; }
/* .ord-ava-confirmed / .ord-ava-completed already defined in the Orders block above */
/* ============ Messenger premium (msg-*) ============ */
.msg-steps-card { padding: 18px 20px; margin-bottom: 16px; border-radius: 18px; }
.msg-steps-head { display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.msg-steps-head h3 { margin: 0; font-size: .95rem; font-weight: 800; color: #0f172a; }
.msg-steps-head h3 i { color: var(--primary); margin-right: 6px; }
.msg-steps-hint { font-size: .72rem; font-weight: 700; color: #94a3b8; }
.msg-steps { display: none; margin-top: 16px; }
.msg-steps.open { display: flex; }
.msg-item { align-items: flex-start; }
.msg-ava { padding: 0 !important; overflow: hidden; }
.msg-ava img { width: 100%; height: 100%; object-fit: cover; }
.msg-field { margin-top: 10px; }
.msg-field > label { display: block; font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: #64748b; margin-bottom: 5px; }
.msg-masked-note { color: #8a6d1c; background: #fdf6e3; border-radius: 999px; padding: 1px 8px; margin-left: 4px; }
.msg-copy { display: flex; gap: 0; max-width: 460px; }
.msg-copy input { flex: 1; min-width: 0; border: 1.5px solid #e2e8f0; border-right: none; border-radius: 12px 0 0 12px; background: #f8fafc; padding: 9px 13px; font-size: .76rem; font-weight: 600; color: #0f172a; font-family: monospace; }
.msg-copy input:focus { outline: none; border-color: var(--primary); }
.msg-copy button { border: 1.5px solid #e2e8f0; background: #fff; color: #475569; padding: 0 13px; cursor: pointer; transition: all .2s; }
.msg-copy button:first-of-type { border-radius: 0; }
.msg-copy button:last-child { border-radius: 0 12px 12px 0; border-left: none; }
.msg-copy button:hover { background: #0a1128; border-color: #0a1128; color: #fff; }
.msg-s-on { background: #dcfce7; color: #15803d; }
.msg-s-off { background: #fee2e2; color: #b91c1c; }
.msg-s-warn { background: #fdf3d7; color: #8a6d1c; }
.msg-settings { white-space: nowrap; }
@media (max-width: 640px) {
    .msg-item { flex-wrap: wrap; }
    .msg-copy { max-width: 100%; }
    .msg-steps.open { flex-direction: column; }
}
/* ============ Chat history premium (hist-*) ============ */
.hist-ava-ai { background: linear-gradient(135deg,#4f46e5,#818cf8); font-weight: 900; }
.hist-ava-live { background: linear-gradient(135deg,#059669,#34d399); font-weight: 900; }
.hist-ai { background: #e0e7ff; color: #3730a3; }
.hist-live { background: #dcfce7; color: #15803d; }
.hist-view { border: 1.5px solid #e2e8f0; background: #f8fafc; color: #0f172a; border-radius: 999px; padding: 4px 13px; font-size: .7rem; font-weight: 800; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; transition: all .2s; }
.hist-view:hover { background: #0a1128; border-color: #0a1128; color: #fff; }
/* ============ Messenger token save (msg-*) ============ */
.msg-save { margin-top: 8px; border: none; cursor: pointer; border-radius: 10px; padding: 8px 16px; font-weight: 800; font-size: .74rem; color: #fff; background: linear-gradient(135deg,#059669,#34d399); box-shadow: 0 8px 18px -8px rgba(5,150,105,.6); display: none; align-items: center; gap: 7px; transition: transform .2s, box-shadow .2s; }
.msg-save.msg-dirty { display: inline-flex; }
.msg-save:hover { transform: translateY(-1px); box-shadow: 0 12px 22px -8px rgba(5,150,105,.7); }
.msg-save:disabled { opacity: .7; cursor: wait; transform: none; }
@media (max-width: 640px) {
    .msg-save.msg-dirty { width: 100%; justify-content: center; }
}

/* Channel brand logos (local SVGs, replace FA brand glyphs) */
.nav-item img.ch-logo{width:20px;height:20px;object-fit:contain;flex-shrink:0}
.wh-pill img.ch-logo{width:18px;height:18px;object-fit:contain;vertical-align:-4px;background:#fff;border-radius:6px;padding:2px;margin-right:3px}
.dash-greet img.ch-logo{width:22px;height:22px;object-fit:contain;vertical-align:-5px;margin-right:3px}
.dash-kpi-icon img.ch-logo{width:24px;height:24px;object-fit:contain}
.section-label img.ch-logo{width:17px;height:17px;object-fit:contain;vertical-align:-3px;margin-right:4px}
.chatbot-tab-pill img.ch-logo{width:15px;height:15px;object-fit:contain;vertical-align:-2px;margin-right:2px}
.modal-icon img.ch-logo{width:26px;height:26px;object-fit:contain}
.al-pill img.ch-logo{width:13px;height:13px;object-fit:contain;vertical-align:-2px;margin-right:2px}
.msg-field label img.ch-logo{width:14px;height:14px;object-fit:contain;vertical-align:-2px}

/* Channel separators inside Edit Chatbot -> channels panel */
.channel-sep{border:none;border-top:1.5px dashed #D8E2F2;margin:22px 6px 20px;position:relative}
.channel-sep::after{content:'\25C6';position:absolute;top:-10px;left:50%;transform:translateX(-50%);background:#fff;padding:0 12px;color:#9DB4D8;font-size:10px}
.chatbot-tab-panel[data-panel="messenger"] .form-section{background:#F8FAFD;border:1px solid #E6EDF8;border-radius:14px;padding:16px 18px;margin-bottom:0}
.chatbot-tab-panel[data-panel="messenger"] .form-section .section-label{margin-bottom:10px}

/* Font Awesome icon font weights */
.fa,
.fas,
.far,
.fab {
    font-weight: var(--fa-style, 900);
}
.fa-brands,
.fab { font-weight: 400; }
.fa-regular,
.far { font-weight: 400; }
.fa-solid,
.fas { font-weight: 900; }

/* ============ Chatbot Installation Wizard (wiz-*) ============ */

@keyframes wizSlideIn {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.wiz-wrapper {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 
        0 1px 3px 0 rgba(0, 0, 0, 0.1),
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.03);
    width: 100%;
    max-width: 1100px;
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: wizSlideIn 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes wizSlideIn {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.wiz {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.wiz-head {
    background: linear-gradient(135deg, #0a1128 0%, #1c2541 50%, #0a1128 100%);
    padding: 2rem 3.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    border-radius: 24px 24px 0 0;
    position: relative;
    overflow: hidden;
}

.wiz-head::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 0%, rgba(205, 164, 52, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(205, 164, 52, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.wiz-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: rgba(255,255,255,0.08);
    overflow: hidden;
    border-radius: 0 0 24px 24px;
}

.wiz-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #cda434, #f5c542, #cda434);
    border-radius: 0;
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    width: 0%;
    box-shadow: 0 0 20px rgba(205, 164, 52, 0.4);
}

.wiz-head-l {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.wiz-head-ic {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.05));
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cda434;
    font-size: 1.5rem;
    box-shadow: 
        0 4px 12px rgba(0,0,0,0.15),
        inset 0 1px 0 rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.wiz-head-ic:hover {
    transform: scale(1.05) rotate(3deg);
    box-shadow: 
        0 8px 24px rgba(205, 164, 52, 0.3),
        inset 0 1px 0 rgba(255,255,255,0.15);
}

.wiz-head-l h3 {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff, #f5e6a0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.wiz-head-l p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    margin: 0;
    font-weight: 400;
}

.wiz-x {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.wiz-x:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255,255,255,0.3);
    transform: rotate(90deg);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.wiz-rail {
    background: linear-gradient(180deg, #fafafa 0%, #f5f5f5 100%);
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.wiz-rail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #cda434, transparent);
}

.wiz-rail-track {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #cda434 transparent;
    flex: 1;
    min-width: 0;
}

.wiz-rail-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    font-size: 0.7rem;
    flex-shrink: 0;
    transition: color 0.3s ease;
}

.wiz-rail-arrow i {
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.08));
}

.wiz-rail-track::-webkit-scrollbar {
    height: 6px;
}

.wiz-rail-track::-webkit-scrollbar-track {
    background: transparent;
}

.wiz-rail-track::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #cda434, #b58e26);
    border-radius: 3px;
}

.wiz-rail-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
    color: #64748b;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    box-shadow: 
        0 2px 8px rgba(0,0,0,0.06),
        inset 0 1px 0 rgba(255,255,255,0.5);
}

.wiz-rail-nav:hover:not(:disabled) {
    background: linear-gradient(180deg, #fdfbf6 0%, #fefce8 100%);
    border-color: #cda434;
    color: #cda434;
    transform: scale(1.02);
    box-shadow: 
        0 8px 24px rgba(205, 164, 52, 0.15),
        inset 0 1px 0 rgba(255,255,255,0.5);
}

.wiz-rail-nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.wiz-rail-nav:disabled:hover {
    transform: none;
    box-shadow: none;
}

.wiz-rail-nav i {
    font-size: 1.125rem;
    transition: transform 0.2s ease;
}

.wiz-rail-prev:hover:not(:disabled) i {
    transform: translateX(-2px);
}

.wiz-rail-next:hover:not(:disabled) i {
    transform: translateX(2px);
}

.wiz-rail-nav-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: translateX(-4px);
}

.wiz-rail-nav:hover .wiz-rail-nav-label {
    opacity: 1;
    transform: translateX(0);
}

.wiz-rail-prev .wiz-rail-nav-label {
    transform: translateX(4px);
}

.wiz-rail-prev:hover .wiz-rail-nav-label {
    transform: translateX(0);
}

.wiz-rail::-webkit-scrollbar {
    height: 4px;
}

.wiz-rail::-webkit-scrollbar-track {
    background: transparent;
}

.wiz-rail::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

.wiz-pip {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 0.875rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 130px;
    flex: 1;
    max-width: 200px;
    position: relative;
    overflow: hidden;
}

.wiz-pip::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    transition: background 0.3s ease;
}

.wiz-pip:hover {
    border-color: #cda434;
    transform: translateY(-4px);
    box-shadow: 
        0 12px 24px rgba(205, 164, 52, 0.15),
        0 4px 8px rgba(0, 0, 0, 0.05);
}

.wiz-pip:hover::before {
    background: linear-gradient(90deg, #cda434, #f5c542, #cda434);
}

.wiz-pip.active {
    border-color: #cda434;
    background: linear-gradient(135deg, #fdfbf6 0%, #fff 100%);
    box-shadow: 
        0 8px 24px rgba(205, 164, 52, 0.2),
        0 4px 8px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.wiz-pip.active::before {
    background: linear-gradient(90deg, #cda434, #f5c542, #cda434);
}

.wiz-pip.completed {
    border-color: #059669;
    background: linear-gradient(135deg, #ecfdf5 0%, #fff 100%);
}

.wiz-pip.completed::before {
    background: linear-gradient(90deg, #059669, #10b981, #059669);
}

.wiz-pip-n {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.8125rem;
    color: #64748b;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.wiz-pip.active .wiz-pip-n {
    background: linear-gradient(135deg, #cda434, #b58e26);
    border-color: transparent;
    color: #fff;
    box-shadow: 
        0 4px 12px rgba(205, 164, 52, 0.4),
        0 0 0 3px rgba(205, 164, 52, 0.15);
    transform: scale(1.05);
}

.wiz-pip.completed .wiz-pip-n {
    background: linear-gradient(135deg, #059669, #10b981);
    border-color: transparent;
    color: #fff;
    transform: scale(1.05);
}

.wiz-pip-t {
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    white-space: nowrap;
    text-align: center;
    line-height: 1.2;
}

.wiz-pip.active .wiz-pip-t {
    color: #cda434;
    font-weight: 800;
}

.wiz-pip.completed .wiz-pip-t {
    color: #059669;
    font-weight: 800;
}

.wiz-pip-t {
    font-size: 0.7rem;
    font-weight: 700;
    color: #475569;
    white-space: nowrap;
    text-align: center;
}

.wiz-pip.active .wiz-pip-t {
    color: #cda434;
}

.wiz-body {
    flex: 1;
    overflow-y: auto;
    padding: 2.5rem 3rem;
    min-height: 0;
    scrollbar-gutter: stable;
}

.wiz-body::-webkit-scrollbar {
    width: 6px;
}

.wiz-body::-webkit-scrollbar-track {
    background: transparent;
}

.wiz-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.wiz-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.wiz-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.wiz-form-group {
    margin-bottom: 1.5rem;
}

.wiz-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.wiz-label label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.wiz-label .wiz-required {
    color: #ef4444;
    margin-left: 2px;
    font-size: 0.75rem;
}

.wiz-label .wiz-opt {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 400;
}

.wiz-form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.wiz-form-label .wiz-required {
    color: #ef4444;
    margin-left: 2px;
}

.wiz-input {
    background: #fafafa;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    color: #1e293b;
    width: 100%;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.wiz-input:hover {
    border-color: #cbd5e1;
    background: #fff;
}

.wiz-input:focus {
    background: #fff;
    border-color: #cda434;
    box-shadow: 
        0 0 0 4px rgba(205, 164, 52, 0.15),
        0 4px 12px rgba(205, 164, 52, 0.08);
    outline: none;
    transform: translateY(-1px);
}

.wiz-input::placeholder {
    color: #94a3b8;
    transition: opacity 0.2s ease;
}

.wiz-input:focus::placeholder {
    opacity: 0.6;
}

.wiz-select {
    background: #fafafa;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    padding: 1rem 3.5rem 1rem 1.25rem;
    font-size: 1rem;
    color: #1e293b;
    width: 100%;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 1.25rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 3.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.wiz-select:focus {
    background: #fff;
    border-color: #cda434;
    box-shadow: 
        0 0 0 4px rgba(205, 164, 52, 0.18),
        0 4px 12px rgba(205, 164, 52, 0.1);
    outline: none;
    transform: translateY(-1px);
}

.wiz-select:focus {
    background: #fff;
    border-color: #cda434;
    box-shadow: 
        0 0 0 4px rgba(205, 164, 52, 0.18),
        0 4px 12px rgba(205, 164, 52, 0.1);
    outline: none;
    transform: translateY(-1px);
}

.wiz-textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

.wiz-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.wiz-hint {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.5;
    padding-left: 0.25rem;
}

.wiz-hint i {
    margin-top: 3px;
    flex-shrink: 0;
    color: #cda434;
    font-size: 0.75rem;
}

.wiz-check-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 1.25rem;
    background: linear-gradient(180deg, #fafafa 0%, #f5f5f5 100%);
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.wiz-check-row:hover {
    border-color: #cbd5e1;
    background: linear-gradient(180deg, #fafafa 0%, #f5f5f5 100%);
}

.wiz-check-row:has(input:checked) {
    border-color: #cda434;
    background: linear-gradient(180deg, #fdfbf6 0%, #fefce8 100%);
}

.wiz-check-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #cda434;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

.wiz-check-label {
    font-size: 0.9rem;
    color: #1e293b;
    cursor: pointer;
    flex: 1;
    line-height: 1.5;
    font-weight: 500;
}

.wiz-check-row:has(input:checked) .wiz-check-label {
    color: #cda434;
    font-weight: 600;
}

.wiz-foot-r {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.wiz-foot {
    background: linear-gradient(180deg, #fafafa 0%, #f5f5f5 100%);
    border-top: 1px solid #e2e8f0;
    padding: 1.5rem 3.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    border-radius: 0 0 24px 24px;
    gap: 1rem;
    position: relative;
}

.wiz-foot::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #cda434, transparent);
}

.wiz-btn {
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    outline: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.wiz-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.wiz-btn:hover:not(:disabled)::before {
    left: 100%;
}

.wiz-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.wiz-btn-back {
    background: #fff;
    border: 2px solid #e2e8f0;
    color: #475569;
}

.wiz-btn-back:hover:not(:disabled) {
    background: #fafafa;
    border-color: #cbd5e1;
    transform: translateX(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.wiz-btn-next {
    background: linear-gradient(135deg, #cda434, #b58e26);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(205, 164, 52, 0.3);
}

.wiz-btn-next:hover:not(:disabled) {
    background: linear-gradient(135deg, #b58e26, #9a7a1f);
    transform: translateX(4px);
    box-shadow: 0 8px 24px rgba(205, 164, 52, 0.4);
}

.wiz-btn-done {
    background: linear-gradient(135deg, #0a1128 0%, #1c2541 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(10, 17, 40, 0.3);
}

.wiz-btn-done:hover:not(:disabled) {
    background: linear-gradient(135deg, #1c2541 0%, #0a1128 100%);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(10, 17, 40, 0.4);
}

.wiz-skip {
    font-size: 0.75rem;
    color: #64748b;
    white-space: nowrap;
}

.wiz-help-wrap {
    display: inline-flex;
    align-items: center;
    margin-left: 0.35rem;
}

.wiz-info {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    transition: all 0.2s;
    flex-shrink: 0;
}

.wiz-info:hover {
    border-color: #cda434;
    color: #cda434;
    background: #fdfbf6;
}

.wiz-tip {
    position: absolute;
    z-index: 9999;
    max-width: 320px;
    background: #1e293b;
    color: #e2e8f0;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.4);
    font-size: 0.8rem;
    line-height: 1.5;
    pointer-events: none;
    animation: wizTipIn 0.15s ease;
    border: 1px solid #334155;
}

@keyframes wizTipIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.wiz-tip::before {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 20px;
    width: 12px;
    height: 12px;
    background: #1e293b;
    border-right: 1px solid #334155;
    border-bottom: 1px solid #334155;
    transform: rotate(45deg);
}

.wiz-tip-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #334155;
}

.wiz-tip-header i {
    color: #cda434;
    font-size: 1rem;
}

.wiz-tip-header strong {
    color: #fff;
    font-size: 0.85rem;
}

.wiz-tip-body {
    color: #cbd5e1;
}

.wiz-tip-do {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #334155;
}

.wiz-tip-do strong {
    color: #cda434;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 0.35rem;
}

.wiz-tip-do p {
    margin: 0;
    font-size: 0.75rem;
    color: #94a3b8;
}

/* Side-positioned tooltip variants */
.wiz-tip.wiz-tip-side {
    padding: 1rem 1.25rem;
}

.wiz-tip.wiz-tip-side::before {
    bottom: auto;
    left: auto;
    right: -6px;
    top: 1rem;
    transform: rotate(135deg);
    border-right: 1px solid #334155;
    border-bottom: 1px solid #334155;
    border-left: none;
    border-top: none;
}

.wiz-tip.wiz-tip-side.wiz-tip-side-left::before {
    left: -6px;
    right: auto;
    transform: rotate(-45deg);
    border-right: none;
    border-bottom: none;
    border-left: 1px solid #334155;
    border-top: 1px solid #334155;
}

.wiz-tip.wiz-tip-side .wiz-tip-header,
.wiz-tip.wiz-tip-side .wiz-tip-body,
.wiz-tip.wiz-tip-side .wiz-tip-do {
    text-align: left;
}

/* Wizard lead text */
.wiz-lead {
    font-size: 1rem;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #fdfbf6 0%, #fefce8 100%);
    border: 1px solid #fde68a;
    border-radius: 12px;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.wiz-lead::before {
    content: '\f05a';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 1.25rem;
    color: #cda434;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.wiz-step-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.wiz-step-title i {
    color: #cda434;
}

.wiz-step-sub {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0 0 1.5rem;
}

.wiz-card {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.wiz-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.wiz-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #cda434 0%, #b58e26 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.wiz-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.wiz-card-sub {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
}

.wiz-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 1.5rem 0;
}

@media (max-width: 640px) {
    .wiz {
        max-height: 100vh;
        border-radius: 0;
        max-width: 100%;
    }
    .wiz-head {
        border-radius: 0;
        padding: 1.25rem 1.5rem;
    }
    .wiz-foot {
        border-radius: 0;
        flex-wrap: wrap;
    }
    .wiz-body {
        padding: 1.5rem;
    }
    .wiz-rail {
        padding: 0.5rem 1rem;
    }
    .wiz-pip {
        padding: 0.5rem 0.75rem;
        min-width: 70px;
    }
    .wiz-pip-t {
        font-size: 0.65rem;
    }
    .wiz-row {
        grid-template-columns: 1fr;
    }
    .wiz-foot {
        flex-direction: column-reverse;
        align-items: stretch;
    }
    .wiz-btn {
        width: 100%;
    }
    .wiz-foot-r {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
}

/* ============ Wizard Review Step ============ */
.wiz-review {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.wiz-rhead {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
}

.wiz-ravatar {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: #fff;
    border: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.wiz-ravatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.wiz-rname {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
}

.wiz-rslug {
    font-size: 0.85rem;
    color: #64748b;
    font-family: monospace;
}

.wiz-rgrid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.wiz-rv {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
}

.wiz-rv span {
    font-size: 0.7rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.wiz-rv b {
    font-size: 0.85rem;
    color: #1e293b;
    word-break: break-word;
}

.wiz-rgrid > :nth-child(odd) {
    /* first column items */
}

.wiz-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 0.5rem;
    vertical-align: middle;
    border: 1px solid rgba(0,0,0,0.1);
}

.wiz-nextup {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: #fefce8;
    border: 1.5px solid #fde68a;
    border-radius: 12px;
    color: #a16207;
}

.wiz-nextup i {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.wiz-nextup div b {
    font-size: 0.9rem;
    color: #a16207;
    display: block;
    margin-bottom: 0.35rem;
}

.wiz-nextup div span {
    font-size: 0.8rem;
    color: #854d0e;
    line-height: 1.5;
}

/* ============ Wizard Component Styles ============ */
.wiz-group {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.wiz-group-h {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    transition: background 0.2s;
}

.wiz-group-h:hover {
    background: #f1f5f9;
}

.wiz-group-ic {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.wiz-group-cyan { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.wiz-group-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.wiz-group-amber { background: linear-gradient(135deg, #f59e0b, #d97706); }
.wiz-group-green { background: linear-gradient(135deg, #10b981, #059669); }
.wiz-group-red { background: linear-gradient(135deg, #ef4444, #dc2626); }
.wiz-group-purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

.wiz-group-h div b {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.wiz-group-h div span {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
}

.wiz-group-b {
    padding: 1rem 1.25rem 1.25rem;
    display: none;
}

.wiz-group.open .wiz-group-b {
    display: block;
    animation: wizGroupSlide 0.2s ease;
}

@keyframes wizGroupSlide {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.wiz-group-toggle {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s;
}

.wiz-group-toggle:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

/* Hintbox styles */
.wiz-hintbox {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    font-size: 0.8rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.wiz-hintbox i {
    flex-shrink: 0;
    margin-top: 2px;
    font-size: 0.9rem;
}

.wiz-hintbox span {
    flex: 1;
    min-width: 0;
}

.wiz-hintbox-blue {
    background: #eff6ff;
    border: 1.5px solid #bfdbfe;
    color: #1e40af;
}

.wiz-hintbox-blue i { color: #3b82f6; }

.wiz-hintbox-amber {
    background: #fefce8;
    border: 1.5px solid #fde68a;
    color: #92400e;
}

.wiz-hintbox-amber i { color: #f59e0b; }


/* VeloXscan Auditor Styles */
.vx-mode-selector {
    display: flex;
    gap: 12px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.vx-mode-btn {
    flex: 1;
    min-width: 180px;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    font-size: 1rem;
    font-weight: 600;
    color: #475569;
}

.vx-mode-btn:hover {
    border-color: #94a3b8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.vx-mode-btn.vx-active {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #1d4ed8;
    box-shadow: 0 2px 12px rgba(59,130,246,0.15);
}

.vx-mode-btn i {
    margin-right: 8px;
}

.vx-mode-desc {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    color: #94a3b8;
    margin-top: 4px;
}

.vx-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.vx-placeholder-sub {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 8px;
}

.vx-loading {
    text-align: center;
    padding: 60px 20px;
    color: #3b82f6;
}

.vx-progress-bar {
    width: 200px;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    margin: 16px auto 0;
    overflow: hidden;
}

.vx-progress-fill {
    height: 100%;
    background: #3b82f6;
    border-radius: 2px;
    animation: vx-progress 1.5s ease-in-out infinite;
}

@keyframes vx-progress {
    0% { width: 0%; margin-left: 0; }
    50% { width: 70%; margin-left: 15%; }
    100% { width: 0%; margin-left: 100%; }
}

.vx-error {
    text-align: center;
    padding: 40px;
    color: #ef4444;
}

.vx-executive-summary {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.vx-overall-score {
    width: 120px;
    height: 120px;
    border: 4px solid #e2e8f0;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.vx-overall-num {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}

.vx-overall-label {
    font-size: 0.7rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vx-summary-stats {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.vx-stat {
    text-align: center;
}

.vx-stat-num {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e293b;
}

.vx-stat-label {
    font-size: 0.75rem;
    color: #64748b;
}

.vx-panel {
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 16px;
    border: 1px solid #e2e8f0;
}

.vx-panel h3 {
    margin: 0 0 16px;
    font-size: 1rem;
    color: #1e293b;
}

.vx-risk-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #fef2f2;
    border-radius: 8px;
    margin-bottom: 8px;
    align-items: flex-start;
}

.vx-risk-layer {
    background: #ef4444;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

.vx-strength-item {
    padding: 8px 0;
    color: #166534;
}

.vx-matrix-section {
    margin-bottom: 20px;
}

.vx-matrix-section h4 {
    margin: 0 0 12px;
    font-size: 0.9rem;
}

.vx-matrix-item {
    background: #f8fafc;
    border-left: 4px solid;
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 8px;
}

.vx-matrix-layer {
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
}

.vx-layer-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
}

.vx-layer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.vx-layer-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vx-layer-num {
    background: #1e293b;
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

.vx-layer-title h4 {
    margin: 0;
    font-size: 1rem;
    color: #1e293b;
}

.vx-layer-score {
    width: 60px;
    height: 60px;
    border: 3px solid;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vx-score-num {
    font-size: 1.5rem;
    font-weight: 800;
}

.vx-score-max {
    font-size: 0.8rem;
    color: #94a3b8;
}

.vx-layer-status {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px 20px;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
}

.vx-status {
    font-weight: 600;
    color: #475569;
}

.vx-priority {
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.vx-priority-p0 { background: #fef2f2; color: #dc2626; }
.vx-priority-p1 { background: #fffbeb; color: #d97706; }
.vx-priority-p2 { background: #eff6ff; color: #2563eb; }

.vx-section {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
}

.vx-section h5 {
    margin: 0 0 12px;
    font-size: 0.85rem;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vx-evidence-item {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 8px;
}

.vx-evidence-item code {
    font-size: 0.8rem;
    color: #166534;
    background: #dcfce7;
    padding: 2px 6px;
    border-radius: 4px;
}

.vx-evidence-item p {
    margin: 6px 0 0;
    font-size: 0.85rem;
    color: #166534;
}

.vx-gap {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    margin-bottom: 8px;
    align-items: flex-start;
}

.vx-gap-severity {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 800;
    flex-shrink: 0;
    margin-top: 2px;
}

.vx-sev-critical { background: #fef2f2; color: #dc2626; }
.vx-sev-high { background: #fff7ed; color: #ea580c; }
.vx-sev-medium { background: #fefce8; color: #ca8a04; }
.vx-sev-low { background: #f0fdf4; color: #16a34a; }

.vx-gap-body strong {
    color: #92400e;
    font-size: 0.9rem;
}

.vx-gap-body p {
    margin: 4px 0 0;
    font-size: 0.8rem;
    color: #a16207;
}

.vx-no-gaps {
    padding: 20px;
    text-align: center;
    color: #16a34a;
    background: #f0fdf4;
    border-radius: 8px;
}

.vx-remediation {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 10px;
}

.vx-remediation h5 {
    margin: 0 0 8px;
    color: #1d4ed8;
    font-size: 0.9rem;
}

.vx-remediation p {
    margin: 0 0 10px;
    font-size: 0.85rem;
    color: #1e40af;
}

.vx-code-block {
    background: #1e293b;
    color: #e2e8f0;
    padding: 14px 16px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.8rem;
    line-height: 1.5;
    margin: 0;
}

.vx-code-block code {
    font-family: 'Fira Code', 'Consolas', monospace;
}

.vx-snippet {
    background: #1e293b;
    color: #e2e8f0;
    padding: 10px 14px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.75rem;
    margin: 8px 0 0;
    line-height: 1.4;
}

.vx-footer {
    text-align: center;
    padding: 20px;
    color: #94a3b8;
    font-size: 0.8rem;
}

.vx-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
}

.vx-badge-critical { background: #fef2f2; color: #dc2626; }
.vx-badge-warning { background: #fffbeb; color: #d97706; }
.vx-badge-success { background: #f0fdf4; color: #16a34a; }

.vx-none {
    color: #94a3b8;
    font-style: italic;
}
/* End VeloXscan Auditor Styles */

.wiz-hintbox-green {
    background: #ecfdf5;
    border: 1.5px solid #a7f3d0;
    color: #065f46;
}

.wiz-hintbox-green i { color: #10b981; }

.wiz-hintbox-red {
    background: #fef2f2;
    border: 1.5px solid #fecaca;
    color: #991b1b;
}

.wiz-hintbox-red i { color: #ef4444; }

/* Switch row */
.wiz-sw {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.wiz-sw-t {
    flex: 1;
    min-width: 0;
}

.wiz-sw-t b {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.wiz-sw-t span {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.4;
}

/* Color picker */
.wiz-color {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.wiz-color input[type="color"] {
    width: 60px;
    height: 40px;
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
    cursor: pointer;
    background: none;
    padding: 0;
}

.wiz-color input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.wiz-color input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 6px;
}

/* Logo upload */
.wiz-logo-box {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background: #f8fafc;
    border: 2px dashed #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    transition: all 0.2s;
}

.wiz-logo-box:hover {
    border-color: #cda434;
    border-style: solid;
}

.wiz-logo-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.wiz-logo-btn {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: #cda434;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.7rem;
    box-shadow: 0 2px 6px rgba(205, 164, 52, 0.4);
    transition: all 0.2s;
}

.wiz-logo-btn:hover {
    background: #b58e26;
    transform: scale(1.1);
}

/* Days checkboxes */
.wiz-days {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.wiz-day {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.wiz-day:hover {
    border-color: #cda434;
}

.wiz-day input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #cda434;
}

.wiz-day span {
    font-size: 0.75rem;
    font-weight: 600;
    color: #1e293b;
}

.wiz-day:has(input:checked) {
    background: #fdfbf6;
    border-color: #cda434;
}

/* Toggle buttons (menus) */
.wiz-toggles {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wiz-tgl {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.wiz-tgl:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.wiz-tgl:has(input:checked) {
    background: #fdfbf6;
    border-color: #cda434;
}

.wiz-tgl input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #cda434;
    flex-shrink: 0;
}

.wiz-tgl-ic {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    flex-shrink: 0;
}

.wiz-tgl:has(input:checked) .wiz-tgl-ic {
    background: #fefce8;
    color: #cda434;
}

.wiz-tgl-t {
    flex: 1;
    min-width: 0;
}

.wiz-tgl-t b {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
}

.wiz-tgl-t small {
    display: block;
    color: #64748b;
    font-size: 0.75rem;
    margin-top: 2px;
}

/* Gateway list */
.wiz-gws {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wiz-gw-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.wiz-gw-item:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.wiz-gw-item:has(input:checked) {
    background: #fdfbf6;
    border-color: #cda434;
}

.wiz-gw-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #cda434;
}

.wiz-gw-info {
    flex: 1;
    min-width: 0;
}

.wiz-gw-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
}

.wiz-gw-desc {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 2px;
}

/* Loading state */
.wiz-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #64748b;
    font-size: 0.875rem;
}

.wiz-loading i {
    margin-right: 0.5rem;
    font-size: 1rem;
}

/* Messages step */
.wiz-msgs-body {
    max-height: 400px;
    overflow-y: auto;
}

.wiz-msgs-body::-webkit-scrollbar {
    width: 6px;
}

.wiz-msgs-body::-webkit-scrollbar-track {
    background: transparent;
}

.wiz-msgs-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.wiz-msg-q {
    width: 100%;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #1e293b;
    margin-bottom: 1rem;
    transition: all 0.25s;
}

.wiz-msg-q:focus {
    background: #fff;
    border-color: #cda434;
    box-shadow: 0 0 0 4px rgba(205, 164, 52, 0.12);
    outline: none;
}

.wiz-mgroup {
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    margin-bottom: 1rem;
    overflow: hidden;
}

.wiz-mgroup-h {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    transition: background 0.2s;
}

.wiz-mgroup-h:hover {
    background: #f1f5f9;
}

.wiz-mgroup-h h4 {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.wiz-mgroup-h i {
    color: #64748b;
    transition: transform 0.2s;
}

.wiz-mgroup.open .wiz-mgroup-h i {
    transform: rotate(180deg);
}

.wiz-mgroup-b {
    display: none;
    padding: 0;
}

.wiz-mgroup.open .wiz-mgroup-b {
    display: block;
}

.wiz-mrow {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
    transition: background 0.2s;
}

.wiz-mrow:hover {
    background: #fafafa;
}

.wiz-mrow:last-child {
    border-bottom: none;
}

.wiz-mrow.is-changed {
    background: #fefce8;
    border-left: 3px solid #f59e0b;
}

.wiz-mprev {
    flex: 1;
    min-width: 0;
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.5;
}

.wiz-mprev span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wiz-mtxt {
    width: 100%;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
    color: #1e293b;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
    transition: all 0.25s;
}

.wiz-mtxt:focus {
    background: #fff;
    border-color: #cda434;
    box-shadow: 0 0 0 4px rgba(205, 164, 52, 0.12);
    outline: none;
}

.wiz-mreset {
    background: none;
    border: none;
    color: #64748b;
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.wiz-mreset:hover {
    background: #f1f5f9;
    color: #ef4444;
}

/* Responsive adjustments for wizard components */
@media (max-width: 640px) {
    .wiz-sw {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .wiz-color {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .wiz-group-h {
        padding: 0.875rem 1rem;
    }
    
    .wiz-group-ic {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .wiz-group-b {
        padding: 0.75rem 1rem 1rem;
    }
    
    .wiz-tgl {
        padding: 0.6rem;
    }
    
    .wiz-tgl-ic {
        width: 32px;
        height: 32px;
    }
    
    .wiz-mrow {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .wiz-mtxt {
        min-height: 50px;
    }
    
    .wiz-gw-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 640px) {
    .wiz-rgrid {
        grid-template-columns: 1fr;
    }
}
