/**
 * Lisa AI Chat Widget Styles
 * TodoSign AI Assistant Interface
 *
 * Design: Refined Tech-Luxe with Glassmorphism
 * Typography: Plus Jakarta Sans + DM Sans
 */

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

/* ============================================
   CSS Variables & Theme
   ============================================ */
:root {
    /* Brand Colors */
    --lisa-navy-deep: #0a0f1a;
    --lisa-navy: #0f172a;
    --lisa-navy-light: #1e293b;
    --lisa-blue: #1e3a8a;
    --lisa-blue-accent: #3b82f6;
    --lisa-blue-glow: #60a5fa;
    --lisa-blue-soft: #93c5fd;

    /* Neutrals */
    --lisa-white: #ffffff;
    --lisa-gray-50: #f8fafc;
    --lisa-gray-100: #f1f5f9;
    --lisa-gray-200: #e2e8f0;
    --lisa-gray-300: #cbd5e1;
    --lisa-gray-400: #94a3b8;
    --lisa-gray-500: #64748b;
    --lisa-gray-600: #475569;

    /* Semantic */
    --lisa-success: #10b981;
    --lisa-warning: #f59e0b;
    --lisa-error: #ef4444;

    /* Glass Effects */
    --lisa-glass-bg: rgba(255, 255, 255, 0.08);
    --lisa-glass-border: rgba(255, 255, 255, 0.12);
    --lisa-glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

    /* Sizing */
    --lisa-widget-width: 400px;
    --lisa-widget-height: 600px;
    --lisa-bubble-size: 64px;
    --lisa-border-radius: 24px;
    --lisa-border-radius-sm: 16px;
    --lisa-border-radius-xs: 12px;

    /* Animation */
    --lisa-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --lisa-transition: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --lisa-transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    --lisa-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================
   Light Theme Overrides
   ============================================ */
[data-theme="light"] .lisa-widget {
    --lisa-glass-bg: rgba(255, 255, 255, 0.95);
    --lisa-glass-border: rgba(0, 0, 0, 0.08);
    --lisa-glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* Chat window - Light theme */
[data-theme="light"] .lisa-chat {
    background: linear-gradient(165deg, #f8fafc 0%, #f1f5f9 100%);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .lisa-chat::before {
    background: radial-gradient(circle, rgba(59, 130, 246, 0.05) 0%, transparent 70%);
}

[data-theme="light"] .lisa-chat::after {
    background: radial-gradient(circle, rgba(30, 58, 138, 0.08) 0%, transparent 70%);
}

/* Header - Light theme */
[data-theme="light"] .lisa-header {
    background: rgba(255, 255, 255, 0.6);
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .lisa-header-name {
    color: #0f172a;
}

[data-theme="light"] .lisa-header-subtitle {
    color: #64748b;
}

[data-theme="light"] .lisa-header-status {
    border-color: #f8fafc;
}

[data-theme="light"] .lisa-header-btn {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
    color: #64748b;
}

[data-theme="light"] .lisa-header-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #0f172a;
}

/* Messages - Light theme */
[data-theme="light"] .lisa-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .lisa-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .lisa-message.lisa .lisa-message-content {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    color: #334155;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .lisa-message.lisa .lisa-message-avatar {
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .lisa-message-time {
    color: #94a3b8;
}

/* Typing indicator - Light theme */
[data-theme="light"] .lisa-typing-avatar {
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .lisa-typing-indicator {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .lisa-typing-dot {
    background: #94a3b8;
}

/* Suggestions - Light theme */
[data-theme="light"] .lisa-suggestion {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    color: #475569;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .lisa-suggestion:hover {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1e40af;
}

/* Input area - Light theme */
[data-theme="light"] .lisa-input-area {
    background: rgba(255, 255, 255, 0.8);
    border-top-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .lisa-input-container {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .lisa-input-container:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

[data-theme="light"] .lisa-input {
    color: #0f172a;
}

[data-theme="light"] .lisa-input::placeholder {
    color: #94a3b8;
}

/* Welcome - Light theme */
[data-theme="light"] .lisa-welcome-title {
    color: #0f172a;
}

[data-theme="light"] .lisa-welcome-subtitle {
    color: #64748b;
}

/* Action cards - Light theme */
[data-theme="light"] .lisa-action-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .lisa-action-card-content {
    color: #475569;
}

/* Bubble - Light theme */
[data-theme="light"] .lisa-bubble {
    border-color: #3b82f6;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.2);
}

[data-theme="light"] .lisa-bubble:hover {
    border-color: #2563eb;
    box-shadow: 0 6px 28px rgba(59, 130, 246, 0.3);
}

[data-theme="light"] .lisa-bubble-badge {
    border-color: #f8fafc;
}

/* ============================================
   Widget Container
   ============================================ */
.lisa-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Floating Bubble (Minimized State)
   ============================================ */
.lisa-bubble {
    width: var(--lisa-bubble-size);
    height: var(--lisa-bubble-size);
    border-radius: 50%;
    background: transparent;
    border: 3px solid var(--lisa-blue-accent);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.25);
    cursor: pointer;
    display: block;
    position: relative;
    padding: 0;
    overflow: visible;
    transition: transform var(--lisa-transition), box-shadow var(--lisa-transition);
}

.lisa-bubble:hover {
    transform: scale(1.05);
    border-color: var(--lisa-blue-glow);
    box-shadow: 0 6px 28px rgba(59, 130, 246, 0.4);
}

.lisa-bubble:active {
    transform: scale(0.95);
}

/* Avatar in bubble */
.lisa-bubble-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* Pulse ring animation - subtle */
.lisa-bubble-pulse {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid var(--lisa-blue-accent);
    opacity: 0;
    animation: lisa-pulse 3s ease-out infinite;
    pointer-events: none;
}

@keyframes lisa-pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.6;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

/* Notification badge */
.lisa-bubble-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    background: #ef4444;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: white;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
}

.lisa-bubble-badge:empty {
    display: none;
}

/* Hidden state */
.lisa-bubble.hidden {
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
}

/* ============================================
   Chat Window (Expanded State)
   ============================================ */
.lisa-chat {
    position: absolute;
    bottom: 0;
    right: 0;
    width: var(--lisa-widget-width);
    height: var(--lisa-widget-height);
    max-height: calc(100vh - 100px);
    background: linear-gradient(165deg, var(--lisa-navy) 0%, var(--lisa-navy-deep) 100%);
    border-radius: var(--lisa-border-radius);
    border: 1px solid var(--lisa-glass-border);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    transform: scale(0.8) translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition:
        transform var(--lisa-spring),
        opacity var(--lisa-transition),
        visibility var(--lisa-transition);
}

.lisa-chat.open {
    transform: scale(1) translateY(0);
    opacity: 1;
    visibility: visible;
}

/* Background decoration */
.lisa-chat::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.lisa-chat::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -30%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(30, 58, 138, 0.3) 0%, transparent 70%);
    pointer-events: none;
}

/* ============================================
   Chat Header
   ============================================ */
.lisa-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--lisa-glass-border);
    position: relative;
    z-index: 2;
}

.lisa-header-avatar {
    position: relative;
    flex-shrink: 0;
}

.lisa-header-avatar img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--lisa-blue-accent);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.lisa-header-status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: var(--lisa-success);
    border-radius: 50%;
    border: 2px solid var(--lisa-navy);
    animation: lisa-status-pulse 2s ease-in-out infinite;
}

