/* ==========================================================================================
   YsAgentAgency — Ultra-Modern Enterprise SaaS UI/UX Design System (v4)
   Typography: 'Plus Jakarta Sans' (Headings/Display) + 'Inter' (Body/UI) + 'JetBrains Mono'
   Aesthetic: High-Contrast Executive Dark Sidebar, Crisp Slate Canvas, Layered Bento Cards,
   Interactive Schedule Builders, Tag Chips, and Real WhatsApp Web Conversation Interface.
   ========================================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500;600&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');

:root {
    --ys-primary: #4f46e5;
    --ys-primary-hover: #4338ca;
    --ys-primary-soft: #eef2ff;
    --ys-primary-border: #c7d2fe;
    --ys-violet: #7c3aed;
    --ys-emerald: #10b981;
    --ys-emerald-dark: #059669;
    --ys-emerald-soft: #ecfdf5;
    --ys-amber: #f59e0b;
    --ys-amber-soft: #fffbeb;
    --ys-rose: #ef4444;
    --ys-rose-soft: #fef2f2;
    --ys-sky: #0ea5e9;
    --ys-sky-soft: #f0f9ff;

    --ys-bg-canvas: #f3f5f9;
    --ys-bg-surface: #ffffff;
    --ys-bg-subtle: #f8fafc;

    --ys-text-primary: #0f172a;
    --ys-text-secondary: #334155;
    --ys-text-muted: #64748b;
    --ys-border: #e2e8f0;
    --ys-border-strong: #cbd5e1;

    --ys-sidebar-w: 280px;
    --ys-topbar-h: 72px;

    --ys-grad-brand: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #9333ea 100%);
    --ys-grad-hero: linear-gradient(125deg, #0f172a 0%, #1e1b4b 48%, #312e81 100%);
    --ys-grad-sidebar: linear-gradient(180deg, #090d16 0%, #0f172a 55%, #131c31 100%);
    --ys-grad-emerald: linear-gradient(135deg, #059669 0%, #10b981 100%);

    --ys-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --ys-shadow-sm: 0 2px 8px -2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
    --ys-shadow-md: 0 8px 24px -4px rgba(15, 23, 42, 0.07), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
    --ys-shadow-lg: 0 18px 36px -6px rgba(79, 70, 229, 0.14), 0 4px 12px -2px rgba(15, 23, 42, 0.06);
    --ys-radius-card: 16px;
    --ys-radius-input: 11px;
    --ys-radius-btn: 10px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    background-color: var(--ys-bg-canvas);
    color: var(--ys-text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    margin: 0;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--ys-text-primary);
}

/* ==========================================================================================
   Mandatory Asterisk (*) & Friendly Helper Hints
   ========================================================================================== */

.ys-req {
    color: #ef4444;
    font-weight: 800;
    margin-left: 3px;
    font-size: 1rem;
    vertical-align: middle;
}

.ys-hint {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.81rem;
    color: var(--ys-text-muted);
    margin-top: 0.42rem;
    line-height: 1.45;
    background: var(--ys-bg-subtle);
    padding: 0.35rem 0.65rem;
    border-radius: 8px;
    border-left: 3px solid var(--ys-primary-border);
}

.ys-hint::before {
    content: "💡";
    font-size: 0.82rem;
    line-height: 1;
}

/* ==========================================================================================
   Executive Sidebar & Glassmorphic Topbar Layout
   ========================================================================================== */

.ys-app-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.ys-sidebar {
    width: var(--ys-sidebar-w);
    background: var(--ys-grad-sidebar);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 8px 0 32px rgba(2, 6, 23, 0.22);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.ys-sidebar-brand {
    height: var(--ys-topbar-h);
    display: flex;
    align-items: center;
    padding: 0 1.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    text-decoration: none;
    color: #ffffff !important;
    gap: 0.85rem;
}

.ys-brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--ys-grad-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.35);
    flex-shrink: 0;
}

.ys-brand-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 1.12rem;
    letter-spacing: -0.03em;
    line-height: 1.15;
    display: block;
    color: #ffffff;
}

