/* ============================================
           RESUME PAGE — Layout & specific overrides
           ============================================ */
        .resume-page body {
            overflow: hidden;
        }

        /* Activity bar navigation */
        .resume-page .activity-bar .activity-btn.active {
            border-left-color: #10b981;
        }

        /* ---- LEFT SIDEBAR ---- */
        .resume-page .sidebar {
            width: 270px;
            min-width: 180px;
            max-width: 480px;
            padding: 0;
            overflow: hidden;
            border-right: 1px solid var(--border-color);
        }

        /* ---- MIDDLE PANEL (LaTeX editor) ---- */
        .resume-middle {
            flex: 1;
            display: flex;
            flex-direction: column;
            min-width: 0;
            background: var(--bg-main);
            border-right: 1px solid var(--border-color);
            overflow: hidden;
        }

        /* ---- RIGHT PANEL (PDF Preview) ---- */
        .resume-preview-panel {
            width: 40vw;
            min-width: 280px;
            max-width: 1000px;
            display: flex;
            flex-direction: column;
            background: #e5e5e5;
            border-left: 1px solid var(--border-color);
            overflow: hidden;
        }

        .resume-preview-panel.collapsed {
            width: 0 !important;
            min-width: 0 !important;
            display: none;
        }

        /* ---- PREVIEW HEADER ---- */
        .preview-panel-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 12px;
            height: 42px;
            background: var(--bg-panel);
            border-bottom: 1px solid var(--border-color);
            flex-shrink: 0;
            gap: 8px;
        }

        .preview-panel-header .panel-title {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 0.78rem;
            font-weight: 600;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 0.7px;
        }

        /* ---- PDF PREVIEW AREA ---- */
        .pdf-preview-container {
            flex: 1;
            overflow: auto;
            background: #ccc;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 16px;
            gap: 12px;
        }

        /* A4 page simulation */
        .pdf-page-sim {
            width: 100%;
            max-width: 794px;
            background: #ffffff;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
            border-radius: 2px;
            padding: 0;
            position: relative;
            overflow: hidden;
            /* Let the injected SVG dictate the height to maintain proper aspect ratio on mobile */
            height: auto;
        }

        /* ---- CHAT PANEL (left sidebar panel) ---- */
        .resume-chat-feed {
            flex: 1;
            overflow-y: auto;
            padding: 12px;
            display: flex;
            flex-direction: column;
            gap: 10px;
            scrollbar-width: thin;
            scrollbar-color: var(--border-color) transparent;
        }

        .resume-chat-feed::-webkit-scrollbar {
            width: 4px;
        }

        .resume-chat-feed::-webkit-scrollbar-thumb {
            background: var(--border-color);
            border-radius: 4px;
        }

        .chat-bubble {
            display: flex;
            flex-direction: column;
            gap: 4px;
            max-width: 100%;
            animation: fadeInUp 0.2s ease;
        }

        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(6px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .chat-bubble.user .bubble-body {
            background: rgba(99, 102, 241, 0.15);
            border: 1px solid rgba(99, 102, 241, 0.3);
            border-radius: 10px 10px 2px 10px;
            align-self: flex-end;
        }

        .chat-bubble.assistant .bubble-body {
            background: var(--bg-input);
            border: 1px solid var(--border-color);
            border-radius: 2px 10px 10px 10px;
        }

        /* Thought / search bubble for resume page */
        .chat-bubble.thought .bubble-body {
            background: rgba(245, 158, 11, 0.07);
            border: 1px solid rgba(245, 158, 11, 0.25);
            border-radius: 2px 10px 10px 10px;
            color: var(--text-secondary);
            font-style: italic;
        }

        /* Search results card in resume chat */
        .search-results-card {
            background: var(--bg-input);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 10px;
            font-style: normal;
        }

        .search-results-header {
            font-size: 0.72rem;
            font-weight: 600;
            color: var(--text-secondary);
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .search-result-item {
            margin-bottom: 8px;
            padding-bottom: 8px;
            border-bottom: 1px solid var(--border-color);
        }

        .search-result-item:last-child {
            margin-bottom: 0;
            padding-bottom: 0;
            border-bottom: none;
        }

        .search-result-title {
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--accent-primary);
            text-decoration: none;
            display: block;
            margin-bottom: 2px;
        }

        .search-result-title:hover { text-decoration: underline; }

        .search-result-snippet {
            font-size: 0.72rem;
            color: var(--text-secondary);
            margin: 0;
            line-height: 1.4;
            font-style: normal;
        }

        .bubble-body {
            padding: 9px 12px;
            font-size: 0.8rem;
            line-height: 1.55;
            color: var(--text-primary);
        }

        .bubble-meta {
            font-size: 0.68rem;
            color: var(--text-secondary);
            padding: 0 4px;
        }

        .chat-bubble.user .bubble-meta {
            text-align: right;
        }

        /* AI thinking dots */
        .thinking-dots {
            display: inline-flex;
            gap: 4px;
            align-items: center;
            height: 18px;
        }

        .thinking-dots span {
            width: 5px;
            height: 5px;
            border-radius: 50%;
            background: var(--accent-primary);
            animation: dotPulse 1.2s infinite;
        }

        .thinking-dots span:nth-child(2) {
            animation-delay: 0.2s;
        }

        .thinking-dots span:nth-child(3) {
            animation-delay: 0.4s;
        }

        @keyframes dotPulse {

            0%,
            80%,
            100% {
                opacity: 0.2;
                transform: scale(0.8);
            }

            40% {
                opacity: 1;
                transform: scale(1);
            }
        }

        /* ---- RESUME SPECIFIC OVERRIDES ---- */
        .resume-page .btn-chat-send {
            background: linear-gradient(135deg, #10b981, #059669);
        }

        .resume-page .btn-chat-send:hover:not(:disabled) {
            box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
        }

        .resume-input-hint {
            font-size: 0.68rem;
            color: var(--text-secondary);
            opacity: 0.7;
        }

        /* ---- PROJECTS PANEL ---- */
        .project-list {
            flex: 1;
            overflow-y: auto;
            padding: 8px;
            display: flex;
            flex-direction: column;
            gap: 6px;
            scrollbar-width: thin;
        }

        .project-item {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 9px 10px;
            border-radius: 8px;
            border: 1px solid var(--border-color);
            background: var(--bg-input);
            cursor: pointer;
            transition: all 0.15s;
            position: relative;
        }

        .project-item:hover {
            border-color: rgba(99, 102, 241, 0.4);
            background: rgba(99, 102, 241, 0.06);
        }

        .project-item.active {
            border-color: var(--accent-primary);
            background: rgba(99, 102, 241, 0.1);
        }

        .project-item-icon {
            width: 28px;
            height: 28px;
            border-radius: 6px;
            background: rgba(16, 185, 129, 0.15);
            border: 1px solid rgba(16, 185, 129, 0.25);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            color: #10b981;
            font-size: 0.7rem;
        }

        .project-item-info {
            flex: 1;
            min-width: 0;
        }

        .project-item-name {
            font-size: 0.8rem;
            font-weight: 600;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .project-item-date {
            font-size: 0.68rem;
            color: var(--text-secondary);
            margin-top: 2px;
        }

        .project-item-actions {
            display: flex;
            gap: 4px;
            opacity: 0;
            transition: opacity 0.15s;
        }

        .project-item:hover .project-item-actions {
            opacity: 1;
        }

        .project-action-btn {
            background: none;
            border: none;
            color: var(--text-secondary);
            cursor: pointer;
            padding: 3px 5px;
            border-radius: 4px;
            font-size: 0.7rem;
            transition: color 0.15s, background 0.15s;
        }

        .project-action-btn:hover {
            color: var(--text-primary);
            background: rgba(255, 255, 255, 0.08);
        }

        .project-action-btn.danger:hover {
            color: var(--status-error);
        }

        .empty-projects {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 32px 16px;
            color: var(--text-secondary);
            text-align: center;
        }

        .empty-projects i {
            font-size: 1.8rem;
            opacity: 0.3;
            margin-bottom: 4px;
        }

        .empty-projects p {
            font-size: 0.78rem;
            line-height: 1.5;
        }

        /* new project btn in header */
        .new-proj-btn {
            background: none;
            border: none;
            color: var(--text-secondary);
            cursor: pointer;
            font-size: 0.75rem;
            padding: 3px 6px;
            border-radius: 4px;
            transition: color 0.15s, background 0.15s;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .new-proj-btn:hover {
            color: var(--text-primary);
            background: var(--bg-input);
        }

        /* ---- EDITOR AREA ---- */
        .resume-editor-wrap {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            position: relative;
        }

        .latex-editor-container {
            flex: 1;
            min-height: 0;
        }

        /* Ace editor fill */
        #latexEditor {
            width: 100%;
            height: 100%;
            font-size: 13px;
            line-height: 1.6;
        }

        /* ---- STATUS BAR (bottom of editor) ---- */
        .editor-statusbar {
            height: 22px;
            display: flex;
            align-items: center;
            padding: 0 12px;
            gap: 14px;
            font-size: 0.68rem;
            color: var(--text-secondary);
            background: #0f0f12;
            border-top: 1px solid var(--border-color);
            flex-shrink: 0;
        }

        .editor-statusbar .sb-item {
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .statusbar-badge {
            background: rgba(16, 185, 129, 0.2);
            border: 1px solid rgba(16, 185, 129, 0.3);
            color: #10b981;
            font-size: 0.62rem;
            font-weight: 700;
            padding: 1px 6px;
            border-radius: 10px;
        }

        /* ---- COMPILE / PREVIEW STATE ---- */
        .preview-loading {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 10px;
            padding: 48px 24px;
            color: var(--text-secondary);
            font-size: 0.75rem;
            text-align: center;
        }

        .preview-loading i {
            font-size: 2rem;
            opacity: 0.4;
        }

        /* compile badge */
        .compile-badge {
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: 0.68rem;
            font-weight: 600;
            padding: 2px 8px;
            border-radius: 10px;
        }

        .compile-badge.ok {
            background: rgba(16, 185, 129, 0.15);
            color: #10b981;
            border: 1px solid rgba(16, 185, 129, 0.3);
        }

        .compile-badge.err {
            background: rgba(239, 68, 68, 0.15);
            color: #ef4444;
            border: 1px solid rgba(239, 68, 68, 0.3);
        }

        .compile-badge.idle {
            background: var(--bg-input);
            color: var(--text-secondary);
            border: 1px solid var(--border-color);
        }

        .compile-badge.compiling {
            background: rgba(245, 158, 11, 0.12);
            color: #f59e0b;
            border: 1px solid rgba(245, 158, 11, 0.25);
        }

        /* ---- WELCOME BANNER ---- */
        .resume-welcome {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 10px;
            padding: 20px 14px 14px;
            text-align: center;
            border-bottom: 1px solid var(--border-color);
            flex-shrink: 0;
        }

        .resume-welcome-icon {
            width: 40px;
            height: 40px;
            border-radius: 10px;
            background: rgba(16, 185, 129, 0.12);
            border: 1px solid rgba(16, 185, 129, 0.25);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.1rem;
            color: #10b981;
        }

        .resume-welcome h3 {
            font-size: 0.85rem;
            font-weight: 700;
            color: var(--text-primary);
        }

        .resume-welcome p {
            font-size: 0.75rem;
            color: var(--text-secondary);
            line-height: 1.5;
        }

        /* quick fill chips */
        .quick-chips {
            display: flex;
            flex-wrap: wrap;
            gap: 5px;
            padding: 0 12px 10px;
            flex-shrink: 0;
        }

        .quick-chip {
            background: var(--bg-input);
            border: 1px solid var(--border-color);
            color: var(--text-secondary);
            font-size: 0.7rem;
            padding: 4px 9px;
            border-radius: 20px;
            cursor: pointer;
            transition: all 0.15s;
            white-space: nowrap;
            display: inline-flex;
            align-items: center;
            gap: 5px;
        }

        .quick-chip:hover {
            border-color: #10b981;
            color: #10b981;
            background: rgba(16, 185, 129, 0.07);
        }

        /* Active-template status chip (chat panel) */
        .active-template-chip {
            display: flex;
            align-items: center;
            gap: 6px;
            margin: 10px 12px 4px;
            padding: 6px 10px;
            background: var(--bg-input);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            font-size: 0.72rem;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.15s;
            flex-shrink: 0;
        }

        .active-template-chip:hover {
            border-color: #10b981;
            color: #10b981;
        }

        .active-template-chip strong {
            color: var(--text-primary);
            font-weight: 600;
        }

        .active-template-chip:hover strong {
            color: #10b981;
        }

        .active-template-chip span {
            flex: 1;
        }

        /* Templates tab — gallery of selectable template cards */
        .template-gallery {
            display: flex;
            flex-direction: column;
            gap: 12px;
            padding: 12px;
            overflow-y: auto;
        }

        .template-card {
            display: flex;
            flex-direction: column;
            background: var(--bg-input);
            border: 1.5px solid var(--border-color);
            border-radius: 12px;
            cursor: pointer;
            text-align: left;
            padding: 0;
            overflow: hidden;
            transition: all 0.15s;
            font-family: inherit;
        }

        .template-card:hover {
            border-color: #10b981;
        }

        .template-card.active {
            border-color: #10b981;
            box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.25);
        }

        .template-card-preview {
            background: #ffffff;
            padding: 14px 16px;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        /* --- Template 1 mock preview: classic serif --- */
        .template-preview-1 .tp-name {
            width: 46%;
            height: 8px;
            margin: 0 auto 3px;
            background: #1a1a1a;
            border-radius: 1px;
        }

        .template-preview-1 .tp-contact {
            width: 70%;
            height: 3px;
            margin: 0 auto 6px;
            background: #9ca3af;
            border-radius: 1px;
        }

        .template-preview-1 .tp-rule {
            display: none;
        }

        .template-preview-1 .tp-heading {
            width: 32%;
            height: 5px;
            margin-top: 4px;
            background: #1a1a1a;
            border-radius: 1px;
            position: relative;
        }

        .template-preview-1 .tp-heading::after {
            content: "";
            position: absolute;
            left: 0;
            top: 7px;
            width: 220%;
            max-width: 100%;
            height: 1px;
            background: #1a1a1a;
        }

        .template-preview-1 .tp-line {
            width: 92%;
            height: 3px;
            background: #d1d5db;
            border-radius: 1px;
        }

        .template-preview-1 .tp-line.short {
            width: 60%;
        }

        /* --- Template 2 mock preview: modern accent --- */
        .template-preview-2 .tp-name {
            width: 46%;
            height: 8px;
            margin: 0 auto 3px;
            background: #1a1a1a;
            border-radius: 1px;
        }

        .template-preview-2 .tp-contact {
            width: 70%;
            height: 3px;
            margin: 0 auto 6px;
            background: #1a56db;
            opacity: 0.6;
            border-radius: 1px;
        }

        .template-preview-2 .tp-accent-rule {
            width: 100%;
            height: 2px;
            background: #1a56db;
            margin-bottom: 4px;
        }

        .template-preview-2 .tp-heading-accent {
            width: 32%;
            height: 5px;
            margin-top: 4px;
            background: #1a56db;
            border-radius: 1px;
            position: relative;
        }

        .template-preview-2 .tp-heading-accent::after {
            content: "";
            position: absolute;
            left: 0;
            top: 7px;
            width: 220%;
            max-width: 100%;
            height: 1px;
            background: #d1d5db;
        }

        .template-preview-2 .tp-line {
            width: 92%;
            height: 3px;
            background: #d1d5db;
            border-radius: 1px;
        }

        .template-preview-2 .tp-line.short {
            width: 60%;
        }

        .template-card-body {
            padding: 10px 12px 12px;
        }

        .template-card-title {
            display: flex;
            align-items: center;
            gap: 7px;
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 4px;
        }

        .template-card-title i:first-child {
            color: #10b981;
        }

        .template-card-selected-icon {
            margin-left: auto;
            color: #10b981;
            opacity: 0;
            transition: opacity 0.15s;
        }

        .template-card.active .template-card-selected-icon {
            opacity: 1;
        }

        .template-card-body p {
            font-size: 0.72rem;
            color: var(--text-secondary);
            line-height: 1.4;
            margin: 0;
        }

        /* panel-header override — green accent for resume */
        .resume-page .panel-header {
            border-bottom: 1px solid var(--border-color);
        }

        /* Rename modal */
        .rename-modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(4px);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1000;
        }

        .rename-modal {
            background: var(--bg-panel);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            padding: 20px 24px;
            min-width: 300px;
            display: flex;
            flex-direction: column;
            gap: 14px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
        }

        .rename-modal h4 {
            font-size: 0.9rem;
            color: var(--text-primary);
        }

        .rename-modal input {
            background: var(--bg-input);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            color: var(--text-primary);
            font-family: var(--font-ui);
            font-size: 0.85rem;
            padding: 9px 12px;
            outline: none;
            width: 100%;
            transition: border-color 0.2s;
        }

        .rename-modal input:focus {
            border-color: var(--accent-primary);
        }

        .rename-modal-btns {
            display: flex;
            gap: 8px;
            justify-content: flex-end;
        }

        .btn-modal-cancel, .btn-modal-save, .btn-modal-delete {
            border: none;
            border-radius: 6px;
            font-size: 0.8rem;
            font-weight: 600;
            padding: 8px 16px;
            cursor: pointer;
            transition: all 0.15s;
        }

        .btn-modal-cancel {
            background: var(--bg-input);
            color: var(--text-secondary);
        }

        .btn-modal-cancel:hover {
            color: var(--text-primary);
        }

        .btn-modal-save {
            background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
            color: white;
        }

        .btn-modal-save:hover {
            opacity: 0.9;
        }

        .btn-modal-delete {
            background: #ef4444;
            color: white;
        }
        
        .btn-modal-delete:hover {
            opacity: 0.9;
        }
        @media (max-width: 1024px) {
            .resume-page .activity-bar {
                display: none !important;
            }

            /* Buttons only meaningful on desktop — hidden on mobile */
            .desktop-only {
                display: none !important;
            }

            /* 3-dot project menu: always visible on mobile (no hover on touch screens) */
            .resume-page .project-item-actions {
                opacity: 1 !important;
            }

            /* Make project-action-btn slightly larger for touch targets */
            .resume-page .project-action-btn {
                padding: 5px 8px !important;
                font-size: 0.8rem !important;
            }

            /* Body: always hidden overflow on resume page to prevent scroll behind fullscreen panels */
            body {
                overflow: hidden !important;
            }

            /* LEFT PANEL (sidebar-section) — flex column to fill height, input area pinned to bottom.
               NOTE: display is intentionally NOT overridden here — JS controls it via inline style */
            .resume-page .sidebar-section {
                flex: 1 !important;
                max-height: none !important;
                flex-direction: column !important;
                overflow: hidden !important;
            }

            /* When JS sets display:flex on the active panel, ensure it fills the height */
            .resume-page .sidebar-section[style*="flex"] {
                height: 100% !important;
            }

            /* Chat feed takes all available space */
            .resume-page .resume-chat-feed {
                flex: 1 !important;
                min-height: 0 !important;
                overflow-y: auto !important;
            }

            /* Input area always at the bottom — safe-area for home bar phones */
            .resume-page .resume-input-area {
                flex-shrink: 0 !important;
                padding-bottom: max(14px, env(safe-area-inset-bottom)) !important;
            }

            /* Editor statusbar safe-area padding */
            .resume-page .editor-statusbar {
                padding-bottom: max(0px, env(safe-area-inset-bottom));
            }

            /* Welcome banner and chips shrink if needed */
            .resume-page .resume-welcome {
                flex-shrink: 0;
            }

            .resume-page .quick-chips {
                flex-shrink: 0;
            }
        }

        @media (max-width: 640px) {
            /* Hide text labels on action buttons */
            .resume-page .btn-label {
                display: none !important;
            }

            .resume-page .action-btn {
                padding: 6px 8px;
                font-size: 0.75rem;
            }

            .resume-page .panel-title {
                font-size: 0.75rem;
            }
        }

        /* --- Project Action 3-Dot Context Menu --- */
        .project-ctx-menu {
            position: relative;
            display: flex;
            align-items: center;
        }

        /* Base custom-options class is inherited from style.css, override positioning and visibility */
        .custom-options.project-options {
            top: 100%;
            right: 0;
            left: auto;
            width: 150px;
            opacity: 0;
            visibility: hidden;
            transform: translateY(5px);
            transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            z-index: 1000;
        }

        /* Show dropdown on hover */
        .project-ctx-menu:hover .project-options {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        /* Make sure option text wraps/truncates nicely if needed, and icons align */
        .project-options .custom-option {
            padding: 10px 12px;
            font-size: 0.78rem;
            gap: 10px;
        }

        .project-options .custom-option i {
            width: 14px;
            text-align: center;
            color: var(--text-secondary);
        }

        .project-options .custom-option:hover i {
            color: var(--text-primary);
        }

        /* Danger option specific hover */
        .project-options .custom-option.danger:hover {
            color: var(--status-error);
            background-color: rgba(239, 68, 68, 0.1);
        }

        .project-options .custom-option.danger:hover i {
            color: var(--status-error);
        }


/* Fix overflow for Templates activity button */
#ab-templates span {
    font-size: 0.60rem;
    letter-spacing: -0.3px;
}

        .template-card-title span {
            flex: 1;
            white-space: normal;
            word-wrap: break-word;
            line-height: 1.2;
        }

/* Mobile Accept/Reject Toast Notification */
.mobile-confirm-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    animation: slideUpToast 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.mobile-confirm-toast .toast-msg {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-confirm-toast .toast-actions {
    display: flex;
    gap: 10px;
}

@keyframes slideUpToast {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* ============================================
   RESUME — Interactive Questionnaire Bubble
   ============================================ */

@keyframes qFadeSlide {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.q-card {
    animation: qFadeSlide 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 10px;
    padding: 12px 14px;
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.q-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.q-card-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    flex: 1;
}

.q-progress {
    font-size: 0.68rem;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 20px;
    padding: 2px 8px;
    white-space: nowrap;
    font-weight: 600;
    flex-shrink: 0;
}

.q-input-row {
    display: flex;
    gap: 6px;
    align-items: stretch;
}

.q-input {
    flex: 1;
    background: var(--bg-input, rgba(255,255,255,0.05));
    border: 1px solid var(--border-color, rgba(255,255,255,0.1));
    border-radius: 7px;
    color: var(--text-primary);
    font-family: var(--font-ui, 'Inter', sans-serif);
    font-size: 0.82rem;
    padding: 7px 10px;
    outline: none;
    transition: border-color 0.2s;
    min-width: 0;
    resize: none;
    line-height: 1.4;
}

.q-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.12);
}

.q-input::placeholder {
    color: var(--text-muted, rgba(255,255,255,0.3));
}

.q-btn-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}

.q-btn {
    border: none;
    border-radius: 6px;
    font-size: 0.73rem;
    font-weight: 600;
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    font-family: var(--font-ui, 'Inter', sans-serif);
    line-height: 1.2;
}

.q-btn.send {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    flex: 1;
}

.q-btn.send:hover { opacity: 0.88; transform: translateY(-1px); }

.q-btn.skip {
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary);
    border: 1px solid rgba(255,255,255,0.1);
}

.q-btn.skip:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
}

.q-btn.ai-fill {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
}

.q-btn.ai-fill:hover { opacity: 0.88; transform: translateY(-1px); }

.q-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.q-answered-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: #10b981;
    padding: 4px 8px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    margin-top: 4px;
    animation: qFadeSlide 0.2s ease both;
}

.q-answered-badge.skipped {
    color: var(--text-secondary);
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
}

.q-answered-badge.ai {
    color: #8b5cf6;
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
}

/* Disabled state for answered cards */
.q-card.answered .q-input-row,
.q-card.answered .q-actions {
    display: none;
}

/* Spinner inside send button */
.q-btn-spinner {
    width: 10px;
    height: 10px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: white;
    border-radius: 50%;
    display: inline-block;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Field-specific extra questions wrapper */
.q-extra-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: -4px;
    padding: 4px 2px 0;
    border-top: 1px solid rgba(255,255,255,0.06);
}

@media (max-width: 640px) {
    .q-card { padding: 10px 11px; }
    .q-btn { font-size: 0.7rem; padding: 5px 8px; }
    .q-card-title { font-size: 0.8rem; }
}