@keyframes lisa-status-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 0 4px rgba(16, 185, 129, 0); }
}

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

.lisa-header-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--lisa-white);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lisa-header-name span {
    font-size: 11px;
    font-weight: 500;
    color: var(--lisa-blue-soft);
    background: rgba(59, 130, 246, 0.15);
    padding: 2px 8px;
    border-radius: 10px;
}

.lisa-header-subtitle {
    font-size: 13px;
    color: var(--lisa-gray-400);
    margin: 2px 0 0;
}

.lisa-header-actions {
    display: flex;
    gap: 8px;
}

.lisa-header-btn {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--lisa-glass-border);
    color: var(--lisa-gray-400);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--lisa-transition-fast);
}

.lisa-header-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--lisa-white);
    transform: translateY(-1px);
}

.lisa-header-btn svg {
    width: 18px;
    height: 18px;
}

/* ============================================
   Messages Area
   ============================================ */
.lisa-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    z-index: 1;
    scroll-behavior: smooth;
}

/* Custom scrollbar */
.lisa-messages::-webkit-scrollbar {
    width: 6px;
}

.lisa-messages::-webkit-scrollbar-track {
    background: transparent;
}

.lisa-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.lisa-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Message bubble base */
.lisa-message {
    display: flex;
    gap: 10px;
    max-width: 85%;
    animation: lisa-message-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    opacity: 0;
}