.ys-brand-subtitle {
    font-size: 0.68rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.ys-sidebar-nav {
    flex: 1;
    padding: 1.1rem 0.95rem;
    overflow-y: auto;
}

.ys-nav-section-label {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748b;
    padding: 0.65rem 0.75rem 0.38rem;
    margin-top: 0.4rem;
}

.ys-nav-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem 0.95rem;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 11px;
    font-weight: 500;
    font-size: 0.92rem;
    margin-bottom: 0.25rem;
    transition: all 0.18s ease;
    position: relative;
}

.ys-nav-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.8;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.ys-nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.07);
    transform: translateX(2px);
}

.ys-nav-link:hover svg {
    opacity: 1;
}

.ys-nav-link.active {
    color: #ffffff;
    background: var(--ys-grad-brand);
    box-shadow: 0 6px 18px rgba(79, 70, 229, 0.42);
    font-weight: 600;
}

.ys-nav-link.active svg {
    opacity: 1;
}

.ys-sidebar-footer {
    padding: 1rem 1.15rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(2, 6, 23, 0.45);
}

.ys-main-panel {
    flex: 1;
    margin-left: var(--ys-sidebar-w);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
}

.ys-topbar {
    height: var(--ys-topbar-h);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--ys-border);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: var(--ys-shadow-xs);
}

.ys-content-area {
    flex: 1;
    padding: 1.85rem 2.2rem 2.75rem;
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
}

/* ==========================================================================================
   Bento Cards, Section Headers, Icon Boxes & Hero Banner
   ========================================================================================== */

.ys-card {
    background: var(--ys-bg-surface);
    border: 1px solid var(--ys-border);
    border-radius: var(--ys-radius-card);
    box-shadow: var(--ys-shadow-md);
    transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
    overflow: hidden;
}

.ys-card-hover:hover {
    box-shadow: var(--ys-shadow-lg);
    transform: translateY(-3px);
    border-color: var(--ys-primary-border);
}

.ys-card-header {
    padding: 1.25rem 1.6rem;
    border-bottom: 1px solid var(--ys-border);
    background: linear-gradient(180deg, #ffffff 0%, #fafbff 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.ys-hero-banner {
    background: var(--ys-grad-hero);
    border-radius: 20px;
    color: #ffffff;
    padding: 2rem 2.25rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 16px 36px -6px rgba(15, 23, 42, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ys-hero-banner::before {
    content: "";
    position: absolute;
    right: -60px;
    top: -80px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.35) 0%, rgba(79, 70, 229, 0) 70%);
    pointer-events: none;
}

.ys-hero-banner h1, .ys-hero-banner h2, .ys-hero-banner h3 {
    color: #ffffff !important;
}

/* KPI Stat Cards with Top Accent Border */
.ys-kpi-card {
    background: #ffffff;
    border: 1px solid var(--ys-border);
    border-radius: var(--ys-radius-card);
    padding: 1.35rem 1.5rem;
    box-shadow: var(--ys-shadow-sm);
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.ys-kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--ys-shadow-lg);
}

.ys-kpi-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--ys-grad-brand);
}