@keyframes lisa-message-in {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Lisa's messages (left) */
.lisa-message.lisa {
    align-self: flex-start;
}

.lisa-message.lisa .lisa-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--lisa-glass-border);
}

.lisa-message.lisa .lisa-message-content {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid var(--lisa-glass-border);
    border-radius: var(--lisa-border-radius-sm);
    border-top-left-radius: 4px;
    padding: 14px 16px;
    color: var(--lisa-gray-100);
}

/* User's messages (right) */
.lisa-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.lisa-message.user .lisa-message-content {
    background: linear-gradient(135deg, var(--lisa-blue-accent) 0%, var(--lisa-blue) 100%);
    border-radius: var(--lisa-border-radius-sm);
    border-top-right-radius: 4px;
    padding: 14px 16px;
    color: var(--lisa-white);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.lisa-message-text {
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    font-family: 'DM Sans', sans-serif;
}

.lisa-message-time {
    font-size: 11px;
    color: var(--lisa-gray-500);
    margin-top: 6px;
    display: block;
}

.lisa-message.user .lisa-message-time {
    color: rgba(255, 255, 255, 0.6);
    text-align: right;
}

/* ============================================
   Typing Indicator
   ============================================ */
.lisa-typing {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px 16px;
    opacity: 0;
    transform: translateY(10px);
    transition: all var(--lisa-transition);
    pointer-events: none;
}

.lisa-typing.visible {
    opacity: 1;
    transform: translateY(0);
}

.lisa-typing-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--lisa-glass-border);
}

.lisa-typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid var(--lisa-glass-border);
    border-radius: var(--lisa-border-radius-sm);
    border-top-left-radius: 4px;
}

.lisa-typing-dot {
    width: 8px;
    height: 8px;
    background: var(--lisa-gray-400);
    border-radius: 50%;
    animation: lisa-typing-bounce 1.4s ease-in-out infinite;
}

.lisa-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.lisa-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes lisa-typing-bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
}

/* ============================================
   Quick Actions / Suggestions
   ============================================ */
.lisa-suggestions {
    padding: 0 20px 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lisa-suggestion {
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--lisa-glass-border);
    border-radius: 20px;
    color: var(--lisa-gray-300);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--lisa-transition-fast);
    white-space: nowrap;
}

.lisa-suggestion:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--lisa-blue-accent);
    color: var(--lisa-blue-soft);
    transform: translateY(-2px);
}

.lisa-suggestion:active {
    transform: translateY(0) scale(0.98);
}

/* ============================================
   Input Area
   ============================================ */
.lisa-input-area {
    padding: 16px 20px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--lisa-glass-border);
    position: relative;
    z-index: 2;
}

.lisa-input-container {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--lisa-glass-border);
    border-radius: var(--lisa-border-radius-sm);
    padding: 8px;
    transition: all var(--lisa-transition-fast);
}

.lisa-input-container:focus-within {
    border-color: var(--lisa-blue-accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.lisa-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--lisa-white);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    padding: 8px 12px;
    resize: none;
    min-height: 24px;
    max-height: 120px;
    line-height: 1.5;
}

.lisa-input::placeholder {
    color: var(--lisa-gray-500);
}

.lisa-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--lisa-blue-accent) 0%, var(--lisa-blue) 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--lisa-transition-fast);
    flex-shrink: 0;
}

.lisa-send-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.lisa-send-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.lisa-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.lisa-send-btn svg {
    width: 20px;
    height: 20px;
    transition: transform var(--lisa-transition-fast);
}

.lisa-send-btn:hover:not(:disabled) svg {
    transform: translateX(2px);
}

/* ============================================
   Welcome Message
   ============================================ */
.lisa-welcome {
    text-align: center;
    padding: 30px 20px;
}

.lisa-welcome-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--lisa-blue-accent);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.4);
    margin-bottom: 16px;
    animation: lisa-welcome-float 3s ease-in-out infinite;
}

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

.lisa-welcome-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--lisa-white);
    margin: 0 0 8px;
}

.lisa-welcome-subtitle {
    font-size: 14px;
    color: var(--lisa-gray-400);
    margin: 0 0 24px;
    line-height: 1.6;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 480px) {
    .lisa-widget {
        bottom: 16px;
        right: 16px;
    }

    .lisa-chat {
        width: calc(100vw - 32px);
        height: calc(100vh - 100px);
        max-height: none;
        border-radius: var(--lisa-border-radius-sm);
    }

    .lisa-bubble {
        width: 56px;
        height: 56px;
    }

    .lisa-bubble-avatar {
        width: 40px;
        height: 40px;
    }

    .lisa-messages {
        padding: 16px;
    }

    .lisa-message {
        max-width: 90%;
    }

    .lisa-suggestions {
        padding: 0 16px 12px;
    }

    .lisa-input-area {
        padding: 12px 16px 16px;
    }
}

/* ============================================
   Animations & Effects
   ============================================ */

/* Gradient animation for special messages */
.lisa-message.highlight .lisa-message-content {
    background: linear-gradient(135deg,
        rgba(59, 130, 246, 0.2) 0%,
        rgba(30, 58, 138, 0.2) 50%,
        rgba(59, 130, 246, 0.2) 100%);
    background-size: 200% 200%;
    animation: lisa-gradient-shift 3s ease infinite;
}

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

/* Shimmer loading effect */
.lisa-shimmer {
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 100%);
    background-size: 200% 100%;
    animation: lisa-shimmer 1.5s linear infinite;
}

@keyframes lisa-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Action result cards */
.lisa-action-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--lisa-glass-border);
    border-radius: var(--lisa-border-radius-xs);
    padding: 12px;
    margin-top: 10px;
}

.lisa-action-card-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--lisa-blue-soft);
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lisa-action-card-content {
    font-size: 13px;
    color: var(--lisa-gray-300);
}

.lisa-action-card-link {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--lisa-glass-border);
}

.lisa-action-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #22d3ee;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--lisa-transition-fast);
}

.lisa-action-link:hover {
    color: #67e8f9;
    text-decoration: underline;
}

/* Config link in messages */
.lisa-config-link {
    color: #22d3ee;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--lisa-transition-fast);
}

.lisa-config-link:hover {
    color: #67e8f9;
    text-decoration: underline;
}

[data-theme="light"] .lisa-action-link,
[data-theme="light"] .lisa-config-link {
    color: #0891b2;
}

[data-theme="light"] .lisa-action-link:hover,
[data-theme="light"] .lisa-config-link:hover {
    color: #0e7490;
}

/* Signer items in action card */
.lisa-signer-item {
    display: flex;
    flex-direction: column;
    padding: 10px 12px;
    margin: 8px 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--lisa-glass-border);
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--lisa-transition-fast);
}

.lisa-signer-item:first-child {
    margin-top: 12px;
}

.lisa-signer-item:hover {
    background: rgba(6, 182, 212, 0.15);
    border-color: rgba(6, 182, 212, 0.4);
    transform: translateX(4px);
}

.lisa-signer-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--lisa-white);
}