.ys-kpi-card.kpi-emerald::before { background: var(--ys-grad-emerald); }
.ys-kpi-card.kpi-amber::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.ys-kpi-card.kpi-sky::before { background: linear-gradient(90deg, #0284c7, #38bdf8); }

.ys-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ys-stat-indigo { background: var(--ys-primary-soft); color: var(--ys-primary); border: 1px solid var(--ys-primary-border); }
.ys-stat-emerald { background: var(--ys-emerald-soft); color: var(--ys-emerald-dark); border: 1px solid #a7f3d0; }
.ys-stat-amber { background: var(--ys-amber-soft); color: #d97706; border: 1px solid #fde68a; }
.ys-stat-violet { background: #f5f3ff; color: var(--ys-violet); border: 1px solid #ddd6fe; }

/* Status Badges & Tag Chips */
.ys-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.34rem 0.8rem;
    border-radius: 9999px;
    font-size: 0.77rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.ys-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}

.ys-badge-success { background-color: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.ys-badge-success .ys-badge-dot { background-color: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2); }

.ys-badge-secondary { background-color: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.ys-badge-secondary .ys-badge-dot { background-color: #94a3b8; }

.ys-badge-warning { background-color: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.ys-badge-warning .ys-badge-dot { background-color: #f59e0b; }

.ys-badge-danger { background-color: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.ys-badge-danger .ys-badge-dot { background-color: #ef4444; }

.ys-badge-indigo { background-color: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe; }

/* Interactive Payment & Keyword Chips */
.ys-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.ys-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    background: #f8fafc;
    color: var(--ys-text-secondary);
    border: 1px solid var(--ys-border-strong);
    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease;
}

.ys-chip:hover {
    border-color: var(--ys-primary);
    color: var(--ys-primary);
    background: var(--ys-primary-soft);
}

.ys-chip.active {
    background: var(--ys-primary);
    color: #ffffff;
    border-color: var(--ys-primary);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.28);
}

/* ==========================================================================================
   Buttons, Tactile Form Inputs & Labels
   ========================================================================================== */

.btn-ys-primary {
    background: var(--ys-grad-brand);
    border: none;
    color: #ffffff !important;
    font-weight: 600;
    padding: 0.62rem 1.35rem;
    border-radius: var(--ys-radius-btn);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
    transition: all 0.18s ease;
}

.btn-ys-primary:hover, .btn-ys-primary:focus {
    background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
    transform: translateY(-1px);
    color: #ffffff !important;
}

.btn-ys-emerald {
    background: var(--ys-grad-emerald);
    border: none;
    color: #ffffff !important;
    font-weight: 600;
    padding: 0.62rem 1.35rem;
    border-radius: var(--ys-radius-btn);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
    transition: all 0.18s ease;
}

.btn-ys-emerald:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.btn-ys-outline {
    background: #ffffff;
    border: 1.5px solid var(--ys-border-strong);
    color: var(--ys-text-secondary);
    font-weight: 600;
    padding: 0.58rem 1.2rem;
    border-radius: var(--ys-radius-btn);
    transition: all 0.15s ease;
}

.btn-ys-outline:hover {
    background: var(--ys-primary-soft);
    border-color: var(--ys-primary);
    color: var(--ys-primary);
}

.form-label {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--ys-text-primary);
    margin-bottom: 0.4rem;
    display: inline-block;
}

.form-control, .form-select {
    background-color: #f8fafc;
    border: 1.5px solid var(--ys-border-strong);
    border-radius: var(--ys-radius-input);
    padding: 0.68rem 0.95rem;
    font-size: 0.94rem;
    color: var(--ys-text-primary);
    font-weight: 500;
    transition: all 0.18s ease;
}

.form-control::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.form-control:hover, .form-select:hover {
    border-color: #94a3b8;
}

.form-control:focus, .form-select:focus {
    background-color: #ffffff;
    border-color: var(--ys-primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.14);
}

/* ==========================================================================================
   Enterprise Data Tables & Code Pills
   ========================================================================================== */

.ys-table { margin-bottom: 0; }

.ys-table thead th {
    background-color: #f8fafc;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.95rem 1.35rem;
    border-bottom: 1.5px solid var(--ys-border);
    white-space: nowrap;
}

.ys-table tbody td {
    padding: 1.05rem 1.35rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    color: var(--ys-text-secondary);
    font-size: 0.92rem;
}

.ys-table tbody tr:last-child td { border-bottom: none; }
.ys-table tbody tr:hover { background-color: #f8fafc; }

.ys-code-pill {
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.78rem;
    font-weight: 600;
    background: #eef2ff;
    color: #4338ca;
    padding: 0.22rem 0.6rem;
    border-radius: 6px;
    border: 1px solid #c7d2fe;
    display: inline-block;
}

/* ==========================================================================================
   WhatsApp Live Chat Viewer UI (Chat/Index.cshtml)
   ========================================================================================== */

.ys-chat-shell {
    display: flex;
    height: calc(100vh - 185px);
    min-height: 580px;
    background: #ffffff;
    border: 1px solid var(--ys-border);
    border-radius: var(--ys-radius-card);
    overflow: hidden;
    box-shadow: var(--ys-shadow-md);
}

.ys-chat-sidebar {
    width: 350px;
    border-right: 1px solid var(--ys-border);
    display: flex;
    flex-direction: column;
    background: #ffffff;
    flex-shrink: 0;
}

.ys-chat-list {
    flex: 1;
    overflow-y: auto;
}

.ys-chat-contact-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.95rem 1.15rem;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: var(--ys-text-primary);
    transition: all 0.15s ease;
}

.ys-chat-contact-item:hover {
    background-color: #f8fafc;
}

.ys-chat-contact-item.active {
    background-color: var(--ys-primary-soft);
    border-left: 4px solid var(--ys-primary);
}

.ys-chat-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--ys-grad-emerald);
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(16, 185, 129, 0.25);
}

.ys-chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #efeae2;
    background-image: radial-gradient(rgba(15, 23, 42, 0.06) 1px, transparent 1px);
    background-size: 22px 22px;
    min-width: 0;
}

.ys-chat-header {
    background: #ffffff;
    padding: 0.95rem 1.5rem;
    border-bottom: 1px solid var(--ys-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.ys-chat-messages {
    flex: 1;
    padding: 1.5rem 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.ys-msg-row {
    display: flex;
    flex-direction: column;
    max-width: 72%;
}

.ys-msg-in { align-self: flex-start; }
.ys-msg-out { align-self: flex-end; }

.ys-msg-bubble {
    padding: 0.75rem 1.05rem;
    border-radius: 14px;
    font-size: 0.93rem;
    line-height: 1.55;
    position: relative;
    box-shadow: 0 2px 5px rgba(15, 23, 42, 0.08);
    word-wrap: break-word;
}

.ys-msg-in .ys-msg-bubble {
    background: #ffffff;
    color: var(--ys-text-primary);
    border-top-left-radius: 3px;
}

.ys-msg-out.ys-msg-bot .ys-msg-bubble {
    background: var(--ys-grad-brand);
    color: #ffffff;
    border-top-right-radius: 3px;
}

.ys-msg-out.ys-msg-agent .ys-msg-bubble {
    background: #d9fdd3;
    color: #111b21;
    border-top-right-radius: 3px;
}

.ys-chat-composer {
    background: #ffffff;
    padding: 1rem 1.35rem;
    border-top: 1px solid var(--ys-border);
}

/* ==========================================================================================
   Authentication Split Screen Layout
   ========================================================================================== */

.ys-auth-shell {
    min-height: 100vh;
    display: flex;
    background: #ffffff;
}

.ys-auth-brand-panel {
    width: 46%;
    background: var(--ys-grad-hero);
    color: #ffffff;
    padding: 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.ys-auth-brand-panel h1 { color: #ffffff !important; }

.ys-auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem;
    background: var(--ys-bg-canvas);
}

.ys-auth-card {
    width: 100%;
    max-width: 490px;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid var(--ys-border);
    box-shadow: var(--ys-shadow-md);
    padding: 2.5rem;
}

@media (max-width: 991.98px) {
    .ys-sidebar { transform: translateX(-100%); }
    .ys-sidebar.show { transform: translateX(0); }
    .ys-main-panel { margin-left: 0; }
    .ys-content-area { padding: 1.25rem 1rem 2rem; }
    .ys-auth-brand-panel { display: none; }
    .ys-chat-shell { flex-direction: column; height: auto; }
    .ys-chat-sidebar { width: 100%; max-height: 300px; border-right: none; border-bottom: 1px solid var(--ys-border); }
}


/* ==========================================================================
   JOTFORM AI AGENT STUDIO DESIGN SYSTEM (v5 — BUILD / TRAIN / PUBLISH)
   ========================================================================== */
.jf-studio-bar {
    background: linear-gradient(90deg, #1e1b4b 0%, #4c1d95 50%, #4338ca 100%);
    padding: 0.65rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 16px -4px rgba(30, 27, 75, 0.25);
}

.jf-studio-steps {
    display: inline-flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.42);
    padding: 0.28rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    gap: 0.25rem;
}

.jf-studio-step {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.42rem 1.15rem;
    border-radius: 9999px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    transition: all 0.2s ease;
}

.jf-studio-step:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.jf-studio-step.active {
    background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.45);
}

/* Jotform Left Training Sub-Navigation Rail */
.jf-train-rail {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    padding: 0.85rem;
    box-shadow: 0 4px 20px -4px rgba(15, 23, 42, 0.05);
}

.jf-train-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 0.95rem;
    border-radius: 14px;
    text-decoration: none;
    color: #334155;
    transition: all 0.18s ease;
    margin-bottom: 0.35rem;
    border: 1px solid transparent;
}

.jf-train-item:hover {
    background: #f8fafc;
    color: #0f172a;
    transform: translateX(2px);
}

.jf-train-item.active {
    background: linear-gradient(135deg, #f5f3ff 0%, #eef2ff 100%);
    border-color: #c4b5fd;
    color: #4c1d95;
    box-shadow: 0 4px 12px -2px rgba(124, 58, 237, 0.12);
}

.jf-train-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 800;
}

.jf-train-icon.purple { background: #f3e8ff; color: #7e22ce; }
.jf-train-icon.blue   { background: #e0f2fe; color: #0284c7; }
.jf-train-icon.amber  { background: #fef3c7; color: #d97706; }
.jf-train-icon.emerald{ background: #d1fae5; color: #059669; }
.jf-train-icon.rose   { background: #ffe4e6; color: #e11d48; }

/* Cute Selectable Character Avatar Cards */
.jf-avatar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
    gap: 0.75rem;
}

.jf-avatar-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 0.85rem 0.6rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.jf-avatar-card:hover {
    border-color: #a855f7;
    background: #faf5ff;
    transform: translateY(-2px);
}

.jf-avatar-card.selected {
    border-color: #7c3aed;
    background: linear-gradient(180deg, #f5f3ff 0%, #ffffff 100%);
    box-shadow: 0 8px 20px -4px rgba(124, 58, 237, 0.22);
}

.jf-avatar-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin: 0 auto 0.5rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
}

/* Jotform Role Cards */
.jf-role-card {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 0.85rem 1rem;
    cursor: pointer;
    transition: all 0.18s ease;
}

.jf-role-card:hover, .jf-role-card.selected {
    background: #f5f3ff;
    border-color: #7c3aed;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.12);
}

/* Jotform Right-Side Live Mobile Phone Simulator */
.jf-phone-frame {
    background: #ffffff;
    border: 8px solid #1e1b4b;
    border-radius: 36px;
    box-shadow: 0 24px 48px -12px rgba(30, 27, 75, 0.28);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 610px;
    position: sticky;
    top: 84px;
}

.jf-phone-notch {
    width: 110px;
    height: 18px;
    background: #1e1b4b;
    border-radius: 0 0 14px 14px;
    margin: 0 auto;
}

.jf-phone-header {
    background: linear-gradient(135deg, #4c1d95 0%, #4f46e5 100%);
    color: #ffffff;
    padding: 0.9rem 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.jf-phone-body {
    flex: 1;
    background-color: #efeae2;
    background-image: radial-gradient(#cbd5e1 0.8px, transparent 0.8px);
    background-size: 16px 16px;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.jf-phone-footer {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 0.65rem 0.85rem;
}

/* Jotform 4-Color Knowledge Source Cards */
.jf-source-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.15rem;
    transition: all 0.2s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    text-decoration: none;
    color: inherit;
}

.jf-source-card:hover {
    border-color: #8b5cf6;
    transform: translateY(-3px);
    box-shadow: 0 12px 24px -6px rgba(124, 58, 237, 0.16);
    color: inherit;
}

/* Jotform WHEN / DO Action Rule Card */
.jf-when-do-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 5px solid #7c3aed;
    border-radius: 16px;
    padding: 1.25rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}

.jf-when-do-card:hover {
    box-shadow: 0 10px 24px -6px rgba(15, 23, 42, 0.1);
}

.jf-tag-when {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    border-radius: 6px;
    background: #f3e8ff;
    color: #6b21a8;
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.jf-tag-do {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    border-radius: 6px;
    background: #dcfce7;
    color: #15803d;
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}


/* ==========================================================================
   SOFT COLOR GRADIENT THEME UPGRADE (v6 — ATTRACTIVE PASTEL GRADIENTS)
   Replaces flat gray canvas & plain white cards with soft luminous gradients
   ========================================================================== */
body, .ys-main-panel {
    background: linear-gradient(135deg, #f5f3ff 0%, #eef2ff 38%, #ecfeff 72%, #fdf2f8 100%) !important;
    background-attachment: fixed !important;
}

.ys-topbar {
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(16px) !important;
    border-bottom: 1px solid #ddd6fe !important;
}

.ys-card {
    background: linear-gradient(180deg, #ffffff 0%, #faf8ff 100%) !important;
    border: 1px solid #ddd6fe !important;
    box-shadow: 0 8px 26px -6px rgba(99, 102, 241, 0.09), 0 2px 6px -1px rgba(15, 23, 42, 0.04) !important;
}

.ys-card-header {
    background: linear-gradient(90deg, #f5f3ff 0%, #eef2ff 55%, #ecfdf5 100%) !important;
    border-bottom: 1px solid #e0e7ff !important;
}

/* Soft Gradient Bento KPI Cards */
.ys-kpi-card {
    background: linear-gradient(135deg, #ffffff 0%, #eef2ff 55%, #e0e7ff 100%) !important;
    border: 1px solid #c7d2fe !important;
    box-shadow: 0 10px 24px -6px rgba(79, 70, 229, 0.12) !important;
}

.ys-kpi-card.emerald {
    background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 55%, #d1fae5 100%) !important;
    border: 1px solid #a7f3d0 !important;
    box-shadow: 0 10px 24px -6px rgba(16, 185, 129, 0.12) !important;
}

.ys-kpi-card.amber {
    background: linear-gradient(135deg, #ffffff 0%, #fffbeb 55%, #fef3c7 100%) !important;
    border: 1px solid #fde68a !important;
    box-shadow: 0 10px 24px -6px rgba(245, 158, 11, 0.12) !important;
}

.ys-kpi-card.rose {
    background: linear-gradient(135deg, #ffffff 0%, #fdf2f8 55%, #fce7f3 100%) !important;
    border: 1px solid #fbcfe8 !important;
    box-shadow: 0 10px 24px -6px rgba(236, 72, 153, 0.12) !important;
}

/* Soft Pastel Cards for Index Sections */
.ys-soft-indigo {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%) !important;
    border: 1px solid #c4b5fd !important;
    border-radius: 14px;
}

.ys-soft-emerald {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%) !important;
    border: 1px solid #6ee7b7 !important;
    border-radius: 14px;
}

.ys-soft-sky {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%) !important;
    border: 1px solid #7dd3fc !important;
    border-radius: 14px;
}

.ys-soft-amber {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%) !important;
    border: 1px solid #fcd34d !important;
    border-radius: 14px;
}

.jf-train-rail {
    background: linear-gradient(180deg, #ffffff 0%, #f5f3ff 100%) !important;
    border: 1px solid #ddd6fe !important;
}

.jf-source-card {
    background: linear-gradient(135deg, #ffffff 0%, #f5f3ff 100%) !important;
    border: 1.5px solid #ddd6fe !important;
}

/* Compact & Colorful WhatsApp Chat Shell (Not overly lengthy) */
.ys-chat-shell {
    height: 490px !important;
    min-height: 460px !important;
    max-height: 510px !important;
    border: 1px solid #c4b5fd !important;
    box-shadow: 0 12px 30px -8px rgba(99, 102, 241, 0.15) !important;
}

.ys-chat-sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #f5f3ff 100%) !important;
    border-right: 1px solid #ddd6fe !important;
}

.ys-chat-header {
    background: linear-gradient(90deg, #f5f3ff 0%, #eef2ff 60%, #ecfdf5 100%) !important;
    border-bottom: 1px solid #ddd6fe !important;
}

.ys-chat-messages {
    background: linear-gradient(135deg, #ede9fe 0%, #e0e7ff 50%, #d1fae5 100%) !important;
    padding: 0.9rem 1.15rem !important;
    gap: 0.45rem !important;
}