.lisa-signer-info {
    font-size: 12px;
    color: var(--lisa-gray-400);
    margin-top: 2px;
}

[data-theme="light"] .lisa-signer-item {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .lisa-signer-item:hover {
    background: rgba(6, 182, 212, 0.1);
    border-color: rgba(6, 182, 212, 0.4);
}

[data-theme="light"] .lisa-signer-name {
    color: #0f172a;
}

[data-theme="light"] .lisa-signer-info {
    color: #64748b;
}

/* ============================================
   Print & Reduced Motion
   ============================================ */
@media print {
    .lisa-widget {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lisa-widget *,
    .lisa-widget *::before,
    .lisa-widget *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   Company Setup Card (Onboarding)
   ============================================ */
.lisa-company-setup-card {
    background: linear-gradient(135deg,
        rgba(6, 182, 212, 0.15) 0%,
        rgba(99, 102, 241, 0.1) 100%);
    border: 1px solid rgba(6, 182, 212, 0.25);
    border-radius: 16px;
    padding: 20px;
    margin-top: 16px;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.lisa-setup-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #06b6d4 0%, #6366f1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(6, 182, 212, 0.3);
}

.lisa-setup-icon i {
    font-size: 20px;
    color: white;
}

.lisa-setup-info h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--lisa-white);
    margin: 0 0 6px;
}

.lisa-setup-info p {
    font-size: 13px;
    color: var(--lisa-gray-400);
    margin: 0;
    line-height: 1.5;
}

.lisa-setup-info strong {
    color: #22d3ee;
}

.lisa-setup-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #06b6d4 0%, #6366f1 100%);
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.35);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lisa-setup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(6, 182, 212, 0.45);
}

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

.lisa-setup-btn i {
    font-size: 14px;
}

/* ============================================
   Client Selector (for contract creation)
   ============================================ */
.lisa-client-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.lisa-client-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--lisa-glass-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--lisa-transition-fast);
    text-align: left;
    font-family: inherit;
}

.lisa-client-btn:hover {
    background: rgba(6, 182, 212, 0.15);
    border-color: rgba(6, 182, 212, 0.4);
    transform: translateX(4px);
}

.lisa-client-btn:active {
    transform: translateX(2px) scale(0.98);
}

.lisa-client-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--lisa-white);
}

.lisa-client-email {
    font-size: 12px;
    color: var(--lisa-gray-400);
}

.lisa-add-contact {
    margin-top: 4px;
}

.lisa-no-contacts {
    font-size: 13px;
    color: var(--lisa-gray-400);
    font-style: italic;
    margin: 8px 0;
}

/* Light theme */
[data-theme="light"] .lisa-client-btn {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .lisa-client-btn:hover {
    background: rgba(6, 182, 212, 0.1);
    border-color: rgba(6, 182, 212, 0.4);
}

[data-theme="light"] .lisa-client-name {
    color: #0f172a;
}

[data-theme="light"] .lisa-client-email {
    color: #64748b;
}

[data-theme="light"] .lisa-no-contacts {
    color: #64748b;
}

/* Client confirmed state */
.lisa-client-confirmed {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    margin-top: 8px;
}

.lisa-client-check {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: bold;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.lisa-client-confirmed .lisa-client-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--lisa-white);
}

.lisa-select-signers {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lisa-select-signers i {
    font-size: 12px;
}

[data-theme="light"] .lisa-client-confirmed {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.25);
}

[data-theme="light"] .lisa-client-confirmed .lisa-client-name {
    color: #0f172a;
}

/* ============================================
   Client Selector Popup
   ============================================ */
.lisa-client-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lisa-client-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lisa-client-popup {
    width: 100%;
    max-width: 440px;
    max-height: 80vh;
    background: linear-gradient(165deg, #0f172a 0%, #0a0f1a 100%);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lisa-client-popup-overlay.active .lisa-client-popup {
    transform: scale(1) translateY(0);
}

.lisa-client-popup-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lisa-client-popup-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #06b6d4 0%, #6366f1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(6, 182, 212, 0.3);
}

.lisa-client-popup-icon i {
    font-size: 20px;
    color: white;
}

.lisa-client-popup-title {
    flex: 1;
}

.lisa-client-popup-title h3 {
    font-size: 18px;
    font-weight: 700;
    color: white;
    margin: 0;
}

.lisa-client-popup-title p {
    font-size: 13px;
    color: #94a3b8;
    margin: 4px 0 0;
}

.lisa-client-popup-close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.lisa-client-popup-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.lisa-client-popup-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}

.lisa-client-popup-search {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-bottom: 16px;
}

.lisa-client-popup-search i {
    color: #64748b;
    font-size: 14px;
}

.lisa-client-popup-search input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 14px;
    font-family: inherit;
}

.lisa-client-popup-search input::placeholder {
    color: #64748b;
}

.lisa-client-popup-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lisa-client-popup-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.lisa-client-popup-item:hover {
    background: rgba(6, 182, 212, 0.1);
    border-color: rgba(6, 182, 212, 0.3);
    transform: translateX(4px);
}

.lisa-client-popup-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #1e3a8a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.lisa-client-popup-info {
    flex: 1;
    min-width: 0;
}

.lisa-client-popup-name {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lisa-client-popup-detail {
    display: block;
    font-size: 13px;
    color: #64748b;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lisa-client-popup-arrow {
    color: #475569;
    transition: all 0.2s;
}

.lisa-client-popup-item:hover .lisa-client-popup-arrow {
    color: #06b6d4;
    transform: translateX(4px);
}

.lisa-client-popup-empty {
    text-align: center;
    padding: 40px 20px;
}

.lisa-client-popup-empty i {
    font-size: 48px;
    color: #334155;
    margin-bottom: 16px;
}

.lisa-client-popup-empty p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

.lisa-client-popup-footer {
    padding: 16px 24px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.lisa-client-popup-add {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #06b6d4 0%, #6366f1 100%);
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.35);
    transition: all 0.2s;
}

.lisa-client-popup-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(6, 182, 212, 0.45);
}

.lisa-client-popup-add i {
    font-size: 12px;
}

/* Light theme */
[data-theme="light"] .lisa-client-popup {
    background: linear-gradient(165deg, #f8fafc 0%, #f1f5f9 100%);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .lisa-client-popup-header {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .lisa-client-popup-title h3 {
    color: #0f172a;
}

[data-theme="light"] .lisa-client-popup-title p {
    color: #64748b;
}

[data-theme="light"] .lisa-client-popup-close {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
    color: #64748b;
}

[data-theme="light"] .lisa-client-popup-close:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #0f172a;
}

[data-theme="light"] .lisa-client-popup-search {
    background: white;
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .lisa-client-popup-search input {
    color: #0f172a;
}

[data-theme="light"] .lisa-client-popup-item {
    background: white;
    border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .lisa-client-popup-item:hover {
    background: rgba(6, 182, 212, 0.06);
    border-color: rgba(6, 182, 212, 0.25);
}

[data-theme="light"] .lisa-client-popup-name {
    color: #0f172a;
}

[data-theme="light"] .lisa-client-popup-footer {
    border-top-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .lisa-client-popup-empty i {
    color: #cbd5e1;
}

/* ============================================
   Interactive Buttons (Yes/No)
   ============================================ */
.lisa-interactive-buttons {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    margin-bottom: 8px;
}

.lisa-interactive-buttons button {
    flex: 1;
    padding: 12px 16px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    border: none;
}

.lisa-interactive-buttons button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.lisa-btn-yes {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.35);
}

.lisa-btn-yes:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.45);
}

.lisa-btn-no {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: var(--lisa-gray-300);
}

.lisa-btn-no:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: white;
}

.lisa-interactive-buttons button i {
    font-size: 12px;
}

/* Light theme */
[data-theme="light"] .lisa-btn-no {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1) !important;
    color: #475569;
}

[data-theme="light"] .lisa-btn-no:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.08);
    color: #0f172a;
}
